Re: [PATCH] c++: Fix use-after-free of replaced friend instantiation [PR118807]

2025-02-11 Thread Jason Merrill
On 2/10/25 11:58 PM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu (and additionally passed modules.exp with a checking=all build), OK for trunk? -- >8 -- When instantiating a friend function, we call register_specialization which adds it to the DECL_TEMPLATE_INSTANTI

[PATCH] c++: Fix use-after-free of replaced friend instantiation [PR118807]

2025-02-10 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu (and additionally passed modules.exp with a checking=all build), OK for trunk? -- >8 -- When instantiating a friend function, we call register_specialization which adds it to the DECL_TEMPLATE_INSTANTIATIONS of the template. However, in some circu