Blender Git Commit Log

Git Commits -> Revision 122e2b4

Revision 122e2b4 by Sergey Sharybin (master)
December 25, 2013, 10:43 (GMT)
Fix T37709: Memory corruption when freeing custom bone shape objects

Summary:
Issue was caused by access to pchan->custom object from channel free
function when freeing all objects from main. Order of objects free
is not defined and such an access might easily end up with access
to freed memory.

We don't need to do user counter stuff when freeing main, so added
an _ex functions with do_id_user flag which is used when freeing main.

We had the same issue with other datablocks, so now it should be
easier to support relevant user counter.

This issue was caused by the fix for T36391, so perhaps that's indeed
high time to do real user counter.

Reviewers: brecht, campbellbarton

Reviewed By: campbellbarton

Maniphest Tasks: T37709

Differential Revision: https://developer.blender.org/D137

Commit Details:

Full Hash: 122e2b4bfa0211676042ba8e02570d1dcd2fc40d
Parent Commit: ad0a3de
Lines Changed: +76, -44

6 Modified Paths:

/source/blender/blenkernel/BKE_action.h (+3, -0) (Diff)
/source/blender/blenkernel/BKE_library.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_object.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/action.c (+23, -6) (Diff)
/source/blender/blenkernel/intern/library.c (+41, -36) (Diff)
/source/blender/blenkernel/intern/object.c (+7, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021