[Ohrrpgce] SVN: teeemcee/10556 OPENFILE: avoid possible race condition when multiple threads open files

subversion at HamsterRepublic.com subversion at HamsterRepublic.com
Thu Aug 30 22:57:43 PDT 2018


teeemcee
2018-08-30 22:57:43 -0700 (Thu, 30 Aug 2018)
400
OPENFILE: avoid possible race condition when multiple threads open files (this is a FB flaw)

So, in FB, you have to call FREEFILE and pass the handle to OPEN. Obviously
this is a race condition.
OPENFILE internally now grabs the global FB lock to avoid this, even if
another thread calls FREEFILE/OPEN directly rather than using OPENFILE.
Multiple threads using plain OPEN can still race each other.
---
U   wip/filelayer.cpp


More information about the Ohrrpgce mailing list