Fix jitterbuffer - #422
Open
solos wants to merge 2 commits into
Open
Fix jitterbuffer#422solos wants to merge 2 commits into
solos wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #422 +/- ##
==========================================
+ Coverage 81.46% 81.49% +0.03%
==========================================
Files 91 91
Lines 4688 4686 -2
==========================================
Hits 3819 3819
+ Misses 693 692 -1
+ Partials 176 175 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…orityQueue Critical defects addressed: 1. Circular list in Push Inserting a node with the same priority as the head previously created a bidirectional cycle (head.next = newPq && newPq.next = head), leading to infinite loops during Pop/Find. Rewrite the insertion logic to prevent circular references. 2. Missing prev/next pointer updates in Pop / PopAt / PopAtTimestamp Removal did not update adjacent nodes' prev/next pointers nor clear the removed node's pointers, resulting in dangling references and preventing timely GC. Add proper pointer re-linking and cleanup in all removal paths. 3. Memory leak in Clear Clear only set each node's prev to nil but left q.next pointing to the old head, keeping the entire node chain reachable and preventing GC. Fix by resetting q.next to nil so the chain becomes unreachable and collectible.
Initialize PriorityQueue and node pointer fields explicitly in NewQueue and newNode.
thatsnotright
force-pushed
the
fix-jitterbuffer
branch
from
September 17, 2026 11:11
855d9ec to
7a77736
Compare
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.
Description
Inserting a node with the same priority as the head previously created a
bidirectional cycle (head.next = newPq && newPq.next = head), leading to
infinite loops during Pop/Find. Rewrite the insertion logic to prevent
circular references.
Missing prev/next pointer updates in Pop / PopAt / PopAtTimestamp
Removal did not update adjacent nodes' prev/next pointers nor clear the
removed node's pointers, resulting in dangling references and preventing
timely GC. Add proper pointer re-linking and cleanup in all removal paths.
3.Memory leak in Clear
Clear only set each node's prev to nil but left q.next pointing to the old
head, keeping the entire node chain reachable and preventing GC. Fix by
resetting q.next to nil so the chain becomes unreachable and collectible.
Reference issue
None