jangoslackgit / sqlite4java

Automatically exported from code.google.com/p/sqlite4java
0 stars 0 forks source link

Possible crash if SQLiteConnection.dispose() is called from a different thread #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Access violation/segmentation fault is possible in the following scenario:

1. T1: open connection
2. T1: start any method that use sqlite3* handle
3. T1: method checks handle/state for validity, releases lock
4. T2: dispose is called, handle is now invalid
5. T1: method uses now-invalid handle - crash

Original issue reported on code.google.com by ser...@gmail.com on 21 Aug 2010 at 10:41

GoogleCodeExporter commented 9 years ago

Original comment by ser...@gmail.com on 21 Aug 2010 at 10:55

GoogleCodeExporter commented 9 years ago

Original comment by ser...@gmail.com on 23 Aug 2010 at 8:10

GoogleCodeExporter commented 9 years ago

Original comment by ser...@gmail.com on 23 Aug 2010 at 8:11

GoogleCodeExporter commented 9 years ago
what happen to the connection when this happens? Will the connection to linger 
around 

Original comment by dongsh...@gmail.com on 12 Feb 2014 at 8:53

GoogleCodeExporter commented 9 years ago
The behavior is not specified. It could linger. The library may take best 
effort to shut it down.

Original comment by ser...@gmail.com on 13 Feb 2014 at 9:21