Commit c8d60d7
[liftoff][arm64] Fix address computation for trap handling
This refactors the {GetMemOp} function once again:
Instead of computing (mem_start + (offset_reg + offset_imm)), do compute
((mem_start + offset_imm) + offset_reg). This avoids an overflow in
(offset_reg + offset_imm) when using 32-bit computations, which hides
OOB memory accesses when relying on the trap handler.
As a nice side-effect, this change makes the whole method a lot nicer to
read.
We also need to change {StoreTaggedPointer} now, which was relying on the
inner working of {GetMemOp}. The new version makes the semantics more
transparent at the cost of repeating some logic from (the previous version
of) {GetMemOp}.
[email protected]
Bug: v8:11955, chromium:1227465, v8:11951
Change-Id: Ia068ca7c4f7db89b81529edd3438b0e4eee7d23d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3015566
Commit-Queue: Clemens Backes <[email protected]>
Reviewed-by: Jakob Kummerow <[email protected]>
Cr-Commit-Position: refs/heads/master@{#75693}1 parent 408f592 commit c8d60d7
1 file changed
+19
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
146 | 136 | | |
147 | | - | |
| 137 | + | |
| 138 | + | |
148 | 139 | | |
149 | 140 | | |
150 | 141 | | |
| |||
470 | 461 | | |
471 | 462 | | |
472 | 463 | | |
473 | | - | |
474 | 464 | | |
475 | | - | |
476 | | - | |
477 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
478 | 476 | | |
479 | 477 | | |
480 | 478 | | |
| |||
492 | 490 | | |
493 | 491 | | |
494 | 492 | | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
| 493 | + | |
499 | 494 | | |
500 | 495 | | |
501 | 496 | | |
| |||
0 commit comments