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



--- Comment #16 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 
2012-12-19 08:17:15 UTC ---

After testing on CP2K, I believe that ASAN yields a false positive (current

trunk). It is obviously hard to be sure, but the indications are 



First, the code and testcase runs without error with valgrind (when compiled

without -fsanitize=address). 

Second, the error happens after the last statement in the subroutine and is of

'unknown' type

Third, the invalid write has size 1, which is a very unusual length in Fortran,

as almost no data types have that length.



While I can provide build instructions for CP2K (and the sources are public of

course), I can't reduce this to a small runtime testcase. Is it sufficient to

upload the object/disassembly for the involved subroutine for this to be

investigated ?



I can copy and paste commands in gdb if you have suggestions...



Meanwhile, the error message reads:



==49256== ERROR: AddressSanitizer: unknown-crash on address 0x1ffff6742e2c at

pc 0x7ff6d8e6e11d bp 0x7fffb3a16b80 sp 0x7fffb3a16b58

WRITE of size 1 at 0x1ffff6742e2c thread T0

    #0 0x7ff6d8e6e11c in __interceptor_memset _asan_rtl_

    #1 0x1c93a5f in __qs_environment_MOD_qs_init

/data/vjoost/gnu/cp2k/cp2k/src/../src/qs_environment.F:210

    #2 0xe4f

Address 0x1ffff6742e2c is located in the high shadow area.

Stats: 415M malloced (231M for red zones) by 484132 calls

Stats: 0M realloced by 0 calls

Stats: 282M freed by 427077 calls

Stats: 264M really freed by 150081 calls

Stats: 418M (107040 full pages) mmaped in 357 calls

  mmaps   by size class: 7:294840; 8:24564; 9:22506; 10:9198; 11:18615;

12:6656; 13:5632; 14:96; 15:16; 16:8; 18:2; 21:7; 23:1; 24:2; 25:2; 26:2;

  mallocs by size class: 7:335835; 8:33268; 9:33156; 10:17186; 11:24103;

12:20433; 13:19971; 14:147; 15:11; 16:5; 18:2; 21:7; 23:1; 24:2; 25:3; 26:2;

  frees   by size class: 7:320047; 8:18657; 9:20241; 10:16584; 11:11547;

12:19913; 13:19948; 14:124; 15:2; 16:5; 21:6; 23:1; 25:1; 26:1;

  rfrees  by size class: 7:43981; 8:18546; 9:20241; 10:16454; 11:11497;

12:19531; 13:19693; 14:124; 15:2; 16:4; 21:6; 25:1; 26:1;

Stats: malloc large: 33 small slow: 11758

==49256== ABORTING

Reply via email to