From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 527DE3858D32 for ; Mon, 15 May 2023 07:59:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 527DE3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4eed764a10cso14082038e87.0 for ; Mon, 15 May 2023 00:59:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684137580; x=1686729580; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Z0eEoimYdgxCJ5zd7w0WUZbKqkyqwEZjbN28w6KAd1k=; b=GYiOCrhSoZTVhuExAsmS0rb14g3eMc4+tkAHIBwRl3w5Hnu2cNd/uVQxu0Bbe3wnON eoQeuMPruua2aUOUn9JaQdi2MWF4oQp3yjBup16dHVqFxbcUfDehDFBR7qbmCcoKkOKX VIpIvyrlMMeBYTA9+rvWiADab0adZgJUYKlknx38ts/KHgllIyrTyMoGaRFLbdxbjR9s Rg8rCawcBtwZ37s7wwUqBr1tgIhK24trIEsjmqpZWFCoK+LdFiFLMvuJgOhpbYeJJV46 w+vTCF9wyML8tStiW/y2MTMNNpHwTK/0dRjknmkqWdAIOwvznYs/M/wPsqddaL5WX8Ei CAUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684137580; x=1686729580; h=content-transfer-encoding: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=Z0eEoimYdgxCJ5zd7w0WUZbKqkyqwEZjbN28w6KAd1k=; b=TEFiQO4LLqLqn/gDfK2Q90loPk7edCDJhbtpi6N9ESN7ZWVWzvb+cHDqxYNuLjd3Gs 1Kz3zPOXI8K9IJ+9+mcElIDiJIVQen3bvseQGaeWf4ISE9ZuFKFlDelupk42mq3auJ0M gO17gjgmIYk+lk876+BJN2EkuPLfQzvh3K6w/hhekR1wBeCskxqIbX02gY27q5QL8WTp dxwUhhPIduwmbQG33T2J52zZriC8EQr9ljXWpIQ7dgDm4MomPDqRJxDjaVnmqghVDwhM 8GSTW1WcIuJWOEfXW39yGhNy/Z7nRuF71uZnTcXTa2eOcryJxu3UU7NQ2nvFBetaIGst TlWA== X-Gm-Message-State: AC+VfDxW3jNRc6PbmNWfgscT03QdRbMIZnDZVWx26Gjw8YT4f1ALQ8xS 6qovrXRqn4Rk5YB7xkHONdhN0xKb6PrFMlwSiWRiQDN2 X-Google-Smtp-Source: ACHHUZ5iKZsA+Hu3ClO2C+1lYPUH1aeG2nlkXqUa1S+xQjk8o1GqBGb9HZX+607Sy2DuBLVlEdKIqMCe6mOd9WLyvEA= X-Received: by 2002:a19:c20d:0:b0:4f2:5c13:ea55 with SMTP id l13-20020a19c20d000000b004f25c13ea55mr5592789lfc.18.1684137579710; Mon, 15 May 2023 00:59:39 -0700 (PDT) MIME-Version: 1.0 References: <2TMB4YQOP1E1R.2QLW7HCD1NVF3@8pit.net> <23a59ecf-9f5e-4d55-9f31-48242b775ec7@in.tum.de> In-Reply-To: <23a59ecf-9f5e-4d55-9f31-48242b775ec7@in.tum.de> From: Richard Biener Date: Mon, 15 May 2023 09:59:27 +0200 Message-ID: Subject: Re: [PATCH] Fix assertion for unwind-dw2-fde.c btree changes To: Thomas Neumann Cc: =?UTF-8?Q?S=C3=B6ren_Tempel?= , gcc-patches@gcc.gnu.org, alice@ayaya.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: On Sun, May 14, 2023 at 9:00=E2=80=AFPM Thomas Neumann via Gcc-patches wrote: > > Dear S=C3=B6ren, > > > we ran into a regression introduced by these changes. The regression > > manifests itself in a failing assertion in __deregister_frame_info_base= s. > > The assertion failure was observed while using Chromium's `flatc` build > > system tool. The failing assertion is: > > > > unwind-dw2-fde.c:281 gcc_assert (in_shutdown || ob); > > [snip] > > However, I believe there is one more edge case that isn't being account > > for presently: If the inserted entry has a size of 0 (i.e. if range[1] = - > > range[0] =3D=3D 0) then the btree_insert call in __register_frame_info_= bases > > will not insert anything. This is not accounted for in > > [snip] > > > > Would be cool if this could be fixed on the GCC trunk. > > thanks for the details analysis and the patch, it looks obviously > correct for me. I can apply it to trunk, but we need approval from a gcc > maintainer first. The patch is OK for trunk and affected branches. Thanks, Richard. > But independent of your patch, do you have the test case available in > some easily accessible form, for example a docker image or an automated > build script? I ask because something odd is happening here, somebody > registered a non-empty EH that does not contain a single unwind range. I > am puzzled why anybody would do that, I would like to double check that > this is indeed the intended behavior and not a bug somewhere else. Or if > you have the test case at hand, it would be great if you could do a > quick step through get_pc_range for the affected frame to double-check > that the table is indeed empty and we don't miss an entry for some > strange reason. > > Best > > Thomas > > >