Issue appears to be that zipr.cpp:640-ish is filling gaps between non-executable scoops, and assigning executable spaces on the same page as non-executable data scoops.
I cannot reproduce this. I ran the command that you gave me and was able to execute ./xxx. I'm sorry to be dumb, but I don't really know where to go from here.
None of the commands I gave indicated to run xxx, just use readelf on it and see if any segments are RWE. It won't run w/o the proper library path and loaded libraries.
Sorry. I was just trying to take the next step and assumed that you meant it didn't work when run. I apologize. Although, I was able to get it to run by just pointing it to one of the configs in the source directory.
@jdh8d Check out rwe_fix branch for my suggested fix. Unfortunately you cannot merge this directly without seeing an error in apache_prefork. Here's why: With this addition, those gaps are forced to be full sized. As a result, there is no room to place the phdrs.
I was able to verify that the fix worked by putting in a temporary workaround in my local environment that shrank those non-executable scoops to an arbitrary size (6 bytes).
@jdh8d Check out rwe_fix branch for my suggested fix. Unfortunately you cannot merge this directly without seeing an error in apache_prefork. Here's why: With this addition, those gaps are forced to be full sized. As a result, there is no room to place the phdrs.
I was able to verify that the fix worked by putting in a temporary workaround in my local environment that shrank those non-executable scoops to an arbitrary size (6 bytes).
I think the non-executable scoops that're being inserted for gap-filling are taking up the space for the phdrs. I recommend we don't fill gaps between RW pages. Only if the gap is bounded on one side by a R-- or R-X page. Also, being careful not to gap-fill onto the RW-side of the page.