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 0D0383858C39 for ; Thu, 14 Sep 2023 20:33:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0D0383858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694723605; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UztQyk0k6zXn6r7oYeHEF9sRoQe/tYdPRMY8IO6e19U=; b=cFobCBF7XAddMbFvHLiya5yI706cJIibHAifw2NjpPiUpZyAaywmVIhVnD2aljXx5JcCHW 46ZfUQk3umFgBLivTe0m2RPG2Knw+0Bl56eyw/rFEuEw00/QajnsOOJg8vvfIZXcXsRFtB sIzCdYZD2kmvkfZ7mWBBqzYmt9E0BLM= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-472-WwqjauMrOp28nQD1tWf5Kg-1; Thu, 14 Sep 2023 16:33:22 -0400 X-MC-Unique: WwqjauMrOp28nQD1tWf5Kg-1 Received: by mail-vk1-f198.google.com with SMTP id 71dfb90a1353d-4962790293eso659466e0c.3 for ; Thu, 14 Sep 2023 13:33:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694723601; x=1695328401; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=UztQyk0k6zXn6r7oYeHEF9sRoQe/tYdPRMY8IO6e19U=; b=jEFrXobs5ScwKej1rWHVvBKQeIv2MYLz6a7OK5nKMv1XsfKy5rZV7MTybXqwo1/bTD C+bGOtqtdgrB+dr68/ekFxxVG1ajHkf4JrRfQQiAxcEdwAGQg4sdmcdp0L6QxjGLgLlD VBECz0HT+T2pTCj5nft+dk7+gCLTK6JJtBdqYCXxY+E6nDhwEQyLUaUCL60++FV/H9qo XWjy7zBrQJDJ5nCF2lPmpcVPB7+skENGmdYsGmpufNWAcPR8TOc1vObnQgrlxRrXUj54 /ynN7X92CwpQZ1wpnFUkqJ2BVjtu1m98/12Y2XVgNw5NdARhGgUhgVaGDMF/ZPYtNdx6 H7bA== X-Gm-Message-State: AOJu0YwQvNUYv4UAcrB/orapxujdcvp2gDaKtGMxNFntQTnDTtCpCmec ld3xTHgSzJPqfdiD26intg/w6IFTziVj+sZ3fleiVyU7QaFeiJQ83BGJuII3Z0QXfrF+v53PfTA JKVnG5jQ= X-Received: by 2002:a1f:dd82:0:b0:48f:c07e:433a with SMTP id u124-20020a1fdd82000000b0048fc07e433amr6484182vkg.11.1694723601700; Thu, 14 Sep 2023 13:33:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbYV5p9HWErmZSjbheQ/4lXQPGXvBLjOLgkktf9FMF/e0uZUMLQus3IZcT4DF3LzT6AR/vhA== X-Received: by 2002:a1f:dd82:0:b0:48f:c07e:433a with SMTP id u124-20020a1fdd82000000b0048fc07e433amr6484174vkg.11.1694723601457; Thu, 14 Sep 2023 13:33:21 -0700 (PDT) Received: from t14s.localdomain (c-76-28-97-5.hsd1.ma.comcast.net. [76.28.97.5]) by smtp.gmail.com with ESMTPSA id jx14-20020a05622a810e00b00401f7f23ab6sm678162qtb.85.2023.09.14.13.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 13:33:21 -0700 (PDT) Message-ID: <4c0293d1f94cb290ab682587209fff41f09e7c26.camel@redhat.com> Subject: Re: [PATCH] ggc, jit: forcibly clear GTY roots in jit From: David Malcolm To: Antoni Boucher Cc: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org Date: Thu, 14 Sep 2023 16:33:20 -0400 In-Reply-To: <346bb0c85a6ddb6f9074f5ac6cd6d70075cb14ee.camel@zoho.com> References: <20230906134001.681629-1-dmalcolm@redhat.com> <2e5a9a1f4714e7946b11f929ae2a7ae0786d9c4a.camel@zoho.com> <346bb0c85a6ddb6f9074f5ac6cd6d70075cb14ee.camel@zoho.com> User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable 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 Tue, 2023-09-12 at 15:20 -0400, Antoni Boucher wrote: FWIW I've pushed the "ggc, jit: forcibly clear GTY roots in jit" to trunk after retesting it, as r14-4003-geaa8e8541349df. > I added it to bugzilla here: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111396 I don't yet have a fix for this issue. Dave >=20 > Since this only reproduces part of the issue, please let me test > again > with rustc_codegen_gcc after adding the missing fix. >=20 > I confirmed that the fix is in > https://github.com/antoyo/gcc/commit/9d5b6b20efa20825926196759d50706a604c= 64a8 > so you might as well include all of this (except the linetable > condition in toplev.cc). >=20 > 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::d= efault(); > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 context.add_command_line_o= ption("-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.n= ew_type::(); > > >=20 > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 let function =3D context.n= ew_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= _block("start"); > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 let value =3D context.new_= rvalue_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(Ou= tputKind::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 >=20