[all-commits] [llvm/llvm-project] 49bb99: [BOLT] Fix build-time assertion in RewriteInstance...
Maksim Panchenko via All-commits
all-commits at lists.llvm.org
Tue Apr 30 10:51:30 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 49bb993959668b3f319e9ea5fa0c97a41ab0890e
https://github.com/llvm/llvm-project/commit/49bb993959668b3f319e9ea5fa0c97a41ab0890e
Author: Maksim Panchenko <maks at fb.com>
Date: 2024-04-30 (Tue, 30 Apr 2024)
Changed paths:
M bolt/lib/Rewrite/RewriteInstance.cpp
Log Message:
-----------
[BOLT] Fix build-time assertion in RewriteInstance (#90540)
We use pwrite() in RewriteInstance to update contents of existing
sections. pwrite() requires file position to be set past the written
offset which we guarantee at the start of rewriteFile(). Then we had an
implicit assumption in patchBuildID() that the file position will be set
again in patchELFSymTabs() after being reset in patchELFPHDRTable().
That assumption was broken in #90300. The fix is to save and restore
file position in patchELFPHDRTable(). Then we don't have to update it
again in patchELFSymTabs().
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list