Repository navigation
Conversation
load_vvertices() reopens the qvoronoi output file for reading while ftmp, the stream qhull wrote it through, is still open and unflushed. The reader only sees what stdio has already written to disk, so the end of the file (neighbour lists of the last vertices) is silently dropped. How many vertices are lost depends on the libc buffer size and the output size: on Linux/glibc the sample structures in data/sample lose 10 to 209 vertices each, and results differ between platforms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated on Linux x86_64 (Ubuntu 24.04, gcc 13) with the fixed binary. Only files the tests compare as different are replaced; the others are unchanged. 4URL gains a pocket (40), and pocket renumbering explains the large number of files for 6TL9 and 123abc. Co-Authored-By: Claude Opus 5.5 <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.
This PR fixes a bug where the output from qvoronoi is read before it is flushed: the list of vertices is truncated. Depending on the size of the truncation, this can lead to an entire pocket missed, or only some vertices in a pocket (which still impacts the computed predictors).
Measured on Linux x86_64 (Ubuntu 24.04, gcc 13) with an instrumented build of
mastercounting the verticesfill_vvertices()actually reads:mastermaster-c D-r 1224:PU8:A-a D-w both-a C,DPR is split in 2 commits: the code change itself vs the test files changes which are larger (e.g. shifts due to changes in pocket ranking).
Note: This bug was found by comparing results from a WASM instance of fpocket vs native. Due to differences in the stdio buffer length, inconsistencies were found.
Note 2: This investigation and PR had been made using a coding agent