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



--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-08 
20:05:19 UTC ---

(In reply to comment #8)

> 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.



I guess for standard-wise correctness it would need to cast all the involved

pointers to (uintptr_t) or similar and do arithmetic in integers.  It is a

general issue of having pointers pointing into the same heap object, when you

need to realloc that heap object, you need to adjust it.  In any case, for

whatever reason libiberty contains the prehistoric GNU regex code rather than

the far newer code that is included in glibc.

Reply via email to