projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8817cc8
)
Init the unwind state struct so callers can rely on its content on failure.
author
Rodrigo Kumpera
<kumpera@gmail.com>
Tue, 24 Jan 2012 18:12:09 +0000
(16:12 -0200)
committer
Rodrigo Kumpera
<kumpera@gmail.com>
Tue, 24 Jan 2012 18:12:29 +0000
(16:12 -0200)
mono/mini/mini-darwin.c
patch
|
blob
|
history
diff --git
a/mono/mini/mini-darwin.c
b/mono/mini/mini-darwin.c
index ee5f8381b72ad50de4a6aa28f756b0c2cb591f33..96fdb5e7cae0a69d7e382c28e4fafe950450df55 100644
(file)
--- a/
mono/mini/mini-darwin.c
+++ b/
mono/mini/mini-darwin.c
@@
-274,6
+274,12
@@
mono_thread_state_init_from_handle (MonoThreadUnwindState *tctx, MonoNativeThrea
guint32 lmf_key;
#endif
+ /*Zero enough state to make sure the caller doesn't confuse itself*/
+ tctx->valid = FALSE;
+ tctx->unwind_data [MONO_UNWIND_DATA_DOMAIN] = NULL;
+ tctx->unwind_data [MONO_UNWIND_DATA_LMF] = NULL;
+ tctx->unwind_data [MONO_UNWIND_DATA_JIT_TLS] = NULL;
+
state = (thread_state_t) alloca (mono_mach_arch_get_thread_state_size ());
mctx = (mcontext_t) alloca (mono_mach_arch_get_mcontext_size ());