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 in function external_func at address 0x{{[0-9a-f]+}}; ignoring both functions
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]+}}; ignoring this function
12
+
13
+
14
+
.globl internal_corrupt
15
+
.type internal_corrupt,@function
16
+
internal_corrupt:
17
+
b constant_island_0 // targeting the data in code
18
+
constant_island_0:
19
+
.word0xffffffff
20
+
.size internal_corrupt,.-internal_corrupt
21
+
22
+
23
+
.globl external_corrupt
24
+
.type external_corrupt,@function
25
+
external_corrupt:
26
+
b constant_island_1 // targeting the data in code externally
# CHECK-TARGETS: BOLT-WARNING: corrupted control flow detected in function external_corrupt: an external branch/call targets an invalid instruction in function external_func at address 0x{{[0-9a-f]+}}; ignoring both functions
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]+}}; ignoring this function
12
+
13
+
14
+
.globl internal_corrupt
15
+
.type internal_corrupt,@function
16
+
internal_corrupt:
17
+
jb data_in_code + 1# targeting the data in code, and jump into the middle of 'xorb' instruction
18
+
data_in_code:
19
+
.byte0x34, 0x01# data in code, will be disassembled as 'xorb 0x1, %al'
20
+
.size internal_corrupt,.-internal_corrupt
21
+
22
+
23
+
.globl external_corrupt
24
+
.type external_corrupt,@function
25
+
external_corrupt:
26
+
jb external_func + 1# targeting the middle of normal instruction externally
0 commit comments