Steinar Midtskogen <stei...@latinitas.org> writes:

> I can easily check that the argument doesn't match argv[2], but if
> it's still possible to get into a loop like this if virtual tables
> refer to eachother, then I don't think it's possible to detect this in
> the VT code.

I think indeed that this is a problem:

sqlite> create table a ( x INTEGER, PRIMARY KEY (x) );
sqlite> create virtual table b using interpolate(a);
sqlite> drop table a;
sqlite> create virtual table a using interpolate(b);

Program received signal SIGSEGV, Segmentation fault.

And the call backtrace goes on forever.

Yes, this is a user fault, but if the VT code must check this, it
would be nice to have a way to detect it.  It's possible to have some
kind of static counter in xCreate() which could be used for detecting
this, but that would limit the number of instances rather than the
level of nesting.

-- 
Steinar
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to