Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-20277

Disable -fno-strict-aliasing

    XMLWordPrintable

Details

    Description

      -fno-strict-aliasing was added in https://github.com/mariadb/server/commit/c192be206ae36398804b473f7b0e4ee4431b71da

      Basically it removes some optimizations: https://godbolt.org/z/dzgsVJ

      Violating aliasing rules is UB: https://blog.regehr.org/archives/1520

      Some cases can be found with UBSAN's check -fsanitize=alignment Something can be caught by compiler itself: https://jira.mariadb.org/browse/MDEV-19386

      So instead of violating C/C++ ISO standards and having less optimizations it's better to honour type system an have more optimizations.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              kevg Eugene Kosov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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