Commit 6fce53a
authored
[BOLT][AArch64] Skip as many zeros as possible in padding validation (#166467)
We are skipping four zero's at a time when validating code padding in
case that the next zero would be part of an instruction or constant
island, and for functions that have large amount of padding (like due to
hugify), this could be very slow. We now change the validation to skip
as many as possible but still need to be 4's exact multiple number of
zero's. No valid instruction has encoding as 0x00000000 and even if we
stumble into some constant island, the API
`BinaryFunction::isInConstantIsland()` has been made to find the size
between the asked address and the end of island (#164037), so this
should be safe.1 parent 3be8250 commit 6fce53a
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1010 | 1010 | | |
1011 | 1011 | | |
1012 | 1012 | | |
1013 | | - | |
1014 | | - | |
| 1013 | + | |
| 1014 | + | |
1015 | 1015 | | |
1016 | 1016 | | |
1017 | 1017 | | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
| 1018 | + | |
1021 | 1019 | | |
1022 | 1020 | | |
1023 | 1021 | | |
| |||
0 commit comments