347e294959ebb8f3b4e506b5a7f7e47f716fc480
**Problem** When using Sculpt Texture Paint to paint objects in a debug build, Blender will crash due to an Address Sanitizer exception, `stack-use-after-free`. This makes development for Sculpt Texture Paint harder since the feature can't be used in debug builds without turning off Address Sanitizer. Code-wise, the issue here happens when extending UV island borders. When creating and adding UV primitives to extend the UV border, the primitives are allocated locally and then added to a list. This means that when these primitives are accessed later from the list, the ASAN error is triggered since the primitives have been freed. Freed primitives are generally accessed when checking if a primitive has already been added to the primitive list belonging to its connected UV Edges. **Solution** The solution here is to change UV Edges to store the index of a UV primitive, and not use a pointer to the object itself. This is the best solution since it makes it fast and simple to check if an UV Edge already has a reference to its connected primitives, while still allowing access to the primitive objects since primitives can be accessed using indexes from mesh data objects. Co-authored-by: T0MIS0N <50230774+T0MIS0N@users.noreply.github.com> Pull Request: https://projects.blender.org/blender/blender/pulls/137032
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
