← Back to issue list

elf: fixes for corrupt shared objects

View original Github issue

Metadata

Project
snapcraft
Number
#2929
Type
pull request
State
merged
Author
cjp256
Labels
Created
Updated
Closed

Current evaluation

Merged to master. Resolves corrupt shared object handling by catching elftools ConstructErrors and skipping corrupted ELF files during library crawling. Approved, passed CI, and achieved 100% diff coverage.

Suggested action:

No scores available.

Issue body

elf: catch and chain elftools' ConstructErrors to CorruptedElfFileError elf: ignore corrupted elf files when crawling for libraries

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged to master. Resolves corrupt shared object handling by catching elftools ConstructErrors and skipping corrupted ELF files during library crawling. Approved, passed CI, and achieved 100% diff coverage.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Updates ELF parsing to catch ConstructErrors and ignore corrupted files during library crawling. Achieved 100% diff coverage with negligible overall coverage impact.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Fixes corrupt ELF shared object handling by catching ConstructErrors and ignoring corrupted files during library crawling. Achieved 100% diff coverage with a negligible overall coverage decrease.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2663 elf: handle invalid elf files snapcraft merged Merged changes to handle invalid ELF files by catching elftools exceptions and silently ignoring them. Includes a regression test, passed CI, and achieved 100% diff coverage. Resolves LP #1838098.
83%
#2746 elf: handle missing dependencies not found on system snapcraft merged Merged updates to handle missing ELF dependencies when ldd fails to resolve them. The change prevents filtering unresolved libraries, refactors ldd parsing for reliability, and adds unit tests. Approved by one reviewer and passed CI checks.
74%
#1950 elf: better debug messages snapcraft merged Merged pull request polishing ELF debug messages for linker and library exclusion checks. Changes eliminate repetitive logging and reduce unnecessary calls. Approved by reviewers, passed CI, and successfully integrated.
72%
#75 refactor: rewrite elf file support debcraft merged Merged rewrite of ELF file support to better match deb building needs, replacing Snapcraft's implementation. Handles needed libraries; symbol support deferred. Approved by two reviewers, passed all CI checks, and resolves #72.
71%
#2830 elf: properly handle corrupted ELF files snapcraft merged Merged. Snapcraft now catches errors and issues warnings instead of crashing during priming when encountering corrupted ELF files. Test binaries from Qt 5.13 were added, and commits were squashed with source attribution included per reviewer feedback.
70%
#3840 elf: add handling and patching helpers snapcraft merged Merged into main following reviewer approval and passing CI checks. Introduces ELF binary listing and dynamic linker location helpers, adding handling and patching utilities to the elf module while increasing test coverage.
70%
#1989 elf: don't parse elf more than necessary snapcraft merged Merged a single-line change optimizing ELF parsing to avoid unnecessary work, yielding a minor performance improvement. Approved by a maintainer and passed CI checks.
70%