Fix BlockFetcher ASAN error

Summary:
Some call sites of BlockFetcher create temporary ReadOptions and pass to BlockFetcher. The temporary object will be gone after BlockFetcher construction but BlockFetcher keep its reference, causing stack-use-after-scope. Fixing it.
Closes https://github.com/facebook/rocksdb/pull/3258

Differential Revision: D6547152

Pulled By: yiwu-arbug

fbshipit-source-id: 6b49e9dd46bb72307f5d8f88ea15faacff35b9bc
This commit is contained in:
Yi Wu 2017-12-12 12:08:52 -08:00 committed by Facebook Github Bot
parent 4bcb7fb148
commit 7393ef779c

View File

@ -45,7 +45,7 @@ class BlockFetcher {
RandomAccessFileReader* file_;
FilePrefetchBuffer* prefetch_buffer_;
const Footer& footer_;
const ReadOptions& read_options_;
const ReadOptions read_options_;
const BlockHandle& handle_;
BlockContents* contents_;
const ImmutableCFOptions& ioptions_;