Closed ramosian-glider closed 9 years ago
By default, asan does not detect use-after-return.
As mentioned at http://code.google.com/p/address-sanitizer/wiki/ExampleUseAfterReturn,
you need to use an additional build flag: -mllvm -asan-use-after-return.
With this flag I get a warning:
==20526== ERROR: AddressSanitizer stack-use-after-return on address 0x7fe82beb3220
at pc 0x406a84 bp 0x7fffbf9f0550 sp 0x7fffbf9f0548
READ of size 4 at 0x7fe82beb3220 thread T0
#0 0x406a84 (test+0x406a84)
#1 0x7fe82c6d1c4d (/lib/libc-2.11.1.so+0x1ec4d)
Address 0x7fe82beb3220 is located at offset 32 in frame <func> of T0's stack:
This frame has 1 object(s):
[32, 36) 'a'
Note, that this mode is still experimental and not officially supported.
Reported by konstantin.s.serebryany
on 2012-05-15 07:02:43
WontFix
Adding Project:AddressSanitizer as part of GitHub migration.
Reported by ramosian.glider
on 2015-07-30 09:12:59
Originally reported on Google Code with ID 71
Reported by
umesh.kalappa0
on 2012-05-15 06:56:44