On 06/12/2015 05:40 PM, Andreas Schwab wrote:
Stefan Liebler <stli@linux.vnet.ibm.com> writes:
Is there a way to load the correct libgcc_s.so on all architectures?
#include <gnu/lib-names.h>
dlopen(LIBGCC_S_SO, ...)
Andreas.
Thanks.
Here is the patch with the enhanced tst-makecontext testcase.
It calls _Unwind_Backtrace within cf() function, which is called in a
makecontext context and check if the callback function is not called
infinitely times.
Tested on s390/s390x before and after this patch.
Before: Test fails; After: Test succeeds.
Ok to commit?
Bye Stefan
---
2015-06-15 Stefan Liebler <stli@linux.vnet.ibm.com>
[BZ #18508]
* stdlib/Makefile ($(objpfx)tst-makecontext3):
Depend on $(libdl).
* stdlib/tst-makecontext.c (cf): Test if _Unwind_Backtrace
is not called infinitely times.
(backtrace_helper): New function.
(trace_arg): New struct.
(st1): Enlarge stack size.
* sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S:
(__makecontext_ret): Omit cfi_startproc and cfi_endproc.
* sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S:
Likewise.