From 46c40d7fa1ec6fd230acb0b1e1f6cd01a32a05d2 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 6 Oct 2022 11:48:05 -0500 Subject: Fix: Use after free in geometry node group logger The name of the node group in the geometry nodes logger is created in `GeoModifierLog::get_local_tree_logger`, where it references the compute context. However, the compute context is a local variable that doesn't live as long as the log. Therefore the log needs to own the node group name. Removing the ownership from `NodeGroupComputeContext` may be possible as well, but seems less obviously correct. This can be a temporary solution until we can completely avoid storing strings in the logger (see D15775). Fixes T101599 --- source/blender/nodes/NOD_geometry_nodes_log.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/nodes/NOD_geometry_nodes_log.hh b/source/blender/nodes/NOD_geometry_nodes_log.hh index 2b0c16c8656..5a2203a76b7 100644 --- a/source/blender/nodes/NOD_geometry_nodes_log.hh +++ b/source/blender/nodes/NOD_geometry_nodes_log.hh @@ -169,7 +169,7 @@ using TimePoint = Clock::time_point; class GeoTreeLogger { public: std::optional parent_hash; - std::optional group_node_name; + std::optional group_node_name; Vector children_hashes; LinearAllocator<> *allocator = nullptr; -- cgit v1.2.3