gty404 opened a new pull request, #1034: URL: https://github.com/apache/iceberg-cpp/pull/1034
## Summary - `ManifestReader` and `ManifestListReader` cast raw integers from the file straight into `ManifestStatus`, `DataFile::Content` and `ManifestContent`. An out-of-range value in a manifest then reached switches that end in `unreachable()`, which is undefined behavior. - Validate these fields at parse time through `ManifestStatusFromInt`, `DataFileContentFromInt` and a new `ManifestContentFromInt`, returning `InvalidArgument` for unknown values. - `ManifestWriter::WriteEntry` now returns an error instead of `std::unreachable()` for an unknown entry status. ## Test plan - [x] New tests write manifests / manifest lists with out-of-range `data_file.content`, `status` and manifest `content` (bypassing `ManifestWriter`) and assert the readers return `InvalidArgument` - [x] New tests fail without the fix and pass with it - [x] `ctest` (all 20 test targets) passes locally -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
