[Bug 3919] New: crash in _longjmp_unwind (siglongjmp)
bugzilla at busybox.net
bugzilla at busybox.net
Sat Jun 25 09:30:22 UTC 2011
https://bugs.busybox.net/show_bug.cgi?id=3919
Summary: crash in _longjmp_unwind (siglongjmp)
Product: uClibc
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
AssignedTo: unassigned at uclibc.org
ReportedBy: busybox-bugzilla at plan9.de
CC: uclibc-cvs at uclibc.org
Estimated Hours: 0.0
with current builds, siglongjmp always jumps to 0 and crashes in static builds
without threads. reason is this test
if (__pthread_cleanup_upto != NULL)
which is always true even, even if the function address is 0.
fixing it in a similar way as
http://ue.tst.eu/9d0e9de564d5c343c524e9742a17d204.txt makes it work - i
verified with this version of jmp-unwind.c (there might be other occurences of
this bug):
/* Defeat compiler optimization which assumes function addresses are never NULL
*/
static int not_null_ptr(const void *p)
{
const void *q;
__asm__ (""
: "=r" (q) /* output */
: "0" (p) /* input */
);
return q != 0;
}
void _longjmp_unwind (jmp_buf env, int val);
void
_longjmp_unwind (jmp_buf env, int val)
{
#ifdef SHARED
if (__libc_pthread_functions_init)
PTHFCT_CALL (ptr___pthread_cleanup_upto, (env->__jmpbuf,
CURRENT_STACK_FRAME));
#else
if (not_null_ptr(__pthread_cleanup_upto))
__pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME);
#endif
}
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the uClibc-cvs
mailing list