[d3d12] Rework signal handlers to dump debug info. Prevent rogue pointer access.#1076
Open
manon-traverse wants to merge 1 commit intollvm:mainfrom
Open
[d3d12] Rework signal handlers to dump debug info. Prevent rogue pointer access.#1076manon-traverse wants to merge 1 commit intollvm:mainfrom
manon-traverse wants to merge 1 commit intollvm:mainfrom
Conversation
manon-traverse
commented
Apr 10, 2026
| template <> char CapabilityValueEnum<directx::ShaderModel>::ID = 0; | ||
| template <> char CapabilityValueEnum<directx::RootSignature>::ID = 0; | ||
|
|
||
| static std::mutex SignalHandlerMutex; |
Contributor
Author
There was a problem hiding this comment.
The lock may seem overkill as our use cases are single-threaded at the moment. However, the overhead of this mutex is so small it makes sense to have it there in case we ever go into a complex multi-threaded scenario.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We can register the signal handler on device creation instead of in the executeProgram function. This brings the three executeProgram implementations closer to each other and causes this debug feature to now always be enabled.
Additionally, there was an issue where a rogue pointer access could occur if the signal handler was triggered after device clean-up. That problem is resolved with this PR as well.