Commit b8c3508
committed
ZJIT: Avoid transmute dodging rustc/LLVM int-to-ptr miscompilation
The transmute triggered a miscompilation on Rust 1.85.0, where the
callback was "optimized" to unconditional go to a `SIGTRAP`ping
instruction.
While later Rust versions don't have the same miscompilation, it seems
that this is also partly our fault for being funky with the pointer provenance
in this code. It's possible rust will make some changes that break the
transmute.
Use the Exposed Provenance API here and steer clear of transmute.
See: rust-lang/rust#121282
See: rust-lang/rust#147265
See: rust-lang/rust#128409 (comment)1 parent a6c6e56 commit b8c3508
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1228 | 1228 | | |
1229 | 1229 | | |
1230 | 1230 | | |
1231 | | - | |
1232 | | - | |
| 1231 | + | |
| 1232 | + | |
1233 | 1233 | | |
1234 | 1234 | | |
1235 | 1235 | | |
1236 | 1236 | | |
1237 | | - | |
| 1237 | + | |
1238 | 1238 | | |
1239 | 1239 | | |
1240 | 1240 | | |
| |||
0 commit comments