Skip to content

Commit

Permalink
fix deleterange asan issue
Browse files Browse the repository at this point in the history
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 facebook#1528

Differential Revision: D4191984

Pulled By: ajkr

fbshipit-source-id: 1386f20
  • Loading branch information
ajkr authored and Facebook Github Bot committed Nov 16, 2016
1 parent 327085b commit 760ef68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions db/range_del_aggregator.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ class RangeDelAggregator {
Status AddTombstones(InternalIterator* input, bool arena);
TombstoneMap& GetTombstoneMap(SequenceNumber seq);

PinnedIteratorsManager pinned_iters_mgr_;
StripeMap stripe_map_;
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

0 comments on commit 760ef68

Please sign in to comment.