Finalizer crasher on OS X

Ken Raeburn raeburn at MIT.EDU
Fri Sep 24 13:01:05 EDT 2010


One possibility that our libraries won't handle well is two instances of a library (whether two copies in the file system, or one copy mapped in twice and initialized twice), both using the same k5support library.  The library tracks whether it's been initialized, but (in order to not chew up lots of thread-specific-data key values, which may be a limited resource on some systems) we funnel all the thread-specific data stuff through the support library, which also tracks whether it thinks the other libraries have been initialized or not, in the form of cleanup handler registrations.

It may be we could just do without the latter, if the OSes we care about support large numbers of TSD keys -- or if this problem, which I think has come up before, is more important.  Then each library can register its own keys and destructors, and multiple instances shouldn't be a problem (at least, for that reason).  Or find a mechanism that addresses both issues; maybe dynamic allocation of TSD handles within the support library, instead of enumerators and fixed-size arrays.

Ken



More information about the krbdev mailing list