Commit 64d1d37
committed
Debugger: Prevent Abort on Invalid Virtual Method
If the debugger is asked to invoke an interface or virtual
method on a class the mono_object_get_virtual_method_internal
will assert & abort (or crash).
mono_object_get_virtual_method_internal assumes that
it is being asked to invoke a virtual method on an instance
that implements it. If that's not true it will assert & abort or
access invalid memory if assertions are disabled.
To protect against this we check if the this_arg can be cast to
the interface or base class type. If it can then we should be
safe to call mono_object_get_virtual_method_internal.1 parent 30ec273 commit 64d1d37
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6545 | 6545 | | |
6546 | 6546 | | |
6547 | 6547 | | |
| 6548 | + | |
| 6549 | + | |
| 6550 | + | |
| 6551 | + | |
6548 | 6552 | | |
6549 | 6553 | | |
6550 | 6554 | | |
| |||
6556 | 6560 | | |
6557 | 6561 | | |
6558 | 6562 | | |
| 6563 | + | |
| 6564 | + | |
| 6565 | + | |
| 6566 | + | |
6559 | 6567 | | |
6560 | 6568 | | |
6561 | 6569 | | |
| |||
0 commit comments