From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 420DE386C58C for ; Thu, 11 Jan 2024 18:03:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 420DE386C58C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 420DE386C58C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704996190; cv=none; b=oK1ma+leYmb1qqYPEyKDa+4fhvud+9JhMklWuk2taSB4wjKkCODitJRhCP6Msbv/DP3eUTD7X1VM/iWD7n5/T7mXvdG7zS7TWYkSqdFaiZHZNS/aXjZh/raJNdT9+RlmPc+j4CsGVYWLSj2BobJPLHgJ0lGnw0Q7DRP50ZoTlXs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704996190; c=relaxed/simple; bh=5JkHYswGA2dxAtpyw22mhMHXbPDVW3wyi4l/Q1S2Ltg=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=lr8t88ftF1nWZyEn9sozqFI7Be8iNiGCb7wWrXMaLIE8q+/BhGa9f7qIv98VXGlc71/ppXguhncyUh0lI1hVViRLcSgDr4Dnc6odXxL+dB0kKUROmLMOlvAfa3/AcY/oAGlFALVzBjJCRDNA11cb/VQFoGiQoxK1C+wOSbx6OaE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704996187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7eHxsYGUwqtGs0kgCeAsTHaWCgTwAprsa3VWig0FAGs=; b=JBl9xE8m9vA4nSMifWRcAYrEQTD/D2Cm0jQdLWmYritF1GrcyH1uDb/eqm3Bl7b52N+DVn PKL1KzhiaflWecrsnPhnbdZv3FYhy6yPHc/tksTodn9hiyKLf99kvLOf2xyUM+vjTrWd1r nQ5AMJ5OPxe4qinS8QURpMgf6VE68/k= Received: from mail-yb1-f198.google.com (mail-yb1-f198.google.com [209.85.219.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-478-Q1WmAxpRP3GQS6uuOIcXUw-1; Thu, 11 Jan 2024 13:03:06 -0500 X-MC-Unique: Q1WmAxpRP3GQS6uuOIcXUw-1 Received: by mail-yb1-f198.google.com with SMTP id 3f1490d57ef6-dbeba57a668so8123566276.3 for ; Thu, 11 Jan 2024 10:03:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704996186; x=1705600986; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7eHxsYGUwqtGs0kgCeAsTHaWCgTwAprsa3VWig0FAGs=; b=YLwwZhWK+dtx0+3OARVv/bL4CY/KPR9c7ItaR7OjaECHv24y41BYxQQ7idrw5d32U/ X1vHKIeieBrQ0p2IjG1sAtIVDdzXSBfAVQGGyw86oFSXrmqLAeqXm2+o+HACzVpsiCZ2 9FvTPC/dIcibsvAEI15mvxBHJb3be7ZqAqnH8ol7sSVHMQLZd7dIFUoupj0IJ/SSL4an 7r8ORawYX6UweXYXtoN1oJOXz5yCxVlJjBsmlj/mzfRSUsX/puBCrmkAK2EfSgOFhtnb KQlcKvt/ovwy6V6TKOJ1+BCdvuPJvcfEB7kWehMoI9BycdC8wQDXiTBmJ7xgp8USG5Br 1mrg== X-Gm-Message-State: AOJu0YxWI7g9tbXWPK9O8sMJromJUB6PPiqwfu2PDMyrxfQTzciF8i/5 2Srt4I+UxyTqeZEvqBkuWSKtQZtq+N2wLClppKbkvgBVM9oU2XbU/EoORp2emwg8Aums3DQw9ZJ G4Fd56b69hNLnE9npodNoduij27GrmEMEemSHVOQ= X-Received: by 2002:a5b:a92:0:b0:dbd:d639:3f1b with SMTP id h18-20020a5b0a92000000b00dbdd6393f1bmr27163ybq.47.1704996185821; Thu, 11 Jan 2024 10:03:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHv6OH6ww7SwK21zhdG9WOGNO5npO30O/lDVne5ax3kEbvQoCfgps+TYJhkVU2sdRBFgSoHbU26bbrCqJ7I+c= X-Received: by 2002:a5b:a92:0:b0:dbd:d639:3f1b with SMTP id h18-20020a5b0a92000000b00dbdd6393f1bmr27151ybq.47.1704996185591; Thu, 11 Jan 2024 10:03:05 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Thu, 11 Jan 2024 18:02:49 +0000 Message-ID: Subject: Re: [Bug libstdc++/112477] [13/14 Regression] Assignment of value-initialized iterators differs from value-initialization To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: "libstdc++" , gcc-patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 10 Jan 2024 at 18:28, Fran=C3=A7ois Dumont w= rote: > > libstdc++: [_GLIBCXX_DEBUG] Fix assignment of value-initialized iterator > [PR112477] > > Now that _M_Detach do not reset iterator _M_version value we need to > reset it when > the iterator is attached to a new sequence. Even if this sequencer is > null like when > assigning a value-initialized iterator. In this case _M_version shall be > reset to 0. > > libstdc++-v3/ChangeLog: > > PR libstdc++/112477 > * src/c++11/debug.cc > (_Safe_iterator_base::_M_attach): Reset _M_version to 0 if > attaching to null > sequence. > (_Safe_iterator_base::_M_attach_single): Likewise. > (_Safe_local_iterator_base::_M_attach): Likewise. > (_Safe_local_iterator_base::_M_attach_single): Likewise. > * testsuite/23_containers/map/debug/112477.cc: New test case. > > Tested under Linux x64 _GLIBCXX_DEBUG mode. > > Ok to commit and backport to gcc 13 ? Yes please - thanks for the quick fix. > > Fran=C3=A7ois > > On 09/01/2024 22:47, fdumont at gcc dot gnu.org wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112477 > > > > Fran=C3=A7ois Dumont changed: > > > > What |Removed |Added > > -----------------------------------------------------------------------= ----- > > Assignee|unassigned at gcc dot gnu.org |fdumont at gcc= dot gnu.org > > > > --- Comment #8 from Fran=C3=A7ois Dumont -= -- > > Hi > > I'm going to have a look but if you wish to contribute do not hesitate. > > Thanks for the report. > >