Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
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
- includes
-
MDEV-20454 Disable -fno-strict-aliasing for InnoDB
- Open
- relates to
-
MDEV-21981 Replace arithmetic + with bitwise OR when possible
- Closed
-
MDEV-19386 Broken strict-aliasing rules in /storage/maria/ma_recovery.c prevents from bulding
- Open