File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This reproduces a bug with instrumentation crashes on internal call
2
+
3
+ # REQUIRES: system-linux,bolt-runtime
4
+
5
+ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
6
+ # Delete our BB symbols so BOLT doesn't mark them as entry points
7
+ # RUN: llvm-strip --strip-unneeded %t.o
8
+ # RUN: ld.lld %t.o -o %t.exe -q -shared -fini=_fini
9
+ # RUN: llvm-bolt -instrument %t.exe -relocs -o %t.out
10
+
11
+ .text
12
+ .globl _start
13
+ .type _start, %function
14
+ .p2align 4
15
+ _start:
16
+ push %rbp
17
+ mov %rsp ,%rbp
18
+ push %r12
19
+ push %rbx
20
+ sub $0x120 ,%rsp
21
+ mov $0x3 ,%rbx
22
+ .J1:
23
+ cmp $0x0 ,%rbx
24
+ je .J2
25
+ callq .J3
26
+ nopl (%rax ,%rax ,1 )
27
+ lea var@GOTPCREL(%rip ),%rax
28
+ retq
29
+ .J2:
30
+ add $0x120 ,%rsp
31
+ pop %rbx
32
+ pop %r12
33
+ jmp .J4
34
+ .J3:
35
+ pop %rax
36
+ add $0x4 ,%rax
37
+ dec %rbx
38
+ jmp .J1
39
+ .J4:
40
+ pop %rbp
41
+ retq
42
+ .size _start, .-_start
43
+
44
+
45
+ .globl _fini
46
+ .type _fini, %function
47
+ .p2align 4
48
+ _fini:
49
+ hlt
50
+ .size _fini, .-_fini
51
+
52
+ .data
53
+ .globl var
54
+ var:
55
+ .quad 0xdeadbeef
You can’t perform that action at this time.
0 commit comments