← Back to issue list

elf: check if file exists before checking if ELF

View original Github issue

Metadata

Project
snapcraft
Number
#1901
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1901 as commit 592206be6, adding an existence check before ELF inspection to avoid parsing missing files (LP #1746397).

Resolution: closed resolved

Reason: PR #1901 was merged to snapcraft as commit 592206be6. Its change checks that a file exists before invoking the ELF checker, preventing errors on absent paths.

Evaluated by: mr-cal-bot

No scores available.

Issue body

LP: #1746397 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? ----- I personally do not see this issue, nor do the tests which build the example for the dotnet plugin which exposes this for some folks. That said, this check does not hurt.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1901 as commit 592206be6, adding an existence check before ELF inspection to avoid parsing missing files (LP #1746397).
stealth/space-bunny-alpha — closed resolved Added and merged a file-existence guard before ELF parsing, addressing LP #1746397; commit 592206be6.
stealth/space-bunny-alpha — closed resolved Merged PR #1901 as commit 592206be6, adding a file-existence guard before ELF parsing despite LP #1746397 being unreproducible.
stealth/space-bunny-alpha — closed resolved Merged PR #1901 (commit 592206be6) adding an os.path.isfile/exists check before ElfFile.is_elf in elf handling, addressing Launchpad bug #1746397. Maintainers said they couldn't reproduce but merged the one-line guard.
stealth/space-bunny-alpha — closed resolved Merged #1901 (commit 592206be6), adding an existence check before ELF parsing for LP #1746397 despite the original failure being unreproducible.
qwen/qwen3.6-35b-a3b — — Merged a defensive file existence check before ELF parsing to address LP #1746397. The original bug could not be reproduced, but the reviewer approved the harmless one-line change to prevent potential errors.
qwen3.6-35b-a3b-mtp-q6 — — Merged a defensive file existence check before ELF parsing to address LP: #1746397. Reviewers could not reproduce the bug but approved the safe change. The PR was merged to prevent potential errors when handling missing files.

Update history

No update history recorded yet.

Related work

  • Related To: launchpad#1746397 (confidence 98%)

    Original Launchpad bug report referenced in the PR body.

Related issues

No related issues found above the similarity threshold.