質問

the first error in the 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).

as you can see the filename_char has a value... the next functions (TFile::TFile) are from a stable CERN library.

I can't understand what is wrong in the ROOTproductidrecord.cpp:1078 ...

役に立ちましたか?

解決

from http://zlib.net/zlib_faq.html#faq36 : "Valgrind (or some similar memory access checker) says that deflate is performing a conditional jump that depends on an uninitialized value. Isn't that a bug?

No. That is intentional for performance reasons, and the output of deflate is not affected. This only started showing up recently since zlib 1.2.x uses malloc() by default for allocations, whereas earlier versions used calloc(), which zeros out the allocated memory. Even though the code was correct, versions 1.2.4 and later was changed to not stimulate these checkers."

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top