llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

clang chrashes with -Wthread-safety in clang::CFGImplicitDtor::getDestructorDecl

Open llvmbot opened this issue 10 years ago • 5 comments

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.

llvmbot avatar Jul 22 '16 18:07 llvmbot

I believe r277522 fixed this. Please re-open if I'm wrong.

zmodem avatar Aug 09 '16 20:08 zmodem

This affects 3.8 too, so not a regression, but would be nice to have for 3.9 if a fix emerges.

zmodem avatar Jul 25 '16 20:07 zmodem

Oops, never mind. I see you already did. https://reviews.llvm.org/D22419 Thanks!

devincoughlin avatar Jul 23 '16 18:07 devincoughlin

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

devincoughlin avatar Jul 23 '16 18:07 devincoughlin

assigned to @tkremenek

llvmbot avatar Jul 22 '16 18:07 llvmbot