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



--- Comment #5 from Markus Trippelsdorf <markus at trippelsdorf dot de> 
2012-11-16 19:36:26 UTC ---

I'm not sure if it's related, but with gcc built with clang's

-fsanitize=address I get:



markus@x4 ~ % /var/tmp/gcc_sani_clang/usr/local/bin/g++ -flto t.cpp 2>&1 |

asan_symbolize.py | c++filt

=================================================================

==15267== ERROR: AddressSanitizer: global-buffer-overflow on address

0x000002d16424 at pc 0x12ca07a bp 0x7fff5db28190 sp 0x7fff5db28188

READ of size 4 at 0x000002d16424 thread T0

    #0 0x12ca079 in lto_write_options() /home/markus/gcc/gcc/lto-opts.c:97

    #1 0x12c076a in produce_asm_for_decls()

/home/markus/gcc/gcc/lto-streamer-out.c:1407

    #2 0x135a74f in ipa_write_summaries_2(opt_pass*, lto_out_decl_state*)

/home/markus/gcc/gcc/passes.c:2430

0x000002d16424 is located 28 bytes to the left of global variable '.str2184

(options.c)' (0x2d16440) of size 4

  '.str2184 (options.c)' is ascii string 'gnu'

0x000002d16424 is located 25 bytes to the right of global variable '.str2183

(options.c)' (0x2d16400) of size 11

  '.str2183 (options.c)' is ascii string 'local-exec'

Shadow byte and word:

  0x1000005a2c84: f9

  0x1000005a2c80: 00 03 f9 f9 f9 f9 f9 f9

More shadow bytes:

  0x1000005a2c60: 00 00 00 02 f9 f9 f9 f9

  0x1000005a2c68: 00 07 f9 f9 f9 f9 f9 f9

  0x1000005a2c70: 00 05 f9 f9 f9 f9 f9 f9

  0x1000005a2c78: 00 06 f9 f9 f9 f9 f9 f9

=>0x1000005a2c80: 00 03 f9 f9 f9 f9 f9 f9

  0x1000005a2c88: 04 f9 f9 f9 f9 f9 f9 f9

  0x1000005a2c90: 05 f9 f9 f9 f9 f9 f9 f9

  0x1000005a2c98: 00 f9 f9 f9 f9 f9 f9 f9

  0x1000005a2ca0: 07 f9 f9 f9 f9 f9 f9 f9

Stats: 3M malloced (2M for red zones) by 3820 calls

Stats: 0M realloced by 288 calls

Stats: 2M freed by 1635 calls

Stats: 0M really freed by 0 calls

Stats: 9M (2317 full pages) mmaped in 18 calls

  mmaps   by size class: 7:4095; 8:2047; 9:1023; 10:511; 11:255; 12:384; 13:64;

14:32; 15:16; 16:8; 17:20; 18:2;

  mallocs by size class: 7:2233; 8:820; 9:69; 10:96; 11:228; 12:297; 13:49;

14:1; 15:5; 16:1; 17:20; 18:1;

  frees   by size class: 7:523; 8:492; 9:47; 10:80; 11:156; 12:291; 13:21;

14:1; 15:4; 17:20;

  rfrees  by size class:

Stats: malloc large: 27 small slow: 88

==15267== ABORTING



markus@x4 ~ % cat t.cpp

int main () {}

Reply via email to