-Fri Aug 28 10:41:38 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+1998-08-28 09:22 Ulrich Drepper <drepper@cygnus.com>
+
+ * elf/rtld.c (process_envvars): Fix copy&paste error.
+
+ * malloc/malloc.c (malloc_hook_ini): Don't overwrite realloc and
+ memalign hook.
+ (realloc_hook_ini): Don't overwrite memalign hook.
+ (memalign_hook_ini): Don't overwrite malloc and memalign hooks.
+ Reported by Philippe Troin <phil@fifi.org>.
+
+ * malloc/mcheck.c (mprobe): Call checkhdr with adjusted pointer.
+ Patch by Philippe Troin <phil@fifi.org>.
+
+1998-08-26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * sysdeps/generic/segfault.c (install_handler): Protect the
+ non-POSIX signals with #ifdef.
+ (catch_segfault): Add missing mode parameter for open.
+ * debug/catchsegv.sh: Avoid termination message from shell. Allow
+ other termination signals.
+
+1998-08-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * debug/Makefile (distribute): Add register-dump.h.
+
+1998-08-28 10:41 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/register-dump.h: New file.
segv_output=`basename "$prog"`.segv.$$
+# Redirect stderr to avoid termination message from shell.
+(exec 3>&2 2>/dev/null
LD_PRELOAD=${LD_PRELOAD:+${LD_PRELOAD}:}@SLIB@/libSegFault.so \
SEGFAULT_USE_ALTSTACK=1 \
SEGFAULT_OUTPUT_NAME=$segv_output \
-"$prog" ${1+"$@"}
+"$prog" ${1+"$@"} 2>&3 3>&-)
exval=$?
-# Check for a segmentation error.
-if test $exval -eq 139 && test -f "$segv_output"; then
- # We caught a segmentation error. The output is in the file with the
+# Check for signal termination.
+if test $exval -gt 128 && test -f "$segv_output"; then
+ # The program caught a signal. The output is in the file with the
# name we have in SEGFAULT_OUTPUT_NAME. In the output the names of
# functions in shared objects are available, but names in the static
# part of the program are not. We use addr2line to get this information.
/* Path where the binary is found. */
if (!__libc_enable_secure
&& memcmp (&envline[3], "ORIGIN_PATH", 11) == 0)
- _dl_hwcap_mask = strtoul (&envline[15], NULL, 0);
+ _dl_origin_path = &envline[15];
break;
case 12:
#endif
{
__malloc_hook = NULL;
- __realloc_hook = NULL;
- __memalign_hook = NULL;
ptmalloc_init();
return mALLOc(sz);
}
{
__malloc_hook = NULL;
__realloc_hook = NULL;
- __memalign_hook = NULL;
ptmalloc_init();
return rEALLOc(ptr, sz);
}
size_t sz; size_t alignment; const __malloc_ptr_t caller;
#endif
{
- __malloc_hook = NULL;
- __realloc_hook = NULL;
__memalign_hook = NULL;
ptmalloc_init();
return mEMALIGn(sz, alignment);
enum mcheck_status
mprobe (__ptr_t ptr)
{
- return mcheck_used ? checkhdr (ptr) : MCHECK_DISABLED;
+ return mcheck_used ? checkhdr (((struct hdr *) ptr) - 1) : MCHECK_DISABLED;
}
fname = getenv ("SEGFAULT_OUTPUT_NAME");
if (fname != NULL && fname[0] != '\0')
{
- fd = open (fname, O_TRUNC | O_WRONLY | O_CREAT);
+ fd = open (fname, O_TRUNC | O_WRONLY | O_CREAT, 0666);
if (fd == -1)
fd = 2;
}
INSTALL_FOR_SIG (SIGSEGV, "segv");
INSTALL_FOR_SIG (SIGILL, "ill");
+#ifdef SIGBUS
INSTALL_FOR_SIG (SIGBUS, "bus");
+#endif
+#ifdef SIGSTKFLT
INSTALL_FOR_SIG (SIGSTKFLT, "stkflt");
+#endif
INSTALL_FOR_SIG (SIGABRT, "abrt");
INSTALL_FOR_SIG (SIGFPE, "fpe");
}