freebsd-dev/lib/libc/arm
Konstantin Belousov 55a1911ef2 The getcontext() from the __fillcontextx() call in the
check_deferred_signal() returns twice, since handle_signal() emulates
the return from the normal signal handler by sigreturn(2)ing the
passed context.  Second return is performed on the destroyed stack
frame, because __fillcontextx() has already returned.  This causes
undefined and bad behaviour, usually the victim thread gets SIGSEGV.

Avoid nested frame and the need to return from it by doing direct call
to getcontext() in the check_deferred_signal() and using a new private
libc helper __fillcontextx2() to complement the context with the
extended CPU state if the deferred signal is still present.

The __fillcontextx() is now unused, but is kept to allow older
libthr.so to be used with the new libc.

Mark __fillcontextx() as returning twice [1].

Reported by:	pgj
Pointy hat to:	kib
Discussed with:	dim
Tested by:	pgj, dim
Suggested by:	jilles [1]
MFC after:	1 week
2013-05-28 04:54:16 +00:00
..
aeabi When clang builds libc it may insert calls to __aeabi_* functions. Normally 2013-02-12 06:04:51 +00:00
gen The getcontext() from the __fillcontextx() call in the 2013-05-28 04:54:16 +00:00
softfloat Silence a clang warning by telling it we are only interested in left 2013-01-06 00:49:06 +00:00
string Merge index() and strchr() together. 2012-01-03 07:14:01 +00:00
sys Rework the __vdso_* symbols attributes to only make the symbols weak, 2013-01-30 12:48:16 +00:00
_fpmath.h Correct some bugs that resulted from arm/_fpmath.h being blindly copied 2012-01-16 04:04:35 +00:00
arith.h Add support for the FPA floating-point format on ARM. The 2008-12-23 22:20:59 +00:00
gd_qnan.h Arrange so that the NaN returned by strtod("nan", NULL) is the same as 2007-12-16 21:15:09 +00:00
Makefile.inc Add the required __aeabi_* functions to libc. 2013-01-19 05:33:55 +00:00
Symbol_oabi.map Use the compiler-rt version __{u,}divsi3 and __{u,}modsi3 on ARM EABI 2013-01-19 04:11:45 +00:00
Symbol.map Use the compiler-rt version __{u,}divsi3 and __{u,}modsi3 on ARM EABI 2013-01-19 04:11:45 +00:00
SYS.h Update the syscall calling convention for ARM EABI. We store the syscall 2013-01-19 04:03:18 +00:00