Skip to content

Commit 2bfec9c

Browse files
committed
sys/targets: use a custom data offset for arm32
ARM32 suffers from the same problem as ARM64 - the data offset may be beyond the addressable memory range. Cc #5986. Cc #5770.
1 parent 7153f4a commit 2bfec9c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

sys/targets/targets.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -781,14 +781,13 @@ func initTarget(target *Target, OS, arch string) {
781781
}
782782

783783
func (target *Target) defaultDataOffset() uint64 {
784+
if target.Arch == ARM64 || target.Arch == ARM {
785+
// On ARM/ARM64, in many cases we can't use many enough bits of the address space.
786+
// Let's use the old value for now. It's also problematic (see #5770), but it's
787+
// lesser of the two evils.
788+
return 0x20000000
789+
}
784790
if target.PtrSize == 8 {
785-
if target.Arch == ARM64 {
786-
// On ARM64, in many cases we can't use many enough bits of the address space.
787-
// Let's use the old value for now. It's also problematic (see #5770), but it's
788-
// lesser of the two evils.
789-
return 0x20000000
790-
}
791-
792791
// An address from ASAN's 64-bit HighMem area.
793792
// 0x200000000000 works both for arm64 and amd64. We don't run syzkaller tests on any other platform.
794793
// During real fuzzing, we don't build with ASAN, so the address should not matter much as long as

0 commit comments

Comments
 (0)