public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/67726] New: std::condition_variable::wait can throw, but should terminate.
@ 2015-09-26 19:33 redi at gcc dot gnu.org
  2015-09-28 12:41 ` [Bug libstdc++/67726] " redi at gcc dot gnu.org
  2015-09-28 16:46 ` redi at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-26 19:33 UTC (permalink / raw)
  To: gcc-bugs

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.
>From gcc-bugs-return-498105-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Sep 26 20:18:31 2015
Return-Path: <gcc-bugs-return-498105-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 17530 invoked by alias); 26 Sep 2015 20:18:31 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 17495 invoked by uid 48); 26 Sep 2015 20:18:27 -0000
From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/67617] Non-standard const requirements imposed on associative container comparison objects
Date: Sat, 26 Sep 2015 20:18:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 4.8.4
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: daniel.kruegler at googlemail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-67617-4-08XNJNwsX6@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67617-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67617-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg02083.txt.bz2
Content-length: 628

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67617

--- Comment #5 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to Daniel Krügler from comment #3)
> [..] I believe the wording for associative containers is not as clear as
> it should be. For unordered containers 23.2.5 p11 speaks of "possibly const
> value" for hasher and binary predicate, but in 23.2.4 p8 this additional
> "possibly const" requirement is missing. I'm submitting an LWG issue for
> this and provide the issue number once available.

Please refer to LWG issue http://cplusplus.github.io/LWG/lwg-active.html#2542
>From gcc-bugs-return-498106-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Sep 26 20:35:14 2015
Return-Path: <gcc-bugs-return-498106-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 40870 invoked by alias); 26 Sep 2015 20:35:14 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 40839 invoked by uid 55); 26 Sep 2015 20:35:11 -0000
From: "mikael at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/67721] deep copy missing when assigning a derived type constructor to an array
Date: Sat, 26 Sep 2015 20:35:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords: patch, wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mikael at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-67721-4-EOguQOY4mT@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67721-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67721-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg02084.txt.bz2
Content-length: 965

https://gcc.gnu.org/bugzilla/show_bug.cgi?idg721

--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> ---
Author: mikael
Date: Sat Sep 26 20:34:39 2015
New Revision: 228170

URL: https://gcc.gnu.org/viewcvs?rev"8170&root=gcc&view=rev
Log:
Fix missing deep copy when assigning a DT constructor to an array

This adds the missing deep copy when assiging a constructor of a derived
type with allocatable components to an array.

The check for consantness is removed so that the deep_copy argument passed
to gfc_trans_scalar_assign is set to true.

        PR fortran/67721
gcc/fortran/
        * trans-expr.c (gfc_trans_assignment_1): Remove the non-constantness
        condition guarding deep copy.
gcc/testsuite/
        * gfortran.dg/alloc_comp_deep_copy_3.f03: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/alloc_comp_deep_copy_3.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libstdc++/67726] std::condition_variable::wait can throw, but should terminate.
  2015-09-26 19:33 [Bug libstdc++/67726] New: std::condition_variable::wait can throw, but should terminate redi at gcc dot gnu.org
@ 2015-09-28 12:41 ` redi at gcc dot gnu.org
  2015-09-28 16:46 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-28 12:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67726

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-09-28
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This was http://cplusplus.github.io/LWG/lwg-defects.html#2135


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libstdc++/67726] std::condition_variable::wait can throw, but should terminate.
  2015-09-26 19:33 [Bug libstdc++/67726] New: std::condition_variable::wait can throw, but should terminate redi at gcc dot gnu.org
  2015-09-28 12:41 ` [Bug libstdc++/67726] " redi at gcc dot gnu.org
@ 2015-09-28 16:46 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-28 16:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67726

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
For --enable-threads=posix the current code is probably OK, as
__gthread_cond_wait should never return an error when used correctly, so will
only throw when the program already has UB.

We should fix it for other thread models though.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-28 16:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-26 19:33 [Bug libstdc++/67726] New: std::condition_variable::wait can throw, but should terminate redi at gcc dot gnu.org
2015-09-28 12:41 ` [Bug libstdc++/67726] " redi at gcc dot gnu.org
2015-09-28 16:46 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).