[all-commits] [llvm/llvm-project] f1aa60: MCFragment: Use trailing data for fixed-size part
Fangrui Song via All-commits
all-commits at lists.llvm.org
Sat Aug 2 10:29:57 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f1aa6050bd90f8ec4273da55d362e23905ad3a81
https://github.com/llvm/llvm-project/commit/f1aa6050bd90f8ec4273da55d362e23905ad3a81
Author: Fangrui Song <i at maskray.me>
Date: 2025-08-02 (Sat, 02 Aug 2025)
Changed paths:
M llvm/include/llvm/MC/MCObjectStreamer.h
M llvm/include/llvm/MC/MCSection.h
M llvm/lib/MC/MCObjectStreamer.cpp
M llvm/lib/MC/MCWin64EH.cpp
M llvm/lib/MC/MCWinCOFFStreamer.cpp
M llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
A llvm/test/MC/ELF/many-instructions.s
Log Message:
-----------
MCFragment: Use trailing data for fixed-size part
Reapply after #151724 switched to `char *Data`, fixing a
-fsanitize=pointer-overflow issue in MCAssembler::layout.
---
The fixed-size content of the MCFragment object is now stored as
trailing data, replacing ContentStart/ContentEnd with ContentSize. The
available space for trailing data is tracked using `FragSpace`. If the
available space is insufficient, a new block is allocated within the
bump allocator `MCObjectStreamer::FragStorage`.
FragList::Tail cannot be reused when switching sections or subsections,
as it is not associated with the fragment space tracked by `FragSpace`.
Instead, allocate a new fragment, which becomes less expensive after #150574.
Data can only be appended to the tail fragment of a subsection, not to
fragments in the middle. Post-assembler-layout adjustments (such as
.llvm_addrsig and .llvm.call-graph-profile) have been updated to use the
variable-size part instead.
Pull Request: https://github.com/llvm/llvm-project/pull/150846
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