Skip to content

Commit

Permalink
[metadata] Propagate error in mono_runtime_try_invoke_array (mono/mon…
Browse files Browse the repository at this point in the history
…o#18382)

This was prompted by mono/mono#18339, which seems to be failing to locate a native library and then hitting an assertion. We should propagate the error instead, so that if others run into something similar they can see what's actually going wrong instead of just getting a runtime crash.

Commit migrated from mono/mono@1178ab3
  • Loading branch information
CoffeeFlux authored Jan 8, 2020
1 parent 6891bc5 commit 6d175d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -5576,7 +5576,7 @@ mono_runtime_try_invoke_array (MonoMethod *method, void *obj, MonoArray *params,

if (!obj) {
obj = mono_object_new_checked (mono_domain_get (), method->klass, error);
mono_error_assert_ok (error);
return_val_if_nok (error, NULL);
g_assert (obj); /*maybe we should raise a TLE instead?*/
#ifndef DISABLE_REMOTING
if (mono_object_is_transparent_proxy (obj)) {
Expand Down

0 comments on commit 6d175d2

Please sign in to comment.