Commit: d267d76540d0adecee75346d6cfe2fa6a69478c8
Author: Dalai Felinto
Date:   Tue Jun 6 12:47:47 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBd267d76540d0adecee75346d6cfe2fa6a69478c8

Force crash on depsgraph iterator wrong access.

Related to T51718, so it crashes even when no fancy ASAN flags are used.
Patch suggestion by Campbell Barton.

===================================================================

M       source/blender/depsgraph/intern/depsgraph_query.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc 
b/source/blender/depsgraph/intern/depsgraph_query.cc
index 1179575f716..d889dccfede 100644
--- a/source/blender/depsgraph/intern/depsgraph_query.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query.cc
@@ -228,4 +228,9 @@ void DEG_objects_iterator_end(BLI_Iterator *iter)
        if (data->eval_ctx != NULL) {
                DEG_evaluation_context_free(data->eval_ctx);
        }
+
+#ifdef DEBUG
+       /* Force crash in case the iterator data is referenced and accessed 
down the line. (T51718) */
+       memset(&data->temp_dupli_object, 0xFF, sizeof(data->temp_dupli_object));
+#endif
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to