epicsThreadOnce crashes in static object destructor on win32
Bug #861214 reported by
James Rowland
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Fix Released
|
Low
|
Unassigned |
Bug Description
win32 epicsThreadOnce locks a global mutex that is destroyed by the atexit handler threadCleanupWIN32. The short example below fails.
#include <stdio.h>
#include <epicsThread.h>
epicsThreadOnceId once = EPICS_THREAD_
void bye(void * usr)
{
printf(
}
struct Hello
{
~Hello()
{
}
};
Hello h;
int main(int argc, char *argv[])
{
printf("hi\n");
return 0;
}
Related branches
Changed in epics-base: | |
status: | In Progress → Fix Committed |
Changed in epics-base: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Just deleting the last two lines from the threadCleanupWI N32() routine should fix this, see patch. Since the process is dying it shouldn't matter that we don't clean up completely.