From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 8B5D63858016 for ; Wed, 4 May 2022 11:18:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8B5D63858016 Received: by mail-wr1-x42c.google.com with SMTP id q23so1570634wra.1 for ; Wed, 04 May 2022 04:18:31 -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=CMNQiNVwIClSFABsC0gTUwxzACoEmtmhWq6VJAleltc=; b=DIRdzwt4vk9R/RNv8djwUqyjV1uSQdISoxcuxHwuMlV14oDx1MOJS/zNE2EwGyTVC/ amk5weHy/8IDuOJSd7GyMn7rPuSc4V9+UTcAvqFCj+ktnW8YDVBudNUKqH++3OV1s74n xTw0QwhbcW12FlxAfOdlVN8IJ73ZCeB8SWeS4nts/YA8pMJPA7tRl9CCe+yzQlKELnau qVn9sKaWgJsT28+JKOQP2aItlYRwUDmp4F2ntTRIbWQ+xqjt0lXcgUut2QtN2doAcPea rWtZdmqR/TC0XuGnQC9A3MX6srnxK9sq2Ayc0GyDk/By3lRedrC4hsN6Y7du1svWYo8s OTgw== X-Gm-Message-State: AOAM53119HECgQTy8PqHQ8QYkEV5Aa6wC4PvxPL6mDrFI/yTaV7HowZY qS1sXHewb11c2Te4OalWUFREonYOOj+UVCK1URg= X-Google-Smtp-Source: ABdhPJy7sHH/+DPf3HbVMdbR8DQSBYPnvxQQfFK3docaVhZMDsu+CF5btHvhAk6r/lSVNGXgzmQfDnGYh+tsw84yN6s= X-Received: by 2002:a05:6000:1687:b0:20c:7de9:feca with SMTP id y7-20020a056000168700b0020c7de9fecamr2811286wrd.221.1651663110352; Wed, 04 May 2022 04:18:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Wed, 4 May 2022 12:18:19 +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=-0.9 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:18:33 -0000 On Wed, 4 May 2022 at 12:14, Jonathan Wakely wrote: > > 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 Oh, and libstdc++ patches need to be CC'd to both the libstdc++ list *and* the gcc-patches list, as per https://gcc.gnu.org/lists.html > > 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.