mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
a3fb223ce6
On macOS/arm, signature verification has kill semantics by default. Signature verification is cached with a file's inode (actually, vnode), and if a new executable is copied over an existing file (which reuses the inode), the cache isn't invalidated. So when the new executable is executed, the kernel still has the old content's signature cached and the kills the executable because the old signatue doesn't match the new contents (https://openradar.appspot.com/FB8914243). As workaround, rm the desitnation files first, to ensure they have a fresh vnode (and hence no stale cached signature) after the copy. Part of PR46647. See also e0e334a9c1ac for a similar change.
40 lines
1.5 KiB
LLVM
40 lines
1.5 KiB
LLVM
; If the binary looks up libraries using an rpath, we can't test this
|
|
; without copying the whole lib dir or polluting the build dir.
|
|
; REQUIRES: static-libs
|
|
; REQUIRES: x86-registered-target
|
|
|
|
; The above also applies if the binary is built with libc++.
|
|
; UNSUPPORTED: libcxx-used
|
|
|
|
; This test is really flaky on Windows. On Windows, executables and DLLs cannot
|
|
; be deleted or written while they are loaded. The OS unlocks the file some
|
|
; time after the process terminates, so if 'rm' runs too quickly, it will fail
|
|
; with "access denied".
|
|
; UNSUPPORTED: system-windows
|
|
|
|
; Temporary bitcode file
|
|
; RUN: opt -o %t.input %s
|
|
|
|
; workaround for https://openradar.appspot.com/FB8914243
|
|
; RUN: rm -f %t.bin--
|
|
; RUN: rm -f %t.bin--x86_64
|
|
; RUN: rm -f %t.bin--x86_64-unknown
|
|
; RUN: rm -f %t.bin--x86_64-instcombine
|
|
|
|
; RUN: cp llvm-opt-fuzzer %t.bin--
|
|
; RUN: not %t.bin-- %t.input 2>&1 | FileCheck -check-prefix=EMPTY %s
|
|
; EMPTY: -mtriple must be specified
|
|
|
|
; RUN: cp llvm-opt-fuzzer %t.bin--x86_64
|
|
; RUN: not %t.bin--x86_64 %t.input 2>&1 | FileCheck -check-prefix=PASSES %s
|
|
; PASSES: at least one pass should be specified
|
|
|
|
; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-unknown
|
|
; RUN: not %t.bin--x86_64-unknown %t.input 2>&1 | FileCheck -check-prefix=UNKNOWN %s
|
|
; UNKNOWN: Unknown option: unknown
|
|
|
|
; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-instcombine
|
|
; RUN: %t.bin--x86_64-instcombine %t.input 2>&1 | FileCheck -check-prefix=CORRECT %s
|
|
; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine
|
|
; CORRECT: Running
|