You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# CHECK-TARGETS: BOLT-WARNING: corrupted control flow detected in function external_corrupt, an external branch/call targets an invalid instruction at address 0x{{[0-9a-f]+}}
11
+
# CHECK-TARGETS: BOLT-WARNING: corrupted control flow detected in function internal_corrupt, an internal branch/call targets an invalid instruction at address 0x{{[0-9a-f]+}}
12
+
13
+
14
+
.globl internal_corrupt
15
+
.type internal_corrupt,@function
16
+
internal_corrupt:
17
+
ret
18
+
nop
19
+
.Lfake_branch_1:
20
+
.inst 0x14000001// Opcode 0x14=b, check for internal branch: b + 0x4
21
+
.Lgarbage_1:
22
+
.word0xffffffff
23
+
.size internal_corrupt,.-internal_corrupt
24
+
25
+
26
+
.globl external_corrupt
27
+
.type external_corrupt,@function
28
+
external_corrupt:
29
+
ret
30
+
nop
31
+
.Lfake_branch_2:
32
+
.inst 0x14000004// Opcode 0x14=b, check for external branch: b + 0xf
# CHECK-TARGETS: BOLT-WARNING: corrupted control flow detected in function external_corrcupt, an external branch/call targets an invalid instruction at address 0x{{[0-9a-f]+}}
11
-
# CHECK-TARGETS: BOLT-WARNING: corrupted control flow detected in function internal_corrcupt, an internal branch/call targets an invalid instruction at address 0x{{[0-9a-f]+}}
10
+
# CHECK-TARGETS: BOLT-WARNING: corrupted control flow detected in function external_corrupt, an external branch/call targets an invalid instruction at address 0x{{[0-9a-f]+}}
11
+
# CHECK-TARGETS: BOLT-WARNING: corrupted control flow detected in function internal_corrupt, an internal branch/call targets an invalid instruction at address 0x{{[0-9a-f]+}}
12
12
13
13
14
-
.globlinternal_corrcupt
15
-
.typeinternal_corrcupt,@function
14
+
.globlinternal_corrupt
15
+
.typeinternal_corrupt,@function
16
16
.align16
17
-
internal_corrcupt:
17
+
internal_corrupt:
18
18
leaq .Lopts_1(%rip),%rax
19
19
addq$25,%rax
20
20
.byte0xf3,0xc3
@@ -26,13 +26,13 @@ internal_corrcupt:
26
26
.Lopts_1:
27
27
.byte114,1,52,40,56,120,44,105,110,116,41,0# data '114' will be disassembled as 'jb', check for internal branch: jb + 0x1
28
28
.align64
29
-
.sizeinternal_corrcupt,.-internal_corrcupt
29
+
.sizeinternal_corrupt,.-internal_corrupt
30
30
31
31
32
-
.globlexternal_corrcupt
33
-
.typeexternal_corrcupt,@function
32
+
.globlexternal_corrupt
33
+
.typeexternal_corrupt,@function
34
34
.align16
35
-
external_corrcupt:
35
+
external_corrupt:
36
36
leaq .Lopts_2(%rip),%rax
37
37
addq$25,%rax
38
38
.byte0xf3,0xc3
@@ -44,4 +44,4 @@ external_corrcupt:
44
44
.Lopts_2:
45
45
.byte114,99,52,40,56,120,44,99,104,97,114,41,0# data '114' will be disassembled as 'jb', check for external branch: jb + 0x63
0 commit comments