Comment 2 for bug 237156

Revision history for this message
Mike Stroyan (stroyan) wrote :

The crash occurs when the libselinux1 library is trying to do its 'fini' destructor functions when unloading.
It references some thread local storage variables that were statically initialized to NULL.
That first reference fails when it actually tries to allocate the variables.
This patch explicity initializes those variables during the init function, making the fini function work.
It seems that the real defect is in a corner case of the implementation of "__thread" feature.
But changing libselinux1 this way is a practical workaround.