]> git.ipfire.org Git - thirdparty/gcc.git/commit
asan: Fix missing FakeStack flag cleanup
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 7 Jan 2025 23:17:07 +0000 (00:17 +0100)
committerIlya Leoshkevich <iii@linux.ibm.com>
Sun, 26 Jan 2025 18:03:46 +0000 (19:03 +0100)
commit13d971601175541146fda54682cde4d3f9cd2759
tree03334915907e9f98843b330faa7902d5d05fe2d0
parent50fb72d62ccf89a89a09f885014d990770c727d7
asan: Fix missing FakeStack flag cleanup

The FakeStack flag is not zeroed out when can_store_by_pieces()
returns false.  Over time, this causes FakeStack::Allocate() to perform
the maximum number of loop iterations, significantly slowing down the
instrumented program.

Link: https://inbox.sourceware.org/gcc-patches/20250109001702.154685-1-iii@linux.ibm.com/
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
gcc/ChangeLog:

* asan.cc (asan_emit_stack_protection): Always zero the flag
unless it is cleared by the __asan_stack_free_N() libcall.
gcc/asan.cc