[PATCH, sanitizer] Wrap rethrow_primary_exception (PR 87880).

Iain Sandoe iain@sandoe.co.uk
Sun Jun 16 18:54:00 GMT 2019


Hi Jakub,

> On 14 Jun 2019, at 15:47, Jakub Jelinek <jakub@redhat.com> wrote:
> 
> On Fri, Jun 14, 2019 at 03:38:05PM +0100, Iain Sandoe wrote:
>> For some Darwin versions the absence of the rethrow_primary_exception
>> symbol causes almost all sanitizer tests to fail.
>> 
>> The following patch wraps it as suggested by Jakub in the PR trail, such that
>> if the gate is not defined, it’s assumed to be available.
> 
> I wonder if we shouldn't bump libasan soname because of this, as this change
> is removing an exported symbol from it.
> 
> Otherwise LGTM (but bumping soname would mean it is not backportable).

So, I guess, unless Jonathan has plans to add __cxa_rethrow_primary_exception
during the 10 time-frame, it’s correct to exclude the symbol anyway and we should
bump the so version and apply trunk.

Actually, because the way in which interposing works for Darwin is different, the only
symbol change in the library on Darwin is removing an "undefined dynamic lookup".
So, for back-ports, I can could up with some Darwin-specific Makefike change that
only adds the ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION=0 for Darwin.

So - OK for trunk with a bumped soname?
(and a TODO to figure a Darwin-only backport)

thanks
Iain


> 
>> 2019-06-14  Iain Sandoe  <iain@sandoe.co.uk>
>> 
>> 	PR libsanitizer/87880
>> 	* asan/asan_interceptors.h:
>> 	(ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION): New.
>> 	* asan/Makefile.am (DEFS): Add 
>> 	ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION, defined to 0.
>> 	* asan/Makefile.in: Regenerated.
> 
> 	Jakub



More information about the Gcc-patches mailing list