Skip to content

Prevent concurrent fragment resolution from corrupting directive stacks - #363

Merged
Bill Avery (wravery) merged 2 commits into
mainfrom
copilot/fix-double-free-segv-crash
Sep 15, 2026
Merged

Bill Avery (wravery) merged 2 commits into
mainfrom
copilot/fix-double-free-segv-crash

Conversation

Copilot AI commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Concurrent object resolvers shared mutable fragment directive stacks, allowing fragment traversal on separate threads to race during push_front/pop_front and cause double-free or segmentation faults.

  • Resolution isolation

    • Snapshot inherited fragment definition, spread, and inline-fragment stacks for each selection visitor.
    • Preserve inherited directive context without sharing mutable list nodes across asynchronous resolvers.
  • Regression coverage

    • Exercise the same fragment beneath three concurrently resolved fields in the threaded coroutine test.

Co-authored-by: wravery <6502881+wravery@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix double-free SEGV sanitizer crashes using fragments in query Prevent concurrent fragment resolution from corrupting directive stacks Sep 15, 2026
@wravery
Bill Avery (wravery) marked this pull request as ready for review September 15, 2026 21:21
@wravery
Bill Avery (wravery) merged commit 7df6c3f into main Sep 15, 2026
24 of 28 checks passed
@wravery
Bill Avery (wravery) deleted the copilot/fix-double-free-segv-crash branch September 15, 2026 21:36
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.

Using fragments in query sometimes results in double-free/SEGV sanitizer crashes.

2 participants