freebsd-dev/lib/libc/mips
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
..
gdtoa
gen The getcontext() from the __fillcontextx() call in the 2013-05-28 04:54:16 +00:00
net
softfloat Convert softfloat to use the standard exception flag and rounding macros 2012-01-16 04:05:53 +00:00
string Change index() and rindex() to a weak alias. 2012-01-05 10:32:53 +00:00
sys Rework the __vdso_* symbols attributes to only make the symbols weak, 2013-01-30 12:48:16 +00:00
_fpmath.h
arith.h
gd_qnan.h
Makefile.inc Merge jmallett@'s n64 work into HEAD - changeset 2 2010-06-16 14:13:36 +00:00
Symbol.map Replace a proliferation of buggy MD implementations of modf() with a 2011-10-21 06:40:36 +00:00
SYS.h Fix PIC_RETURN when abicalls are not defined. 2010-10-24 05:22:07 +00:00