<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed., Jul. 17, 2019, 12:50 a.m. Eric Fiselier via Phabricator, <<a href="mailto:reviews@reviews.llvm.org" target="_blank" rel="noreferrer">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">EricWF added a comment.<br>
<br>
For sanitizers I wonder if we could continue to catch use after destrot without losing triviality.  Doesn't MSAN poison the objects memory at the end of the destructor?<br>
<br>
I considered adding the destructor back in debug modes, but this can break or deadlock code by introducing a potentially blocking region into the middle of a carfully considered locking algir<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">*This can deadlock an otherwise carefully designed concurrent algorithm.</div><div dir="auto"><br></div><div dir="auto">Ideally, I think we would want to make static storage duration mutex's trivial, while maintaining debugability on the rest.</div><div dir="auto"><br></div><div dir="auto">We could extend [[clang::no_destroy]] to apply to class types and mean "don't destroy instances with static storage duration".</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Repository:<br>
  rCXX libc++<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D64299/new/" rel="noreferrer noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D64299/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D64299" rel="noreferrer noreferrer noreferrer" target="_blank">https://reviews.llvm.o</a><br>
<br>
<br>
<br>
</blockquote></div></div></div>