Skip to content

Commit 4594620

Browse files
sys/targets: arm64: compile with -fno-jump-tables
Prevent the compiler from generating jump tables that may kick in at random places and break SyzOS execution (#5565)
1 parent 62300cc commit 4594620

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sys/targets/targets.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,11 @@ var List = map[string]map[string]*Target{
291291
KernelHeaderArch: "x86",
292292
},
293293
ARM64: {
294-
PtrSize: 8,
295-
PageSize: 4 << 10,
294+
PtrSize: 8,
295+
PageSize: 4 << 10,
296+
// Jump tables mess up with SyzOS execution, disable them for now.
297+
// See https://github.com/google/syzkaller/issues/5565 for context.
298+
CFlags: []string{"-fno-jump-tables"},
296299
Triple: "aarch64-linux-gnu",
297300
KernelArch: "arm64",
298301
KernelHeaderArch: "arm64",

0 commit comments

Comments
 (0)