issues with epicsTime
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Fix Released
|
Wishlist
|
Jeff Hill |
Bug Description
The issues originally reported by Kay Kasemir:
The epicsTime.cpp in R3.14.8.2 has the
assert ( this->nSec < nSecPerSec );
in the conversion from epicsTime to epicsTimeStamp.
That's OK, the nanoseconds should be normalized,
but it turns out that a few SNS IOCs produce such
bad time stamps, and now I have to catch that in the
archiver in time before I run into the assert().
The thing is that epicsTime.cpp could be more rigorous. epicsTime.strftime contains this mod 1e9:
int frac = ... nSec ... % ((int)1e9)
... and the result is that 'camonitor' will show all those
bad PVs with good looking time stamps,
so IOC engineers who check their time stamps don't see
anything wrong until they try to archive those PVs.
Additional information:
I see the following issues:
1) The epicsTime constructor does not throw an exception when an invalid epicsTimeStamp is passed to it.
2) The "epicsTime:
3) William Lupton's epicsTime::strftime doesn’t add .OVF if the nano-seconds field is invalid. Kay's original issue.
4) William Lupton's epicsTime::strftime has a buffer overrun vulnerability.
5) Certain C interfaces to epicsTime were not bracketed by try catch blocks.
Original Mantis Bug: mantis-245
http://
Fixed in R3.14.9