Skip to content
Snippets Groups Projects
Commit 511d89f0 authored by Danylo Piliaiev's avatar Danylo Piliaiev :flag_ua: Committed by Eric Engestrom
Browse files

meson: Disable GCC's dead store elimination for memory zeroing custom new

Some classes use custom new operator which zeroes memory, however gcc does
aggressive dead-store elimination which threats all writes to the memory
before the constructor as "dead stores".

For now we disable this optimization.

The new operators in question are declared via:
 DECLARE_RZALLOC_CXX_OPERATORS
 DECLARE_LINEAR_ZALLOC_CXX_OPERATORS

The issue was found with lto builds, however there is no guarantee that
it didn't happen with ordinary ones.

CC: <mesa-stable@lists.freedesktop.org>
Closes: mesa/mesa#2977
Closes: mesa/mesa#1358


Signed-off-by: default avatarDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Part-of: <mesa/mesa!5104>
(cherry picked from commit 5500a2b7)
parent fc0124c7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment