[MDEV-23577] assert()'s are left in compiled code in RelWithDebInfo configs with CMake prior to v2.8.10 Created: 2020-08-25  Updated: 2020-08-28

Status: Open
Project: MariaDB Server
Component/s: Compiling, Storage Engine - InnoDB
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Rinat Ibragimov (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 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.


Generated at Thu Feb 08 09:23:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.