Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created March 4, 2015 14:23
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/ef0af70a206b38f9d9e6 to your computer and use it in GitHub Desktop.
Save jnthn/ef0af70a206b38f9d9e6 to your computer and use it in GitHub Desktop.
diff --git a/src/core/nativecall.c b/src/core/nativecall.c
index 51c9352..385bfcf 100644
--- a/src/core/nativecall.c
+++ b/src/core/nativecall.c
@@ -501,7 +501,6 @@ static char callback_handler(DCCallback *cb, DCArgs *cb_args, DCValue *cb_result
"Internal error: unhandled dyncall callback argument type");
}
}
- MVM_gc_root_temp_pop_n(tc, num_roots);
/* Call into a nested interpreter (since we already are in one). Need to
* save a bunch of state around each side of this. */
@@ -589,6 +588,7 @@ static char callback_handler(DCCallback *cb, DCArgs *cb_args, DCValue *cb_result
}
/* Clean up. */
+ MVM_gc_root_temp_pop_n(tc, num_roots);
MVM_free(args);
/* Indicate what we're producing as a result. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment