[Bug other/56245] -fsanitize=address miscompiles GCC

kcc at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 8 18:29:00 GMT 2013


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

--- Comment #8 from Kostya Serebryany <kcc at gcc dot gnu.org> 2013-02-08 18:28:43 UTC ---
Ah, so this *is* caused by the asan merge, although it's not an asan bug. 
The new asan allocator often returns pointers that are >4Gb apart from 
each other so that int is not working for pointer differences any more.
BTW, I think that subtracting one pointer from another if they belong 
to different heap allocations is just plain wrong standard-wise.



More information about the Gcc-bugs mailing list