Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Done
    • 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
    • N/A
    • Optimizer

    Description

      According to marko, running tests under UBSAN produces a lot of runtime failures relating to the optimizer (example output attached)

      We need to take these apart and fix them.

      How to reproduce:

      cmake -DWITH_UBSAN=ON

      ...
      run mtr like so

      UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 ./mtr alias
      

      Attachments

        Issue Links

          Activity

            Roel, do you have evidence that both WITH_ASAN and WITH_UBSAN can really be enabled simultaneously? I thought that the various -fsanitize= options are mutually exclusive. How does the actual compiler invocation look like?

            I believe that -fsanitize=undefined is a little different from the others, until all flagged errors have been fixed. When it comes to WITH_ASAN, we should be clean, and aborting on the first error makes perfect sense. For WITH_MSAN we are almost there (see MDEV-20377) and might consider running with MSAN_OPTIONS=abort_on_error=1, but for WITH_UBSAN and especially WITH_TSAN I am afraid that we still have a long way to go. It might help to file more WITH_UBSAN bugs.

            marko Marko Mäkelä added a comment - Roel , do you have evidence that both WITH_ASAN and WITH_UBSAN can really be enabled simultaneously? I thought that the various -fsanitize= options are mutually exclusive. How does the actual compiler invocation look like? I believe that -fsanitize=undefined is a little different from the others, until all flagged errors have been fixed. When it comes to WITH_ASAN , we should be clean, and aborting on the first error makes perfect sense. For WITH_MSAN we are almost there (see MDEV-20377 ) and might consider running with MSAN_OPTIONS=abort_on_error=1 , but for WITH_UBSAN and especially WITH_TSAN I am afraid that we still have a long way to go. It might help to file more WITH_UBSAN bugs.

            It seems from testing thus far that combined ASAN+UBSAN builds work fine. Combining with TSAN does not work. So now using combined ASAN+UBSAN builds and TSAN builds.

            Roel Roel Van de Paar added a comment - It seems from testing thus far that combined ASAN+UBSAN builds work fine. Combining with TSAN does not work. So now using combined ASAN+UBSAN builds and TSAN builds.

            cmake -DWITH_UBSAN=ON with clang detects more UB than GCC. Recent examples: MDEV-33158, MDEV-33159, MDEV-33160, MDEV-33161.

            marko Marko Mäkelä added a comment - cmake -DWITH_UBSAN=ON with clang detects more UB than GCC. Recent examples: MDEV-33158 , MDEV-33159 , MDEV-33160 , MDEV-33161 .
            danblack Daniel Black added a comment - main.myisampack confirmed with https://bugzilla.opensuse.org/show_bug.cgi?id=1209354
            danblack Daniel Black added a comment -

            Closing this for now, it wasn't specific and there are a lot of other specific bugs reported now.

            danblack Daniel Black added a comment - Closing this for now, it wasn't specific and there are a lot of other specific bugs reported now.

            People

              psergei Sergei Petrunia
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.