Domain destruction fixes
authorDave Watson <davejwatson@fb.com>
Wed, 3 May 2017 17:57:29 +0000 (10:57 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 3 May 2017 18:06:24 +0000 (11:06 -0700)
commit90c8861ca8d315a3e6bbca84d095b8f8dd2496a7
treed664175c2cc64c7445f5bd4224db977655747875
parentc2e28878d8f88359599da03080fbbe71dac2e80f
Domain destruction fixes

Summary:
If a retired object's destructor retire()s other hazard pointers, currently
these are not cleaned up correctly when the domain destructs.

Retired pointers must be cleaned up before destroying hazptr_recs, and must be done
iteratively until no more garbage is generated.

Reviewed By: magedm

Differential Revision: D4987333

fbshipit-source-id: bcdd61abb47caca0892a8c4dbb864d17d4f2fa30
folly/experimental/hazptr/hazptr-impl.h
folly/experimental/hazptr/test/HazptrTest.cpp