This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/67726] New: std::condition_variable::wait can throw, but should terminate.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 26 Sep 2015 19:33:10 +0000
- Subject: [Bug libstdc++/67726] New: std::condition_variable::wait can throw, but should terminate.
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67726
Bug ID: 67726
Summary: std::condition_variable::wait can throw, but should
terminate.
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
We do not meet this requirement in [thread.condition.condvar]:
Remarks: If the function fails to meet the postcondition, std::terminate()
shall be called (15.5.1).
[ Note: This can happen if the re-locking of the mutex throws an exception. â
end note ]
We can solve it for both wait overloads by adding noexcept to the
wait(unique_lock<mutex>&) overload.