Title | Race condition in EventInit() |
Status | closed |
Priority | nice |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | There is only one event system (shared between all arenas) and so EventInit() needs to run only once even if there are multiple arenas. Its initialization is guarded with if(!eventInited) { /* ... */ eventInited = TRUE; } but this is obviously not safe if two threads create arenas at the same time. |
Analysis | A special case of job003387. We could take the global binary lock while initializing the event system. |
How found | inspection |
Evidence | [1] //info.ravenbrook.com/project/mps/master/code/event.c |
Observed in | 1.111.0 |
Created by | Gareth Rees |
Created on | 2013-05-30 14:46:17 |
Last modified by | Richard Brooksby |
Last modified on | 2016-04-12 18:16:06 |
History | 2013-05-30 GDR Created |
Change | Effect | Date | User | Description |
---|---|---|---|---|
191018 | closed | 2016-04-12 18:16:06 | Richard Brooksby | Guarding EventInit with the global lock, and removing the enforcement of the reference count, so that the event system can be used from classes, which get called before any arena. |