This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] fix PR sanitizer/55617
- From: Alexander Potapenko <glider at google dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Jack Howarth <howarth at bromo dot med dot uc dot edu>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Dodji Seketeli <dodji at redhat dot com>, Kostya Serebryany <kcc at google dot com>, Dmitriy Vyukov <dvyukov at google dot com>, Mike Stump <mikestump at comcast dot net>, iain at codesourcery dot com
- Date: Mon, 4 Feb 2013 13:55:01 +0400
- Subject: Re: [PATCH] fix PR sanitizer/55617
- References: <20130203045748.GA23486@bromo.med.uc.edu> <CAFiYyc3F67ZsygtsH2G2E2=YA27E3bskco9+QJF+6R2kGemail@example.com> <20130204093829.GX4385@tucnak.redhat.com>
On Mon, Feb 4, 2013 at 1:38 PM, Jakub Jelinek <firstname.lastname@example.org> wrote:
> On Mon, Feb 04, 2013 at 10:22:48AM +0100, Richard Biener wrote:
>> > Okay for gcc trunk?
>> But that does not work across translation units, no? ISTR collect2 has support
>> to handle constructor priorities all by itself (at link time,
>> considering all inputs).
> I wonder why the patch turned from initially at least supporting intra-CU
> support for ctor priorities into an ugly hack for asan. I guess asan
> doesn't care too much about inter-CU ctor priorities, it just needs its
> ctors to run before anything in the same CU is called (mainly the
> __asan_init call), other CUs either won't be asan instrumented, then it
> doesn't matter, or will be, but they will have their own __asan_init call.
Yes, I was going to ask the same question.
Since other compile-time instrumentation tools (like ThreadSanitizer)
will benefit from this as well, it's better to provide the intra-CU
support by sorting the list of constructors.