rocksdb/util
Yu Zhang 2207a66fe5 Make autovector call default constructor explicitly before move/copy (#12499)
Summary:
Make `autovector` constructs the stack based element in place before move or copy another `autovector`'s stack based elements. This is already done in  the move/copy version of `autovector::push_back` when adding item to the stack based memory
8e6e8957fb/util/autovector.h (L269-L285)

The ` values_ = reinterpret_cast<pointer>(buf_);` statement is not sufficient to ensure the class's member variables are properly constructed. I'm able to reproduce this consistently in a unit test in this change: https://github.com/facebook/rocksdb/compare/main...jowlyzhang:fix_sv_install with unit test:
`./tiered_compaction_test --gtest_filter="\*FastTrack\*"

With below stack trace P1203997597 showing the `std::string` copy destination is invalid, which indicates the object in the destination `autovector` is not constructed properly.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/12499

Test Plan: Existing unit tests.

Reviewed By: anand1976

Differential Revision: D55662354

Pulled By: jowlyzhang

fbshipit-source-id: 581ceb11155d3dd711998607ec6950c0e327556a
2024-04-04 12:33:05 -07:00
..
aligned_buffer.h
async_file_reader.cc Change ReadAsync callback API to remove const from FSReadRequest (#11649) 2024-02-16 09:14:55 -08:00
async_file_reader.h
atomic.h Safer wrapper for std::atomic, use in HCC (#12051) 2023-11-08 13:28:43 -08:00
autovector.h Make autovector call default constructor explicitly before move/copy (#12499) 2024-04-04 12:33:05 -07:00
autovector_test.cc
bloom_impl.h Clean up some FastRange calls (#11707) 2023-08-17 11:52:38 -07:00
bloom_test.cc Make RibbonFilterPolicy::bloom_before_level mutable (SetOptions()) (#11838) 2023-09-15 15:46:10 -07:00
build_version.cc.in
cast_util.h Create an UnownedPtr type (#12447) 2024-03-15 11:43:28 -07:00
channel.h
cleanable.cc
coding.cc
coding.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
coding_lean.h
coding_test.cc Remove extra semi colon from internal_repo_rocksdb/repo/util/coding_test.cc 2024-03-30 07:17:52 -07:00
compaction_job_stats_impl.cc Compare the number of input keys and processed keys for compactions (#11571) 2023-07-28 09:47:31 -07:00
comparator.cc Add support in SstFileReader to get a raw table iterator (#12385) 2024-04-02 21:23:06 -07:00
compression.cc Add CompressionOptions::checksum for enabling ZSTD checksum (#11666) 2023-08-18 15:01:59 -07:00
compression.h LZ4 set acceleration parameter (#11844) 2023-09-18 09:26:29 -07:00
compression_context_cache.cc internal_repo_rocksdb (435146444452818992) (#12115) 2023-12-01 11:15:17 -08:00
compression_context_cache.h
concurrent_task_limiter_impl.cc
concurrent_task_limiter_impl.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
core_local.h Add some more bit operations to internal APIs (#11660) 2023-08-02 11:30:10 -07:00
coro_utils.h
crc32c.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
crc32c.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
crc32c_arm64.cc
crc32c_arm64.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
crc32c_ppc.c
crc32c_ppc.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
crc32c_ppc_asm.S
crc32c_ppc_constants.h
crc32c_test.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
data_structure.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
defer.h
defer_test.cc
distributed_mutex.h Fix race in options taking effect (#11929) 2023-10-12 10:05:23 -07:00
duplicate_detector.h
dynamic_bloom.cc
dynamic_bloom.h Clean up some FastRange calls (#11707) 2023-08-17 11:52:38 -07:00
dynamic_bloom_test.cc internal_repo_rocksdb (435146444452818992) (#12115) 2023-12-01 11:15:17 -08:00
fastrange.h
file_checksum_helper.cc Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
file_checksum_helper.h
file_reader_writer_test.cc Remove WritableFile(FSWritableFile)::GetFileSize default implementation (#12303) 2024-01-30 09:49:32 -08:00
filelock_test.cc Remove extra semi colon from internal_repo_rocksdb/repo/util/filelock_test.cc 2024-03-19 16:17:57 -07:00
filter_bench.cc
gflags_compat.h
hash.cc
hash.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
hash128.h
hash_containers.h
hash_map.h
hash_test.cc Add some more bit operations to internal APIs (#11660) 2023-08-02 11:30:10 -07:00
heap.h
heap_test.cc
kv_map.h
log_write_bench.cc Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
math.h Add some more bit operations to internal APIs (#11660) 2023-08-02 11:30:10 -07:00
math128.h Add some more bit operations to internal APIs (#11660) 2023-08-02 11:30:10 -07:00
murmurhash.cc Remove extra semi colon from internal_repo_rocksdb/repo/util/murmurhash.cc (#12270) 2024-01-24 07:39:59 -08:00
murmurhash.h
mutexlock.h Improve memory efficiency of many OptimisticTransactionDBs (#11439) 2023-05-24 11:57:15 -07:00
overload.h Fix copyright header in util/overload.h (#11826) 2023-09-13 09:50:44 -07:00
ppc-opcode.h
random.cc internal_repo_rocksdb (435146444452818992) (#12115) 2023-12-01 11:15:17 -08:00
random.h
random_test.cc
rate_limiter.cc Decouple RateLimiter burst size and refill period (#12379) 2024-02-26 16:55:13 -08:00
rate_limiter_impl.h Decouple RateLimiter burst size and refill period (#12379) 2024-02-26 16:55:13 -08:00
rate_limiter_test.cc Decouple RateLimiter burst size and refill period (#12379) 2024-02-26 16:55:13 -08:00
repeatable_thread.h
repeatable_thread_test.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
ribbon_alg.h
ribbon_config.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
ribbon_config.h
ribbon_impl.h Remove extra semi colon from internal_repo_rocksdb/repo/util/ribbon_impl.h (#12269) 2024-01-24 08:20:50 -08:00
ribbon_test.cc
set_comparator.h
single_thread_executor.h add a missing include (#11624) 2023-07-18 15:38:52 -07:00
slice.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
slice_test.cc Create an UnownedPtr type (#12447) 2024-03-15 11:43:28 -07:00
slice_transform_test.cc
status.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
stderr_logger.cc Add native logger support to RocksJava (#12213) 2024-01-17 17:51:36 -08:00
stderr_logger.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
stop_watch.h Fix StopWatch bug; Remove setting record_read_stats (#11474) 2023-05-25 10:16:58 -07:00
string_util.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
string_util.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
string_util_test.cc Fix gcc12 build failure caused by INT_MIN in NumberToHumanString (#12215) 2024-01-10 10:17:31 -08:00
thread_guard.h
thread_list_test.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
thread_local.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
thread_local.h
thread_local_test.cc
thread_operation.h GetEntity Support for ReadOnlyDB and SecondaryDB (#11799) 2023-09-15 08:30:44 -07:00
threadpool_imp.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
threadpool_imp.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
timer.h
timer_queue.h
timer_queue_test.cc
timer_test.cc
udt_util.cc Add UDT support in SstFileDumper (#11757) 2023-08-30 13:42:04 -07:00
udt_util.h Add UDT support in SstFileDumper (#11757) 2023-08-30 13:42:04 -07:00
udt_util_test.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
user_comparator_wrapper.h
vector_iterator.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
work_queue.h
work_queue_test.cc
write_batch_util.cc
write_batch_util.h Add initial support for TimedPut API (#12419) 2024-03-14 15:44:55 -07:00
xxhash.cc
xxhash.h Fix deprecated use of 0/NULL in internal_repo_rocksdb/repo/util/xxhash.h + 5 2024-04-01 21:20:51 -07:00
xxph3.h Fix bad include (#11797) 2023-09-05 14:44:17 -07:00