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

2024-12-20 Thread Patrick Palka
On Fri, 20 Dec 2024, Patrick Palka wrote: > On Fri, 20 Dec 2024, Giuseppe D'Angelo wrote: > > > Hello, > > > > On 20/12/2024 13:23, Giuseppe D'Angelo wrote: > > > Hi, > > > > > > The implementation of ranges::is_permutation may create a dangling > > > reference, which then results (sometimes) i

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

2024-12-20 Thread Patrick Palka
On Fri, 20 Dec 2024, Giuseppe D'Angelo wrote: > Hello, > > On 20/12/2024 13:23, Giuseppe D'Angelo wrote: > > Hi, > > > > The implementation of ranges::is_permutation may create a dangling > > reference, which then results (sometimes) in a crash. A minimal example > > that shows the problem under

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

2024-12-20 Thread Giuseppe D'Angelo
Hello, On 20/12/2024 13:23, Giuseppe D'Angelo wrote: Hi, The implementation of ranges::is_permutation may create a dangling reference, which then results (sometimes) in a crash. A minimal example that shows the problem under ASAN is https://gcc.godbolt.org/z/7bP9nE8fK The attached patch fixes