VW's FileIO unit tests segfault with Clang 3.1 and GCC 4.7 #39

Closed
zmoratto opened this Issue Oct 10, 2012 · 0 comments

Projects

None yet

1 participant

@zmoratto
Member

The error seems to be buried inside GDAL 1.9.1. To reproduce the error, build VW like normal from Binary Builder. Then run:

cd $VW/src/vw/FileIO/tests
libtool --mode=execute valgrind TestDiskImageResource

You'll see a list of errors from Valgrind that sometimes and sometimes does not cause the system to segfault. Here's an excerpt of the badness:

Loading: TestDiskImageResource.cxx
==1802== Conditional jump or move depends on uninitialised value(s)
==1802==    at 0x67AD331: __GI___strncasecmp_l (strcmp.S:243)
==1802==    by 0x675F7EA: ____strtod_l_internal (strtod_l.c:585)
==1802==    by 0x76DC620: DOQ1Dataset::Open(GDALOpenInfo*) (stdlib.h:281)
==1802==    by 0x7864C12: GDALOpenInternal(GDALOpenInfo&, char const* const*) (gdaldataset.cpp:2236)==1802==    by 0x7864D81: GDALOpenInternal(char const*, GDALAccess, char const* const*) (gdaldataset.cpp:2208)
==1802==    by 0x4F22F9E: vw::DiskImageResourceGDAL::open(std::string const&) (DiskImageResourceGDAL.cc:251)
==1802==    by 0x4F265F4: vw::DiskImageResourceGDAL::DiskImageResourceGDAL(std::string const&) (DiskImageResourceGDAL.h:68)==1802==    by 0x4F2582C: vw::DiskImageResourceGDAL::construct_open(std::string const&) (DiskImageResourceGDAL.cc:559)  
==1802==    by 0x430510: DiskImageResource_WrongFiles_Test::TestBody() (TestDiskImageResource.cxx:351)==1802==    by 0x49B117: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest-all.cc:3394)==1802==    by 0x495F0F: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest-all.cc:3430)
==1802==    by 0x4827C0: testing::Test::Run() (gtest-all.cc:3466)
==1802==
==1802== Conditional jump or move depends on uninitialised value(s)
==1802==    at 0x67AF857: __GI___strncasecmp_l (strcmp.S:2255)
==1802==    by 0x675F7EA: ____strtod_l_internal (strtod_l.c:585)==1802==    by 0x76DC620: DOQ1Dataset::Open(GDALOpenInfo*) (stdlib.h:281)
==1802==    by 0x7864C12: GDALOpenInternal(GDALOpenInfo&, char const* const*) (gdaldataset.cpp:2236)==1802==    by 0x7864D81: GDALOpenInternal(char const*, GDALAccess, char const* const*) (gdaldataset.cpp:2208)==1802==    by 0x4F22F9E: vw::DiskImageResourceGDAL::open(std::string const&) (DiskImageResourceGDAL.cc:251)==1802==    by 0x4F265F4: vw::DiskImageResourceGDAL::DiskImageResourceGDAL(std::string const&) (DiskImageResourceGDAL.h:68)==1802==    by 0x4F2582C: vw::DiskImageResourceGDAL::construct_open(std::string const&) (DiskImageResourceGDAL.cc:559)  
==1802==    by 0x430510: DiskImageResource_WrongFiles_Test::TestBody() (TestDiskImageResource.cxx:351)==1802==    by 0x49B117: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest-all.cc:3394)
==1802==    by 0x495F0F: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest-all.cc:3430)
==1802==    by 0x4827C0: testing::Test::Run() (gtest-all.cc:3466)
==1802==
==1802== Use of uninitialised value of size 8
==1802==    at 0x67AF859: __GI___strncasecmp_l (strcmp.S:2257)
==1802==    by 0x675F7EA: ____strtod_l_internal (strtod_l.c:585)==1802==    by 0x76DC620: DOQ1Dataset::Open(GDALOpenInfo*) (stdlib.h:281)
==1802==    by 0x7864C12: GDALOpenInternal(GDALOpenInfo&, char const* const*) (gdaldataset.cpp:2236)==1802==    by 0x7864D81: GDALOpenInternal(char const*, GDALAccess, char const* const*) (gdaldataset.cpp:2208)
==1802==    by 0x4F22F9E: vw::DiskImageResourceGDAL::open(std::string const&) (DiskImageResourceGDAL.cc:251)==1802==    by 0x4F265F4: vw::DiskImageResourceGDAL::DiskImageResourceGDAL(std::string const&) (DiskImageResourceGDAL.h:68)==1802==    by 0x4F2582C: vw::DiskImageResourceGDAL::construct_open(std::string const&) (DiskImageResourceGDAL.cc:559)  
==1802==    by 0x430510: DiskImageResource_WrongFiles_Test::TestBody() (TestDiskImageResource.cxx:351)==1802==    by 0x49B117: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest-all.cc:3394)
==1802==    by 0x495F0F: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest-all.cc:3430)
==1802==    by 0x4827C0: testing::Test::Run() (gtest-all.cc:3466)
@zmoratto zmoratto closed this Jul 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment