Commit d3f752c
committed
Perform
As an optimization, we were previously avoiding the load and instead simply
materializing the null reference value, since that is the only value that
inhabits `(ref null none)`. However, in certain situations, such as when loading
from a table when Spectre mitigations are enabled, we rely on that load being
attempted and resulting in a trap if the table index is out of bounds. This
commit makes it so that we will always perform the load if our given
`ir::MemFlags` can trap.
Fixes bytecodealliance#10353(ref null none) loads that can trap1 parent 8357599 commit d3f752c
File tree
2 files changed
+27
-0
lines changed- crates/cranelift/src/gc/enabled
- tests/misc_testsuite/gc
2 files changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
439 | 454 | | |
440 | 455 | | |
441 | 456 | | |
442 | 457 | | |
443 | 458 | | |
444 | 459 | | |
445 | 460 | | |
| 461 | + | |
446 | 462 | | |
447 | 463 | | |
448 | 464 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments