https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94910
Bug ID: 94910 Summary: detect_stack_use_after_return=1 is much slower than clang's Product: gcc Version: 9.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: rafael at espindo dot la CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org Target Milestone: --- The test I am using is from https://github.com/scylladb/seastar/. It can be build with $ cmake -DCMAKE_BUILD_TYPE=Debug -GNinja <src> $ ninja tests/unit/chunked_fifo_test And can be run with: Clang: $ time ASAN_OPTIONS=detect_stack_use_after_return=1 ./tests/unit/chunked_fifo_test -t chunked_fifo_big ... 1.80s user 0.02s system 99% cpu 1.826 total $ time ASAN_OPTIONS=detect_stack_use_after_return=0 ./tests/unit/chunked_fifo_test -t chunked_fifo_big ... 1.67s user 0.01s system 99% cpu 1.691 total GCC: $ time ASAN_OPTIONS=detect_stack_use_after_return=1 ./tests/unit/chunked_fifo_test -t chunked_fifo_big 89.12s user 0.03s system 99% cpu 1:29.34 total $ time ASAN_OPTIONS=detect_stack_use_after_return=0 ./tests/unit/chunked_fifo_test -t chunked_fifo_big 1.32s user 0.02s system 99% cpu 1.350 total So while plain asan is faster with gcc, enabling detect_stack_use_after_return makes it much slower.