Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy function debug name onto stack for crash dumps #159

Merged
merged 4 commits into from Oct 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion vm/scripted-invoker.cpp
Expand Up @@ -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) + 2;
volatile char * volatile debugNameForCrashDumps = (char *)alloca(debugNameLength);
SafeStrcpy((char *)debugNameForCrashDumps + 1, debugNameLength - 1, debugName);

ok = context_->Invoke(m_FnId, temp_params, numparams, result);
}

/* i should be equal to the last valid parameter + 1 */
bool docopies = ok;
Expand Down