Skip to content

Instantly share code, notes, and snippets.

@asherkin
Created July 11, 2017 18:24
Show Gist options
  • Save asherkin/f45aed0c927d3e7e168e8bcb1d37a686 to your computer and use it in GitHub Desktop.
Save asherkin/f45aed0c927d3e7e168e8bcb1d37a686 to your computer and use it in GitHub Desktop.
diff --git a/vm/scripted-invoker.cpp b/vm/scripted-invoker.cpp
index 7ecd2bc..a7ef128 100644
--- a/vm/scripted-invoker.cpp
+++ b/vm/scripted-invoker.cpp
@@ -292,8 +292,14 @@ ScriptedInvoker::Invoke(cell_t *result)
}
/* Make the call if we can */
- if (ok)
+ if (ok) {
+ const char *debugName = this->DebugName();
+ size_t debugNameLength = strlen(debugName) + 1;
+ char *debugNameForCrashDumps = (char *)alloca(debugNameLength);
+ SafeStrcpy(debugNameForCrashDumps, debugNameLength, debugName);
+
ok = context_->Invoke(m_FnId, temp_params, numparams, result);
+ }
/* i should be equal to the last valid parameter + 1 */
bool docopies = ok;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment