[lld] [LLD] Fix crash on parsing ':ALIGN' in linker script (PR #146723)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 10:40:00 PDT 2025
================
@@ -1,7 +1,24 @@
# REQUIRES: x86
+# RUN: rm -rf %t && split-file %s %t
+
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux /dev/null -o %t.o
-# RUN: ld.lld -o %t --script %s %t.o -shared
+# RUN: ld.lld -o %t.1.out --script %t/a.t %t.o -shared
# lld shouldn't crash.
+#--- a.t
SECTIONS { .foo : ALIGN(2M) {} }
+
+# RUN: not ld.lld -o /dev/null --script %t/b.t 2>&1 | FileCheck %s
+
+# lld should not crash and report the error properly.
+
+# CHECK: error: {{.*}}b.t:3: malformed number: :
----------------
parth-07 wrote:
Thank you for suggesting this. I have made the changes.
https://github.com/llvm/llvm-project/pull/146723
More information about the llvm-commits
mailing list