Repository navigation
Commit 8570dfe
ffi: reject multi-argument buffer fast trampolines
The arm64 and x86_64 SysV emitters convert each buffer argument with a
helper call after loading earlier arguments into their target registers.
The call clobbers those registers, so the target would receive wrong
values for every argument before the buffer.
This is not reachable today: buffer-typed trampolines are generated only
for single-argument signatures. Reject other shapes in the emitters so a
future caller falls back instead of miscompiling.
Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
Assisted-by: claude:opus-5.5
PR-URL: #67046
Reviewed-By: Paolo Insogna <paolo@cowtech.it>1 parent 576eef4 commit 8570dfe
2 files changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
260 | 265 | | |
261 | 266 | | |
262 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
381 | 386 | | |
382 | 387 | | |
383 | 388 | | |
| |||
0 commit comments