From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id AC7FC3858016 for ; Wed, 4 May 2022 11:14:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AC7FC3858016 Received: by mail-wr1-x42f.google.com with SMTP id k2so1539146wrd.5 for ; Wed, 04 May 2022 04:14:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I7vXolgdXxMF7KwcqJTLKo7dxWMMQZ7aHv75kLEljA8=; b=T95Bu19R4pT1RQzKCN2x6gXYi5b7p+5Dda7AiAgor+RvKgJNOD24rqJKssSmcF3uKD LYk+rn1p5xYmUokgSpS4FViTOkUuzQc8jXmwpxkAeTnI2hZqq+tCrukRxgi9x3yM6RNd 0EpX0o6AmYt6PfQK9O193SNJjwCkLTpYCGMuPVo95RkLQkSxHr9vXE0wmKngGBEtswHL k7vwqm6Gr8sZBurAW2nOgmW5keKtebO8WAw3t3trTykaMcNbP2twzXhbe8A1yMuVslB5 eMiT9K7e0MCsjLYO7uoopQj0+MV6vv45ZnR0MCaAcQ9G+N11VznmBo6wA8sCbPThkXfa Hlpw== X-Gm-Message-State: AOAM533HvTyTtcRTtkGXvCju5UIVwuBVraI+O3Sa8ZnYA4IR7nG7Pj9l kH2aAfVezGvWoXCsn2jNxHQINsw46XZyV5Os7wY= X-Google-Smtp-Source: ABdhPJxcfQJWCA5SAYDI/aOMZk4YPPr+mPYOS6yyUJ6JSri9pLpQ9YiSdxXOQMrC5aliSg2kcZYjvC1mPzLy+hg0hNY= X-Received: by 2002:adf:f943:0:b0:203:b456:c71d with SMTP id q3-20020adff943000000b00203b456c71dmr15885871wrr.568.1651662880365; Wed, 04 May 2022 04:14:40 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Wed, 4 May 2022 12:14:29 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: fix pointer type exception catch [PR105387] To: Jakob Hasse Cc: "libstdc++@gcc.gnu.org" , Rocha Euripedes , Ivan Grokhotkov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Wed, 04 May 2022 11:14:44 -0000 On Tue, 3 May 2022 at 11:57, Jakob Hasse via Libstdc++ wrote: > > This is a patch for the bug 105387 reported in bugzilla: 105387 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105387. This report should contain all the necessary information about the issue. But the patch there was just a preliminary one. > I created a proper patch with the fix and a test case, based on TAG releases/gcc-11.2.0 (7ca388565af176bd4efd4f8db1e5e9e11e98ef45). The changelog is part of the commit message in the patch. Thanks for the patch! Some boring administrative comments: In the summary line of the git commit message: - The component should be libstdc++ not libstdc++-v3. - The PR number should include "PR" i.e. [PR105387]. Your email Subject: gets this right, but the patch doesn't. This is (not very well) documented at https://gcc.gnu.org/contribute.html#patches Your new testcase has a FSF copyright notice. Unless you have already completed the paperwork to assign your work (either for just this change, or this and all future changes) to the FSF then you need to either do that legal paperwork, or alternatively contribute under the DCO terms without assigning copyright. See https://gcc.gnu.org/contribute.html#legal For simplicity and to expedite the process, I suggest just removing the copyright notice and license notice from the testcase, and adding a Signed-off-by: tag to the commit message, as per https://gcc.gnu.org/dco.html As for the actual code ... The testcase has unused parameters for the 'main' function: +int main(int argc, char **argv) That should be just 'int main()' because the parameters aren't used. The testcase should mention the PR, e.g. // PR libstdc++/105387 I'd prefer if the test contains the original reproducer from the PR, which doesn't rely on internal details like __pointer_type_info. You can put the portable test from the PR into one function and the non-portable test into another function, and call them both from main(). I'd prefer using unsigned char for the buffer, rather than uint8_t (which requires the header, and might be a typedef for 'int' on 8-bit targets, rather than a character type). The test uses nullptr which is not available in C++98. It should either require c++11 so it's UNSUPPORTED for c++98 mode: // { dg-do run { target c++11 } } or just use 0 instead of nullptr. > Number of unexpected failures went down by one and the number of unsupported tests went up by one. 17_intro/headers/c++1998/49745.cc suddenly passes, 22_locale/time_get/get_date/wchar_t/4.cc is suddenly unsupported. I don't know why. I don't understand that either. I'll try to reproduce that.