-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc 1.66.0 requires execstack to load libLLVM.so #105783
Comments
Can you bisect this using https://github.com/rust-lang/cargo-bisect-rustc? |
Clearing the executable stack flag:
seems to work (at least |
Ran into this today on OpenSuse MicroOS. @teohhanhui that workaround works, though I don't understand the ramifications of it. |
Probably the library was build on a non-GNU platform (Windows?), so the linker did not add a GNU_STACK program header. (The absence of that header is treated the same as explicitly specifying an executable stack.) |
This comment was marked as off-topic.
This comment was marked as off-topic.
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-medium |
There is no need for reproducing, one can analyze the shared library:
should return
|
The presence of |
Still seeing this on gentoo/SELinux
And no, I don't want to switch off SELinux or enable executable stack system wide. Any ideas? This is a regression as things used to work just fine with older versions of the |
@dangowrt |
Unfortunately no as the system is too resource constraint and I don't have enough RAM to build LLVM from source, hence I'm using the |
You don't need to build anything from source if you have access to rustup. https://github.com/rust-lang/cargo-bisect-rustc downloads CI artifacts (so it does need internet access). If you can't use it, then it would at least be nice if you could bisect nightlies instead of stables, which are a lot more coarse. |
Fedora reproducer: test.sh:
Procedure:
Result:
Probably cause: #94381 Maybe Line 248 in 516a6d3
-Wl,-z,noexecstack .
|
cc @Kobzol for that last comment |
I don't think that this is caused by missing LLVM linker flags, rather it is caused by BOLT. I used Perhaps counterintuitively, when |
rustc 1.66.0 requires an executable stack, which is frowned upon for security reasons and for example generally forbidden by SELinux.
System: Debian sid (amd64)
Execstack allowed:
Execstack forbidden:
Maybe this is related to PGO or BOLT being enabled?
Stack trace:
The text was updated successfully, but these errors were encountered: