OLD | NEW |
(Empty) | |
| 1 ; RUN: not opt %s -minsfi-sandbox-memory-accesses -S 2>&1 | FileCheck %s |
| 2 |
| 3 ; The SandboxMemoryAccess pass should fail if it encounters an unexpected |
| 4 ; intrinsic such as this '@llvm.objectsize'. This mechanism protects MinSFI |
| 5 ; from unsafe operations it does not handle appearing in the bitcode. |
| 6 ; This could be a result of a bug in the compiler or a newly introduced |
| 7 ; LLVM instruction. |
| 8 |
| 9 declare i32 @llvm.objectsize.i32(i8*, i1) |
| 10 |
| 11 define i32 @test_unhandled_intrinsic(i8* %ptr) { |
| 12 %val = call i32 @llvm.objectsize.i32(i8* %ptr, i1 true) |
| 13 ret i32 %val |
| 14 } |
| 15 |
| 16 ; CHECK: LLVM ERROR: SandboxMemoryAccesses: unexpected instruction with pointer-
type operands |
OLD | NEW |