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 8CFB0385802F for ; Thu, 26 Oct 2023 10:15:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8CFB0385802F 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 8CFB0385802F 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=1698315307; cv=none; b=LrwDoViBIZ8lipq9PHD8XtSs+AfOt16B0mFOtO7MfIHvcxZJrxhl3UULbuX9Wt6urDiLn66yDOtoJeXVXuLTC2CjN5PpygtQKKbcjmUJuFbMM4Hw4l4Ar0Jzdp9EoiHNU5i+zDJfV2+FTW4FENywmJOQ9refzIawVDU2ayIjHFE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698315307; c=relaxed/simple; bh=hEskMWTs+8g5CZrdJwHjpkfz+peilxrw2PO+gKjO8+Q=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=GJskdEJ9csBVdsODbiUusKxZY3IDO+ENSCD1LwFP8EANer2I1GjekWMwKg5dTixjnz9mdx7U4uwCtbtcGY+qoHKTtWjKZ2GxxgyuBQlZMe0nZsMll3joEo8ysouo9LCQYFHvi7RyVZ3IPlqkH2qcHENciK5Gupri6z0xNWR8u+U= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698315305; 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: in-reply-to:in-reply-to:references:references; bh=gNiErX+ceEEFWvutiSU3cBdSIHkpWwt0G1ZxcJKqUyg=; b=SMqONVAcDqO/kCpruaD9ZVoOM4ByX8lAJBpjhfJTFJHJYg1v8ZvhgDyh2z+ckDQWB/mCWS pun+OAxhx4R9foqpv+BadtrUFwVG30hLvKWbavZxi8OQIBFoi2fPfKGvQn1RtonedM3fKC smOWJvpZEmygYDFIh35Mz+rI3gzroqM= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-390-I4mz1cSTPeODj_aEP5-Adg-1; Thu, 26 Oct 2023 06:15:03 -0400 X-MC-Unique: I4mz1cSTPeODj_aEP5-Adg-1 Received: by mail-vk1-f199.google.com with SMTP id 71dfb90a1353d-49e0cd82066so331770e0c.2 for ; Thu, 26 Oct 2023 03:15:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698315303; x=1698920103; h=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=gNiErX+ceEEFWvutiSU3cBdSIHkpWwt0G1ZxcJKqUyg=; b=uaOvx8OFGCLmm2prfEkUCOVZZgRXEnRVYOZSmVKTLVIb795aMgRCYNefa2L169dsjI pECYRmpINCeKMYW7zfLTrC8HyApxVC3KexKbkOTKhNodrgev7HKxemZww7RV0Ebe+4oo E2oKm0csyeo09xf0uo+f/tJvOS4mr8NjP3cLwG490ND9StFq9itNIxsuXy0A4ZxxNIES V+/G7rA64ecMus9zAWeF91rsRpL9Dl4ODDxOWTvpAxXxH81uDR8DGy1Il89tMvim+7GE kVFITlb35VaysFbcJFt/l2PqtDsvMTwTqkYyE/Rva/cAOps07bte0pY7Xwl55uIkClYZ D3mw== X-Gm-Message-State: AOJu0YzAEy76Bltmoa9jRKFpz079C3GTsZhtWkyYwFCHX7FcODdBxQzV Z6naMwTNnEQEew/MuzH+C/QEUgI8gGL2ZTrzVkNZHG9Ig5Lq+uulvydFKFqkqL0o5snbTzilqRY xldLS5EU+fMlmsHdx9I9bqjQUC9U3pz8= X-Received: by 2002:a05:6122:d96:b0:496:1bc2:ddf with SMTP id bc22-20020a0561220d9600b004961bc20ddfmr18173621vkb.8.1698315302787; Thu, 26 Oct 2023 03:15:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGuXCMWdKYuY43d2wTC1sFXwA2tEn8HhpBt8s9aGiGs/0azCiiJx1l3onpN4W4F6QGvmS0yL+pDLtV7LNO4LJw= X-Received: by 2002:a05:6122:d96:b0:496:1bc2:ddf with SMTP id bc22-20020a0561220d9600b004961bc20ddfmr18173607vkb.8.1698315302483; Thu, 26 Oct 2023 03:15:02 -0700 (PDT) MIME-Version: 1.0 References: <7f61df18-dd99-4ff5-9fcd-8ca7820403d4@gmail.com> In-Reply-To: <7f61df18-dd99-4ff5-9fcd-8ca7820403d4@gmail.com> From: Jonathan Wakely Date: Thu, 26 Oct 2023 11:14:51 +0100 Message-ID: Subject: Re: [PATCH][_Hashtable] Use RAII to restore Rehash state To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: "libstdc++" , gcc-patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000525c9b06089bd878" X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP 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: --000000000000525c9b06089bd878 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 26 Oct 2023 at 06:18, Fran=C3=A7ois Dumont w= rote: > libstdc++: [_Hashtable] Use RAII type to manage rehash functor state > > Replace usage of __try/__catch with a RAII type to restore rehash > functor > state when needed. > I'm reviewing this now, but could I request that you attach patches as .txt files in gmail please? When you attach a .patch file gmail decides to give it content-type text/x-patch and base64 encode it, and set content-disposition: attachment, which mean it looks like this when received: https://inbox.sourceware.org/libstdc++/7f61df18-dd99-4ff5-9fcd-8ca7820403d4= @gmail.com/raw It's hard to reply inline when the patch needs to be downloaded separately. If you name the file .txt then gmail just shows it in the mail body (conetnt-disposition: inline) and it's much easier to reply. Anyway, I'll finish reviewing this one now that I've downloaded it and manually pasted the patch into my reply. > > libstdc++-v3/ChangeLog: > > * include/bits/hashtable_policy.h (_RehashStateGuard): New. > (_Insert_base<>::_M_insert_range(_IIt, _IIt, const > _NodeGet&, false_type)): > Adapt. > * include/bits/hashtable.h (__rehash_guard_t): New. > (__rehash_state): Remove. > (_M_rehash): Remove. > (_M_rehash_aux): Rename into _M_rehash. > (_M_assign_elements, _M_insert_unique_node, > _M_insert_multi_node): Adapt. > (rehash): Adapt. > > > Tested under Linux x64. > > Ok to commit ? > > Fran=C3=A7ois > --000000000000525c9b06089bd878--