(arm64) Extend branch range in __memcpy_chk.
Conditional branch has limited range (1MB) and can not be extended by the linker. The current distance (in walleye build) is 500KB, about half of the maximum. HWASan pushes it over the limit. Replace conditional branch with regular branch, which has longer range (26 vs 19 bits offset) and can be extended in the linker if needed. Bug: 112437884 Bug: 12231437 Test: SANITIZE_TARGET=hwaddress Change-Id: Idc083fb557ab3a859541beb009809992406a6703
This commit is contained in:
parent
23cfc34790
commit
00d087c629
|
@ -30,8 +30,11 @@
|
|||
|
||||
ENTRY(__memcpy_chk)
|
||||
cmp x2, x3
|
||||
bls memcpy
|
||||
// Direct b.ls memcpy may not have enough range
|
||||
b.hi .L_memcpy_chk_fail
|
||||
b memcpy
|
||||
|
||||
.L_memcpy_chk_fail:
|
||||
// Preserve for accurate backtrace.
|
||||
stp x29, x30, [sp, -16]!
|
||||
.cfi_def_cfa_offset 16
|
||||
|
|
Loading…
Reference in New Issue