fix deleterange asan issue

Summary:
pinned_iters_mgr_ pins iterators allocated with arena_, so we should order the
instance variable declarations such that the pinned iterators have their destructors
executed before the arena is destroyed.
Closes https://github.com/facebook/rocksdb/pull/1528

Differential Revision: D4191984

Pulled By: ajkr

fbshipit-source-id: 1386f20
main
Andrew Kryczka 8 years ago committed by Facebook Github Bot
parent 327085b7b2
commit 760ef68a69
  1. 5
      db/range_del_aggregator.h

@ -89,9 +89,10 @@ class RangeDelAggregator {
Status AddTombstones(InternalIterator* input, bool arena); Status AddTombstones(InternalIterator* input, bool arena);
TombstoneMap& GetTombstoneMap(SequenceNumber seq); TombstoneMap& GetTombstoneMap(SequenceNumber seq);
PinnedIteratorsManager pinned_iters_mgr_;
StripeMap stripe_map_; StripeMap stripe_map_;
const InternalKeyComparator icmp_; const InternalKeyComparator icmp_;
Arena arena_; Arena arena_; // must be destroyed after pinned_iters_mgr_ which references
// memory in this arena
PinnedIteratorsManager pinned_iters_mgr_;
}; };
} // namespace rocksdb } // namespace rocksdb

Loading…
Cancel
Save