hipe segmentation fault

Mikael Pettersson mikpe@REDACTED
Mon May 8 00:01:16 CEST 2006


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.

/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-07 21:03:48.000000000 +0200
@@ -4,6 +4,7 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+#include <sys/mman.h>
 #include "global.h"
 #include "error.h"
 #include "bif.h"
--- 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-07 21:03:48.000000000 +0200
@@ -4,6 +4,7 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+#include <sys/mman.h>
 #include "global.h"
 
 #include "hipe_arch.h"
--- 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-07 21:03:48.000000000 +0200
@@ -4,6 +4,7 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+#include <sys/mman.h>
 #include "global.h"
 
 #include "hipe_arch.h"
--- 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-07 21:03:48.000000000 +0200
@@ -4,6 +4,7 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+#include <sys/mman.h>
 #include "global.h"
 
 #include "hipe_arch.h"



More information about the erlang-questions mailing list