Subscribe: darwin-userlevel Mailing List
http://rss.lists.apple.com/darwin-userlevel.rss
Preview: darwin-userlevel Mailing List

darwin-userlevel Mailing List



darwin-userlevel Mailing List



Published: 2016-10-31T23:35:02-08:00

 



Re: mprotect to create an executable shared memory segment fails
From: Sam Habiel
Reply to list

I just disabled it as per Apple's instructions; and no cigar. Still
the same issue.

I already ran GT.M without the optimization; I am at the point where I
am ironing out the remaining issues with the port.
On Mon, Oct 10, 2016 at 2:59 PM, Jens Alfke <email@hidden> wrote:

[...] [...]



Re: mprotect to create an executable shared memory segment fails
From: Jens Alfke
Reply to list
[...]

I’m no expert on this, but my guess is that this is a security risk that’s prevented by System Integrity Protection (SIP). It’s obviously potentially dangerous to execute machine code that can be altered by another process. I’d suggest looking up Apple documentation on SIP to see if it calls this out. Or as an experiment you can try running your code on Mac OS 10.10, which was the last release before SIP was added; if it succeeds there, that would implicate SIP.     As a workaround, you can try taking out the code that makes the address space shareable. It sounds like using shared memory is just a performance optimization to reduce footprint and startup time if multiple processes are using the database.      —Jens      



mprotect to create an executable shared memory segment fails
From: Sam Habiel
Reply to list

Hello everybody.

First time poster. Not sure if this is the right place for the
question. Let me know where I should post if this isn't.

I am porting GT.M, a database used in banking and medicine, to Mac OS
X. One feature this database uses for optimizing code performance is [...]