don't crash when weird things happen when deserializing a rntuple
This commit is contained in:
parent
7cbc199f34
commit
61a597d797
1 changed files with 9 additions and 2 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue