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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user