https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110157
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2023-06-07 Target Milestone|--- |13.2 Summary|Address sanitizer crashes |[13/14 Regression] Address |when accessing variables |sanitizer does not like |through procedure callback |nested function trampolines | |any more --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced GNU C testcase (just compile and run with -fsanitize=address): ``` void quicksort(_Bool (*ugt)()) { __builtin_printf(">>> Calling ugt\n"); _Bool t = ugt(); __builtin_printf(">>> Done ugt\n"); } void gfits_setsort(int key) { _Bool sort_gt() { return key > 0; } quicksort(sort_gt); } int main() { gfits_setsort(1); } ``` ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==1==ERROR: AddressSanitizer: SEGV on unknown address 0x7f346f900034 (pc 0x7f346f900034 bp 0x7ffe64ea8b90 sp 0x7ffe64ea8b68 T0) ==1==The signal is caused by a READ memory access. ==1==Hint: PC is at a non-executable region. Maybe a wild jump? #0 0x7f346f900034 (<unknown module>) #1 0x40134f in gfits_setsort /app/example.cpp:14 #2 0x40139f in main /app/example.cpp:19 #3 0x7f3471eb3082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (<unknown module>) ==1==ABORTING ```