fix(linter): skip foreign-arch ELF files in library linter
Metadata
Current evaluation
Adds elf_machine to _ArchConfig and get_host_elf_machine() to elf_utils.py, and skips foreign-arch ELF files in the library linter to avoid QEMU segfaults and multi-GB core dumps. Unreviewed ~3.5 months; CLA check failing; issue #4373 still open.
Suggested action: needs review
Reason: The underlying bug is still live on main: library_linter.py still calls load_dependencies() on every ELF file with no arch check, and issue #4373 remains open, so the PR is not stale-irrelevant. However it has had zero reviewer engagement for ~3.5 months (last activity 107 days ago, 0 comments, 0 reviewers), carries 6 unresolved review comments, and the Canonical CLA CI check is failing — a maintainer needs to review and unblock it.
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
50
Quick Win:
30.0
Staleness:
60
Complexity:
40
Confidence:
80
|
needs review | Adds elf_machine to _ArchConfig and get_host_elf_machine() to elf_utils.py, and skips foreign-arch ELF files in the library linter to avoid QEMU segfaults and multi-GB core dumps. Unreviewed ~3.5 months; CLA check failing; issue #4373 still open. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
55
Complexity:
20
Confidence:
85
|
needs review | Adds architecture check to library linter to skip foreign-arch ELF files, preventing QEMU crashes and core dumps. Currently pending maintainer review with 6 unresolved comments and a failing CLA check. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
15
Complexity:
20
Confidence:
90
|
needs review | Fixes a linter crash and SEGFAULT when processing foreign-arch ELF files by skipping mismatched architectures. Ready for review with passing tests. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
40
Complexity:
20
Confidence:
85
|
needs review | Fixes library linter segfaults on foreign-arch builds by skipping ELF files that do not match the host architecture. The pull request passes all checks, has zero comments, and is awaiting review. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/snapcraft#4373
(confidence 90%)
PR body explicitly states 'Fixes: canonical/snapcraft#4373'; issue is still open and the fix is not present in main, so this PR is the pending implementation of that fix.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4373 library linter fails on foreign archs and can't be disabled for core20 | snapcraft | open | Snapcraft's library linter fails on foreign-arch ELF files (cross-compile) and cannot be disabled on core20, causing build failures and multi-GB core dumps. Triaged with a maintainer note to check ELF target arch; no fix landed yet. |