-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix crash when consume depleted ops #3194
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3194 +/- ##
=======================================
Coverage 90.89% 90.89%
=======================================
Files 294 294
Lines 30407 30407
=======================================
Hits 27639 27639
Misses 2768 2768
☔ View full report in Codecov by Sentry. |
@@ -133,7 +133,7 @@ static Record _handoff | |||
( | |||
OpCreate *op | |||
) { | |||
return array_pop(op->records); | |||
return (array_len(op->records)) ? array_pop(op->records) : NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was to place a NULL as a marker
so you pop the last element which is NULL and we're done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem is that op_cond_traverse can call to this consume after it get the marker null and we can't do anything to change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why the operation continues on asking for more data after it received NULL
No description provided.