https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107531
--- Comment #5 from Jonathan Wakely ---
Unsurprisingly, -fanalyzer doesn't say anything useful about this, because it
doesn't support C++. PR 94355 tracks some of that (and the meta-bug that it
blocks tracks more).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107531
--- Comment #4 from Jonathan Wakely ---
(In reply to nightstrike from comment #0)
> Maybe adding something from -fsanitize=undefined would be an option?
There's nothing undefined in your example.
But if you actually allocate and free resources
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107531
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107531
--- Comment #2 from nightstrike ---
It looks like you're right. The root cause of the problem is that in my
non-reduced case, I didn't have a copy constructor, but I had a non-default
destructor that was releasing resources twice. So it's clea
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107531
--- Comment #1 from Andrew Pinski ---
My bet is on a copy constructor being invoked.