PERL_DL_NONLAZY causes SQLite to Segfault on Error.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SQLite |
Incomplete
|
Undecided
|
Unassigned | ||
libdbd-sqlite2-perl (Ubuntu) |
Invalid
|
Medium
|
MOTU |
Bug Description
I am running Breezey amd64, updated and dist-upraded as of today (11/2/2005) . These are all the SQLite related packages I have installed:
libdbd-sqlite 0.7.1-3
libdbd-sqlite2-perl 0.33-4
sqlite 2.8.16-1
libsqlite0 2.8.16-1
The follow procedure will result in a segfault:
sqlite foo.db ''; # Just some to create a DB, any Sqlite DB will do
PERL_DL_NONLAZY=1 perl -MDBI -le 'DBI->connec(
If you do the above but set PERL_DL_NONLAZY to 0 (or just not set it at all) then you get the expected (and correct) error:
DBD::SQLite2::db selectall_arrayref failed: unrecognized token: "#"(1) at dbdimp.c line 412 at -e line 1.
I ran into this problem b/c some Perl unit tests I wrote use SQLite and one of the tests checks for trapping errors when malformed SQL is passed in.
Here is my cpuinfo:
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 37
model name : AMD Opteron(tm) Processor 246
stepping : 1
cpu MHz : 2009.304
cache size : 1024 KB
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm
bogomips : 3964.92
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp
Changed in libdbd-sqlite2-perl: | |
assignee: | nobody → motu |
My example for reproducing the error formated strangely in my browser. Here it is again:
# Create a DB. Any will do.
sqlite foo.db '';
# Connect and run bad SQL
PERL_DL_NONLAZY=1 perl -MDBI -le 'DBI->connect( "dbi:SQLite2: dbname= foo.db" , "", "")->selectall_ arrayref( "#");'
If PERL_DL_NONLAZY is 0 or unset then the above code will not segfault.