New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global ctor ordering causes crashes #49
Comments
43ee4b9 doesn't address the larger issue, but does make getFieldCreate() and getPVDataCreate() safe to be called at any time. This should at least fix this particular crash. |
@MarkRivers confirms that he no longer sees this crash. |
I made an attempt at to quantify the issue with a script examples/find_global_ctors.py in https://github.com/mdavidsaver/pyelftools which attempts to analyze G++ 6.3 produced object files to find code run from global constructors/destructors. This finds that w/ libpvData.so at least, the problem is not as bad as I had feared. The global ctors are mostly calls to getFieldCreate() and getPVDataCreate(), which are now safe, lots of global The offenders are: createRequest.cpp, FieldCreateFactory.cpp, pvAlarm.cpp, pvControl.cpp, pvDisplay.cpp, pvEnumerated.cpp, pvTimeStamp.cpp, and PVUnion.cpp. It will be worthwhile to go through these simply to cleanup amateur stuff like: pvDataCPP/src/misc/serializeHelper.cpp Line 102 in 43ee4b9
pvDataCPP/src/misc/serializeHelper.cpp Line 142 in 43ee4b9
|
See also epics-base/pvAccessCPP#80 |
Released with Base 7.0.2 |
@MarkRivers reports
The text was updated successfully, but these errors were encountered: