Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created March 3, 2015 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnthn/4799e0f52e7359680f6a to your computer and use it in GitHub Desktop.
Save jnthn/4799e0f52e7359680f6a to your computer and use it in GitHub Desktop.
diff --git a/src/core/nativecall.c b/src/core/nativecall.c
index b96af40..37a7f75 100644
--- a/src/core/nativecall.c
+++ b/src/core/nativecall.c
@@ -435,6 +435,7 @@ static char callback_handler(DCCallback *cb, DCArgs *cb_args, DCValue *cb_result
/* Build a callsite and arguments buffer. */
MVMRegister *args = MVM_malloc(data->num_types * sizeof(MVMRegister));
+MVM_gc_allocate_gen2_default_set(data->tc); /*XXX*/
for (i = 1; i < data->num_types; i++) {
MVMObject *type = data->types[i];
MVMint16 typeinfo = data->typeinfos[i];
@@ -489,6 +490,7 @@ static char callback_handler(DCCallback *cb, DCArgs *cb_args, DCValue *cb_result
"Internal error: unhandled dyncall callback argument type");
}
}
+MVM_gc_allocate_gen2_default_clear(data->tc); /*XXX*/
/* Call into a nested interpreter (since we already are in one). Need to
* save a bunch of state around each side of this. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment