Skip Menu | will be shut down on March 1st, 2021.

This queue is for tickets about the DBI CPAN distribution.

Report information
The Basics
Id: 85562
Status: resolved
Priority: 0/
Queue: DBI

Owner: Nobody in particular
Requestors: aaron.schweiger [...]

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)

Subject: Stack corruption for queries making perl callbacks (SQLITE)
The SQLite database allows user-defined perl functions and aggregates. A problem occurs when a user-defined function requires a non-trivial amount of memory and the perl stack gets reallocated. For an example of this bug in DBD::SQLite, see: The following changes to Driver.xst (attached) resolves the particular issue identified above: < ST(0) = dbdxst_fetchall_arrayref(sth, &PL_sv_undef, (maxrows_svp) ? *maxrows_svp : &PL_sv_undef); --- Show quoted text
> SV *tmp = dbdxst_fetchall_arrayref(sth, &PL_sv_undef, (maxrows_svp) ? *maxrows_svp : &PL_sv_undef); > SPAGAIN; > ST(0) = tmp;
663c665,667 < ST(0) = dbdxst_fetchall_arrayref(sth, slice, batch_row_count); --- Show quoted text
> SV *tmp = dbdxst_fetchall_arrayref(sth, slice, batch_row_count); > SPAGAIN; > ST(0) = tmp;
Could someone more knowledgeable in DBI XS comment on if this issue might have a greater extent? Also, is this an appropriate fix for DBI -- or should DBD::SQLite not rely on the supplied Driver.xst? Many Thanks, Aaron Schweiger
application/octet-stream 21.7k

Message body not shown because it is not plain text.

Looks like the right fix. Thanks!
Patched. Thanks!

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to