Skip to content

Conversation

@rupprecht
Copy link
Collaborator

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.

The test added in llvm#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`.
@rupprecht rupprecht added the skip-precommit-approval PR for CI feedback, not intended for review label Jul 24, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 24, 2025

@llvm/pr-subscribers-lld

Author: Jordan Rupprecht (rupprecht)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/150436.diff

1 Files Affected:

  • (modified) lld/test/ELF/aarch64-build-attributes-malformed.s (+1-1)
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)
 

@llvmbot
Copy link
Member

llvmbot commented Jul 24, 2025

@llvm/pr-subscribers-lld-elf

Author: Jordan Rupprecht (rupprecht)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/150436.diff

1 Files Affected:

  • (modified) lld/test/ELF/aarch64-build-attributes-malformed.s (+1-1)
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)
 

@rupprecht rupprecht merged commit f79efa9 into llvm:main Jul 24, 2025
13 checks passed
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jul 28, 2025
The test added in llvm#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`.
@rupprecht rupprecht deleted the lld-test-out branch August 14, 2025 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lld:ELF lld skip-precommit-approval PR for CI feedback, not intended for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants