Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DBD-Oracle CPAN distribution.

Report information
The Basics
Id: 35353
Status: resolved
Priority: 0/
Queue: DBD-Oracle

People
Owner: champoux [...] pythian.com
Requestors: gotoarunk [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.21
Fixed in: 1.22



Subject: Incorrect use of 'bool' in dbdimp.c
During beta testing of OCI client on Apple intel(10.5) we have noticed that with default perl version available in Leopard GA, 2 DBD tests fail - 20select.t & 25plsql.t. Debugging this a little futher showed that the issue is with the preparse module in the dbdimp.c - 'in_literal' is a variable used for storing char values , but is defined as a bool variable. In 10.5 MAC OSX, bool is a standard type used for storing true or false. so overloading this as a 'char' will not work now. Please make the following modification in dbdimp.c diff DBD-Oracle-1.21/dbdimp.c DBD-Oracle-1.21/dbdimp.c.FIXED 1099c1099 < bool in_literal = FALSE; --- Show quoted text
> char in_literal = '\0';
1146c1146 < in_literal = 0; --- Show quoted text
> in_literal = '\0';
======== versions details where the issue was found ==== Mac OS X Version 10.5.2 Processor: 2.4 GHz Intel Core 2 Duo Perl Version: 5.8.8 DBI Version: 1.604 DBD::Oracle Version: 1.21 Show quoted text
> > perl -V >
Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=darwin, osvers=9.0, archname=darwin-thread-multi-2level uname='darwin omen.apple.com 9.0 darwin kernel version 9.0.0b5: mon sep 10 17:17:11 pdt 2007; root:xnu-1166.6~1release_ppc power macintosh ' config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags=-Dman3ext=3pm -Duseithreads -Duseshrplib' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-arch i386 -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include', optimize='-O3', cppflags='-no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include' ccversion='', gccversion='4.0.1 (Apple Inc. build 5465)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc -mmacosx-version-min=10.5', ldflags ='-arch i386 -L/usr/local/lib' libpth=/usr/local/lib /usr/lib libs=-ldbm -ldl -lm -lutil -lc perllibs=-ldl -lm -lutil -lc libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-arch i386 -bundle -undefined dynamic_lookup -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Locally applied patches: fix for regcomp CVE-2007-5116 security vulnerability Built under darwin Compiled at Dec 7 2007 09:37:29 %ENV: PERL5LIB="/sw/lib/perl5:/sw/lib/perl5/darwin" @INC: /sw/lib/perl5 /sw/lib/perl5/darwin /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl/5.8.1/darwin-thread-multi-2level /Library/Perl/5.8.1 .
Subject: tests fails on MAC OSX(intel) leopard - Incorrect use of 'bool' in dbdimp.c
From: gotoarunk [...] gmail.com
attached the promposed patch. On Wed Apr 23 16:54:08 2008, gotoarunk wrote: Show quoted text
> During beta testing of OCI client on Apple intel(10.5) we have noticed > that with default perl version available in Leopard GA, 2 DBD tests fail > - 20select.t & 25plsql.t. Debugging this a little futher showed that the > issue is with the preparse module in the dbdimp.c - 'in_literal' is a > variable used for storing char values , but is defined as a bool > variable. In 10.5 MAC OSX, bool is a standard type used for storing true > or false. so overloading this as a 'char' will not work now. Please make > the following modification in dbdimp.c > > diff DBD-Oracle-1.21/dbdimp.c DBD-Oracle-1.21/dbdimp.c.FIXED > 1099c1099 > < bool in_literal = FALSE; > ---
> > char in_literal = '\0';
> 1146c1146 > < in_literal = 0; > ---
> > in_literal = '\0';
> > > > > > > ======== versions details where the issue was found ==== > > Mac OS X Version 10.5.2 > Processor: 2.4 GHz Intel Core 2 Duo > > Perl Version: 5.8.8 > > DBI Version: 1.604 > > DBD::Oracle Version: 1.21 >
> > > > perl -V > >
> Summary of my perl5 (revision 5 version 8 subversion 8) configuration: > Platform: > osname=darwin, osvers=9.0, archname=darwin-thread-multi-2level > uname='darwin omen.apple.com 9.0 darwin kernel version 9.0.0b5: mon > sep 10 17:17:11 pdt 2007; root:xnu-1166.6~1release_ppc power macintosh ' > config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe > -Dldflags=-Dman3ext=3pm -Duseithreads -Duseshrplib' > hint=recommended, useposix=true, d_sigaction=define > usethreads=define use5005threads=undef useithreads=define > usemultiplicity=define > useperlio=define d_sfio=undef uselargefiles=define usesocks=undef > use64bitint=define use64bitall=define uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='cc', ccflags ='-arch i386 -g -pipe -fno-common -DPERL_DARWIN > -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement > -I/usr/local/include', > optimize='-O3', > cppflags='-no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN > -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement > -I/usr/local/include' > ccversion='', gccversion='4.0.1 (Apple Inc. build 5465)', > gccosandvers='' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=8 > alignbytes=8, prototype=define > Linker and Libraries: > ld='cc -mmacosx-version-min=10.5', ldflags ='-arch i386 > -L/usr/local/lib' > libpth=/usr/local/lib /usr/lib > libs=-ldbm -ldl -lm -lutil -lc > perllibs=-ldl -lm -lutil -lc > libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, > libperl=libperl.dylib > gnulibc_version='' > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' > cccdlflags=' ', lddlflags='-arch i386 -bundle -undefined > dynamic_lookup -L/usr/local/lib' > > > Characteristics of this binary (from libperl): > Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT > PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES > USE_PERLIO USE_REENTRANT_API > Locally applied patches: > fix for regcomp CVE-2007-5116 security vulnerability > Built under darwin > Compiled at Dec 7 2007 09:37:29 > %ENV: > PERL5LIB="/sw/lib/perl5:/sw/lib/perl5/darwin" > @INC: > /sw/lib/perl5 > /sw/lib/perl5/darwin > /System/Library/Perl/5.8.8/darwin-thread-multi-2level > /System/Library/Perl/5.8.8 > /Library/Perl/5.8.8/darwin-thread-multi-2level > /Library/Perl/5.8.8 > /Library/Perl > /Network/Library/Perl/5.8.8/darwin-thread-multi-2level > /Network/Library/Perl/5.8.8 > /Network/Library/Perl > /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level > /System/Library/Perl/Extras/5.8.8 > /Library/Perl/5.8.6/darwin-thread-multi-2level > /Library/Perl/5.8.6 > /Library/Perl/5.8.1/darwin-thread-multi-2level > /Library/Perl/5.8.1 > .
diff -r -u DBD-Oracle-1.21/dbdimp.c DBD-Oracle-1.21.fixed/dbdimp.c --- DBD-Oracle-1.21/dbdimp.c 2008-04-03 11:07:56.000000000 -0700 +++ DBD-Oracle-1.21.fixed/dbdimp.c 2008-04-23 21:13:56.000000000 -0700 @@ -1096,7 +1096,7 @@ { dTHX; D_imp_dbh_from_sth; - bool in_literal = FALSE; + char in_literal = '\0'; char in_comment = '\0'; char *src, *start, *dest; phs_t phs_tpl; @@ -1143,7 +1143,7 @@ if (in_literal) { if (*src == in_literal) - in_literal = 0; + in_literal = '\0'; *dest++ = *src++; continue; }
Patch applied to Trunk and checked into subversion. I will be incuded in DBD::1.22