Skip to content

Commit

Permalink
2010-02-02 Zoltan Varga <vargaz@gmail.com>
Browse files Browse the repository at this point in the history
	* mini-amd64.c (mono_arch_emit_prolog): Initialize lmf->rsp in the prolog too
	so async stack walks don't crash.

svn path=/branches/mono-2-6/mono/; revision=150738
  • Loading branch information
vargaz committed Feb 2, 2010
1 parent ad322a2 commit 06822be
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions mono/mini/ChangeLog
@@ -1,3 +1,8 @@
2010-02-02 Zoltan Varga <vargaz@gmail.com>

* mini-amd64.c (mono_arch_emit_prolog): Initialize lmf->rsp in the prolog too
so async stack walks don't crash.

2010-02-02 Zoltan Varga <vargaz@gmail.com>

* mini-trampolines.c (mono_magic_trampoline): Fix a problem where the callsite
Expand Down
2 changes: 2 additions & 0 deletions mono/mini/debugger-agent.c
Expand Up @@ -1858,6 +1858,8 @@ mono_debugger_agent_thread_interrupt (void *sigctx, MonoJitInfo *ji)
tls->has_async_ctx = FALSE;
}

mono_memory_barrier ();

tls->suspended = TRUE;
MONO_SEM_POST (&suspend_sem);
}
Expand Down
6 changes: 5 additions & 1 deletion mono/mini/mini-amd64.c
Expand Up @@ -5827,7 +5827,11 @@ mono_arch_emit_prolog (MonoCompile *cfg)
/*
* The ip field is not set, the exception handling code will obtain it from the stack location pointed to by the sp field.
*/
/* sp is saved right before calls */
/*
* sp is saved right before calls but we need to save it here too so
* async stack walks would work.
*/
amd64_mov_membase_reg (code, cfg->frame_reg, cfg->arch.lmf_offset + G_STRUCT_OFFSET (MonoLMF, rsp), AMD64_RSP, 8);
/* Skip method (only needed for trampoline LMF frames) */
/* Save callee saved regs */
for (i = 0; i < MONO_MAX_IREGS; ++i) {
Expand Down

0 comments on commit 06822be

Please sign in to comment.