don't crash when weird things happen when deserializing a rntuple

This commit is contained in:
silverweed 2025-02-11 14:45:11 +01:00
parent 7cbc199f34
commit 61a597d797

View file

@ -353,7 +353,11 @@ RNTuple_Data get_rntuple_data(Arena *arena, const Inspected_File &file, const TF
}
}
assert(inserted != duplicate);
if (inserted == duplicate) {
fprintf(stderr, "WARNING: we were supposed to either add a page or recognize it as a duplicate, but %s "
"true for page 0x%" PRIX64 " - 0x%" PRIX64 "!?\n",
inserted ? "both things are" : "neither thing is", pinfo->range.start, pinfo->range.end());
}
}
if (duplicate) {
@ -446,7 +450,10 @@ RNTuple_Data get_rntuple_data(Arena *arena, const Inspected_File &file, const TF
}
// verify that we added all pages to chunks
assert(idx == n_pages);
if (idx != n_pages) {
fprintf(stderr, "WARNING: we were supposed to add %" PRIu64 " pages but we added %" PRIu64 ": something very wrong"
" is going on with this file!\n", n_pages, idx);
}
if (n_groups) {
Page_Info_Group &last_group = groups[n_groups - 1];