Repository navigation
Conversation
try_break wrapped `if ((rv = call) != 0) break;` in its own do { } while(0),
so the break bound to the macro's loop, not the caller's. It only ever
assigned rv and fell through. Its one user, the -d epilogue in
event_handler_fout's STACK_END, therefore kept trying to append the pid
field and the trace delimiter after the timestamp had already failed to
fit -- harmless only because a full buffer made every later attempt fail
the same way.
Inline the intended check so the do/while actually stops at the first
record that does not fit, and drop the macro since nothing else uses it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
try_breakinphpspy.hwrapsif ((rv = call) != 0) break;in its owndo { } while(0), so thebreakbinds to the macro's loop rather than the caller's — it only ever assignedrvand fell through. Its single user is the-depilogue block inevent_handler_fout's STACK_END, which as a result kept trying to append# pidand the trace delimiter after# trace_tshad already failed to fit. Harmless in practice only because a full buffer made every subsequent attempt fail the same way.This inlines the intended check so the
do/whilegenuinely stops at the first record that doesn't fit, and removes the macro (nothing else references it).makeis warning-free;test_verbose,test_pid,test_buffer_full,test_filter,test_flamegraphpass.Found while working on #167, which deletes this whole block anyway. Whichever lands second: if #167 goes first this PR becomes a one-line
phpspy.hchange; if this goes first, #167's rewrite of STACK_END supersedes the inlined lines. Either conflict is trivial.🤖 Generated with Claude Code