mirror of
https://github.com/Relintai/godot-mono-builds.git
synced 2024-11-14 10:27:25 +01:00
Add patch from Unity fork to fix TLS re-attachment
See: https://github.com/godotengine/godot/issues/33735
This commit is contained in:
parent
710b275fbf
commit
7e3e21defc
19
files/patches/mono-dbg-agent-clear-tls-instead-of-abort.diff
Normal file
19
files/patches/mono-dbg-agent-clear-tls-instead-of-abort.diff
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c
|
||||||
|
index df6329391df..05f30d5b4dc 100644
|
||||||
|
--- a/mono/mini/debugger-agent.c
|
||||||
|
+++ b/mono/mini/debugger-agent.c
|
||||||
|
@@ -4088,8 +4088,12 @@ thread_startup (MonoProfiler *prof, uintptr_t tid)
|
||||||
|
}
|
||||||
|
|
||||||
|
tls = (DebuggerTlsData *)mono_native_tls_get_value (debugger_tls_id);
|
||||||
|
- g_assert (!tls);
|
||||||
|
- // FIXME: Free this somewhere
|
||||||
|
+ if (tls) {
|
||||||
|
+ if (!tls->terminated) {
|
||||||
|
+ MONO_GC_UNREGISTER_ROOT(tls->thread);
|
||||||
|
+ }
|
||||||
|
+ g_free (tls);
|
||||||
|
+ }
|
||||||
|
tls = g_new0 (DebuggerTlsData, 1);
|
||||||
|
MONO_GC_REGISTER_ROOT_SINGLE (tls->thread, MONO_ROOT_SOURCE_DEBUGGER, NULL, "Debugger Thread Reference");
|
||||||
|
tls->thread = thread;
|
@ -26,7 +26,8 @@ def main(raw_args):
|
|||||||
mono_source_root = args.mono_sources
|
mono_source_root = args.mono_sources
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
'fix-mono-android-tkill.diff'
|
'fix-mono-android-tkill.diff',
|
||||||
|
'mono-dbg-agent-clear-tls-instead-of-abort.diff'
|
||||||
]
|
]
|
||||||
|
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
|
Loading…
Reference in New Issue
Block a user