mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
fix(fex): x86 .NET guests suspend threads without injected signals (#3291)
* fix(fex): x86 .NET guests suspend threads without injected signals * fix(fex): keep a COMPlus_ thread-suspend override and cover older .NET guests * fix(fex): treat empty ThreadSuspendInjection values as unset
This commit is contained in:
1 parent
9cbad0b1ac
commit
3dbcefc14c
2 files changed
+16
-1
No files matched your search
@@ -682,6 +682,10 @@ def guest_environment(fex, env):
|
||||
if "aarch64" in result.get("GCONV_PATH", ""):
|
||||
result["GCONV_PATH"] = ""
|
||||
result.setdefault("GC_DISABLE_INCREMENTAL", "1")
|
||||
if not result.get("COMPlus_INTERNAL_ThreadSuspendInjection"):
|
||||
if not result.get("DOTNET_INTERNAL_ThreadSuspendInjection"):
|
||||
result["DOTNET_INTERNAL_ThreadSuspendInjection"] = "0"
|
||||
result["COMPlus_INTERNAL_ThreadSuspendInjection"] = result["DOTNET_INTERNAL_ThreadSuspendInjection"]
|
||||
if fex["portable"]:
|
||||
result["FEX_PORTABLE"] = "1"
|
||||
else:
|
||||
|
||||
@@ -1161,9 +1161,20 @@ class LaunchTest(FexTestCase):
|
||||
self.assertTrue(guest["FEX_APP_CONFIG_LOCATION"].endswith("/config/"))
|
||||
self.assertEqual((guest["FEX_SILENTLOG"], guest["FEX_OUTPUTLOG"]), ("0", "stderr"))
|
||||
self.assertEqual(guest["GC_DISABLE_INCREMENTAL"], "1")
|
||||
self.assertEqual(guest["DOTNET_INTERNAL_ThreadSuspendInjection"], "0")
|
||||
self.assertEqual(guest["COMPlus_INTERNAL_ThreadSuspendInjection"], "0")
|
||||
legacy = FEX["guest_environment"]({"portable": False}, {"COMPlus_INTERNAL_ThreadSuspendInjection": "1"})
|
||||
self.assertEqual(legacy["COMPlus_INTERNAL_ThreadSuspendInjection"], "1")
|
||||
self.assertNotIn("DOTNET_INTERNAL_ThreadSuspendInjection", legacy)
|
||||
blank = FEX["guest_environment"]({"portable": False}, {"COMPlus_INTERNAL_ThreadSuspendInjection": "",
|
||||
"DOTNET_INTERNAL_ThreadSuspendInjection": ""})
|
||||
self.assertEqual(blank["DOTNET_INTERNAL_ThreadSuspendInjection"], "0")
|
||||
self.assertEqual(blank["COMPlus_INTERNAL_ThreadSuspendInjection"], "0")
|
||||
guest = FEX["guest_environment"]({"portable": False}, {"LD_PRELOAD": str(arm), "FEX_PORTABLE": "1", "FEX_OUTPUTLOG": "/tmp/fex.log",
|
||||
"GC_DISABLE_INCREMENTAL": "0"})
|
||||
"GC_DISABLE_INCREMENTAL": "0", "DOTNET_INTERNAL_ThreadSuspendInjection": "1"})
|
||||
self.assertEqual((guest["FEX_OUTPUTLOG"], guest["GC_DISABLE_INCREMENTAL"]), ("/tmp/fex.log", "0"))
|
||||
self.assertEqual(guest["DOTNET_INTERNAL_ThreadSuspendInjection"], "1")
|
||||
self.assertEqual(guest["COMPlus_INTERNAL_ThreadSuspendInjection"], "1")
|
||||
self.assertNotIn("LD_PRELOAD", guest)
|
||||
self.assertNotIn("FEX_PORTABLE", guest)
|
||||
|
||||
|
||||
Reference in new issue
Block a user