Skip to content

Conversation

@3rdit
Copy link
Contributor

@3rdit 3rdit commented Jan 5, 2026

This PR addresses some software breakpoint bugs that can cause crashes or unexpected behaviours in multi-threaded debugging.

Firstly, when multiple threads hit a breakpoint simultaneously the debug events are queued. If a user deletes the breakpoint while events are still pending, the queued events arrive with no breakpoint in the map. This before gave DBG_EXCEPTION_NOT_HANDLED which caused it to fall through and cause unexpected issue. This now detects this scenario and handles it gracefully.

Secondly, MemWriteUnsafe calls during the breakpoint handling never checked return values, now I check it and handle the failured appropriately.

Finally, this PR implements MemWriteSafe (previously just the same as MemWriteUnsafe) so now writing to a breakpoint address will no longer destroy the breakpoint.

Should close x64dbg/x64dbg#3654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regarding the issue of x64dbg not supporting multi-threaded exception handling

1 participant