diff options
author | Jean-Paul Calderone <exarkun@magnon> | 2009-04-01 19:01:41 -0400 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@magnon> | 2009-04-01 19:01:41 -0400 |
commit | ec48cd56e0b0bada9b5556a2c759f3f6fef5c9d1 (patch) | |
tree | 83d135b347e305f813298f4c4d853ea30b1d029c | |
parent | b8a707370acd69170b01dd0b45608c9a11702bf0 (diff) | |
parent | d3feb01b3846bd5de393172acfd22a8c0e1e1dfe (diff) | |
download | pyopenssl-ec48cd56e0b0bada9b5556a2c759f3f6fef5c9d1.tar.gz |
Fix the thread-related segfault
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/util.h | 1 |
2 files changed, 10 insertions, 0 deletions
@@ -1,4 +1,13 @@ 2009-04-01 Jean-Paul Calderone <exarkun@twistedmatrix.com> + Samuele Pedroni <pedronis@openend.se> + + * src/util.h: Delete the TLS key before trying to set a new value + for it in case the current thread identifier is a recycled one (if + it is recycled, the key won't be set because there is already a + value from the previous thread to have this identifier and to use + the pyOpenSSL API). + +2009-04-01 Jean-Paul Calderone <exarkun@twistedmatrix.com> * src/crypto/crypto.c: Add FILETYPE_TEXT for dumping keys and certificates and certificate signature requests to a text format. @@ -37,6 +37,7 @@ extern void flush_error_queue(void); * some Python. */ # define MY_BEGIN_ALLOW_THREADS(ignored) \ + PyThread_delete_key_value(_pyOpenSSL_tstate_key); \ PyThread_set_key_value(_pyOpenSSL_tstate_key, PyEval_SaveThread()); /* |