Title | lockEnsureGlobalLock is not thread-safe on Windows |
Status | closed |
Priority | optional |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | See lockw3.c: /* Ensure both global locks have been initialized. */ /* There is a race condition initializing them. */ |
Analysis | Windows (as of Vista) provides the function InitOnceExecuteOnce [1] which does what we need. But we currently support "Windows XP or later" [2] so we can't use this function without either abandoning support for Windows XP, or having some #if to determine what version of Windows we are compiling against. Microsoft's support for Windows XP expired in April 2014 so maybe enough time has passed for the MPS to drop support too. It's not like we test against it any more. |
How found | inspection |
Evidence | [1] https://msdn.microsoft.com/en-us/library/ms683493.aspx [2] http://www.ravenbrook.com/project/mps/master/manual/html/guide/overview.html |
Created by | Gareth Rees |
Created on | 2017-02-22 16:13:06 |
Last modified by | Gareth Rees |
Last modified on | 2018-07-04 17:06:01 |
History | 2017-02-22 GDR Created. |
Change | Effect | Date | User | Description |
---|---|---|---|---|
194409 | closed | 2018-07-04 16:46:04 | Gareth Rees | Merge branch 2018-06-27/job004056. |