public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/63696] New: Alloc-dealloc-mismatch in ipa-icf.c
@ 2014-10-31 9:04 chefmax at gcc dot gnu.org
2014-10-31 9:21 ` [Bug ipa/63696] " marxin at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: chefmax at gcc dot gnu.org @ 2014-10-31 9:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63696
Bug ID: 63696
Summary: Alloc-dealloc-mismatch in ipa-icf.c
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: chefmax at gcc dot gnu.org
CC: ygribov at gcc dot gnu.org
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build: x86_64-pc-linux-gnu
Created attachment 33850
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33850&action=edit
Trivial fix
Running ASan-boostrap on GCC 5, I ran into the problem:
$ cat /home/max/build/bootstrap-asan/x86_64-unknown-linux-gnu/libgcc/config.log
................................................................................
=================================================================
==22376==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new vs free)
on 0x602000002430
#0 0x6b0cc9 in __interceptor_free
/home/max/workspace/downloads/gcc/libsanitizer/asan/asan_malloc_linux.cc:28
#1 0x250a6c3 in ipa_icf::sem_function::~sem_function()
/home/max/workspace/downloads/gcc/gcc/ipa-icf.c:219
#2 0x250a988 in ipa_icf::sem_function::~sem_function()
/home/max/workspace/downloads/gcc/gcc/ipa-icf.c:224
#3 0x250aaa2 in ipa_icf::sem_item_optimizer::~sem_item_optimizer()
/home/max/workspace/downloads/gcc/gcc/ipa-icf.c:1286
#4 0x2516271 in ipa_icf_driver
/home/max/workspace/downloads/gcc/gcc/ipa-icf.c:2346
#5 0x2516271 in ipa_icf::pass_ipa_icf::execute(function*)
/home/max/workspace/downloads/gcc/gcc/ipa-icf.c:2391
#6 0x121ebfb in execute_one_pass(opt_pass*)
/home/max/workspace/downloads/gcc/gcc/passes.c:2159
#7 0x1220f46 in execute_ipa_pass_list(opt_pass*)
/home/max/workspace/downloads/gcc/gcc/passes.c:2553
#8 0xab3316 in ipa_passes
/home/max/workspace/downloads/gcc/gcc/cgraphunit.c:2065
#9 0xab3316 in symbol_table::compile()
/home/max/workspace/downloads/gcc/gcc/cgraphunit.c:2145
#10 0xab80d7 in symbol_table::finalize_compilation_unit()
/home/max/workspace/downloads/gcc/gcc/cgraphunit.c:2298
#11 0x72cad1 in c_write_global_declarations()
/home/max/workspace/downloads/gcc/gcc/c/c-decl.c:10779
#12 0x142ab81 in compile_file
/home/max/workspace/downloads/gcc/gcc/toplev.c:581
#13 0x636e4d in do_compile
/home/max/workspace/downloads/gcc/gcc/toplev.c:1988
#14 0x636e4d in toplev::main(int, char**)
/home/max/workspace/downloads/gcc/gcc/toplev.c:2085
#15 0x63a732 in main /home/max/workspace/downloads/gcc/gcc/main.c:38
#16 0x2b44e29db76c in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2176c)
#17 0x63b140 (/home/max/build/bootstrap-asan/gcc/cc1+0x63b140)
0x602000002430 is located 0 bytes inside of 16-byte region
[0x602000002430,0x602000002440)
allocated by thread T0 here:
#0 0x6b1cc9 in operator new(unsigned long)
/home/max/workspace/downloads/gcc/libsanitizer/asan/asan_new_delete.cc:60
#1 0x24fd320 in ipa_icf::sem_function::init()
/home/max/workspace/downloads/gcc/gcc/ipa-icf.c:736
SUMMARY: AddressSanitizer: alloc-dealloc-mismatch
/home/max/workspace/downloads/gcc/libsanitizer/asan/asan_malloc_linux.cc:28
__interceptor_free
==22376==HINT: if you don't care about these warnings you may set
ASAN_OPTIONS=alloc_dealloc_mismatch=0
==22376==ABORTING
configure:3398: $? = 1
configure:3586: checking for suffix of object files
configure:3608: /home/max/build/bootstrap-asan/./gcc/xgcc
-B/home/max/build/bootstrap-asan/./gcc/
-B/home/max/install/bootstrap-asan/x86_64-unknown-linux-gnu/bin/
-B/home/max/install/bootstrap-asan/x86_64-unknown-linux-gnu/lib/ -isystem
/home/max/install/bootstrap-asan/x86_64-unknown-linux-gnu/include -isystem
/home/max/install/bootstrap-asan/x86_64-unknown-linux-gnu/sys-include -c -g
-O2 conftest.c >&5
=================================================================
==22386==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new vs free)
on 0x602000002430
#0 0x6b0cc9 in __interceptor_free
/home/max/workspace/downloads/gcc/libsanitizer/asan/asan_malloc_linux.cc:28
#1 0x250a6c3 in ipa_icf::sem_function::~sem_function()
/home/max/workspace/downloads/gcc/gcc/ipa-icf.c:219
#2 0x250a988 in ipa_icf::sem_function::~sem_function()
/home/max/workspace/downloads/gcc/gcc/ipa-icf.c:224
#3 0x250aaa2 in ipa_icf::sem_item_optimizer::~sem_item_optimizer()
/home/max/workspace/downloads/gcc/gcc/ipa-icf.c:1286
#4 0x2516271 in ipa_icf_driver
/home/max/workspace/downloads/gcc/gcc/ipa-icf.c:2346
#5 0x2516271 in ipa_icf::pass_ipa_icf::execute(function*)
/home/max/workspace/downloads/gcc/gcc/ipa-icf.c:2391
#6 0x121ebfb in execute_one_pass(opt_pass*)
/home/max/workspace/downloads/gcc/gcc/passes.c:2159
#7 0x1220f46 in execute_ipa_pass_list(opt_pass*)
/home/max/workspace/downloads/gcc/gcc/passes.c:2553
#8 0xab3316 in ipa_passes
/home/max/workspace/downloads/gcc/gcc/cgraphunit.c:2065
#9 0xab3316 in symbol_table::compile()
/home/max/workspace/downloads/gcc/gcc/cgraphunit.c:2145
#10 0xab80d7 in symbol_table::finalize_compilation_unit()
/home/max/workspace/downloads/gcc/gcc/cgraphunit.c:2298
#11 0x72cad1 in c_write_global_declarations()
/home/max/workspace/downloads/gcc/gcc/c/c-decl.c:10779
#12 0x142ab81 in compile_file
/home/max/workspace/downloads/gcc/gcc/toplev.c:581
#13 0x636e4d in do_compile
/home/max/workspace/downloads/gcc/gcc/toplev.c:1988
#14 0x636e4d in toplev::main(int, char**)
/home/max/workspace/downloads/gcc/gcc/toplev.c:2085
#15 0x63a732 in main /home/max/workspace/downloads/gcc/gcc/main.c:38
#16 0x2b02929fb76c in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2176c)
#17 0x63b140 (/home/max/build/bootstrap-asan/gcc/cc1+0x63b140)
$ ~/build/bootstrap-asan/gcc$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: x86_64-unknown-linux-gnu
Configured with: /home/max/workspace/downloads/gcc/configure --enable-multilib
--enable-checking --target=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu
--prefix=/home/max/install/bootstrap-asan --enable-bootstrap
--with-build-config=bootstrap-asan
Thread model: posix
gcc version 5.0.0 20141030 (experimental) (GCC)
Trivial fix seems to resolve the issue.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-11-06 8:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-31 9:04 [Bug ipa/63696] New: Alloc-dealloc-mismatch in ipa-icf.c chefmax at gcc dot gnu.org
2014-10-31 9:21 ` [Bug ipa/63696] " marxin at gcc dot gnu.org
2014-10-31 10:09 ` rguenth at gcc dot gnu.org
2014-10-31 11:08 ` chefmax at gcc dot gnu.org
2014-11-06 8:29 ` chefmax at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).