arlad dumps core on NetBSD-1.4.2/i386
Assar Westerlund
assar at stacken.kth.se
Mon May 1 07:35:34 CEST 2000
"Dr. Lex Wennmacher" <wennmach at geo.Uni-Koeln.DE> writes:
> On starting arlad:
> xfs_syscall(20, 0x0, 800c5603, 0xbfbfd0f8, 0)
> a_opcode = 800c5603
> xfs_message_rpc opcode = 22
>
> (arlad dying in user space)
Thanks for your report. We've managed to track this down to a bug in
libc on NetBSD 1.4.2. The fix for that (from the NetBSD tree) is
appended below. You'll need to rebuild your libc after applying it.
You might be more interested in the work-around, which is to build
arlad (and the other related programs) static. Just do:
CC='cc-static' configure or apply the fix that we've added to the arla
tree, also included below. After applying that, you need to re-create
configure by running `sh HACKING' (which needs automake and autoconf).
Do tell us if you have any more problems.
/assar
Index: syscall.S
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/i386/sys/syscall.S,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -u -w -r1.8 -r1.9
--- syscall.S 1999/02/08 18:56:48 1.8
+++ syscall.S 2000/04/03 03:13:07 1.9
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.S,v 1.8 1999/02/08 18:56:48 christos Exp $ */
+/* $NetBSD: syscall.S,v 1.9 2000/04/03 03:13:07 mycroft Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -40,7 +40,7 @@
#include <machine/asm.h>
#if defined(SYSLIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: syscall.S,v 1.8 1999/02/08 18:56:48 christos Exp $")
+ RCSID("$NetBSD: syscall.S,v 1.9 2000/04/03 03:13:07 mycroft Exp $")
#endif /* SYSLIBC_SCCS and not lint */
#include "SYS.h"
@@ -56,7 +56,9 @@
err:
#ifdef PIC
PIC_PROLOGUE
- jmp PIC_PLT(CERROR)
+ mov PIC_GOT(CERROR), %ecx
+ PIC_EPILOGUE
+ jmp %ecx
#else
jmp CERROR
#endif
Index: configure.in
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/configure.in,v
retrieving revision 1.416
retrieving revision 1.417
diff -u -w -u -w -r1.416 -r1.417
--- configure.in 2000/04/29 07:56:51 1.416
+++ configure.in 2000/05/01 04:50:18 1.417
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script
dnl This requires autoconf 2.13
-AC_REVISION($Revision: 1.416 $)dnl
+AC_REVISION($Revision: 1.417 $)dnl
AC_PREREQ(2.13)
AC_INIT(arlad/arla.c)
AC_CONFIG_HEADER(include/config.h)
@@ -227,6 +227,17 @@
AC_MSG_RESULT(OpenBSD)
;;
netbsd* | netbsdelf*)
+ dnl There is a nasty bug in 1.4.2 that make shared libs
+ dnl together with syscall(2) fail with bus error.
+ case "$target_os" in
+ netbsd1.4.2)
+ if test X"$GCC" = Xyes ; then
+ CC="$CC -static"
+ else
+ AC_MSG_WARN([There is a problem with netbsd 1.4.2, you should build it static])
+ fi
+ ;;
+ esac
KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/bsd
KERNEL_SRCS='bsd-subr.c'
KERNEL_HDRS=''
More information about the Arla-drinkers
mailing list