epicsThreadTest crashes on vxWorks 6.9.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
New
|
Undecided
|
Unassigned |
Bug Description
Since commit 8fdaa13 "errlog: eltc() re-add flush", epicsThreadTest (and thus epicsRunLibComT
-------
epicsThreadTest > logfile
program
Exception current instruction address: 0x00000004
Machine Status Register: 0x0208b032
Condition Register: 0x84000882
trcStack aborted: error in top frame
-------
Unfortunately the stack is so corrupted that it is not tracable.
The faulty address 0x00000004 hints to a dereferenced NULL pointer.
After the test, the logfile contains:
-------
***** epicsThreadTest *****
1..15
# System has 1 CPUs
ok 1 - ncpus > 0
# main() thread 0x51a8c0
not ok 2 - Join delayed parent (0 seconds) # TODO Thread join doesn't work
ok 3 - Join tests #1 completed
not ok 4 - Join delayed parent (0 seconds) # TODO Thread join doesn't work
ok 5 - Join tests #2 completed
ok 6 - pget == pset
ok 7 - thread.
ok 8 - pget == pset
ok 9 - thread.
ok 10 - pget == pset
ok 11 - thread.
not ok 12 - infoB.didSomething
not ok 13 - infoA.didSomething
not ok 14 - threadA epicsThreadIsOk
not ok 15 - threadB epicsThreadIsOk
-------
It ends just before the test results are printed.
My analysis shows that the crash is most likely related to the fact that epicsThreadMust
The solution is to make infoA and infoB static (or global). Or skip the whole test #ifndef EPICS_THREAD_