#581: make segfaults with PGE.pbc on fedora (r38365)
--------------------+-------------------------------------------------------
Reporter: Lu. | Owner: Infinoid
Type: bug | Status: new
Priority: normal | Milestone:
Component: core | Version:
Severity: medium | Keywords:
Lang: | Patch:
Platform: linux |
--------------------+-------------------------------------------------------
Comment(by Infinoid):
Replying to [comment:7 Lu.]:
> By the way, is it normal for SELinux to block things in that way ?
Yeah, I've heard of this problem once before. (see TT #18.)
> I mean, I didn't have that problem when building perl, or Image::Magick,
although I didn't do anything different this time.
Perl and IM don't do JIT. For JIT, we need to be able to allocate a
buffer somehow, write native machine code to it and execute it. SELinux
in restricted mode doesn't allow you to have the write and execute
permission bits set on the same buffer at the same time, and rather than
crashing or returning an error, it apparently fails silently, doesn't tell
the app and lets it go on and crash horribly when you try to set those
bits.
Before ticket #18, we were just using memory from the heap, which in
hindsight was a really bad idea. Now we're using mmapped buffers, which
plays a little nicer with selinux, but we're still not all the way there.
The next step for us is to use a 2-stage process where the memory is
allocated, set for writing, written to, set for executing, and executed.
We're not quite there yet, which is why selinux barfs. I'd be interested
to hear whether (for instance) the JVM has some special selinux setup to
get around this problem.
I think some of the parrot core developers are hoping that throwing away
our jit engine and using llvm or libjit will fix this problem for us.
Mark
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/581#comment:8>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets