GH-48560: [C++][Parquet] When fuzzing, treat Table validation error as hard error #48863
+8
−3
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.
Rationale for this change
Currently, when fuzzing a Parquet file, proper errors are ignored since the file is most of the time simply invalid: it's ok to get an error.
However, if reading a Parquet row group was successful, the Parquet reader should have ensured that the resulting Table is structurally sound: calling
Table::Validateshould succeed, and if it fails then it should report a bug.What changes are included in this PR?
Call
Table::Validateon a successful read from the Parquet fuzz target, and abort if validation fails.Table::ValidateFull, however, is allowed to fail, as for example a Parquet UTF8 column could contain invalid UTF8 bytes, and we don't detect that when decoding.Are these changes tested?
By existing tests and fuzz regression files.
Actual running this on OSS-Fuzz will tell us if this is really a good idea.
Are there any user-facing changes?
No.