[PATCH][ARM] Fix _dl_tlsdesc_resolve_hold to save r0

Szabolcs Nagy szabolcs.nagy@arm.com
Wed Oct 14 09:20:00 GMT 2015


_dl_tlsdesc_resolve_hold calls into a C function that clobbers r0,
but it assumes the original argument is still in r0 after the call.
This can cause crash in case of concurrent TLS access when TLSDESC
is in use (-mtls-dialect=gnu2).

Run into this while fixing BZ 18572.

Both r0 and r1 are saved/restored so the stack remains 8 byte aligned.

ChangeLog:

2015-10-14  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* sysdeps/arm/dl-tlsdesc.S (_dl_tlsdesc_resolve_hold): Save and restore
	r0 and r1.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hold.diff
Type: text/x-patch
Size: 1353 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20151014/093bd9aa/attachment.bin>


More information about the Libc-alpha mailing list