Re: [PATCH] ggc, jit: forcibly clear GTY roots in jit

2023-09-14 Thread David Malcolm via Gcc-patches
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=111396 I don't yet have a fix for this

Re: [PATCH] ggc, jit: forcibly clear GTY roots in jit

2023-09-12 Thread Antoni Boucher via Gcc-patches
I added it to bugzilla here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111396 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/9d5b6b20efa2082592619675

Re: [PATCH] ggc, jit: forcibly clear GTY roots in jit

2023-09-12 Thread David Malcolm via Gcc-patches
On Tue, 2023-09-12 at 13:36 -0400, Antoni Boucher wrote: > In the mean time, here's a (Rust) reproducer for the issue: > > fn main() { >     for _ in 0..5 { >     let context = Context::default(); >     context.add_command_line_option("-flto"); >     > context.set_optimization_level(Op

Re: [PATCH] ggc, jit: forcibly clear GTY roots in jit

2023-09-12 Thread Antoni Boucher via Gcc-patches
In the mean time, here's a (Rust) reproducer for the issue: fn main() { for _ in 0..5 { let context = Context::default(); context.add_command_line_option("-flto"); context.set_optimization_level(OptimizationLevel::Aggressive); context.add_driver_option("-nostdli

Re: [PATCH] ggc, jit: forcibly clear GTY roots in jit

2023-09-12 Thread Antoni Boucher via Gcc-patches
It seems to not be enough to fix the issue. Let me find out what's missing from my patch. On Tue, 2023-09-12 at 11:35 +0200, Richard Biener via Jit wrote: > On Wed, Sep 6, 2023 at 3:41 PM David Malcolm via Gcc-patches > wrote: > > > > As part of Antoyo's work on supporting LTO in rustc_codegen_g

Re: [PATCH] ggc, jit: forcibly clear GTY roots in jit

2023-09-12 Thread Richard Biener via Gcc-patches
On Wed, Sep 6, 2023 at 3:41 PM David Malcolm via Gcc-patches wrote: > > As part of Antoyo's work on supporting LTO in rustc_codegen_gcc, he > noticed an ICE inside libgccjit when compiling certain rust files. > > Debugging libgccjit showed that outdated information from a previous > in-memory comp

Re: [PATCH] ggc, jit: forcibly clear GTY roots in jit

2023-09-06 Thread Antoni Boucher via Gcc-patches
Hi. I'll do another test to make sure this is enough since I tested with a few more finalize functions. Thanks a lot for finding this! On Wed, 2023-09-06 at 09:40 -0400, David Malcolm via Jit wrote: > As part of Antoyo's work on supporting LTO in rustc_codegen_gcc, he > noticed an ICE inside libgc

[PATCH] ggc, jit: forcibly clear GTY roots in jit

2023-09-06 Thread David Malcolm via Gcc-patches
As part of Antoyo's work on supporting LTO in rustc_codegen_gcc, he noticed an ICE inside libgccjit when compiling certain rust files. Debugging libgccjit showed that outdated information from a previous in-memory compile was referring to ad-hoc locations in the previous compile's line_table. The