fix(linter): skip foreign-arch ELF files in library linter
Metadata
Current evaluation
Maintainer PR adding elf_machine to _ArchConfig and get_host_elf_machine() so the library linter skips foreign-arch ELF files, avoiding QEMU/binfmt crashes on cross-arch builds. Approved, core CI green; only CLA and OSV-scanner fail.
Suggested action: needs review
Reason: Author lengau is a maintainer and the review status is 'approved (1 reviewers)' with the full unit/integration spread suites passing; the only red checks are 'Canonical CLA' (signature/admin step) and 'Security scan / OSV-scanner', neither of which points at this diff. Five unresolved review comments and a 139-day age with activity only 2 days ago suggest some reviewer discussion is still pending, so it is not ready to land unattended. Note one design caveat worth raising: comparing e_machine against the host means every file in an arm64-on-amd64 build is skipped, so the linter silently no-ops rather than validating the target arch (relevant to the sibling complaint in #4373 that it 'can't be disabled').
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
50
Quick Win:
26
Complexity:
28
Confidence:
82
Actionability:
72
|
needs review | Maintainer PR adding elf_machine to _ArchConfig and get_host_elf_machine() so the library linter skips foreign-arch ELF files, avoiding QEMU/binfmt crashes on cross-arch builds. Approved, core CI green; only CLA and OSV-scanner fail. | |
| stealth/space-bunny-alpha |
Impact:
52
Quick Win:
21
Complexity:
26
Confidence:
72
Actionability:
55
|
keep open | Maintainer-authored fix (snapcraft#6249) making the library linter skip ELF files whose e_machine differs from the host, avoiding QEMU/binfmt crashes on cross-arch builds. Approved, 2 required CI checks failing. | |
| qwen/qwen3.6-35b-a3b |
Impact:
60
Quick Win:
21
Complexity:
30
Confidence:
70
Actionability:
50
|
needs review | Skips foreign-arch ELF files in the library linter to prevent QEMU invocation failures and segfaults during cross-architecture builds. Open, 126 days inactive, CI passing except CLA. | |
| qwen/qwen3.8-27b |
Impact:
50
Quick Win:
30
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. |
Update history
| Date | Change |
|---|---|
| updated | |
| updated |
Related work
-
Likely Fixed By:
canonical/snapcraft#4373
(confidence 92%)
PR body explicitly states 'Fixes: canonical/snapcraft#4373'; issue is still open and describes the foreign-arch library linter failure plus the maintainer's suggestion to check target arch via readelf.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4373 library linter fails on foreign archs and can't be disabled for core20 | snapcraft | open | Cross-arch core20 builds still lint foreign ELF files, causing missing-loader failures or QEMU segfaults and potentially 20+ GB core dumps; open PR #6249 proposes the fix. |