aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/rust-hir-dump.cc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2023-08-03 17:24:14 +0200
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2023-08-11 13:32:52 +0000
commit969439fa8e9a2c5b49ce6086401cb39ad004307b (patch)
tree295215a3bf50a4427de925ad311fb7f2016f2ba0 /gcc/rust/hir/rust-hir-dump.cc
parent5712d7d383b0597cd00466e5995c1e620c2fc809 (diff)
downloadgcc-969439fa8e9a2c5b49ce6086401cb39ad004307b.zip
gcc-969439fa8e9a2c5b49ce6086401cb39ad004307b.tar.gz
gcc-969439fa8e9a2c5b49ce6086401cb39ad004307b.tar.bz2
macro-expand: Keep optional references to last_{def, invoc}
This avoids a use-after-free when reaching the recursion limit. gcc/rust/ChangeLog: * expand/rust-macro-expand.h: Keep optional references for last_def and last_invoc. * expand/rust-macro-expand.cc (MacroExpander::expand_invoc): Store optional references. * rust-session-manager.cc (Session::expansion): Use tl::optional's APIs for better checking.
Diffstat (limited to 'gcc/rust/hir/rust-hir-dump.cc')
0 files changed, 0 insertions, 0 deletions