View Issue Details

IDProjectCategoryView StatusLast Update
0000379OpenFOAMBugpublic2015-02-01 10:48
Reporteruser19Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Summary0000379: Foam::timer is not safe
DescriptionFoam::timer calls longjmp() from inside a signal handler. This is not safe and can cause undefined behaviour. See https://www.securecoding.cert.org/confluence/display/seccode/SIG32-C.+Do+not+call+longjmp()+from+inside+a+signal+handler.
TagsNo tags attached.

Activities

henry

2015-01-29 15:21

manager   ~0003615

How would you suggest we change timer to avoid this problem?

wyldckat

2015-01-29 15:33

updater   ~0003618

As far as I know:

1- The updated link is this: https://www.securecoding.cert.org/confluence/display/seccode/VOID+SIG32-C.+Do+not+call+longjmp%28%29+from+inside+a+signal+handler

2- Fixing this is a must if OpenFOAM ever switches to supporting multi-threaded parallel processing, instead of the current multi-process.

I'm not familiar enough with OpenMP to state if this fix is needed or not.

henry

2015-01-29 15:37

manager   ~0003619

It is not clear how the approach outlined in the link would be applied to OpenFOAM or if it is even necessary or what the benefit would be. It appears the change would be substantial and hinder maintenance.

henry

2015-02-01 10:48

manager   ~0003640

It is not clear how serious this issue is; so far no one has reported a problem with the operation of OpenFOAM relating to this issue. It is also not clear how the alternative approaches would be integrated into OpenFOAM and no one has offered any guidance or better still a patch. So I will close the bug-report pending further information from the reporter.

Issue History

Date Modified Username Field Change
2012-01-05 12:52 user19 New Issue
2015-01-29 15:21 henry Note Added: 0003615
2015-01-29 15:33 wyldckat Note Added: 0003618
2015-01-29 15:37 henry Note Added: 0003619
2015-02-01 10:48 henry Note Added: 0003640
2015-02-01 10:48 henry Status new => closed
2015-02-01 10:48 henry Assigned To => henry
2015-02-01 10:48 henry Resolution open => fixed