initialize local variable for UBSAN in PosixEnv function
Summary: this is a repeat commit of a8a28da2159648a2f72c35ea507371df8a97a2a9, which got reverted together with 6afe22db2e667799d8c903db61750d676bffe152, but forgotten about when that commit was un-reverted in 46152d53bf58748fc3ed0681d8970c342bcfc47a. Closes https://github.com/facebook/rocksdb/pull/3796 Differential Revision: D7826077 Pulled By: ajkr fbshipit-source-id: edb22375da56e2feda50c5b35f942f4d2d52b19c
This commit is contained in:
parent
46152d53bf
commit
19fde54841
2
env/env_posix.cc
vendored
2
env/env_posix.cc
vendored
@ -479,7 +479,7 @@ class PosixEnv : public Env {
|
||||
if (status.ok()) {
|
||||
status = GetFileSize(fname, &size);
|
||||
}
|
||||
void* base;
|
||||
void* base = nullptr;
|
||||
if (status.ok()) {
|
||||
base = mmap(nullptr, static_cast<size_t>(size), PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED, fd, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user