Skip Menu |

This queue is for tickets about the DBI CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: aaron.schweiger [...] gmail.com
Cc:
AdminCc:

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: https://rt.cpan.org/Public/Bug/Display.html?id=84974 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
Subject: Driver.xst.new
Download Driver.xst.new
application/octet-stream 21.7k

Message body not shown because it is not plain text.

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