[issue7672] _ssl module causes segfault

Sean Soria report at bugs.python.org
Mon Jan 11 01:46:28 CET 2010

Sean Soria <bugs.python at seansoria.com> added the comment:

You've got init_* that Python calls whenever it loads a library, you could just as easily have destroy_*. But that would probably be overkill.

How would the application know that Python has created callbacks? This is just one instance. Who knows where else this is done in any number of libraries. You you suggest that any application which dynamically loads a library never unload it?

What is the general case that this would not be fixed in? If a multi-threaded app uses SSL and doesn't load its own callbacks then it is in violation as libcryto states that certain callbacks must be set. If it doesn't use SSL then it's never going to have a problem as the callbacks will never be called after _ssl.so is unloaded. So the remaining case is a single threaded app that doesn't load the callbacks because it's single-threaded. But in that case it should be using a single threaded python library or it is in violation as it can no longer be considered a single-threaded app, and therefore should have loaded its own callbacks.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list