Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quick fix for MacroRuleDefinition use-after-free
Macro expansion seems to destruct instances of MacroRulesDefinition in modules. This patch should prevent a use-after-free by cloning and then leaking MacroRulesDefinition instances. gcc/rust/ChangeLog: * ast/rust-macro.h (MacroRulesDefinition::clone_macro_rules_def): New. * util/rust-hir-map.cc (Mappings::insert_macro_invocation): Clone, and then leak, the MacroRulesDefinition. Signed-off-by: Owen Avery <[email protected]>
- Loading branch information