hipe segmentation fault
Mikael Pettersson
mikpe@REDACTED
Sat May 6 01:48:05 CEST 2006
On Fri, 05 May 2006 09:36:45 -0400, Serge Aleynikov wrote:
>When I applied this patch to FC5 Linux 64-bit OS, Erlang compiled fine,
>however when I did the same on a 32-bit Linux FC5 OS, the make process
>failed with the errors shown below.
>
>Serge
>
>gcc -g -O3 -I/home/serge/Projects/Distrs/R10B-10/erts/i686-pc-linux-gnu
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DHYBRID
>-DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes
>-D_THREAD_SAFE -D_REENTRANT -DUSE_THREADS -Ibeam -Isys/unix
>-Isys/common -Ii686-pc-linux-gnu -Ii686-pc-linux-gnu/hybrid -Izlib
>-Ihipe -I../include/internal -I../include/internal/i686-pc-linux-gnu -c
>hipe/hipe_x86.c -o
>/home/serge/Projects/Distrs/R10B-10/erts/obj.hybrid.beam/i686-pc-linux-gnu/hipe_x86.o
>hipe/hipe_x86.c: In function 'morecore':
>hipe/hipe_x86.c:107: warning: implicit declaration of function 'mmap'
>hipe/hipe_x86.c:108: error: 'PROT_EXEC' undeclared (first use in this
>function)
>hipe/hipe_x86.c:108: error: (Each undeclared identifier is reported only
>once
>hipe/hipe_x86.c:108: error: for each function it appears in.)
>hipe/hipe_x86.c:108: error: 'PROT_READ' undeclared (first use in this
>function)
>hipe/hipe_x86.c:108: error: 'PROT_WRITE' undeclared (first use in this
>function)
>hipe/hipe_x86.c:109: error: 'MAP_PRIVATE' undeclared (first use in this
>function)
>hipe/hipe_x86.c:109: error: 'MAP_ANONYMOUS' undeclared (first use in
>this function)
>hipe/hipe_x86.c:114: warning: assignment makes pointer from integer
>without a cast
>hipe/hipe_x86.c:115: error: 'MAP_FAILED' undeclared (first use in this
>function)
This means that, for some reason, an #include of <sys/mman.h> was lost.
This shouldn't happen: hipe_x86.c includes global.h, which includes
sys.h, which includes erl_unix_sys.h (unless one of __WIN32__/VXWORKS/_OSE_
is defined), which includes <sys/mman.h> unless erts/configure decided
that HAVE_MMAP should be 0, which shouldn't be possible on FC5.
I've built R10B-10 on an FC5 box (i686, 100% vanilla, no updates),
and no problems occurred. I can't explain why things don't work for you,
but simply adding "#include <sys/mman.h>" at the end of the
#include directives in hipe_x86.c ought to work.
/Mikael
More information about the erlang-questions
mailing list