aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/util/rust-unicode.cc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2023-08-03 17:24:14 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 19:00:29 +0100
commit1e288d66cb4f0a25a249c0c6dacc2efbf9e44dc8 (patch)
tree8a8c17589d63dea70c4f6cc2143b9026cda8ee41 /gcc/rust/util/rust-unicode.cc
parentfa6bba6f220882a29b7a9e020c49043a3a7e869b (diff)
downloadgcc-1e288d66cb4f0a25a249c0c6dacc2efbf9e44dc8.zip
gcc-1e288d66cb4f0a25a249c0c6dacc2efbf9e44dc8.tar.gz
gcc-1e288d66cb4f0a25a249c0c6dacc2efbf9e44dc8.tar.bz2
gccrs: 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/util/rust-unicode.cc')
0 files changed, 0 insertions, 0 deletions