You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a way to reproduce the issue. valgrind shows uninitialized memory
reads and eventually an invalid read in vtable.c:174. This is using apsw-
3.6.23.1- r1 .
!/usr/bin/env python
import apsw
class Source:
def Create(self, *args):
return 'CREATE TABLE x (delete)', None
connection = apsw.Connection('db')
cursor = connection.cursor()
connection.createmodule("testmod2", Source())
cursor.execute("create virtual table foo using testmod2(2,two)")
for row in cursor.execute("select * from foo"):
print row
Thank you very much for reporting this. It is fixed in r6a1015af26 and re3d41937fa which will be in the next release (scheduled along with the next release of SQLite).
In the short term you can grab the latest src/vtable.c or pull down the entire
source via mercurial.
The underlying cause is error handling. In short the code as written would have
resulted in the previous error message in that thread being returned or if there was
none (your case) then a crash (or assertion failure in debug build). (This esoteric
error handling is due to design errors in SQLite's API.)
There is code in the tests that inspect the source to check for this. However it
does not check the vtable code and this was the only relevant line in the vtable code
that would need to be checked. There is no other relevant code that is being missed
by the checks. I did try to add checking this file, but it is far too complex and we
have complete coverage of vtables api anyway so this code is unlikely to change ever.
From jose.gomes.ny on May 26, 2010 08:19:39
This is a way to reproduce the issue. valgrind shows uninitialized memory
reads and eventually an invalid read in vtable.c:174. This is using apsw-
3.6.23.1- r1 .
!/usr/bin/env python
import apsw
class Source:
def Create(self, *args):
return 'CREATE TABLE x (delete)', None
connection = apsw.Connection('db')
cursor = connection.cursor()
connection.createmodule("testmod2", Source())
cursor.execute("create virtual table foo using testmod2(2,two)")
for row in cursor.execute("select * from foo"):
print row
Original issue: http://code.google.com/p/apsw/issues/detail?id=103
The text was updated successfully, but these errors were encountered: