diff options
author | Hans Goudey <h.goudey@me.com> | 2022-10-06 19:48:05 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-10-06 19:58:11 +0300 |
commit | 46c40d7fa1ec6fd230acb0b1e1f6cd01a32a05d2 (patch) | |
tree | 6ea527ad60ffecaf3beca354e34444c3f3d898cf /source/blender/nodes | |
parent | 26df25caefc4ef53909cb15ae247c5bc401f880c (diff) |
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
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/NOD_geometry_nodes_log.hh | 2 |
1 files changed, 1 insertions, 1 deletions
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<ComputeContextHash> parent_hash; - std::optional<StringRefNull> group_node_name; + std::optional<std::string> group_node_name; Vector<ComputeContextHash> children_hashes; LinearAllocator<> *allocator = nullptr; |