[lld] f79efa9 - [lld][test] Fix unintentional write to a non-writeable dir (#150436)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 08:17:02 PDT 2025
Author: Jordan Rupprecht
Date: 2025-07-24T10:17:00-05:00
New Revision: f79efa986d61700d3fcfd22390bc1aa17d0d454c
URL: https://github.com/llvm/llvm-project/commit/f79efa986d61700d3fcfd22390bc1aa17d0d454c
DIFF: https://github.com/llvm/llvm-project/commit/f79efa986d61700d3fcfd22390bc1aa17d0d454c.diff
LOG: [lld][test] Fix unintentional write to a non-writeable dir (#150436)
The test added in #147970 fails trying to write `a.out` when run in a
non-writeable directory. I believe the intent was to write to /dev/null
as the output, but `-o` was omitted, so it's actually linking *in*
/dev/null and writing to `a.out`.
Added:
Modified:
lld/test/ELF/aarch64-build-attributes-malformed.s
Removed:
################################################################################
diff --git a/lld/test/ELF/aarch64-build-attributes-malformed.s b/lld/test/ELF/aarch64-build-attributes-malformed.s
index f40da1ab7e8a1..c8a0fd62b20aa 100644
--- a/lld/test/ELF/aarch64-build-attributes-malformed.s
+++ b/lld/test/ELF/aarch64-build-attributes-malformed.s
@@ -1,7 +1,7 @@
# REQUIRES: aarch64
# RUN: llvm-mc -triple=aarch64 -filetype=obj %s -o %t.o
-# RUN: ld.lld %t.o /dev/null 2>&1 | FileCheck %s
+# RUN: ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: (.ARM.attributes): unexpected end of data at offset 0x3f while reading [0x3d, 0x41)
More information about the llvm-commits
mailing list