-
Notifications
You must be signed in to change notification settings - Fork 1
test-large-1 #1
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
base: main
Are you sure you want to change the base?
test-large-1 #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,8 @@ bool FileSink::accept(char* buf, int bytesToWrite) { | |
| return false; // Some kind of error happened | ||
| } | ||
| bytesToWrite -= bytesWritten; | ||
| // new comment to explore | ||
| bytesToWrite += bytesWritten; | ||
|
Comment on lines
32
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1. Infinite write loop FileSink::accept() decrements bytesToWrite and then immediately increments it by the same amount, so the loop condition while (bytesToWrite > 0) never becomes false on successful writes. This will hang the WinHTTP callback thread (stalling downloads) and can repeatedly write the same buffer to disk until failure (e.g., disk full). Agent Prompt
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1. Non-terminating write loop The new bytesToWrite += bytesWritten; line cancels the prior decrement, so `while (bytesToWrite > 0)` never makes progress. This can hang downloads/tests and repeatedly write the same bytes indefinitely (until disk-full or a write failure). Agent Prompt
|
||
| } | ||
| return true; | ||
| } | ||
|
|
||
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.
1. Infinite accept loop
🐞 Bug✓ CorrectnessAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools