techoe / ceres-solver

Automatically exported from code.google.com/p/ceres-solver
Other
0 stars 0 forks source link

Uninitialized read in gradient checking cost function test #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
==5335== Conditional jump or move depends on uninitialised value(s)
==5335==    at 0x4E00AB: ceres::internal::IsArrayValid(int, double const*) 
(/home/keir/wrk/ceres-solver.git/internal/ceres/array_utils.cc:49)
==5335==    by 0x4C81EC: 
ceres::internal::ParameterBlock::UpdateLocalParameterizationJacobian() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/parameter_block.h:214)
==5335==    by 0x4C7EA5: 
ceres::internal::ParameterBlock::SetParameterization(ceres::LocalParameterizatio
n*) (/home/keir/wrk/ceres-solver.git/internal/ceres/parameter_block.h:157)
==5335==    by 0x4C76B9: 
ceres::internal::ProblemImpl::AddParameterBlock(double*, int, 
ceres::LocalParameterization*) 
(/home/keir/wrk/ceres-solver.git/internal/ceres/problem_impl.cc:323)
==5335==    by 0x4AB4A3: 
ceres::internal::GradientCheckingProblemImpl_ProblemDimensionsMatch_Test::TestBo
dy() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gradient_checking_cost_function_
test.cc:350)
==5335==    by 0x51203F: void 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3394)
==5335==    by 0x50C15D: void 
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3430)
==5335==    by 0x4EFB95: testing::Test::Run() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3466)
==5335==    by 0x4F07AB: testing::TestInfo::Run() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3642)
==5335==    by 0x4F114E: testing::TestCase::Run() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3749)
==5335==    by 0x4F7216: testing::internal::UnitTestImpl::RunAllTests() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:5541)
==5335==    by 0x5134A1: bool 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::Uni
tTestImpl, bool>(testing::internal::UnitTestImpl*, bool 
(testing::internal::UnitTestImpl::*)(), char const*) 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3394)
==5335== 
==5335== Conditional jump or move depends on uninitialised value(s)
==5335==    at 0x4E00C6: ceres::internal::IsArrayValid(int, double const*) 
(/home/keir/wrk/ceres-solver.git/internal/ceres/array_utils.cc:49)
==5335==    by 0x4C81EC: 
ceres::internal::ParameterBlock::UpdateLocalParameterizationJacobian() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/parameter_block.h:214)
==5335==    by 0x4C7EA5: 
ceres::internal::ParameterBlock::SetParameterization(ceres::LocalParameterizatio
n*) (/home/keir/wrk/ceres-solver.git/internal/ceres/parameter_block.h:157)
==5335==    by 0x4C76B9: 
ceres::internal::ProblemImpl::AddParameterBlock(double*, int, 
ceres::LocalParameterization*) 
(/home/keir/wrk/ceres-solver.git/internal/ceres/problem_impl.cc:323)
==5335==    by 0x4AB4A3: 
ceres::internal::GradientCheckingProblemImpl_ProblemDimensionsMatch_Test::TestBo
dy() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gradient_checking_cost_function_
test.cc:350)
==5335==    by 0x51203F: void 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3394)
==5335==    by 0x50C15D: void 
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3430)
==5335==    by 0x4EFB95: testing::Test::Run() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3466)
==5335==    by 0x4F07AB: testing::TestInfo::Run() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3642)
==5335==    by 0x4F114E: testing::TestCase::Run() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3749)
==5335==    by 0x4F7216: testing::internal::UnitTestImpl::RunAllTests() 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:5541)
==5335==    by 0x5134A1: bool 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::Uni
tTestImpl, bool>(testing::internal::UnitTestImpl*, bool 
(testing::internal::UnitTestImpl::*)(), char const*) 
(/home/keir/wrk/ceres-solver.git/internal/ceres/gmock_gtest_all.cc:3394)
==5335== 

Original issue reported on code.google.com by k...@google.com on 9 Jul 2012 at 7:47

GoogleCodeExporter commented 9 years ago
It seems to be a consequence of the uninitialized arrays x, y, z, and w in 
gradient_checking_cost_function_test.cc. (The values are used to update the 
jacobian)

Original comment by markus.m...@esat.kuleuven.be on 11 Jul 2012 at 11:51

GoogleCodeExporter commented 9 years ago
Fixed on the master branch.

Original comment by sameerag...@google.com on 11 Jul 2012 at 6:23

GoogleCodeExporter commented 9 years ago

Original comment by sameerag...@google.com on 11 Jul 2012 at 6:23