From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 6E45C3870860; Thu, 14 Jan 2021 18:34:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6E45C3870860 Received: by mail-wm1-x330.google.com with SMTP id r4so5554669wmh.5; Thu, 14 Jan 2021 10:34:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=VrMW2LQ2yzSjcFpqL1P3AG2Y2BOe7khvxKAtPxxdol4=; b=jnDoMFTPXIjFIHykQzgxyjJuKlXQ60nYFmnSLHoJXSCfak+WILOJSfDQZLmjS2tlJk MiYwmt//Kt+KbeuM7qDqL391FqlW7/+upton05LYRoY1mnt06WcrKAzKP65cSmgj9xWy DD4SjRoT/nw2wBS0oOIsS7Iyk3xyucgyEG08mlkszjqDuD9TlJX9QUuMxyOPXrVMyQH/ SIpo4WjYtxxI9DNbJ6PSTCTQALEiCA8cNL7m+nxMjSkgidTUyyuuWTJtO1zEiOUVzl0w 7BTrwyKojm/Hvii9olVshKvyIzmfZs0cVfMmPwMo5A0Nu88tDbE4YHOQKF/NdVk8mRB3 JRTQ== X-Gm-Message-State: AOAM533n/vLK5WUge7rSz9f6/B+N3ZuzWHT7Sa5cHaYes4kbfiQ1pMah pZSnEXShRMwb7zL826ZDBPm1ntOQbAY= X-Google-Smtp-Source: ABdhPJyYXrxfRa10ibm/Rcm4yvKj72bjy+6iiDPH9U5Wz7x/HOKDEjFVtnEPEI+sL5xhTId6sWOFNg== X-Received: by 2002:a7b:c841:: with SMTP id c1mr2967450wml.48.1610649253351; Thu, 14 Jan 2021 10:34:13 -0800 (PST) Received: from [10.39.4.109] ([109.190.253.15]) by smtp.googlemail.com with ESMTPSA id n9sm11090618wrq.41.2021.01.14.10.34.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Jan 2021 10:34:12 -0800 (PST) Subject: Re: [PATCH] libstdc++/98466 Fix _GLIBCXX_DEBUG N3644 integration To: Jonathan Wakely Cc: "libstdc++@gcc.gnu.org" , gcc-patches References: <9c1f5008-1ded-fed1-bc57-309ec74b9c77@gmail.com> <20210114171003.GI7692@redhat.com> <20210114171547.GJ7692@redhat.com> From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= Message-ID: Date: Thu, 14 Jan 2021 19:34:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210114171547.GJ7692@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: fr X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 18:34:16 -0000 On 14/01/21 6:15 pm, Jonathan Wakely wrote: > On 14/01/21 17:10 +0000, Jonathan Wakely wrote: >> On 01/01/21 18:51 +0100, François Dumont via Libstdc++ wrote: >>> I think the PR is not limited to unordered containers iterator, it >>> impacts all _GLIBCXX_DEBUG iterators. >>> >>> However unordered containers local_iterator was more complicated to >>> handle. Because of c++/65816 I prefer to review >>> _Node_iterator_default constructor to set _M_cur to nullptr even if >>> in principle it is not necessary except for the _Local_iterator_base >>> constructor when hash code is not cached. >>> >>>     libstdc++: Implement N3644 for _GLIBCXX_DEBUG iterators >>> >>>     libstdc++-v3/ChangeLog >>> >>>             PR libstdc++/98466 >>>             * include/bits/hashtable_policy.h >>> (_Node_iterator_base()): Set _M_cur to nullptr. >>>             (_Node_iterator()): Make default. >>>             (_Node_const_iterator()): Make default. >>>             * include/debug/macros.h >>> (__glibcxx_check_erae_range_after): Add _M_singular >>>             iterator checks. >>>             * include/debug/safe_iterator.h >>>             (_GLIBCXX_DEBUG_VERIFY_OPERANDS): Accept if >>> both iterator are value initialized. >>>             * include/debug/safe_local_iterator.h >>> (_GLIBCXX_DEBUG_VERIFY_OPERANDS): >>>             Likewise. >>>             * include/debug/safe_iterator.tcc >>> (_Safe_iterator<>::_M_valid_range): Add >>>             _M_singular checks on input iterators. >>>             * src/c++11/debug.cc >>> (_Safe_iterator_base::_M_can_compare): Remove _M_singular >>>             checks. >>>             * >>> testsuite/23_containers/deque/debug/98466.cc: New test. >>>             * >>> testsuite/23_containers/unordered_map/debug/98466.cc: New test. >>> >>> Tested under Linux x86_64 normal and debug mode. >>> >>> Ok to commit ? >> >> Yes, thanks. > > I've just realised that this C++14 change used to be noted in the > C++14 status table: > >     >       >       >        xlink:href="http://www.open-std.org/JTC1/sc22/WG21/docs/papers/2013/n3644.pdf"> >          N3644 >        >       >       Null Forward Iterators >       Partial >       Only affects Debug Mode >      > > But I removed that last year when replacing the list of proposals with > the Table of Contents taken from the standard, in commit > 57ede05c6a0b443943e312bf205cb79233c9396f (oops!) > > For the branches we should either document that missing feature in a > note, or backport your fix in a few weeks. > > > I'll keep the backport in my TODOs.