clang chrashes with -Wthread-safety in clang::CFGImplicitDtor::getDestructorDecl
| Bugzilla Link | 28666 |
| Resolution | FIXED |
| Resolved on | Aug 09, 2016 13:50 |
| Version | trunk |
| OS | All |
| Blocks | llvm/llvm-project#28974 |
| Attachments | Added a testcase & a fix to handle destructors of temporaries. |
| Reporter | LLVM Bugzilla Contributor |
| CC | @devincoughlin,@zmodem |
Extended Description
The following example causes clang to chrash:
struct Holder { virtual ~Holder() throw() {} int i = 0; };
int main() { const auto &value = Holder().i; }
Due to incorrect handling of lifetime-extending constructs.
I believe r277522 fixed this. Please re-open if I'm wrong.
This affects 3.8 too, so not a regression, but would be nice to have for 3.9 if a fix emerges.
Oops, never mind. I see you already did. https://reviews.llvm.org/D22419 Thanks!
Thanks for the bug report and the patch! It looks good to me, but would you be willing to put it up on Phabricator so others can take a look? https://reviews.llvm.org
assigned to @tkremenek