On Wed, Feb 13, 2013 at 11:48:32AM -0500, Jack Howarth wrote: > On Wed, Feb 13, 2013 at 04:19:14PM +0100, Jakub Jelinek wrote: > > > > The reexec is problematic, what if the program already in constructors run > > before __asan_init (perhaps ctors of other libraries etc.) does something > > that really shouldn't be done twice? > > > > Wouldn't sorting all of the constructors and destructors by priority, while > retaining the original order, in collect2 solve this issue (as was proposed > for > implementing intra-modular init priority support on darwin)?
I wasn't talking about darwin at all, and on Linux inter-CU init priority works just fine. I'm just saying that reexec isn't always safe, because what the program does before __asan_init can be something undesirable to be done multiple times. Jakub