rocksdb/env
Andrew Kryczka dfc61e7c24 initialize local variable for UBSAN in PosixEnv function
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
2018-04-25 13:42:02 -07:00
..
env_basic_test.cc Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
env_chroot.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
env_chroot.h Change RocksDB License 2017-07-15 16:11:23 -07:00
env_encryption.cc Fix some typos in comments and docs. 2018-03-08 10:27:25 -08:00
env_hdfs.cc Disallow compactions if there isn't enough free space 2018-03-06 16:27:54 -08:00
env_posix.cc initialize local variable for UBSAN in PosixEnv function 2018-04-25 13:42:02 -07:00
env_test.cc Add crash-recovery correctness check to db_stress 2018-04-24 15:58:22 -07:00
env.cc Add crash-recovery correctness check to db_stress 2018-04-24 15:58:22 -07:00
io_posix.cc Add crash-recovery correctness check to db_stress 2018-04-24 15:58:22 -07:00
io_posix.h Add crash-recovery correctness check to db_stress 2018-04-24 15:58:22 -07:00
mock_env_test.cc Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
mock_env.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
mock_env.h Change RocksDB License 2017-07-15 16:11:23 -07:00
posix_logger.h Disallow compactions if there isn't enough free space 2018-03-06 16:27:54 -08:00