Last active
August 29, 2015 14:22
-
-
Save calio/1352395a769b05d6c0fa to your computer and use it in GitHub Desktop.
Make valgrind >= 3.9 works with LuaJIT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: include/vki/vki-amd64-linux.h | |
=================================================================== | |
--- include/vki/vki-amd64-linux.h (revision 13644) | |
+++ include/vki/vki-amd64-linux.h (revision 13643) | |
@@ -236,7 +236,6 @@ | |
#define VKI_MAP_PRIVATE 0x02 /* Changes are private */ | |
#define VKI_MAP_FIXED 0x10 /* Interpret addr exactly */ | |
#define VKI_MAP_ANONYMOUS 0x20 /* don't use a file */ | |
-#define VKI_MAP_32BIT 0x40 /* only give out 32bit addresses */ | |
#define VKI_MAP_NORESERVE 0x4000 /* don't check for reservations */ | |
//---------------------------------------------------------------------- | |
Index: coregrind/m_syswrap/syswrap-generic.c | |
=================================================================== | |
--- coregrind/m_syswrap/syswrap-generic.c (revision 13644) | |
+++ coregrind/m_syswrap/syswrap-generic.c (revision 13643) | |
@@ -1996,7 +1996,7 @@ | |
MapRequest mreq; | |
Bool mreq_ok; | |
-# if defined(VGO_darwin) | |
+#if defined(VGO_darwin) | |
// Nb: we can't use this on Darwin, it has races: | |
// * needs to RETRY if advisory succeeds but map fails | |
// (could have been some other thread in a nonblocking call) | |
@@ -2004,7 +2004,7 @@ | |
// (mmap will cheerfully smash whatever's already there, which might | |
// be a new mapping from some other thread in a nonblocking call) | |
VG_(core_panic)("can't use ML_(generic_PRE_sys_mmap) on Darwin"); | |
-# endif | |
+#endif | |
if (arg2 == 0) { | |
/* SuSV3 says: If len is zero, mmap() shall fail and no mapping | |
@@ -2027,15 +2027,6 @@ | |
return VG_(mk_SysRes_Error)( VKI_EINVAL ); | |
} | |
-# if defined(VKI_MAP_32BIT) | |
- /* We can't support MAP_32BIT (at least, not without significant | |
- complication), and it's royally unportable, so if the client | |
- asks for it, just fail it. */ | |
- if (arg4 & VKI_MAP_32BIT) { | |
- return VG_(mk_SysRes_Error)( VKI_ENOMEM ); | |
- } | |
-# endif | |
- | |
/* Figure out what kind of allocation constraints there are | |
(fixed/hint/any), and ask aspacem what we should do. */ | |
mreq.start = arg1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment