-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.0.0-rc8
-
Component/s: Build
-
None
-
ALL
I was upgraded from gcc 4.8.x to 4.9.1 and while building rc8 I get these error messages:
g++ -o build/linux2/norm/mongo/db/query/plan_cache.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-missing-braces -fno-builtin-memcmp -DBOOST_ALL_NO_LIB -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=1234 -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE___THREAD -DMONGO_HAVE_CXX11_ATOMICS -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -I/foo/rocksdb/include -I/bar/include -Isrc/third_party/s2 -Isrc/third_party/pcre-8.30 -Isrc/third_party/boost -Ibuild/linux2/norm -Isrc src/mongo/db/query/plan_cache.cpp src/mongo/db/query/plan_cache.cpp: In member function 'mongo::Status mongo::PlanCache::getEntry(const mongo::CanonicalQuery&, mongo::PlanCacheEntry**) const': src/mongo/db/query/plan_cache.cpp:481:34: error: 'entry' may be used uninitialized in this function [-Werror=maybe-uninitialized] *entryOut = entry->clone(); ^ src/mongo/db/query/plan_cache.cpp: In member function 'mongo::Status mongo::PlanCache::get(const mongo::CanonicalQuery&, mongo::CachedSolution**) const': src/mongo/db/query/plan_cache.cpp:370:48: error: 'entry' may be used uninitialized in this function [-Werror=maybe-uninitialized] *crOut = new CachedSolution(key, *entry);
Looking at the code and LRUKeyValue::get I see that it can return an error without initializing the second argument, so I think this is an error. But my C++ reading skills are rusty.
- related to
-
SERVER-24240 Ubuntu 16.04 on the v3.2 branch needs to compile with the v2 toolchain
- Closed