Comment #1 on issue 274 by [email protected]: Incorrect shadow values for global string constants on OSX
http://code.google.com/p/address-sanitizer/issues/detail?id=274

From a local run with ASAN_OPTIONS=report_globals=2:

...
==55507==Added Global: beg=0x00156340 size=7/64 name=.str117 module=../../chrome/tools/mac_helpers/infoplist_strings_util.mm dyn_init=0 ==55507==Added Global: beg=0x00156360 size=12/64 name=.str119 module=../../chrome/tools/mac_helpers/infoplist_strings_util.mm dyn_init=0
...
==55507==Search Global: beg=0x00156360 size=12/64 name=.str119 module=../../chrome/tools/mac_helpers/infoplist_strings_util.mm dyn_init=0 0x00156362 is located 2 bytes inside of global variable '.str119' from '../../chrome/tools/mac_helpers/infoplist_strings_util.mm' (0x156360) of size 12
  '.str119' is ascii string '%d.%d.%d.%d'
==55507==Search Global: beg=0x00156340 size=7/64 name=.str117 module=../../chrome/tools/mac_helpers/infoplist_strings_util.mm dyn_init=0 0x00156362 is located 27 bytes to the right of global variable '.str117' from '../../chrome/tools/mac_helpers/infoplist_strings_util.mm' (0x156340) of size 7
  '.str117' is ascii string 'PATCH='
...


According to -emit-llvm the size of .str117 is 64 bytes:

@.str117 = internal unnamed_addr constant { [7 x i8], [57 x i8] } { [7 x i8] c"PATCH=\00", [57 x i8] zeroinitializer }, section "__TEXT,__cstring,cstring_literals", align 32

, however the next string starts at .str117+32.

Hexdump also shows that the variables are too close to each other:

00079340 50 41 54 43 48 3d 00 00 00 00 00 00 00 00 00 00 | PATCH=..........| 00079350 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00079360 25 64 2e 25 64 2e 25 64 2e 25 64 00 00 00 00 00 |%d.%d.%d.%d.....|


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to