https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67484
Bug ID: 67484 Summary: options-save.c sanitizer asan detects freed storage referenced heap-use-after-free Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Target Milestone: --- //g++ references freed storage //sanitizer message: heap-use-after-free //referenced at options-save.c:3556 "|| strcmp (ptr1->x_ix86_arch_string, ptr2->x_ix86_arch_string)))" //ptr1->x_ix86_arch_string was freed at gcc/config/i386/i386.c:5020 "free (option_strings[i]);" //to make happy the sanitizer I commented out the for loop in i386.c lines 5019-5020 //// Target: x86_64-unknown-linux-gnu int fum () __attribute__ ((target("default"))); int fum () __attribute__ ((target("arch=core2"))); int j = fum();