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

assert()'s are left in compiled code in RelWithDebInfo configs with CMake prior to v2.8.10

    XMLWordPrintable

Details

    Description

      There is a quirk in some CMake versions: they do not add -DNDEBUG compiler flag to RelWithDebInfo configurations. That leave assert() checks enabled in such builds, which may be not what users expect.

      CMake changed their RelWithDebInfo default flags to include -DNDEBUG in 0ddfc51f, which is included in v2.8.10 and later versions. However, since minimal CMake version required to build MariaDB 10.2 is 2.8.5, some build configurations may be affected. MariaDB 10.5 bumped its CMake requirements to 2.8.7, which is still affected.

      Windows builds are likely unaffected, as /D NDEBUG were already in b6466061, which is included in v2.4.0 and later versions.

      To fix that, one need to either:
      1) add -DNDEBUG to RelWithDebInfo flags; or
      2) bump required CMake version to 2.8.10.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rinat.ibragimov Rinat Ibragimov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.