Race condition

Description

Original reporter: WolfgangSt

https://bitbucket.org/sinbad/ogre/src/78cf231243e2/RenderSystems/Direct3D9/src/OgreD3D9ResourceManager.cpp#cl-139 [^]

Is prone to a race condition.

mDeviceAccessLockCount++;
if (mDeviceAccessLockCount == 1)

is not an atomic operation as whole and not guarded within the lock.

Either use an InterlockedIncrement operation or move
OGRE_LOCK_RECURSIVE_MUTEX(mResourcesMutex);
to the outer scope

Original Mantis Ticket: http://www.ogre3d.org/mantis/view.php?id=446

Environment

None

Assignee

Murat Sari

Reporter

Philip Allgaier

Labels

None

Components

Fix versions

Affects versions

Priority

Critical
Configure