我正在开发一个名为Palabos的开源项目,由于文件量很大,我目前无法跟踪未初始化的值。
Valgrind正在运行以下选项:
- track-originins = yes --expensive-definedness-checks = yes
有没有更好的方法来确定哪个变量是罪魁祸首?
==27210== Conditional jump or move depends on uninitialised value(s)
==27210== at 0x100096EEF: plb::contained(long, long, long, plb::Box3D const&) (geometry3D.h:240)
==27210== by 0x100096EC3: plb::contained(plb::Dot3D, plb::Box3D const&) (geometry3D.h:292)
==27210== by 0x100096A4E: plb::DetectBorderLineFunctional3D<int>::process(plb::Box3D, plb::ScalarField3D<int>&) (voxelizer.hh:769)
==27210== by 0x100081F3F: plb::BoxProcessingFunctional3D_S<int>::processGenericBlocks(plb::Box3D, std::__1::vector<plb::AtomicBlock3D*, std::__1::allocator<plb::AtomicBlock3D*> >) (dataProcessingFunctional3D.hh:62)
==27210== by 0x1001153CD: plb::BoxProcessor3D::process() (dataProcessingFunctional3D.cpp:115)
==27210== by 0x100111F33: plb::executeDataProcessor(plb::DataProcessorGenerator3D const&, std::__1::vector<plb::AtomicBlock3D*, std::__1::allocator<plb::AtomicBlock3D*> >) (atomicBlockOperations3D.cpp:39)
==27210== by 0x100170CB0: plb::executeDataProcessor(plb::DataProcessorGenerator3D const&, std::__1::vector<plb::MultiBlock3D*, std::__1::allocator<plb::MultiBlock3D*> >) (multiBlockOperations3D.cpp:334)
==27210== by 0x100170E12: plb::executeDataProcessor(plb::DataProcessorGenerator3D const&, plb::MultiBlock3D&) (multiBlockOperations3D.cpp:348)
==27210== by 0x100081D45: void plb::applyProcessingFunctional<int>(plb::BoxProcessingFunctional3D_S<int>*, plb::Box3D, plb::MultiScalarField3D<int>&) (multiDataProcessorWrapper3D.hh:231)
==27210== by 0x10007CEE5: void plb::detectBorderLine<int>(plb::MultiScalarField3D<int>&, plb::Box3D const&, long) (voxelizer.hh:703)
==27210== by 0x10007C69C: std::__1::unique_ptr<plb::MultiScalarField3D<int>, std::__1::default_delete<plb::MultiScalarField3D<int> > > plb::voxelize<double>(plb::TriangularSurfaceMesh<double> const&, plb::Box3D const&, long) (voxelizer.hh:157)
==27210== by 0x10007A893: std::__1::unique_ptr<plb::MultiScalarField3D<int>, std::__1::default_delete<plb::MultiScalarField3D<int> > > plb::voxelize<double>(plb::TriangularSurfaceMesh<double> const&, long, long) (voxelizer.hh:117)
==27210== Uninitialised value was created by a heap allocation
==27210== at 0x1003BBA5B: malloc (in /usr/local/Cellar/valgrind/HEAD/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==27210== by 0x1005037DD: operator new(unsigned long) (in /usr/lib/libc++.1.dylib)
==27210== by 0x100040B6F: std::__1::__split_buffer<plb::Dot3D, std::__1::allocator<plb::Dot3D>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<plb::Dot3D>&) (new:168)
==27210== by 0x10004046C: std::__1::__split_buffer<plb::Dot3D, std::__1::allocator<plb::Dot3D>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<plb::Dot3D>&) (__split_buffer:305)
==27210== by 0x10008CF40: void std::__1::vector<plb::Dot3D, std::__1::allocator<plb::Dot3D> >::__push_back_slow_path<plb::Dot3D const&>(plb::Dot3D const&) (vector:1571)
==27210== by 0x1000966FB: plb::DetectBorderLineFunctional3D<int>::process(plb::Box3D, plb::ScalarField3D<int>&) (vector:1592)
==27210== by 0x100081F3F: plb::BoxProcessingFunctional3D_S<int>::processGenericBlocks(plb::Box3D, std::__1::vector<plb::AtomicBlock3D*, std::__1::allocator<plb::AtomicBlock3D*> >) (dataProcessingFunctional3D.hh:62)
==27210== by 0x1001153CD: plb::BoxProcessor3D::process() (dataProcessingFunctional3D.cpp:115)
==27210== by 0x100111F33: plb::executeDataProcessor(plb::DataProcessorGenerator3D const&, std::__1::vector<plb::AtomicBlock3D*, std::__1::allocator<plb::AtomicBlock3D*> >) (atomicBlockOperations3D.cpp:39)
==27210== by 0x100170CB0: plb::executeDataProcessor(plb::DataProcessorGenerator3D const&, std::__1::vector<plb::MultiBlock3D*, std::__1::allocator<plb::MultiBlock3D*> >) (multiBlockOperations3D.cpp:334)
==27210== by 0x100170E12: plb::executeDataProcessor(plb::DataProcessorGenerator3D const&, plb::MultiBlock3D&) (multiBlockOperations3D.cpp:348)
==27210== by 0x100081D45: void plb::applyProcessingFunctional<int>(plb::BoxProcessingFunctional3D_S<int>*, plb::Box3D, plb::MultiScalarField3D<int>&) (multiDataProcessorWrapper3D.hh:231)
==27210==