https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109731
Jonathan Wakely changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Status|NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109731
Andrew Pinski changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109731
--- Comment #3 from Jonathan Wakely ---
It seems that it's considered safe because Token::lexer_ is const, so GCC
thinks the value of token->lexer_ can't be changed by the ~Lexer() destructor.
That's true, but 'token' can become an invalid point
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109731
--- Comment #2 from Jonathan Wakely ---
ASan shows the use-after-free:
=
==46643==ERROR: AddressSanitizer: heap-use-after-free on address 0x60200010
at pc 0x004010c4 bp 0x7
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109731
Jonathan Wakely changed:
What|Removed |Added
Last reconfirmed||2023-05-04
Status|UNCONFI