http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53706

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2012-06-17 22:00:43 
UTC ---
Created attachment 27646
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27646
A testcase for x86-64

valgrind ./cc1plus -fpreprocessed x.ii -quiet -dumpbase x.ii -march=corei7-avx
-mcx16 -msahf -mmovbe -maes -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4
-mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -auxbase
x -g -O2 -Wextra -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wsuggest-attribute=format -Wpedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror -version -fno-exceptions -fno-rtti -fno-common
-o x.s
==15175== Memcheck, a memory error detector
==15175== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==15175== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==15175== Command: ./cc1plus -fpreprocessed x.ii -quiet -dumpbase x.ii
-march=corei7-avx -mcx16 -msahf -mmovbe -maes -mpclmul -mpopcnt -mabm -mno-lwp
-mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1
-mlzcnt -auxbase x -g -O2 -Wextra -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wsuggest-attribute=format -Wpedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror -version -fno-exceptions
-fno-rtti -fno-common -o x.s
==15175== 
GNU C++ (GCC) version 4.8.0 20120616 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.7.0 20120604 (Red Hat 4.7.0-7), GMP version
5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.8.0 20120616 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.7.0 20120604 (Red Hat 4.7.0-7), GMP version
5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 79196506890681890a6020f62ba12f85
==15175== Invalid write of size 8
==15175==    at 0x1176677: variable_htab_free (var-tracking.c:1418)
==15175==    by 0x15F75FC: htab_delete (hashtab.c:430)
==15175==    by 0x118F11D: vt_emit_notes (var-tracking.c:9132)
==15175==    by 0x119161D: variable_tracking_main_1 (var-tracking.c:9875)
==15175==    by 0x1191653: variable_tracking_main (var-tracking.c:9889)
==15175==    by 0xD51511: execute_one_pass (passes.c:2164)
==15175==    by 0xD516F7: execute_pass_list (passes.c:2219)
==15175==    by 0xD51718: execute_pass_list (passes.c:2220)
==15175==    by 0xD51718: execute_pass_list (passes.c:2220)
==15175==    by 0x9C0F9F: expand_function (cgraphunit.c:1615)
==15175==    by 0x9C1686: expand_all_functions (cgraphunit.c:1720)
==15175==    by 0x9C2205: compile (cgraphunit.c:2018)
==15175==  Address 0xfcb2bf8 is 40 bytes inside a block of size 2,568 free'd
==15175==    at 0x4C289AE: free (vg_replace_malloc.c:427)
==15175==    by 0x9007EA: empty_alloc_pool (alloc-pool.c:210)
==15175==    by 0x900867: free_alloc_pool (alloc-pool.c:230)
==15175==    by 0x118F103: vt_emit_notes (var-tracking.c:9130)
==15175==    by 0x119161D: variable_tracking_main_1 (var-tracking.c:9875)
==15175==    by 0x1191653: variable_tracking_main (var-tracking.c:9889)
==15175==    by 0xD51511: execute_one_pass (passes.c:2164)
==15175==    by 0xD516F7: execute_pass_list (passes.c:2219)
==15175==    by 0xD51718: execute_pass_list (passes.c:2220)
==15175==    by 0xD51718: execute_pass_list (passes.c:2220)
==15175==    by 0x9C0F9F: expand_function (cgraphunit.c:1615)
==15175==    by 0x9C1686: expand_all_functions (cgraphunit.c:1720)
==15175==

Reply via email to