Skip to content

TLeaf::ReadBasket invalid write in TMVA test #10010

Closed
@hahnjo

Description

@hahnjo

After #10005 is merged, the test TMVA-CrossValidation-Serialise will fail due to a stack-use-after-return:

352: WRITE of size 4 at 0x7f7ff4e1b880 thread T0
352:     #0 0x7f800120c3b9 in frombuf(char*&, unsigned int*) /home/jhahnfel/ROOT/src/core/base/inc/Bytes.h:310:7
352:     #1 0x7f800120c2bc in frombuf(char*&, int*) /home/jhahnfel/ROOT/src/core/base/inc/Bytes.h:442:48
352:     #2 0x7f7ffe26e9d0 in TBufferFile::ReadInt(int&) /home/jhahnfel/ROOT/src/io/io/inc/TBufferFile.h:401:4
352:     #3 0x7f80011965fc in TLeafI::ReadBasket(TBuffer&) /home/jhahnfel/ROOT/src/tree/tree/src/TLeafI.cxx:165:9
352:     #4 0x7f8001055b29 in TBranch::ReadLeavesImpl(TBuffer&) /home/jhahnfel/ROOT/src/tree/tree/src/TBranch.cxx:2382:13
352:     #5 0x7f800106b4a9 in TBranch::GetEntry(long long, int) /home/jhahnfel/ROOT/src/tree/tree/src/TBranch.cxx:1691:4
352:     #6 0x7f800125eea0 in TTree::GetEntry(long long, int)::$_3::operator()() const /home/jhahnfel/ROOT/src/tree/tree/src/TTree.cxx:5628:23
352:     #7 0x7f800125d3c8 in TTree::GetEntry(long long, int) /home/jhahnfel/ROOT/src/tree/tree/src/TTree.cxx:5703:7
352:     #8 0x50a984 in TestContex::runApplicationPhase(TString) /home/jhahnfel/ROOT/src/tmva/tmva/test/crossvalidation/TestCrossValidationSerialise.cxx:188:13
352:     #9 0x50b2a3 in TestCvSerialise(TMVA::Types::EMVA, TString, TString) /home/jhahnfel/ROOT/src/tmva/tmva/test/crossvalidation/TestCrossValidationSerialise.cxx:231:7
352:     #10 0x50b6e2 in TestCrossValidationSerialise() /home/jhahnfel/ROOT/src/tmva/tmva/test/crossvalidation/TestCrossValidationSerialise.cxx:240:7
352:     #11 0x50b8b3 in main /home/jhahnfel/ROOT/src/tmva/tmva/test/crossvalidation/TestCrossValidationSerialise.cxx:255:4
352:     #12 0x7f7ffad0aca2 in __libc_start_main (/lib64/libc.so.6+0x3aca2)
352:     #13 0x42361d in _start (/home/jhahnfel/ROOT/build-clang-asan-debug/tmva/tmva/test/crossvalidation/testCrossValidationSerialise+0x42361d)
352:
352: Address 0x7f7ff4e1b880 is located in stack of thread T0 at offset 128 in frame
352:     #0 0x7f7feed1f30f in cling::LookupHelper::findType(llvm::StringRef, cling::LookupHelper::DiagSetting) const (/home/jhahnfel/ROOT/build-clang-asan-debug/lib/libCling.so+0xdd430f)

Note: There may be other problems in the test after this issue is fixed. Please check locally with an instrumented build that the test passes afterwards!

Metadata

Metadata

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions