[llvm] [BOLT] Exit early when prepareToParse fails on buildid (PR #161151)
Paschalis Mpeis via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 11:00:37 PDT 2025
paschalis-mpeis wrote:
This corcerns and edge case, causing an assertion in 'prepareToParse'.
I was on Ubuntu without perf installed; instead there's a wrapper that prints installation instructions.
perf2bolt assumes perf is present. With one profile type it handled it okay, exiting gradefully with the message.
With another it crashed on the second prepareToParse (for mmaps).
I'd expect that if fetching the build-id failed, the subsequent call would also fail.
Note that when the binary lacks build-id, we have no issues, just a warning:
> BOLT-WARNING: build-id will not be checked because we could not read one from input binary
Either way, at prepareToParse we get an error while trying to read the error message.
If we handle that, then the assertion will be gone.
I've sent a second draft patch as an alternative to the first (066ebeec884bc167c8db36dd863e4ccdae5326c0).
https://github.com/llvm/llvm-project/pull/161151
More information about the llvm-commits
mailing list