From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender3-pp-o99.zoho.com (sender3-pp-o99.zoho.com [136.143.184.99]) by sourceware.org (Postfix) with ESMTPS id 184133858D3C; Tue, 12 Sep 2023 19:20:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 184133858D3C Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=zoho.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=zoho.com ARC-Seal: i=1; a=rsa-sha256; t=1694546408; cv=none; d=zohomail.com; s=zohoarc; b=PSHK9EU9b04IEYhQ9PaBncmwyCTId/5rhYXM1s8+vPbF+2wv65yBIX1Pqcqjag6tI8/sT4GTMT4pGVKXHz1Sqlx7k0hkrtJ3lEPZoK99z1un2vWn+WrJXUe45KO39E5sgOk23SKpEEAD1ih4DTJmt9OkdS3JEwKwnxropjHD4YM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694546408; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=CyUYTGDL+m1fhH8hvoiEZMa2KTWZFuKiQ39YIquFPWM=; b=Mq2q6sl2mVOhpAezMgNji5hMKFD7xwW8WlpDcJM9k3l+ocolUdk/Lr5OCOv61kw4ORHMN7tAasWdUeY0+Zli+EijCfeQ1Ed+8JB4v870vjrkGeXgsYR7BAP1CJ1BictwuLaRqxPvruxDdpaHEa0lbUG/nncy8FcRCvcz7CRJd/A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=bouanto@zoho.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1694546408; s=zm2022; d=zoho.com; i=bouanto@zoho.com; h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Feedback-ID:Message-Id:Reply-To; bh=CyUYTGDL+m1fhH8hvoiEZMa2KTWZFuKiQ39YIquFPWM=; b=f6uYXIwKlMuypGfGHHCj496cwhw2Ee+SI3xaiUa4p3Fz20q4yNCp86WEwyzuUTkr ES8v3Vzd9cngI36f9y6WFWgVRvhImLuY+/YTMcUPJTGptCGM4qufFpyDJj4H4YP6OF2 PLeOZLOAutWpUMmQnt82wCWBnBLBP8XZ7KOUKQNI= Received: from [192.168.1.172] (38.87.11.6 [38.87.11.6]) by mx.zohomail.com with SMTPS id 1694546406292659.1067825045419; Tue, 12 Sep 2023 12:20:06 -0700 (PDT) Message-ID: <346bb0c85a6ddb6f9074f5ac6cd6d70075cb14ee.camel@zoho.com> Subject: Re: [PATCH] ggc, jit: forcibly clear GTY roots in jit From: Antoni Boucher To: David Malcolm Cc: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org Date: Tue, 12 Sep 2023 15:20:04 -0400 In-Reply-To: References: <20230906134001.681629-1-dmalcolm@redhat.com> <2e5a9a1f4714e7946b11f929ae2a7ae0786d9c4a.camel@zoho.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 MIME-Version: 1.0 Feedback-ID: rr0801122867a6eeb7a478df9cfd6aed970000eddf392f3545aebe815a9d7028b08bf1aef3303b9cd4c20e5aae:zu08011226971fcd2953aa2ffd6b9d5210000067eddec00636c37809527bd80c3647d40fc5f85ed228db34:rf080112312b764c0a05094ce407bb24c50000087d9592e8534d8c35b7cc123f28b7309c1f36e631e8bee46c2ff1ca58e705e39dca53:ZohoMail X-ZohoMailClient: External X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,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: I added it to bugzilla here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111396 Since this only reproduces part of the issue, please let me test again with rustc_codegen_gcc after adding the missing fix. I confirmed that the fix is in https://github.com/antoyo/gcc/commit/9d5b6b20efa20825926196759d50706a604c64= a8 so you might as well include all of this (except the linetable condition in toplev.cc). On Tue, 2023-09-12 at 14:38 -0400, David Malcolm wrote: > On Tue, 2023-09-12 at 13:36 -0400, Antoni Boucher wrote: > > In the mean time, here's a (Rust) reproducer for the issue: > >=20 > > fn main() { > > =C2=A0=C2=A0=C2=A0 for _ in 0..5 { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 let context =3D Context::def= ault(); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 context.add_command_line_opt= ion("-flto"); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > context.set_optimization_level(OptimizationLevel::Aggressive); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 context.add_driver_option("-= nostdlib"); > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 let int_type =3D context.new= _type::(); > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 let function =3D context.new= _function(None, > > FunctionType::Exported, int_type, &[], "main", false); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 let block =3D function.new_b= lock("start"); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 let value =3D context.new_rv= alue_from_int(int_type, 42); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 block.end_with_return(None, = value); > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 context.compile_to_file(Outp= utKind::Executable, "my_exe"); > > =C2=A0=C2=A0=C2=A0 } > > } >=20 > Can we get this in bugzilla please?=C2=A0 If you generate a .c version of > the context (via gcc_jit_context_dump_reproducer_to_file) I can try > to > debug it. >=20 > Thanks > Dave >=20