[lld] [LLD][COFF] Fix out-of-bounds write when filling gaps with INT3 in code sections (PR #180411)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 8 16:03:16 PST 2026
================
@@ -0,0 +1,60 @@
+# REQUIRES: x86
+# Test that merging .bss into .text with /FILEALIGN:1 doesn't crash.
+#
+# RUN: yaml2obj %s -o %t.obj
+# RUN: lld-link /out:%t.exe /entry:main /subsystem:console \
+# RUN: /merge:.bss=.text /filealign:1 %t.obj
+# RUN: llvm-readobj --sections %t.exe | FileCheck %s
+
+# CHECK: Name: .text
+# CHECK-NEXT: VirtualSize: 0x
----------------
aganea wrote:
nit: I guess we just write the virtual size that we're expecting here: 0x104
https://github.com/llvm/llvm-project/pull/180411
More information about the llvm-commits
mailing list