[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] problems with gst-2.0.8 on NetBSD/i386 (1.5W)
From: |
Greg A. Woods |
Subject: |
Re: [Help-smalltalk] problems with gst-2.0.8 on NetBSD/i386 (1.5W) |
Date: |
Fri, 15 Nov 2002 18:54:33 -0500 (EST) |
[ On Friday, November 15, 2002 at 22:45:43 (+0100), Bonzini wrote: ]
> Subject: Re: [Help-smalltalk] problems with gst-2.0.8 on NetBSD/i386 (1.5W)
>
> > Next I ran into a much bigger problem:
> >
> > SMALLTALK_KERNEL="`cd ./kernel; pwd`" \
> > SMALLTALK_IMAGE="`pwd`" \
> > ./gst -iQ dummy_file
> > gst: Bus error
> > gst: Error occurred while not in byte code interpreter!!
> > Bus error
> > gmake[2]: *** [gst.im] Error 138
> >
> >
> > I rebuilt with '-g' and here's what gdb says:
>
> Can you try gst 2.0.7? If it succeeds, try searching for MAP_NORESERVE
> in libgst/heap.c, and add "#undef MAP_NORESERVE" before the first match.
Yes, this does the trick.
MAP_NORESERVE is defined in NetBSD's <sys/mman.h>:
#define MAP_NORESERVE 0x0040 /* Sun: don't reserve needed swap area
*/
but it's not mentioned in the mmap(2) manual page.
I'm guessing the (-1) I was seeing as a pointer value was MAP_FAILED:
/*
* Error indicator returned by mmap(2)
*/
#define MAP_FAILED ((void *) -1) /* mmap() failed */
I see that there is one very critical places where mmap()'s return code
isn't checked for errors (in libgst/heap.c @ line 433):
/* Get two reference addresses which we will base ourselves on */
mmapGuess = higher = ANON_MMAP (NULL, pagesize, true);
and I'm guessing that's the initial cause of the SIGBUS....
--
Greg A. Woods
+1 416 218-0098; <address@hidden>; <address@hidden>
Planix, Inc. <address@hidden>; VE3TCP; Secrets of the Weird <address@hidden>