[PATCH 2/7] Libsanitizer merge from upstream r249633.

Maxim Ostapenko m.ostapenko@partner.samsung.com
Thu Oct 15 10:34:00 GMT 2015


On 14/10/15 10:30, Jakub Jelinek wrote:
> On Tue, Oct 13, 2015 at 02:16:23PM +0300, Maxim Ostapenko wrote:
>> This patch introduces required compiler changes. Now, we don't version
>> asan_init, we have a special __asan_version_mismatch_check_v[n] symbol for
>> this.
> For this, I just have to wonder what is the actual improvement over what we
> had.  To me it looks like a step in the wrong direction, it will only bloat
> the size of the ctors.  I can live with it, but just want to put on record I
> think it is a mistake.
>
>> Also, asan_stack_malloc_[n] doesn't take a local stack as a second parameter
>> anymore, so don't pass it.
> I think this is another mistake, but this time with actually bad fix on the
> compiler side for it.  If I read the code well, previously
> __asan_stack_malloc_n would return you the local stack if it failed for
> whatever reason, which is actually what you want as fallback.
> But, the new code returns NULL instead, so I think you would need to compare
> the return value of __asan_stack_malloc_n with NULL and if it is NULL, use
> the addr instead of what it returned; which is not what your asan.c change
> does.  Now, what is the improvement here?  Bloat the compiler generated
> code... :(
>

Ah, right, fixing this now. Does this looks better now?

>> 2015-10-12  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
>>
>> config/
>>
>> 	* bootstrap-asan.mk: Replace ASAN_OPTIONS=detect_leaks with
>> 	LSAN_OPTIONS=detect_leaks
> Missing . at the end, and the config/ hunk missing from the patch.
>
>> gcc/
>>
>> 	* asan.c (asan_emit_stack_protection): Don't pass local stack to
>> 	asan_stack_malloc_[n] anymore.
>> 	(asan_finish_file): Instert __asan_version_mismatch_check_v[n] call.
> s/Instert/Instead/

Fixed now.

>
> 	Jakub
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.diff
Type: text/x-patch
Size: 3926 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151015/6e138221/attachment.bin>


More information about the Gcc-patches mailing list