Re: [sqlite] sqlite3VdbeMemAboutToChange(Vdbe *, Mem *): Assertion `(mFlags_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed.
Richard Hipp, on Tuesday, December 31, 2019 08:33 AM, wrote... > > On 12/31/19, Jose Isaias Cabrera wrote: > > > > I don't know what "This bug affects debug builds...", > > This is yet another fault not in SQLite itself, but in the auxiliary > VM register tracking logic that we use during testing and debugging. > Hence, it only comes up if you compile with -DSQLITE_DEBUG. An > ordinary build works find and gives a correct answer. > > The VM register tracking logic does for the VM (approximately) what > ASAN does for machine code - it tries to identify cases where the byte > code is violating assumptions about the operation of the VM. > > In this particular instance, the issue raised by the VM register > tracking logic was a false-positive. The VM register tracking logic > has been enhanced on trunk to avoid this particular false-positive, so > the problem should no longer occur. Thank you, Dr. Hipp. josé ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3VdbeMemAboutToChange(Vdbe *, Mem *): Assertion `(mFlags_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed.
On 12/31/19, Jose Isaias Cabrera wrote: > > I don't know what "This bug affects debug builds...", This is yet another fault not in SQLite itself, but in the auxiliary VM register tracking logic that we use during testing and debugging. Hence, it only comes up if you compile with -DSQLITE_DEBUG. An ordinary build works find and gives a correct answer. The VM register tracking logic does for the VM (approximately) what ASAN does for machine code - it tries to identify cases where the byte code is violating assumptions about the operation of the VM. In this particular instance, the issue raised by the VM register tracking logic was a false-positive. The VM register tracking logic has been enhanced on trunk to avoid this particular false-positive, so the problem should no longer occur. D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3VdbeMemAboutToChange(Vdbe *, Mem *): Assertion `(mFlags_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed.
Yongheng Chen, on Tuesday, December 31, 2019 03:21 AM, wrote... > > Hi, > > We found a debug assertion bug in sqlite. Here’s the PoC: > — > CREATE TABLE v0 ( v1 , v2 FLOAT ) ; > CREATE TRIGGER x AFTER INSERT ON v0 > BEGIN > INSERT INTO v0 SELECT DISTINCT v2 / 10 , v2 / 1 FROM v0 ; > END; > INSERT INTO v0 ( v1 , v1 ) VALUES ( '' , 10 ) ,( '' , 0 ) ,( 'AIR' , 10 > ); > UPDATE v0 SET v2 = randomblob ( v2 ) ; > SELECT coalesce ( max ( quote ( v1 ) ) , 10 ) FROM v0 GROUP BY v1 ; > — > > This bug affects debug builds based on trunk and the latest release > version. > > Special thanks to Manuel Rigger for all his help. And thanks every one in > the sqlite team for your great work. I don't know what "This bug affects debug builds...", this worked on 3.30.0 released version. 8:10:31.22>sqlite3 SQLite version 3.30.0 2019-10-04 15:03:17 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> CREATE TABLE v0 ( v1 , v2 FLOAT ) ; sqlite> CREATE TRIGGER x AFTER INSERT ON v0 ...> BEGIN ...> INSERT INTO v0 SELECT DISTINCT v2 / 10 , v2 / 1 FROM v0 ; ...> END; sqlite> INSERT INTO v0 ( v1 , v1 ) VALUES ( '' , 10 ) ,( '' , 0 ) ,( 'AIR' , 10 ); sqlite> UPDATE v0 SET v2 = randomblob ( v2 ) ; sqlite> SELECT coalesce ( max ( quote ( v1 ) ) , 10 ) FROM v0 GROUP BY v1 ; NULL '' 'AIR' sqlite> But, I am not running any debugger. ;-) josé ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] sqlite3VdbeMemAboutToChange(Vdbe *, Mem *): Assertion `(mFlags_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed.
Hi, We found a debug assertion bug in sqlite. Here’s the PoC: — CREATE TABLE v0 ( v1 , v2 FLOAT ) ; CREATE TRIGGER x AFTER INSERT ON v0 BEGIN INSERT INTO v0 SELECT DISTINCT v2 / 10 , v2 / 1 FROM v0 ; END; INSERT INTO v0 ( v1 , v1 ) VALUES ( '' , 10 ) ,( '' , 0 ) ,( 'AIR' , 10 ); UPDATE v0 SET v2 = randomblob ( v2 ) ; SELECT coalesce ( max ( quote ( v1 ) ) , 10 ) FROM v0 GROUP BY v1 ; — This bug affects debug builds based on trunk and the latest release version. Special thanks to Manuel Rigger for all his help. And thanks every one in the sqlite team for your great work. Yongheng & Rui ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users