[Vm-dev] SIZEOF_VOID_P 8 and mprotect
gettimothy at zoho.com
Wed Jul 9 18:56:59 UTC 2014
Don't spend brain cycles on this, but I want to mention it in passing.
I am working out integrating Ian's configuration approach into the CMakeVMakerSqueak and ran into this interesting thing.
Ian's code on my system will detect the SIZEOF_ stuff on my system
#define SIZEOF_INT 4
#define SIZEOF_LONG 8
#define SIZEOF_LONG_LONG 8
#define SIZEOF_VOID_P 8
When I go to run the cog, I get this error.
mprotect(x,y,PROT_READ | PROT_WRITE | PROT_EXEC): Cannot allocate memory
Segmentation fault (core dumped)
Changing SIZEOF_VOID_P to 4 makes that problem go away and the image launches.
I am thinking I am going to throw a conditional in the configuration such that if it is a 64 bit system with 32 bit libs, to work around this.
I mention this in passing in case there is a "magic"
#define mprotect_will_just_work 1
flag or something.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev