[issue26387] Race condition in sqlite module

2016-02-19 Thread Filipp Andjelo
Filipp Andjelo added the comment: Hm, this is strange, because close() can only be called from the same thread and dealloc() can be called only if reference count is 0, right? So why is there a mutex again each other anyway? And how can that be, that sqlite3_close() is called multiple times wi

[issue26387] Race condition in sqlite module

2016-02-18 Thread SilentGhost
Changes by SilentGhost : -- components: +Extension Modules nosy: +ghaering versions: -Python 3.2, Python 3.3 ___ Python tracker ___ _

[issue26387] Race condition in sqlite module

2016-02-18 Thread Filipp Andjelo
New submission from Filipp Andjelo: Race condition in sqlite close/dealloc crashes the application with double free(). The pointer is set to NULL outside of mutexed zone, so if close and dealloc follow each other very shortly application crashes. Please see the attached patch. -- comp