Blender Git Commit Log

Git Commits -> Revision a3df65d

Revision a3df65d by Sergey Sharybin (master)
January 3, 2016, 13:28 (GMT)
Fix T47008: OSL Memory Corruption (Use after free)

The issue was caused by OSL using TLS which is required to be freed before the
Cycles session is freed. This is quite tricky to do in Cycles because different
render session are sharing the same task scheduler, so when one session is being
freed TLS might need to be active still.

In order to solve this, we are now doing JIT optimization ahead of the time
which ensures either TLS of JIT is freed before the render on multi-core system
or freed on OSLRenderSession destroy on single-core system.

This might increase synchronization time due to JIT of unused function, but
that we can solve later with some smart idea,

Commit Details:

Full Hash: a3df65dea819309496447a26ddf4d7dbe0c3203a
Parent Commit: 80a7603
Lines Changed: +13, -3

1 Modified Path:

/intern/cycles/render/osl.cpp (+13, -3) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021