Skip to content
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

binutils+patchelf: Upcoming incompatibility that already affects Fedora #362211

Open
ADKaster opened this issue Dec 5, 2024 · 2 comments
Open
Labels
0.kind: bug Something is broken

Comments

@ADKaster
Copy link
Contributor

ADKaster commented Dec 5, 2024

Describe the bug

Patch bf6d7087de0a7351fd1dfd5f41522a7f4f576180 to binutils, applied to binutils 2.43.50, exposes a bad assumption in patchelf.

Binaries linked with this version of binutils crash when their rpath is modified with patchelf.

Steps To Reproduce

Steps to reproduce the behavior:

Ensure that the BFD linker has the referenced patch applied.

g++ -o hello hello.cpp
./hello
Hello, World!
patchelf --set-rpath '/usr/lib' ./hello # Any path fails
./hello
Segmentation fault (core dumped)

Expected behavior

Non-crashing binaries. The binutils maintainers have stated that they intend to keep this section re-order if possible, as it allows gdb to give more useful information when analyzing core dumps. (And there's not much activity on the patchelf bug tracker 😬 )

Screenshots

N/A

Additional context

https://bugzilla.redhat.com/show_bug.cgi?id=2319341
https://bugzilla.redhat.com/show_bug.cgi?id=2321588
NixOS/patchelf#568
microsoft/vcpkg#41576
LadybirdBrowser/ladybird#2149

Metadata

N/A

Notify maintainers

@Ericson2314 @lovesegfault


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@ADKaster ADKaster added the 0.kind: bug Something is broken label Dec 5, 2024
@winterqt
Copy link
Member

winterqt commented Dec 6, 2024

cc @Mic92

@Mic92
Copy link
Member

Mic92 commented Dec 6, 2024

We are currently stuck on an old patchelf version as well. I believe NixOS/patchelf#544 addresses most part of it. However the bigger issue with patchelf maintenance is that no matter how many regression test you add with every change you do, there is always something breaking in nixpkgs. I added issue to remove patchelf from stdenv, which would greatly help development: #362353 as it would remove the testing scope. All in all, not a very fun task to do, especially if you have to fix issues that only every happen in a nix build, and would require an stdenv rebuild to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants