hipe segmentation fault

Mikael Pettersson mikpe@REDACTED
Tue May 9 09:31:38 CEST 2006


Mikael Pettersson writes:
 > On Sat, 06 May 2006 13:21:06 -0400, Serge Aleynikov wrote:
 > >> If you add the "#include <sys/mman.h>" to hipe_x86.c as I
 > >> described, does the system then build OK, or do other things
 > >> still break because of the missing HAVE_MMAP?
 > >
 > >Yes, it does get compiled fine in that case.
 > 
 > Here's a patch (for devel branch but applies to R10B as well)
 > that adds explicit #include <sys/mman.h> to those HiPE runtime
 > system files that use mmap(). This should be unnecessary since
 > erl_unix_sys.h includes <sys/mman.h> if erts/configure found
 > mmap(), but as Serge has shown that is not completely reliable.

Sorry, scratch that and use this patch instead. The previous patch
worked fine on Linux and Solaris, but broke an #include ordering
constraint on Mac OSX (10.3.9). This new patch fixes that.

/Mikael

--- otp-0501/erts/emulator/hipe/hipe_amd64.c.~1~	2005-12-15 12:29:52.000000000 +0100
+++ otp-0501/erts/emulator/hipe/hipe_amd64.c	2006-05-09 09:21:20.000000000 +0200
@@ -5,6 +5,7 @@
 #include "config.h"
 #endif
 #include "global.h"
+#include <sys/mman.h>
 #include "error.h"
 #include "bif.h"
 #include "big.h"	/* term_to_Sint() */
--- otp-0501/erts/emulator/hipe/hipe_arm.c.~1~	2005-12-16 01:45:29.000000000 +0100
+++ otp-0501/erts/emulator/hipe/hipe_arm.c	2006-05-09 09:21:20.000000000 +0200
@@ -5,6 +5,7 @@
 #include "config.h"
 #endif
 #include "global.h"
+#include <sys/mman.h>
 
 #include "hipe_arch.h"
 #include "hipe_native_bif.h"	/* nbif_callemu() */
--- otp-0501/erts/emulator/hipe/hipe_ppc.c.~1~	2005-12-15 18:14:43.000000000 +0100
+++ otp-0501/erts/emulator/hipe/hipe_ppc.c	2006-05-09 09:21:20.000000000 +0200
@@ -5,6 +5,7 @@
 #include "config.h"
 #endif
 #include "global.h"
+#include <sys/mman.h>
 
 #include "hipe_arch.h"
 #include "hipe_native_bif.h"	/* nbif_callemu() */
--- otp-0501/erts/emulator/hipe/hipe_x86.c.~1~	2006-04-06 21:08:41.000000000 +0200
+++ otp-0501/erts/emulator/hipe/hipe_x86.c	2006-05-09 09:21:20.000000000 +0200
@@ -5,6 +5,7 @@
 #include "config.h"
 #endif
 #include "global.h"
+#include <sys/mman.h>
 
 #include "hipe_arch.h"
 #include "hipe_native_bif.h"	/* nbif_callemu() */



More information about the erlang-questions mailing list