From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id D43AC3857C52; Fri, 22 Oct 2021 05:22:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D43AC3857C52 Received: by mail-wr1-x431.google.com with SMTP id y3so279268wrl.1; Thu, 21 Oct 2021 22:22:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=SO/ZFbefzyFnBtU6LigyxWgOoR/Xbz9VC05YK72+g0k=; b=MGTQ5NUVU6KNcfu1/Xh3uFitiJ9YQRZKDC4rEBXcxPeJhDQzXoask336n3pKHDziIB ffncXx7JwNIVkENKHx8+25olHJt2OHSFSJxIK6TtTzEBJxO/u+SqpRhBWBhzbwx3Do0f 5ifPXNwSabPZ/ai+CE8QCLmtea87yIQ3Yx3PaOgfFVKTLaJ7w1aJCU2WXNzfVRl5sskv tPuMlJGvg4uH6JC7WeLp2RcHH4UvGDmdBNj9UKvaNvWj0BotJVG33NKelSZgSqEeOBsP sX+4bbMLR7Z3WLe88xp6EjSiuAHQvV8MQpn0q0EV5X6cPruTIFUKSmostb1625HZOvsm MttA== X-Gm-Message-State: AOAM531g/UPi1eQrkyv5RBmPMHI3ZVmVSgWgVsONNBDpRJRKUcjjoXfh eEmx0+Yvc69PHrga+wbhd1KD0bqZa0gkBg== X-Google-Smtp-Source: ABdhPJzGWcv/2K6nv+o99REsaeKaYjo9nktjLdGhJeuo3l3gkPpowUt0k1lIU+FbGqod3rUfuZAmaQ== X-Received: by 2002:a05:6000:1681:: with SMTP id y1mr13014765wrd.340.1634880170774; Thu, 21 Oct 2021 22:22:50 -0700 (PDT) Received: from ?IPv6:2a01:e0a:1dc:b1c0:2d28:ca1d:e17f:894e? ([2a01:e0a:1dc:b1c0:2d28:ca1d:e17f:894e]) by smtp.googlemail.com with ESMTPSA id l3sm4154628wmc.37.2021.10.21.22.22.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Oct 2021 22:22:50 -0700 (PDT) Subject: Re: [PATH][_GLIBCXX_DEBUG] Fix unordered container merge To: Jonathan Wakely Cc: Jonathan Wakely , libstdc++ , gcc-patches References: <4eec3fb9-851e-3e4e-f9f4-1110db3af747@gmail.com> <6c349652-8b6f-2027-08c3-6ce58a765aeb@gmail.com> <04e376af-0819-d289-9990-fc42d5db8f6d@gmail.com> From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= Message-ID: Date: Fri, 22 Oct 2021 07:22:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Language: fr X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Fri, 22 Oct 2021 05:22:53 -0000 On 21/10/21 6:55 pm, Jonathan Wakely wrote: > > > On Thu, 21 Oct 2021 at 17:52, François Dumont > wrote: > > I eventually would like to propose a different approach. > > I am adding a hook in normal implementation to let the > _GLIBCXX_DEBUG code know when a node is being extracted. This way > invalidation is only done by comparing nodes, no need to compute > hash code for this operation. > > > Ugh, this is horrible, I don't like the normal mode depending on the > debug mode (even if it's just having to add hooks like this). Yes, I was relunctant to do so but in this case I was not able to find another way to provide the same result as here. Ok, I'll come back to the other patch and just invalidate all iterators in case of exception. > > The previous patch seemed fine to me. Already an improvement on what > is on trunk now. >