dfc61e7c24
Summary: It seems clear to me that the variable is initialized before line 492, but it wasn't clear to UBSAN. The failure was: ``` In file included from ./env/io_posix.h:14:0, from env/env_posix.cc:44: ./include/rocksdb/env.h: In member function ‘virtual rocksdb::Status rocksdb::{anonymous}::PosixEnv::NewMemoryMappedFileBuffer(const string&, std::unique_ptr<rocksdb::MemoryMappedFileBuffer>*)’: ./include/rocksdb/env.h:822:36: error: ‘base’ may be used uninitialized in this function [-Werror=maybe-uninitialized] : base(_base), length(_length) {} ^ env/env_posix.cc:482:11: note: ‘base’ was declared here void* base; ``` We can just initialize to nullptr to keep UBSAN happy. Closes https://github.com/facebook/rocksdb/pull/3770 Differential Revision: D7756287 Pulled By: ajkr fbshipit-source-id: 0f2efb9594e2d3a30706a4ca7e1d4a6328031bf2 |
||
---|---|---|
.. | ||
env_basic_test.cc | ||
env_chroot.cc | ||
env_chroot.h | ||
env_encryption.cc | ||
env_hdfs.cc | ||
env_posix.cc | ||
env_test.cc | ||
env.cc | ||
io_posix.cc | ||
io_posix.h | ||
mock_env_test.cc | ||
mock_env.cc | ||
mock_env.h | ||
posix_logger.h |