Subject: | Invalid handle causes a segfault instead of exception |
In selectall_arrayref (SQLite.xsi:119) and perhaps other places, if the statement attribute is SvROK, it is treated as prepared handle. If, by mistake, a reference to something else gets in, a segfault results.
I suggest that the handle-ness be instead checked by sv_isa(st, appropriate-class-name). Perhaps a wrapper around DBIh_COM could do this check and croak on failure.