As a first step, we could remove `processtools::crash_illegal_instruction` and make `processtools::ProcessToolsService::crash` create a remote thread that calls `ntdll!DbgBreakpoint` [instead of `processtools::crash_illegal_instruction` ](https://searchfox.org/mozilla-central/source/toolkit/components/processtools/src/lib.rs#129), just like the current implementation used for bug 1793525. `CreateRemoteThread` is not the best way to do this though and bug 1793525 has had problems with it, in particular bug 1806050 which highlights that it's forbidden to create a remote (or local) thread in an exiting processes -- and exiting processes can hang in a `DLL_PROCESS_DETACH`. Hence the next goal in bug 1793525 is to replace the call to `CreateRemoteThread` by a dump-then-terminate approach, and we could do the same here.
Bug 1811304 Comment 2 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
As a first step, we could remove `processtools::crash_illegal_instruction` and make `processtools::ProcessToolsService::crash` create a remote thread that calls `ntdll!DbgBreakpoint` [instead of `processtools::crash_illegal_instruction` ](https://searchfox.org/mozilla-central/source/toolkit/components/processtools/src/lib.rs#129), just like the current implementation used for bug 1793525. `CreateRemoteThread` is not the best way to do this though and bug 1793525 has had problems with it, in particular bug 1806050 which highlights that it's forbidden to create a remote (or local) thread in an exiting process -- and exiting processes can hang in a `DLL_PROCESS_DETACH`. Hence the next goal in bug 1793525 is to replace the call to `CreateRemoteThread` by a dump-then-terminate approach, and we could do the same here.
As a first step, we could remove `processtools::crash_illegal_instruction` and make `processtools::ProcessToolsService::crash` create a remote thread that calls `ntdll!DbgBreakpoint` [instead of `processtools::crash_illegal_instruction` ](https://searchfox.org/mozilla-central/source/toolkit/components/processtools/src/lib.rs#129), just like the current implementation used for bug 1793525. `CreateRemoteThread` is not the best way to do what is required here though and bug 1793525 has had problems with it, in particular bug 1806050 which highlights that it's forbidden to create a remote (or local) thread in an exiting process -- and exiting processes can hang in a `DLL_PROCESS_DETACH`. Hence the next goal in bug 1793525 is to replace the call to `CreateRemoteThread` by a dump-then-terminate approach, and we could do the same here.
As a first step, we could remove `processtools::crash_illegal_instruction` and make `processtools::ProcessToolsService::crash` create a remote thread that calls into `ntdll!DbgBreakpoint` [instead of `processtools::crash_illegal_instruction` ](https://searchfox.org/mozilla-central/source/toolkit/components/processtools/src/lib.rs#129), just like the current implementation used for bug 1793525. `CreateRemoteThread` is not the best way to do what is required here though and bug 1793525 has had problems with it, in particular bug 1806050 which highlights that it's forbidden to create a remote (or local) thread in an exiting process -- and exiting processes can hang in a `DLL_PROCESS_DETACH`. Hence the next goal in bug 1793525 is to replace the call to `CreateRemoteThread` by a dump-then-terminate approach, and we could do the same here.
As a first step, we could remove `processtools::crash_illegal_instruction` and make `processtools::ProcessToolsService::crash` create a remote thread that calls into `ntdll!DbgBreakpoint` [instead of `processtools::crash_illegal_instruction` ](https://searchfox.org/mozilla-central/source/toolkit/components/processtools/src/lib.rs#129), just like the current implementation used for bug 1793525. `CreateRemoteThread` is not the best way to do what is required here though and bug 1793525 has had problems with it, in particular bug 1806050 which highlights that it's forbidden to create a remote (or local) thread in an exiting process -- and exiting processes can hang in a `DLL_PROCESS_DETACH`. Hence the next goal in bug 1793525 is to replace the call to `CreateRemoteThread` by a dump-then-terminate approach, and we could probably do the same here.