Skip to content

Commit aa344c0

Browse files
committed
Add integration test for TBasket
1 parent 143c1d0 commit aa344c0

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

roottest/root/tree/basket/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@ ROOTTEST_ADD_TEST(basket
88
MACRO rundropbasket.C
99
COPY_TO_BUILDDIR DataTest3_cel.root
1010
OUTREF dropbasket.ref)
11+
12+
# corrupted.root contains a TTree "tree" with a corrupted TBasket that has fNevBufSize == 4 and fNevBuf == 4210752.
13+
# Since fNevBuf is much larger than fNevBufSize this would cause oob reads unless TBasket properly validates this.
14+
# Verify that it does.
15+
ROOTTEST_ADD_TEST(corrupted_basket
16+
COPY_TO_BUILDDIR corrupted.root
17+
COMMAND ${ROOT_root_CMD} -q -l -e "(new TFile(\"corrupted.root\"))->template Get<TTree>(\"tree\")->GetEntry(0)"
18+
PASSREGEX "Inconsistent length for the entry offset buffer \\(4210752 events for a buffer size of 4\\)")
5.66 KB
Binary file not shown.

0 commit comments

Comments
 (0)