Commit abf21e2
Fix DumpIL error message for IL stubs (dotnet#5731)
IL stubs (P/Invoke and Reverse P/Invoke marshaling stubs) have a nil
metadata token (0x06000000) and no IL body. The DumpIL command now
detects this case early via IsNilToken and prints a clear message
instead of the cryptic 'error decoding IL' / 'ilAddr is 0'. Also
improved the fallback error message when GetILAddress fails for non-nil
tokens.
This is the right fix, as IL for stubs is freed after JIT'ing in
FreeCompileTimeState. Sometimes they persist if the IL was put on the
loader heap for a couple of specific stubs, but it's not worth building
a big feature to display these in SOS, so we'll improve the message and
be done.
Fixes dotnet#3005
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent f11183a commit abf21e2
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
793 | 799 | | |
794 | 800 | | |
795 | 801 | | |
796 | | - | |
| 802 | + | |
797 | 803 | | |
798 | 804 | | |
799 | 805 | | |
| |||
0 commit comments