You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file OpenPsiRules.h decalres multiple arrays storing handles as globals. This will often lead to crashes in cxa_finalize when the shared library is unloaded. This is the current reason for why OpenPsiRulesUTest and the other OpenPsi tests crash.
Basically, when those tests finish, the C libarary unloads all shared libraries that were used, which causes all finalizers in those shared libraries to run. Whenever a shared library contains global C++ objects, the finalizer calls the destructors on those objects. a global Handle _psi_category would be an example of a global C++ class.
The problem here is that the finalizers are run in arbitrary order, and there is no way in which to control that order. In this case, the finalizer that unloaded libatombase.so which contains the definition for Handle has already run, so the code that defines the Handle destructor is now gone. At some later time, the finalizers for libopenpsi are run, which try to call the destructor for Handle which does not exist. Then boom!! an awful bunch of corruption messages spill out.
The text was updated successfully, but these errors were encountered:
The file
OpenPsiRules.h
decalres multiple arrays storing handles as globals. This will often lead to crashes incxa_finalize
when the shared library is unloaded. This is the current reason for whyOpenPsiRulesUTest
and the other OpenPsi tests crash.Basically, when those tests finish, the C libarary unloads all shared libraries that were used, which causes all finalizers in those shared libraries to run. Whenever a shared library contains global C++ objects, the finalizer calls the destructors on those objects. a global
Handle _psi_category
would be an example of a global C++ class.The problem here is that the finalizers are run in arbitrary order, and there is no way in which to control that order. In this case, the finalizer that unloaded
libatombase.so
which contains the definition forHandle
has already run, so the code that defines theHandle
destructor is now gone. At some later time, the finalizers forlibopenpsi
are run, which try to call the destructor forHandle
which does not exist. Then boom!! an awful bunch of corruption messages spill out.The text was updated successfully, but these errors were encountered: