Repository navigation
fix(regex): own PCRE string buffers before release - #790
Merged
Merged
Conversation
This was referenced Aug 16, 2026
ropoctl
added a commit
that referenced
this pull request
Aug 18, 2026
The 0xC0000005 access violation in SemaCheck's in-process regex compilation (#798) was fixed by #790 (own PCRE string buffers before release). These 8 compile-error tests verify regex-literal comptime capture-group diagnostics; each now emits its exact expected expect-check-fail diagnostic on native Windows with no crash. Verified natively on Windows x86_64: all 8 tests produce their expected diagnostics (7x undefined-variable, 1x invalid-regex-literal) with zero access violations.
ropoctl
added a commit
that referenced
this pull request
Aug 18, 2026
The 0xC0000005 access violation in SemaCheck's in-process regex compilation (#798) was fixed by #790 (own PCRE string buffers before release). These 8 compile-error tests verify regex-literal comptime capture-group diagnostics; each now emits its exact expected expect-check-fail diagnostic on native Windows with no crash. Verified natively on Windows x86_64: all 8 tests produce their expected diagnostics (7x undefined-variable, 1x invalid-regex-literal) with zero access violations.
ropoctl
added a commit
that referenced
this pull request
Aug 18, 2026
The 0xC0000005 access violation in SemaCheck's in-process regex compilation (#798) was fixed by #790 (own PCRE string buffers before release). These 8 compile-error tests verify regex-literal comptime capture-group diagnostics; each now emits its exact expected expect-check-fail diagnostic on native Windows with no crash. Verified natively on Windows x86_64: all 8 tests produce their expected diagnostics (7x undefined-variable, 1x invalid-regex-literal) with zero access violations.
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.
Summary
Root cause
with_regex_error_message wrapped the allocated PCRE buffer with with_str_from_cstr, then passed that borrowed view to the consuming with_str_clone parameter. Dropping the consumed temporary freed the buffer once; the following explicit with_free(buf) freed the same pointer again. The debug allocator reported:
The same ownership error existed for capture-name table entries owned by PCRE.
Verification