This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Fix join.pass.cpp segfault after r271475
ClosedPublic

Authored by rmaprath on Jun 2 2016, 2:02 PM.

Details

Summary

After r271475 [1], I'm seeing a segfault in join.pass.cpp on my system.

The test calls std::thread::join() twice and expects it to throw a system_error. It looks like my pthread implementation does not like being called pthread_join with the pthread_t argument set to zero, and decides to segfault. There are few easy ways to fix this, I've gone with the approach taken in std::thread::deatch() so there's more consistency.

[1] http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp?r1=271475&r2=271474&pathrev=271475

Diff Detail

Event Timeline

rmaprath updated this revision to Diff 59453.Jun 2 2016, 2:02 PM
rmaprath retitled this revision from to [libcxx] Fix join.pass.cpp segfault after r271475.
rmaprath updated this object.
rmaprath added a reviewer: EricWF.
rmaprath updated this object.
rmaprath added a subscriber: cfe-commits.

Will commit tomorrow if there are no objections.

Feel free to commit if it looks all right.

/ Asiri

EricWF accepted this revision.Jun 2 2016, 9:00 PM
EricWF edited edge metadata.

Thanks for the patch.

This revision is now accepted and ready to land.Jun 2 2016, 9:00 PM
rmaprath closed this revision.Jun 3 2016, 1:57 AM

Thanks. Fixed in r271634.