This queue is for tickets about the DBI CPAN distribution.

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

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

BugTracker
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

Message body not shown because it is not plain text.

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


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.