mirror of
https://github.com/facebook/rocksdb.git
synced 2024-12-03 14:52:53 +00:00
70bf5ef093
Summary: Use another static object to join threads instead. This change is motivated by a case in which some code using NewLRUCache() -> ShardedCacheBase -> SemiStructuredUniqueIdGen -> GenerateRawUniqueId() -> Env::Default() was happening during static destruction. I didn't see anything else in PosixEnv or base classes that would cause a problem by not destroying. (WinEnv is already not destroyed; see env_default.cc) Pull Request resolved: https://github.com/facebook/rocksdb/pull/11538UndefinedBehaviorSanitizer: undefined-behavior env/env_test.cc:3561:23 in $ ``` Test Plan: test added, which would previously fail with UBSAN: ``` $ ./env_test --gtest_filter=*Destruct* Note: Google Test filter = *Destruct* [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from EnvTestMisc [ RUN ] EnvTestMisc.StaticDestruction [ OK ] EnvTestMisc.StaticDestruction (0 ms) [----------] 1 test from EnvTestMisc (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (0 ms total) [ PASSED ] 1 test. env/env_test.cc:3561:23: runtime error: member call on address 0x7f7b96671ca8 which does not point to an object of type 'rocksdb::Env' 0x7f7b96671ca8: note: object is of type 'N7rocksdb12ConfigurableE' 00 00 00 00 90 a7 f7 95 7b 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'N7rocksdb12ConfigurableE' Reviewed By: jowlyzhang Differential Revision: D46737389 Pulled By: pdillinger fbshipit-source-id: 0f80a443bf799ffc5641e898cf3a75f7d10a987b |
||
---|---|---|
.. | ||
composite_env.cc | ||
composite_env_wrapper.h | ||
emulated_clock.h | ||
env.cc | ||
env_basic_test.cc | ||
env_chroot.cc | ||
env_chroot.h | ||
env_encryption.cc | ||
env_encryption_ctr.h | ||
env_posix.cc | ||
env_test.cc | ||
file_system.cc | ||
file_system_tracer.cc | ||
file_system_tracer.h | ||
fs_posix.cc | ||
fs_readonly.h | ||
fs_remap.cc | ||
fs_remap.h | ||
io_posix.cc | ||
io_posix.h | ||
io_posix_test.cc | ||
mock_env.cc | ||
mock_env.h | ||
mock_env_test.cc | ||
unique_id_gen.cc | ||
unique_id_gen.h |