Commit 7baffba
Fix interpreter delegate calls with large alignment of first arg (#121936)
There is a problem with delegate calls when the first target arch is
aligned to 16 bytes. One path to call the delegate removes the delegate
obj from the argument list by moving the arguments on the interpreter
stack by the size of the delegate obj slot. But in the problematic case,
the stack slot of the delegate obj is followed by an unused slot that
ensures the alignment of the first target argument that starts after it.
Moving the arguments by the 8 bytes garbles the arguments and makes that
unused slot part of the first target arg. Moreover, it also doesn't move
the last 8 bytes of the last argument due to this.
This change fixes it by ensuring that we move the arguments starting at
the aligned location of the first target argument.
This fixes a large number of the libraries tests.
---------
Co-authored-by: Copilot <[email protected]>1 parent e2005d1 commit 7baffba
File tree
3 files changed
+25
-3
lines changed- src/coreclr
- interpreter
- inc
- vm
3 files changed
+25
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4526 | 4526 | | |
4527 | 4527 | | |
4528 | 4528 | | |
| 4529 | + | |
| 4530 | + | |
| 4531 | + | |
| 4532 | + | |
| 4533 | + | |
| 4534 | + | |
| 4535 | + | |
| 4536 | + | |
| 4537 | + | |
| 4538 | + | |
| 4539 | + | |
| 4540 | + | |
4529 | 4541 | | |
4530 | 4542 | | |
4531 | 4543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2563 | 2563 | | |
2564 | 2564 | | |
2565 | 2565 | | |
2566 | | - | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
2567 | 2577 | | |
2568 | 2578 | | |
2569 | 2579 | | |
| |||
2624 | 2634 | | |
2625 | 2635 | | |
2626 | 2636 | | |
2627 | | - | |
| 2637 | + | |
2628 | 2638 | | |
2629 | 2639 | | |
2630 | 2640 | | |
| |||
0 commit comments