Re: [PATCH v3] libstdc++: fix a dangling reference crash in ranges::is_permutation

2024-12-23 Thread Patrick Palka
On Sat, 21 Dec 2024, Giuseppe D'Angelo wrote: > Hello, > > On 20/12/2024 22:20, Patrick Palka wrote: > > > > The attached patch fixes it. I've tested on Linux x86-64. Adding a > > > > negative test for this is somehow challenging (how do you test you're > > > > not using a dangling reference?), b

Re: [PATCH v3] libstdc++: fix a dangling reference crash in ranges::is_permutation

2024-12-21 Thread Giuseppe D'Angelo
Hello, On 20/12/2024 22:20, Patrick Palka wrote: The attached patch fixes it. I've tested on Linux x86-64. Adding a negative test for this is somehow challenging (how do you test you're not using a dangling reference?), but running the modified test under ASAN shows the fix in place. I'd expec