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

Segmentation fault for AppImages bundling glibc 2.39 (caused by lief < 0.16) #357

Open
git-developer opened this issue Oct 2, 2024 · 0 comments

Comments

@git-developer
Copy link

Some AppImages based on Debian Trixie and Ubuntu Noble cause a segmentation fault. Both distros use glibc 2.39. When building an AppImage for Trixie, one of the following messages is shown (build log):

Can't find string offset for section name '.note.cafe1a7e'
Dynamic tag: 0x70000000 is not supported for the current architecture

This message arises from LIEF, a library used to patch binary files. Debugging uncovered that the messages occur when libc.so.6 is patched. Apparently, libc contains something that LIEF is not able to handle. In 07/2024, lief-project/LIEF#1081 was merged, adding support new dynamic tags for x86_64. When LIEF is updated to a version containing these changes (currently available: pre-release 0.16.0.dev0), the messages are gone and no segfault occurs.

Workaround for latest Docker image (1.1.0) (example): Before running appimage-builder, update LIEF, install packaging-legacy and patch package.py

Cause:

  1. Latest LIEF (0.16.0.dev0) requires an update of setuptools (>= 71)
  2. Latest setuptools requires an update of packaging (>= 24)
  3. Latest packaging requires that versions conform to PEP 440 (see InvalidVersion exception when invalid version used on Setuptools 66 pypa/setuptools#3772)
  4. AppImageBuilder 1.1.0 uses packaging.version to compare versions of debian packages (e.g. 1.21.1ubuntu2.3).

Originally reported downstream in C0rn3j/sc-controller#32.

Please consider releasing an updated Docker image containing a current version of LIEF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant