Skip to content

Commit

Permalink
Fix deadlock when trying to report an unsupported NativeCall return type
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Apr 17, 2020
1 parent 1aa555f commit ca6534d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core/nativecall_dyncall.c
Expand Up @@ -725,6 +725,7 @@ MVMObject * MVM_nativecall_invoke(MVMThreadContext *tc, MVMObject *res_type,
break;
}
default:
MVM_gc_mark_thread_unblocked(tc);
MVM_telemetry_interval_stop(tc, interval_id, "nativecall invoke failed");
MVM_exception_throw_adhoc(tc, "Internal error: unhandled dyncall return type");
}
Expand Down
1 change: 1 addition & 0 deletions src/core/nativecall_libffi.c
Expand Up @@ -689,6 +689,7 @@ MVMObject * MVM_nativecall_invoke(MVMThreadContext *tc, MVMObject *res_type,
handle_ret(tc, unsigned long long, ffi_arg, MVM_nativecall_make_int);
break;
default:
MVM_gc_mark_thread_unblocked(tc);
MVM_telemetry_interval_stop(tc, interval_id, "nativecall invoke failed");
MVM_exception_throw_adhoc(tc, "Internal error: unhandled libffi return type");
}
Expand Down

0 comments on commit ca6534d

Please sign in to comment.