This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67484] New: options-save.c sanitizer asan detects freed storage referenced heap-use-after-free
- From: "zeccav at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 07 Sep 2015 14:47:32 +0000
- Subject: [Bug c++/67484] New: options-save.c sanitizer asan detects freed storage referenced heap-use-after-free
- Auto-submitted: auto-generated
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();