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



--- Comment #36 from Kostya Serebryany <kcc at gcc dot gnu.org> 2013-02-12 
08:58:56 UTC ---

> I see, but then you could use the global vars (perhaps weak ones in libasan

> with some default), combined together with arguments to __asan_init (or some

> alternative name of the same function for compatibility).  All that it would 
> do

> beyond normal initialization would be complain if the requested scale/offset

> pair is different from the chosen one.



Maybe we could add calls to e.g. 

  __asan_check_abi_mismatch(uptr a1, uptr a2, uptr a3, uptr a4, uptr a5, uptr

a6)

after every call to __asan_init

(a1 == offset, a2 == shift, a3 == something_else, etc)



if any of a1..a6 is different between the calls to __asan_check_abi_mismatch --

fire an error.

WDYT?

Reply via email to