Details

    Description

      As noted in MDEV-20377, MemorySanitizer (cmake -DWITH_MSAN=ON) requires that all libraries be instrumented, with the possible exception of libc. Currently, libmariadb insists on linking with GNUTLS instead of WolfSSL, which we can easily build ourselves by specifying -DWITH_SSL=bundled.

      An instrumented library is a must-have for WITH_MSAN builds, and it would also improve the coverage of other sanitizers (WITH_ASAN, WITH_UBSAN, WITH_TSAN).

      Because libmariadb is normally licensed under the GNU LGPL version 2, which WolfSSL is believed to be incompatible with, we could consider introducing some configuration parameter, similar to the existing cmake flag NOT_FOR_DISTRIBUTION. That flag is already being used in cmake/readline.cmake and cmake/aws_sdk.cmake. However, its purpose appears to allow something GPLv2 incompatible to be built, while here the result should still be GPLv2 compatible while being LGPLv2 incompatible. Perhaps the option should be called NOT_LGPL or similar, and it should apply to Connector/C only, not to the MariaDB server?

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Description As noted in MDEV-20377, MemorySanitizer ({{cmake -DWITH_MSAN=ON}}) requires that all libraries be instrumented, with the possible exception of {{libc}}. Currently, {{libmariadb}} insists on linking with GNUTLS instead of WolfSSL, which we can easily build ourselves by specifying {{-DWITH_SSL=bundled}}.

            An instrumented library is a must-have for {{WITH_MSAN}} builds, and it would also improve the coverage of other sanitizers ({{WITH_ASAN}}, {{WITH_UBSAN}}, {{WITH_TSAN}}).
            As noted in MDEV-20377, MemorySanitizer ({{cmake -DWITH_MSAN=ON}}) requires that all libraries be instrumented, with the possible exception of {{libc}}. Currently, {{libmariadb}} insists on linking with GNUTLS instead of WolfSSL, which we can easily build ourselves by specifying {{-DWITH_SSL=bundled}}.

            An instrumented library is a must-have for {{WITH_MSAN}} builds, and it would also improve the coverage of other sanitizers ({{WITH_ASAN}}, {{WITH_UBSAN}}, {{WITH_TSAN}}).

            Because {{libmariadb}} is normally licensed under the GNU LGPL version 2, which WolfSSL is believed to be incompatible with, we could consider introducing some configuration parameter, similar to the existing {{cmake}} flag {{NOT_FOR_DISTRIBUTION}}. That flag is already being used in {{cmake/readline.cmake}} and {{cmake/aws_sdk.cmake}}. However, its purpose appears to allow something GPLv2 incompatible to be built, while here the result should still be GPLv2 compatible while being LGPLv2 incompatible. Perhaps the option should be called {{NOT_LGPL}} or similar, and it should apply to Connector/C only, not to the MariaDB server?
            serg Sergei Golubchik made changes -
            Assignee Vladislav Vaintroub [ wlad ]
            julien.fritsch Julien Fritsch made changes -
            marko Marko Mäkelä made changes -
            otto Otto Kekäläinen made changes -
            julien.fritsch Julien Fritsch made changes -
            Assignee Sergei Golubchik [ serg ]
            marko Marko Mäkelä made changes -
            julien.fritsch Julien Fritsch made changes -
            julien.fritsch Julien Fritsch made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            serg Sergei Golubchik made changes -
            Priority Critical [ 2 ] Major [ 3 ]
            julien.fritsch Julien Fritsch made changes -
            Component/s CI [ 15611 ]
            Component/s Compiling [ 11001 ]
            Fix Version/s 10.4 [ 23138 ]
            Fix Version/s 10.5 [ 24012 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Key MDEV-22083 TODO-2757
            Affects Version/s 10.4 [ 23138 ]
            Affects Version/s 10.5 [ 24012 ]
            Affects Version/s 10.4 [ 22408 ]
            Affects Version/s 10.5 [ 23123 ]
            Workflow MariaDB v3 [ 106330 ] Simple workflow [ 118726 ]
            Issue Type Bug [ 1 ] Task [ 3 ]
            Project MariaDB Server [ 10000 ] Dev todo [ 10100 ]
            julien.fritsch Julien Fritsch made changes -
            Component/s compiling [ 16810 ]
            danblack Daniel Black made changes -
            Assignee Sergei Golubchik [ serg ] Daniel Black [ danblack ]
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Assignee Daniel Black [ danblack ] Sergei Golubchik [ serg ]
            Roel Roel Van de Paar made changes -
            Comment [ A comment with security level 'Developers' was removed. ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Vicențiu Ciorbaru [ cvicentiu ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Summary Allow libmariadb to be built with WolfSSL when WITH_SSL=bundled Make libmariadb run under MSAN
            marko Marko Mäkelä made changes -
            Assignee Vicențiu Ciorbaru [ cvicentiu ] Marko Mäkelä [ marko ]
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            Component/s libmariadb [ 14006 ]
            Component/s CI [ 15611 ]
            Component/s compiling [ 16810 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.4 [ 23138 ]
            Fix Version/s 10.5 [ 24012 ]
            Key TODO-2757 MDEV-26758
            Affects Version/s 10.4 [ 23138 ]
            Affects Version/s 10.5 [ 24012 ]
            Workflow Simple workflow [ 118726 ] MariaDB v3 [ 125911 ]
            Project Dev todo [ 10100 ] MariaDB Server [ 10000 ]
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2021-10-04 16:53:58.0 2021-10-04 16:53:58.628
            marko Marko Mäkelä made changes -
            Fix Version/s 10.5.13 [ 26026 ]
            Fix Version/s 10.6.5 [ 26034 ]
            Fix Version/s 10.7.1 [ 26120 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 125911 ] MariaDB v4 [ 134227 ]

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.