Valgrind 中的第一个错误:
/media/d2bfa67b-a3e7-4dde-9f3a-119260e3a29c/workspace/000-back-office/var/root_data/global_product_id/global_product_id_cut.root
==14840== Conditional jump or move depends on uninitialised value(s)
==14840== at 0x8B264E0: inflateReset2 (in /lib/x86_64-linux-gnu/libz.so.1.2.3.4)
==14840== by 0x8B265D8: inflateInit2_ (in /lib/x86_64-linux-gnu/libz.so.1.2.3.4)
==14840== by 0x5627ABA: R__unzip (in /media/d2bfa67b-a3e7-4dde-9f3a-119260e3a29c /workspace/000-back-office/src/root/lib/libCore.so)
==14840== by 0x5E1B409: TKey::ReadObjWithBuffer(char*) (in /media/d2bfa67b-a3e7-4dde-9f3a-119260e3a29c/workspace/000-back-office/src/root/lib/libRIO.so)
==14840== by 0x5DFB673: TFile::GetStreamerInfoList() (in /media/d2bfa67b-a3e7-4dde-9f3a-119260e3a29c/workspace/000-back-office/src/root/lib/libRIO.so)
==14840== by 0x5DF9CC9: TFile::ReadStreamerInfo() (in /media/d2bfa67b-a3e7-4dde-9f3a-119260e3a29c/workspace/000-back-office/src/root/lib/libRIO.so)
==14840== by 0x5DFCE68: TFile::Init(bool) (in /media/d2bfa67b-a3e7-4dde-9f3a-119260e3a29c/workspace/000-back-office/src/root/lib/libRIO.so)
==14840== by 0x5DFDE12: TFile::TFile(char const*, char const*, char const*, int) (in /media/d2bfa67b-a3e7-4dde-9f3a-119260e3a29c/workspace/000-back-office/src/root/lib/libRIO.so)
==14840== by 0x43BBA6: ROOTproduct_id_record::loadROOT(bool) (ROOTproductidrecord.cpp:1078)
==14840== by 0x42E5CD: ROOTproduct_id::loadROOT() (ROOTproductid.cpp:142)
==14840== by 0x469D17: main (report_engine.cpp:528)
ROOTproductidrecord.cpp:1077-1078
std::cout<<filename_char<<"\n";
TFile* my_rootfile_pointer = new TFile(filename_char); //open an existing file for reading (default).
如您所见,filename_char 有一个值......下一个函数(TFile::TFile)来自一个稳定的 CERN 库。
我不明白 ROOTproductidrecord.cpp:1078 有什么问题...