Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.93k stars 549 forks source link

Patch for DBD::Oracle-1.12 #6319

Closed p5pRT closed 21 years ago

p5pRT commented 21 years ago

Migrated from rt.perl.org#21304 (status was 'resolved')

Searchable as RT21304$

p5pRT commented 21 years ago

From shap@mbd.ru

Greetings\,

Here is the micro patch to DBD​::Oracle-1.12 module. The problem was the following\, when you turn on high level debugging ( DBI->trace(2) or greater ) Perl crashes with "Segmentation failed" message. I found that DBILOGFP is no longer an FILE structute and PerlIO_printf should be used instead of fprintf to output logging information.

Best regards\, Dmitry Shapovalov.

===================================================================== $ perlbug -d


Flags​:   category=   severity=


Site configuration information for perl v5.8.0​:

Configured by inger at Mon Dec 30 15​:08​:38 MSK 2002.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration​:   Platform​:   osname=linux\, osvers=2.4.18-alt7-smp\, archname=i386-linux-thread-multi   uname='linux mash.office.altlinux.ru 2.4.18-alt7-smp #1 smp thu jun 6 11​:43​:56 msd 2002 i686 unknown unknown gnulinux '   config_args='-des -Darchname=i386-linux -Dd_dosuid -Ud_csh -Duseshrplib -Dlibperl=libperl.so.5.8 -Doptimize=-pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686 -Dinstallprefix=/usr -Dprefix=/usr -Dprivlib=/usr/lib/perl5 -Darchlib=/usr/lib/perl5/i386-linux -Dvendorprefix=/usr -Dvendorlib=/usr/lib/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl/i386-linux -Dsiteprefix=/usr/local -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.0 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.0/i386-linux -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dcf_by=ALT Linux Team -Dmyhostname=localhost -Dperladmin=root@​localhost -Dinc_version_list=5.6.1 5.6.0 -Dpager=/usr/bin/less -isR -Di_shadow -Di_syslog -Dusethreads -Duseithreads -Duselargefiles -Ui_db -Di_gdbm -Di_ndbm -Di_sdbm -Ui_odbm'   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=undef use64bitall=undef uselongdouble=undef   usemymalloc=n\, bincompat5005=undef   Compiler​:   cc='cc'\, ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm'\,   optimize='-pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686'\,   cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm'   ccversion=''\, gccversion='3.2.1 (ALT Linux\, build 3.2.1-alt2)'\, gccosandvers=''   intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=1234   d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=12   ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8   alignbytes=4\, prototype=define   Linker and Libraries​:   ld='cc'\, ldflags =' -L/usr/local/lib'   libpth=/usr/local/lib /lib /usr/lib   libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil   perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil   libc=/lib/libc-2.2.6.so\, so=so\, useshrplib=true\, libperl=libperl.so.5.8   gnulibc_version='2.2.6'   Dynamic Linking​:   dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-rdynamic'   cccdlflags='-fpic'\, lddlflags='-shared -L/usr/local/lib'

Locally applied patches​:


@​INC for perl v5.8.0​:   /usr/lib/perl5/i386-linux   /usr/lib/perl5   /usr/local/lib/perl5/site_perl/5.8.0/i386-linux   /usr/local/lib/perl5/site_perl/5.8.0   /usr/local/lib/perl5/site_perl   /usr/lib/perl5/vendor_perl/i386-linux   /usr/lib/perl5/vendor_perl   /usr/lib/perl5/vendor_perl   .


Environment for perl v5.8.0​:   HOME=/home/shap   LANG=ru_RU.CP1251   LANGUAGE=ru_RU.CP1251   LC_COLLATE=ru_RU.CP1251   LC_CTYPE=ru_RU.CP1251   LC_MESSAGES=ru_RU.CP1251   LC_MONETARY=ru_RU.CP1251   LC_NUMERIC=ru_RU.CP1251   LC_TIME=ru_RU.CP1251   LD_LIBRARY_PATH=/usr/local/oracle/9.0.1/lib​:/usr/local/oracle/9.0.1/lib   LOGDIR (unset)  
PATH=.​:.​:/home/shap/bin​:/bin​:/usr/bin​:/usr/X11R6/bin​:/usr/local/bin​:/usr/local/oracle/9.0.1/bin​:/usr/local/oracle/9.0.1/bin   PERL_BADLANG (unset)   SHELL=/bin/bash [shap@​dshap shap]$ perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration​:   Platform​:   osname=linux\, osvers=2.4.18-alt7-smp\, archname=i386-linux-thread-multi   uname='linux mash.office.altlinux.ru 2.4.18-alt7-smp #1 smp thu jun 6 11​:43​:56 msd 2002 i686 unknown unknown gnulinux '   config_args='-des -Darchname=i386-linux -Dd_dosuid -Ud_csh -Duseshrplib -Dlibperl=libperl.so.5.8 -Doptimize=-pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686 -Dinstallprefix=/usr -Dprefix=/usr -Dprivlib=/usr/lib/perl5 -Darchlib=/usr/lib/perl5/i386-linux -Dvendorprefix=/usr -Dvendorlib=/usr/lib/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl/i386-linux -Dsiteprefix=/usr/local -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.0 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.0/i386-linux -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dcf_by=ALT Linux Team -Dmyhostname=localhost -Dperladmin=root@​localhost -Dinc_version_list=5.6.1 5.6.0 -Dpager=/usr/bin/less -isR -Di_shadow -Di_syslog -Dusethreads -Duseithreads -Duselargefiles -Ui_db -Di_gdbm -Di_ndbm -Di_sdbm -Ui_odbm'   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=undef use64bitall=undef uselongdouble=undef   usemymalloc=n\, bincompat5005=undef   Compiler​:   cc='cc'\, ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm'\,   optimize='-pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686'\,   cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm'   ccversion=''\, gccversion='3.2.1 (ALT Linux\, build 3.2.1-alt2)'\, gccosandvers=''   intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=1234   d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=12   ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8   alignbytes=4\, prototype=define   Linker and Libraries​:   ld='cc'\, ldflags =' -L/usr/local/lib'   libpth=/usr/local/lib /lib /usr/lib   libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil   perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil   libc=/lib/libc-2.2.6.so\, so=so\, useshrplib=true\, libperl=libperl.so.5.8   gnulibc_version='2.2.6'   Dynamic Linking​:   dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-rdynamic'   cccdlflags='-fpic'\, lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl)​:   Compile-time options​: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT   Built under linux   Compiled at Dec 30 2002 15​:10​:05   @​INC​:   /usr/lib/perl5/i386-linux   /usr/lib/perl5   /usr/local/lib/perl5/site_perl/5.8.0/i386-linux   /usr/local/lib/perl5/site_perl/5.8.0   /usr/local/lib/perl5/site_perl   /usr/lib/perl5/vendor_perl/i386-linux   /usr/lib/perl5/vendor_perl   /usr/lib/perl5/vendor_perl   .

p5pRT commented 21 years ago

From shap@mbd.ru

oci7.c.diff ```diff --- oci7.c 2003-02-18 21:06:28 +0300 +++ oci7.c.patch 2003-02-18 21:05:07 +0300 @@ -104,7 +104,7 @@ #endif if (imp_sth->cda->ft != FT_SELECT) { if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " dbd_describe skipped for non-select (sql f%d, lb %ld, csr 0x%lx)\n", imp_sth->cda->ft, (long)long_buflen, (long)imp_sth->cda); /* imp_sth memory was cleared when created so no setup required here */ @@ -112,7 +112,7 @@ } if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " dbd_describe (for sql f%d after oci f%d, lb %ld, csr 0x%lx)...\n", imp_sth->cda->ft, imp_sth->cda->fc, (long)long_buflen, (long)imp_sth->cda); @@ -283,7 +283,7 @@ imp_sth->est_width = est_width; if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " dbd_describe'd %d columns (Row bytes: %d max, %d est avg. Cache: %d rows)\n", (int)num_fields, imp_sth->t_dbsize, est_width, imp_sth->cache_rows); @@ -330,7 +330,7 @@ } else { /* is simply no more data */ sv_setiv(DBIc_ERR(imp_sth), 0); /* ensure errno set to 0 here */ if (debug >= 3) - fprintf(DBILOGFP, " dbd_st_fetch no-more-data, rc=%d, rpc=%ld\n", + PerlIO_printf(DBILOGFP, " dbd_st_fetch no-more-data, rc=%d, rpc=%ld\n", imp_sth->cda->rc, (long)imp_sth->cda->rpc); } /* further fetches without an execute will arrive back here */ @@ -350,7 +350,7 @@ imp_sth->next_entry = 0; imp_sth->in_cache = imp_sth->cda->rpc - previous_rpc; if (debug >= 4) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " dbd_st_fetch load-cache: prev rpc %d, new rpc %ld, in_cache %d\n", previous_rpc, (long)imp_sth->cda->rpc, imp_sth->in_cache); assert(imp_sth->in_cache > 0); @@ -360,7 +360,7 @@ num_fields = AvFILL(av)+1; if (debug >= 3) - fprintf(DBILOGFP, " dbd_st_fetch %d fields, rpc %ld (cache: %d/%d/%d)\n", + PerlIO_printf(DBILOGFP, " dbd_st_fetch %d fields, rpc %ld (cache: %d/%d/%d)\n", num_fields, (long)imp_sth->cda->rpc, imp_sth->next_entry, imp_sth->in_cache, imp_sth->cache_rows); @@ -441,7 +441,7 @@ } if (debug >= 5) - fprintf(DBILOGFP, " %d (rc=%d, otype %d, len %lu): %s\n", + PerlIO_printf(DBILOGFP, " %d (rc=%d, otype %d, len %lu): %s\n", i, rc, fbh->dbtype, (unsigned long)datalen, neatsvpv(sv,0)); } @@ -526,7 +526,7 @@ return 0; } if (DBIS->debug >= 3) - fprintf(DBILOGFP, " dbd_st_prepare'd sql f%d\n", imp_sth->cda->ft); + PerlIO_printf(DBILOGFP, " dbd_st_prepare'd sql f%d\n", imp_sth->cda->ft); /* Describe and allocate storage for results. */ if (!dbd_describe(sth, imp_sth)) { ```
p5pRT commented 21 years ago

From shap@mbd.ru

dbdimp.c.diff ```diff --- dbdimp.c 2003-02-18 21:07:02 +0300 +++ dbdimp.c.patch 2003-02-19 13:10:12 +0300 @@ -82,16 +82,23 @@ int i; int aidx; /* array index */ { - FILE *fp = DBILOGFP; - fprintf(fp, " fbh %d: '%s'\t%s, ", - i, fbh->name, (fbh->nullok) ? "NULLable" : "NO null "); - fprintf(fp, "otype %3d->%3d, dbsize %ld/%ld, p%d.s%d\n", - fbh->dbtype, fbh->ftype, (long)fbh->dbsize,(long)fbh->disize, - fbh->prec, fbh->scale); + PerlIO_printf( + DBILOGFP, + " fbh %d: '%s'\t%s, ", + i, fbh->name, (fbh->nullok) ? "NULLable" : "NO null " + ); + PerlIO_printf( + DBILOGFP, + "otype %3d->%3d, dbsize %ld/%ld, p%d.s%d\n", + fbh->dbtype, fbh->ftype, (long)fbh->dbsize, (long)fbh->disize, fbh->prec, fbh->scale + ); if (fbh->fb_ary) { - fprintf(fp, " out: ftype %d, bufl %d. indp %d, rlen %d, rcode %d\n", - fbh->ftype, fbh->fb_ary->bufl, fbh->fb_ary->aindp[aidx], - fbh->fb_ary->arlen[aidx], fbh->fb_ary->arcode[aidx]); + PerlIO_printf( + DBILOGFP, + " out: ftype %d, bufl %d. indp %d, rlen %d, rcode %d\n", + fbh->ftype, fbh->fb_ary->bufl, fbh->fb_ary->aindp[aidx], + fbh->fb_ary->arlen[aidx], fbh->fb_ary->arcode[aidx] + ); } } @@ -323,10 +330,13 @@ if (DBIS->debug >= 3) warn("dbd_db_login: sigaction errno %d, handler %lx, flags %lx", errno,act.sa_handler,act.sa_flags); - if (DBIS->debug >= 2) - fprintf(DBILOGFP, " dbd_db_login: set SA_RESTART on Oracle SIGCLD handler.\n"); + if (DBIS->debug >= 2) + PerlIO_printf( + DBILOGFP, + " dbd_db_login: set SA_RESTART on Oracle SIGCLD handler.\n" + ); } - } + } #endif /* HAS_SIGACTION */ #endif /* OCI_V8_SYNTAX */ @@ -664,8 +674,11 @@ if (imp_sth->all_params_hv) { DBIc_NUM_PARAMS(imp_sth) = (int)HvKEYS(imp_sth->all_params_hv); if (DBIS->debug >= 2) - fprintf(DBILOGFP, " dbd_preparse scanned %d distinct placeholders\n", - (int)DBIc_NUM_PARAMS(imp_sth)); + PerlIO_printf( + DBILOGFP, + " dbd_preparse scanned %d distinct placeholders\n", + (int)DBIc_NUM_PARAMS(imp_sth) + ); } } @@ -780,12 +793,12 @@ if (DBIS->debug >= 2) { char *val = neatsvpv(phs->sv,0); - fprintf(DBILOGFP, " bind %s <== %.1000s (", phs->name, val); - if (!SvOK(phs->sv)) + PerlIO_printf(DBILOGFP, " bind %s <== %.1000s (", phs->name, val); + if (!SvOK(phs->sv)) fprintf(DBILOGFP, "NULL, "); - fprintf(DBILOGFP, "size %ld/%ld/%ld, ", + PerlIO_printf(DBILOGFP, "size %ld/%ld/%ld, ", (long)SvCUR(phs->sv),(long)SvLEN(phs->sv),phs->maxlen); - fprintf(DBILOGFP, "ptype %d, otype %d%s)\n", + PerlIO_printf(DBILOGFP, "ptype %d, otype %d%s)\n", (int)SvTYPE(phs->sv), phs->ftype, (phs->is_inout) ? ", inout" : ""); } @@ -848,7 +861,7 @@ #endif if (DBIS->debug >= 3) { - fprintf(DBILOGFP, " bind %s <== '%.*s' (size %ld/%ld, otype %d, indp %d, at_exec %d)\n", + PerlIO_printf(DBILOGFP, " bind %s <== '%.*s' (size %ld/%ld, otype %d, indp %d, at_exec %d)\n", phs->name, (int)(phs->alen>SvIV(DBIS->neatsvpvlen) ? SvIV(DBIS->neatsvpvlen) : phs->alen), (phs->progv) ? phs->progv : "", @@ -874,7 +887,7 @@ sword status; if (dbis->debug >= 3) - fprintf(DBILOGFP, " pp_rebind_ph_rset_in: BEGIN\n calling OCIBindByName(stmhp=%p, bndhp=%p, errhp=%p, name=%s, csrstmhp=%p, ftype=%d)\n", imp_sth->stmhp, phs->bndhp, imp_sth->errhp, phs->name, imp_sth_csr->stmhp, phs->ftype); + PerlIO_printf(DBILOGFP, " pp_rebind_ph_rset_in: BEGIN\n calling OCIBindByName(stmhp=%p, bndhp=%p, errhp=%p, name=%s, csrstmhp=%p, ftype=%d)\n", imp_sth->stmhp, phs->bndhp, imp_sth->errhp, phs->name, imp_sth_csr->stmhp, phs->ftype); OCIBindByName_log_stat(imp_sth->stmhp, &phs->bndhp, imp_sth->errhp, (text*)phs->name, strlen(phs->name), @@ -892,7 +905,7 @@ return 0; } if (dbis->debug >= 3) - fprintf(DBILOGFP, " pp_rebind_ph_rset_in: END\n"); + PerlIO_printf(DBILOGFP, " pp_rebind_ph_rset_in: END\n"); return 2; } #endif @@ -908,7 +921,7 @@ HV *init_attr = newHV(); int count; if (DBIS->debug >= 3) - fprintf(DBILOGFP, " bind %s - allocating new sth...\n", phs->name); + PerlIO_printf(DBILOGFP, " bind %s - allocating new sth...\n", phs->name); #ifdef OCI_V8_SYNTAX { sword status; @@ -972,7 +985,7 @@ FREETMPS; LEAVE; if (DBIS->debug >= 3) - fprintf(DBILOGFP, " bind %s - allocated %s...\n", + PerlIO_printf(DBILOGFP, " bind %s - allocated %s...\n", phs->name, neatsvpv(phs->sv, 0)); } @@ -982,7 +995,7 @@ D_impdata(imp_sth_csr, imp_sth_t, sth_csr); if (DBIS->debug >= 3) - fprintf(DBILOGFP, " bind %s - initialising new %s for cursor 0x%lx...\n", + PerlIO_printf(DBILOGFP, " bind %s - initialising new %s for cursor 0x%lx...\n", phs->name, neatsvpv(sth_csr,0), (unsigned long)phs->progv); #ifdef OCI_V8_SYNTAX @@ -1031,7 +1044,7 @@ assert(phs->ftype == 102); phs->out_prepost_exec = pp_exec_rset; if (DBIS->debug >= 3) - fprintf(DBILOGFP, " bind %s to cursor (at execute)\n", phs->name); + PerlIO_printf(DBILOGFP, " bind %s to cursor (at execute)\n", phs->name); return 2; } #endif @@ -1068,7 +1081,7 @@ if (done != 1) { if (done == 2) { /* the rebind did the OCI bind call itself successfully */ if (DBIS->debug >= 3) - fprintf(DBILOGFP, " bind %s done with ftype %d\n", + PerlIO_printf(DBILOGFP, " bind %s done with ftype %d\n", phs->name, phs->ftype); return 1; } @@ -1129,7 +1142,7 @@ #endif phs->maxlen_bound = phs->maxlen ? phs->maxlen : 1; if (DBIS->debug >= 3) - fprintf(DBILOGFP, " bind %s done with ftype %d\n", + PerlIO_printf(DBILOGFP, " bind %s done with ftype %d\n", phs->name, phs->ftype); return 1; } @@ -1176,14 +1189,14 @@ croak("Can't bind ``lvalue'' mode scalar as inout parameter (currently)"); if (DBIS->debug >= 2) { - fprintf(DBILOGFP, " bind %s <== %s (type %ld", + PerlIO_printf(DBILOGFP, " bind %s <== %s (type %ld", name, neatsvpv(newvalue,0), (long)sql_type); if (is_inout) - fprintf(DBILOGFP, ", inout 0x%lx, maxlen %ld", + PerlIO_printf(DBILOGFP, ", inout 0x%lx, maxlen %ld", (long)newvalue, (long)maxlen); if (attribs) - fprintf(DBILOGFP, ", attribs: %s", neatsvpv(attribs,0)); - fprintf(DBILOGFP, ")\n"); + PerlIO_printf(DBILOGFP, ", attribs: %s", neatsvpv(attribs,0)); + PerlIO_printf(DBILOGFP, ")\n"); } phs_svp = hv_fetch(imp_sth->all_params_hv, name, name_len, 0); @@ -1280,7 +1293,7 @@ SvCUR_set(sv, phs->alen); *SvEND(sv) = '\0'; if (debug >= 2) - fprintf(DBILOGFP, " out %s = %s (arcode %d, ind %d, len %d)\n", + PerlIO_printf(DBILOGFP, " out %s = %s (arcode %d, ind %d, len %d)\n", phs->name, neatsvpv(sv,0), phs->arcode, phs->indp, phs->alen); } else @@ -1289,7 +1302,7 @@ SvCUR(sv) = phs->alen; *SvEND(sv) = '\0'; if (debug >= 2) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " out %s = %s\t(TRUNCATED from %d to %ld, arcode %d)\n", phs->name, neatsvpv(sv,0), phs->indp, (long)phs->alen, phs->arcode); } @@ -1297,7 +1310,7 @@ if (phs->indp == -1) { /* is NULL */ (void)SvOK_off(phs->sv); if (debug >= 2) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " out %s = undef (NULL, arcode %d)\n", phs->name, phs->arcode); } @@ -1312,7 +1325,7 @@ SV *sv = *av_fetch(av, index, 1); dbd_phs_sv_complete(phs, sv, 0); if (debug >= 2) - fprintf(DBILOGFP, " out '%s'[%ld] = %s (arcode %d, ind %d, len %d)\n", + PerlIO_printf(DBILOGFP, " out '%s'[%ld] = %s (arcode %d, ind %d, len %d)\n", phs->name, (long)index, neatsvpv(sv,0), phs->arcode, phs->indp, phs->alen); } @@ -1336,7 +1349,7 @@ int is_select = (imp_sth->stmt_type == OCI_STMT_SELECT); if (debug >= 2) - fprintf(DBILOGFP, " dbd_st_execute %s (out%d, lob%d)...\n", + PerlIO_printf(DBILOGFP, " dbd_st_execute %s (out%d, lob%d)...\n", oci_stmt_type_name(imp_sth->stmt_type), outparams, imp_sth->has_lobs); #else @@ -1346,7 +1359,7 @@ return -2; /* dbd_describe already called ora_error() */ } if (debug >= 2) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " dbd_st_execute (for sql f%d after oci f%d, out%d)...\n", imp_sth->cda->ft, imp_sth->cda->fc, outparams); #endif @@ -1372,7 +1385,7 @@ else if (SvTYPE(sv) == SVt_RV && SvTYPE(SvRV(sv)) == SVt_PVAV) { if (debug >= 2) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " with %s = [] (len %ld/%ld, indp %d, otype %d, ptype %d)\n", phs->name, (long)phs->alen, (long)phs->maxlen, phs->indp, @@ -1396,7 +1409,7 @@ ub2 prev_alen = phs->alen; phs->alen = (SvOK(sv)) ? SvCUR(sv) + phs->alen_incnull : 0+phs->alen_incnull; if (debug >= 2) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " with %s = '%.*s' (len %ld(%ld)/%ld, indp %d, otype %d, ptype %d)\n", phs->name, (int)phs->alen, (phs->indp == -1) ? "" : SvPVX(sv), @@ -1434,7 +1447,7 @@ if (debug >= 2) { ub2 sqlfncode; OCIAttrGet_stmhp_stat(imp_sth, &sqlfncode, 0, OCI_ATTR_SQLFNCODE, status); - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " dbd_st_execute %s returned (%s, rpc%ld, fn%d, out%d)\n", oci_stmt_type_name(imp_sth->stmt_type), oci_status_name(status), @@ -1490,7 +1503,7 @@ row_count = imp_sth->cda->rpc; if (debug >= 2) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " dbd_st_execute complete (rc%d, w%02x, rpc%ld, eod%d, out%d)\n", imp_sth->cda->rc, imp_sth->cda->wrn, (long)row_count, imp_sth->eod_errno, @@ -1575,7 +1588,7 @@ #endif if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " blob_read field %d+1, ftype %d, offset %ld, len %ld, destoffset %ld, retlen %ld\n", field, imp_sth->fbh[field].ftype, offset, len, destoffset, (long)retl); @@ -1932,15 +1945,14 @@ static void dump_env_to_trace() { - FILE *fp = DBILOGFP; int i = 0; char *p; #ifndef __BORLANDC__ extern char **environ; #endif - fprintf(fp, "Environment variables:\n"); + PerlIO_printf(DBILOGFP, "Environment variables:\n"); do { p = (char*)environ[i++]; - fprintf(fp,"\t%s\n",p); + PerlIO_printf(DBILOGFP,"\t%s\n",p); } while ((char*)environ[i] != '\0'); } ```
p5pRT commented 21 years ago

From shap@mbd.ru

oci8.c.diff ```diff --- oci8.c 2003-02-18 21:06:49 +0300 +++ oci8.c.patch 2003-02-18 21:02:20 +0300 @@ -138,7 +138,7 @@ && recno < 100 ) { if (debug >= 4 || recno>1/*XXX temp*/) - fprintf(DBILOGFP, " OCIErrorGet after %s (er%ld:%s): %d, %ld: %s\n", + PerlIO_printf(DBILOGFP, " OCIErrorGet after %s (er%ld:%s): %d, %ld: %s\n", what, (long)recno, (eg_status==OCI_SUCCESS) ? "ok" : oci_status_name(eg_status), status, (long)eg_errcode, errbuf); @@ -313,7 +313,7 @@ OCIAttrGet_stmhp_stat(imp_sth, &imp_sth->stmt_type, 0, OCI_ATTR_STMT_TYPE, status); if (DBIS->debug >= 3) - fprintf(DBILOGFP, " dbd_st_prepare'd sql %s\n", + PerlIO_printf(DBILOGFP, " dbd_st_prepare'd sql %s\n", oci_stmt_type_name(imp_sth->stmt_type)); DBIc_IMPSET_on(imp_sth); @@ -370,7 +370,7 @@ *indpp = &phs->indp; *piecep = OCI_ONE_PIECE; if (DBIS->debug >= 3) - fprintf(DBILOGFP, " in '%s' [%ld,%ld]: len %2ld, ind %d%s\n", + PerlIO_printf(DBILOGFP, " in '%s' [%ld,%ld]: len %2ld, ind %d%s\n", phs->name, ul_t(iter), ul_t(index), ul_t(phs->alen), phs->indp, (phs->desc_h) ? " via descriptor" : ""); if (index > 0 || iter > 0) @@ -452,7 +452,7 @@ *indpp = &phs->indp; *rcodepp= &phs->arcode; if (DBIS->debug >= 3) - fprintf(DBILOGFP, " out '%s' [%ld,%ld]: alen %2ld, piece %d%s\n", + PerlIO_printf(DBILOGFP, " out '%s' [%ld,%ld]: alen %2ld, piece %d%s\n", phs->name, ul_t(iter), ul_t(index), ul_t(phs->alen), *piecep, (phs->desc_h) ? " via descriptor" : ""); if (iter > 0) @@ -500,7 +500,7 @@ HV *init_attr = newHV(); int count; if (DBIS->debug >= 3) - fprintf(DBILOGFP, " bind %s - allocating new sth...\n", phs->name); + PerlIO_printf(DBILOGFP, " bind %s - allocating new sth...\n", phs->name); ENTER; PUSHMARK(SP); XPUSHs(sv_2mortal(newRV(DBIc_MY_H(imp_dbh)))); @@ -515,7 +515,7 @@ PUTBACK; LEAVE; if (DBIS->debug >= 3) - fprintf(DBILOGFP, " bind %s - allocated %s...\n", + PerlIO_printf(DBILOGFP, " bind %s - allocated %s...\n", phs->name, neatsvpv(phs->sv, 0)); } @@ -525,7 +525,7 @@ D_impdata(imp_sth_csr, imp_sth_t, sth_csr); if (DBIS->debug >= 3) - fprintf(DBILOGFP, " bind %s - initialising new %s...\n", + PerlIO_printf(DBILOGFP, " bind %s - initialising new %s...\n", phs->name, neatsvpv(sth_csr,0)); #ifdef OCI_V8_SYNTAX @@ -652,7 +652,7 @@ &amtp, 1 + offset, bufp, buflen, 0, 0, 0, SQLCS_IMPLICIT, status); if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " OCILobRead field %d %s: LOBlen %ld, LongReadLen %ld, BufLen %ld, Got %ld\n", fbh->field_num+1, oci_status_name(status), ul_t(loblen), imp_sth->long_readlen, ul_t(buflen), ul_t(amtp)); @@ -665,7 +665,7 @@ else { assert(amtp == 0); if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " OCILobRead field %d %s: LOBlen %ld, LongReadLen %ld, BufLen %ld, Got %ld\n", fbh->field_num+1, "SKIPPED", ul_t(loblen), imp_sth->long_readlen, ul_t(buflen), ul_t(amtp)); @@ -739,7 +739,7 @@ OCILobRead_log_stat(imp_sth->svchp, imp_sth->errhp, lobloc, &amtp, 1, SvPVX(dest_sv), buflen, 0, 0, 0, SQLCS_IMPLICIT, status); if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " OCILobRead field %d %s: LOBlen %ldc, LongReadLen %ldc, BufLen %ldb, Got %ldc\n", fbh->field_num+1, oci_status_name(status), ul_t(loblen), imp_sth->long_readlen, ul_t(buflen), ul_t(amtp)); @@ -752,7 +752,7 @@ else { assert(amtp == 0); if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " OCILobRead field %d %s: LOBlen %ld, LongReadLen %ld, BufLen %ld, Got %ld\n", fbh->field_num+1, "SKIPPED", ul_t(loblen), imp_sth->long_readlen, ul_t(buflen), ul_t(amtp)); @@ -779,7 +779,7 @@ fbh_setup_getrefpv(imp_fbh_t *fbh, int desc_t, char *bless) { if (DBIS->debug >= 2) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " col %d: otype %d, desctype %d, %s", fbh->field_num, fbh->dbtype, desc_t, bless); fbh->ftype = fbh->dbtype; fbh->disize = fbh->dbsize; @@ -815,14 +815,14 @@ if (imp_sth->stmt_type != OCI_STMT_SELECT) { if (DBIS->debug >= 3) - fprintf(DBILOGFP, " dbd_describe skipped for %s\n", + PerlIO_printf(DBILOGFP, " dbd_describe skipped for %s\n", oci_stmt_type_name(imp_sth->stmt_type)); /* imp_sth memory was cleared when created so no setup required here */ return 1; } if (DBIS->debug >= 3) - fprintf(DBILOGFP, " dbd_describe %s (%s, lb %ld)...\n", + PerlIO_printf(DBILOGFP, " dbd_describe %s (%s, lb %ld)...\n", oci_stmt_type_name(imp_sth->stmt_type), DBIc_ACTIVE(imp_sth) ? "implicit" : "EXPLICIT", (long)long_readlen); @@ -947,7 +947,7 @@ fbh->disize = fbh->dbsize; p = "Field %d has an Oracle type (%d) which is not explicitly supported%s"; if (DBIS->debug >= 1) - fprintf(DBILOGFP, p, i, fbh->dbtype, "\n"); + PerlIO_printf(DBILOGFP, p, i, fbh->dbtype, "\n"); if (dowarn) warn(p, i, fbh->dbtype, ""); break; @@ -1037,7 +1037,7 @@ } if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " dbd_describe'd %d columns (row bytes: %d max, %d est avg, cache: %d)\n", (int)num_fields, imp_sth->t_dbsize, imp_sth->est_width, imp_sth->cache_rows); @@ -1070,7 +1070,7 @@ } else { if (DBIS->debug >= 3) - fprintf(DBILOGFP, " dbd_st_fetch %d fields...\n", DBIc_NUM_FIELDS(imp_sth)); + PerlIO_printf(DBILOGFP, " dbd_st_fetch %d fields...\n", DBIc_NUM_FIELDS(imp_sth)); OCIStmtFetch_log_stat(imp_sth->stmhp, imp_sth->errhp, 1, OCI_FETCH_NEXT, OCI_DEFAULT, status); } @@ -1081,7 +1081,7 @@ dTHR; /* for DBIc_ACTIVE_off */ DBIc_ACTIVE_off(imp_sth); /* eg finish */ if (DBIS->debug >= 3) - fprintf(DBILOGFP, " dbd_st_fetch no-more-data\n"); + PerlIO_printf(DBILOGFP, " dbd_st_fetch no-more-data\n"); return Nullav; } if (status != OCI_SUCCESS_WITH_INFO) { @@ -1097,7 +1097,7 @@ av = DBIS->get_fbav(imp_sth); if (DBIS->debug >= 3) - fprintf(DBILOGFP, " dbd_st_fetch %d fields %s\n", + PerlIO_printf(DBILOGFP, " dbd_st_fetch %d fields %s\n", num_fields, oci_status_name(status)); ChopBlanks = DBIc_has(imp_sth, DBIcf_ChopBlanks); @@ -1169,7 +1169,7 @@ } if (DBIS->debug >= 5) - fprintf(DBILOGFP, " %d (rc=%d): %s\n", + PerlIO_printf(DBILOGFP, " %d (rc=%d): %s\n", i, rc, neatsvpv(sv,0)); } @@ -1385,7 +1385,7 @@ return oci_error(sth, errhp, status, "OCIDescribeAny/OCIAttrGet/LOB refetch"); } if (DBIS->debug >= 3) - fprintf(DBILOGFP, " lob refetch from table %s, %d columns:\n", + PerlIO_printf(DBILOGFP, " lob refetch from table %s, %d columns:\n", tablename, numcols); for (i = 1; i <= (long)numcols; i++) { @@ -1406,7 +1406,7 @@ if (status) break; if (DBIS->debug >= 3) - fprintf(DBILOGFP, " lob refetch table col %d: '%.*s' otype %d\n", + PerlIO_printf(DBILOGFP, " lob refetch table col %d: '%.*s' otype %d\n", (int)i, (int)col_name_len,col_name, col_dbtype); if (col_dbtype != SQLT_CLOB && col_dbtype != SQLT_BLOB) continue; @@ -1467,7 +1467,7 @@ if (phs->ftype != SvIV(sv_other)) continue; if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " both %s and %s have type %d - ambiguous\n", SvPV(sv,na), SvPV(sv_other,na), (int)SvIV(sv_other)); Safefree(lr); @@ -1480,7 +1480,7 @@ (SvCUR(sql_select)>7)?", ":"", p, &phs->name[1]); sv_catpv(sql_select, sql_field); if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " lob refetch %s param: otype %d, matched field '%s' %s(%s)\n", phs->name, phs->ftype, p, (phs->ora_field) ? "by name " : "by type ", sql_field); @@ -1497,7 +1497,7 @@ if (!matched) { ++unmatched_params; if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " lob refetch %s param: otype %d, UNMATCHED\n", phs->name, phs->ftype); } @@ -1512,7 +1512,7 @@ sv_catpv(sql_select, tablename); sv_catpv(sql_select, " where rowid = :rid for update"); /* get row with lock */ if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " lob refetch sql: %s\n", SvPVX(sql_select)); lr->sql_select = sql_select; @@ -1549,7 +1549,7 @@ phs = (phs_t*)(void*)SvPVX(*phs_svp); fbh->special = phs; if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " lob refetch %d for '%s' param: ftype %d setup\n", (int)i+1,fbh->name, fbh->dbtype); OCIDefineByPos_log_stat(lr->stmthp, &defnp, errhp, i+1, @@ -1613,7 +1613,7 @@ OCILobTrim_log_stat(imp_sth->svchp, errhp, fbh->desc_h, 0, status); } if (DBIS->debug >= 3) - fprintf(DBILOGFP, + PerlIO_printf(DBILOGFP, " lob refetch %d for '%s' param: ftype %d, len %ld: %s %s\n", i+1,fbh->name, fbh->dbtype, ul_t(amtp), (amtp > 0) ? "LobWrite" : "LobTrim", oci_status_name(status)); ```
p5pRT commented 21 years ago

From shap@mbd.ru

Oracle.xs.diff ```diff --- Oracle.xs 2003-02-18 21:07:17 +0300 +++ Oracle.xs.patch 2003-02-18 20:59:39 +0300 @@ -66,7 +66,7 @@ XSRETURN_IV(DBIc_NUM_FIELDS(imp_sth)); } if (debug >= 2) - fprintf(DBILOGFP, " -> ora_fetch\n"); + PerlIO_printf(DBILOGFP, " -> ora_fetch\n"); av = dbd_st_fetch(sth, imp_sth); if (av) { int num_fields = AvFILL(av)+1; @@ -76,14 +76,14 @@ PUSHs(AvARRAY(av)[i]); } if (debug >= 2) - fprintf(DBILOGFP, " <- (...) [%d items]\n", num_fields); + PerlIO_printf(DBILOGFP, " <- (...) [%d items]\n", num_fields); } else { if (debug >= 2) - fprintf(DBILOGFP, " <- () [0 items]\n"); + PerlIO_printf(DBILOGFP, " <- () [0 items]\n"); } if (debug >= 2 && SvTRUE(DBIc_ERR(imp_sth))) - fprintf(DBILOGFP, " !! ERROR: %s %s", + PerlIO_printf(DBILOGFP, " !! ERROR: %s %s", neatsvpv(DBIc_ERR(imp_sth),0), neatsvpv(DBIc_ERRSTR(imp_sth),0)); ```
p5pRT commented 21 years ago

From @tux

On Wed 19 Feb 2003 21​:33\, "Dmitry A. Shapovalov" (via RT) \perlbug\-followup@&#8203;perl\.org wrote​:

# New Ticket Created by "Dmitry A. Shapovalov" # Please include the string​: [perl #21304] # in the subject line of all future correspondence about this issue. # \<URL​: http​://rt.perl.org/rt2/Ticket/Display.html?id=21304 >

Greetings\,

Here is the micro patch to DBD​::Oracle-1.12 module. The problem was the following\, when you turn on high level debugging ( DBI->trace(2) or greater ) Perl crashes with "Segmentation failed" message. I found that DBILOGFP is no longer an FILE structute and PerlIO_printf should be used instead of fprintf to output logging information.

I /think/ this issue is already being addressed.

Since DBD-Oracle is not a CORE module\, I think you'd better take these kind of changes to the place where they belong​: bi-dev \dbi\-dev@&#8203;perl\.org\, but as I know that the DBD-Oracle maintainer is listening in on this list too\, I'm sure he has seen it\, and will check it against the current version.

For your information\, he *is* working towards a new version\, but wanted to leave a stable DBI module before going on with DBD​::Oracle.

Best regards\, Dmitry Shapovalov.

===================================================================== $ perlbug -d

--- Flags​: category= severity= --- Site configuration information for perl v5.8.0​:

Configured by inger at Mon Dec 30 15​:08​:38 MSK 2002.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration​: Platform​: osname=linux\, osvers=2.4.18-alt7-smp\, archname=i386-linux-thread-multi uname='linux mash.office.altlinux.ru 2.4.18-alt7-smp #1 smp thu jun 6 11​:43​:56 msd 2002 i686 unknown unknown gnulinux ' config_args='-des -Darchname=i386-linux -Dd_dosuid -Ud_csh -Duseshrplib -Dlibperl=libperl.so.5.8 -Doptimize=-pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686 -Dinstallprefix=/usr -Dprefix=/usr -Dprivlib=/usr/lib/perl5 -Darchlib=/usr/lib/perl5/i386-linux -Dvendorprefix=/usr -Dvendorlib=/usr/lib/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl/i386-linux -Dsiteprefix=/usr/local -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.0 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.0/i386-linux -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dcf_by=ALT Linux Team -Dmyhostname=localhost -Dperladmin=root@​localhost -Dinc_version_list=5.6.1 5.6.0 -Dpager=/usr/bin/less -isR -Di_shadow -Di_syslog -Dusethreads -Duseithreads -Duselargefiles -Ui_db -Di_gdbm -Di_ndbm -Di_sdbm -Ui_odbm' 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=undef use64bitall=undef uselongdouble=undef usemymalloc=n\, bincompat5005=undef Compiler​: cc='cc'\, ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm'\, optimize='-pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686'\, cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm' ccversion=''\, gccversion='3.2.1 (ALT Linux\, build 3.2.1-alt2)'\, gccosandvers='' intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=1234 d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=12 ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8 alignbytes=4\, prototype=define Linker and Libraries​: ld='cc'\, ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil libc=/lib/libc-2.2.6.so\, so=so\, useshrplib=true\, libperl=libperl.so.5.8 gnulibc_version='2.2.6' Dynamic Linking​: dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-rdynamic' cccdlflags='-fpic'\, lddlflags='-shared -L/usr/local/lib'

Locally applied patches​:

--- @​INC for perl v5.8.0​: /usr/lib/perl5/i386-linux /usr/lib/perl5 /usr/local/lib/perl5/site_perl/5.8.0/i386-linux /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/i386-linux /usr/lib/perl5/vendor_perl /usr/lib/perl5/vendor_perl .

--- Environment for perl v5.8.0​: HOME=/home/shap LANG=ru_RU.CP1251 LANGUAGE=ru_RU.CP1251 LC_COLLATE=ru_RU.CP1251 LC_CTYPE=ru_RU.CP1251 LC_MESSAGES=ru_RU.CP1251 LC_MONETARY=ru_RU.CP1251 LC_NUMERIC=ru_RU.CP1251 LC_TIME=ru_RU.CP1251 LD_LIBRARY_PATH=/usr/local/oracle/9.0.1/lib​:/usr/local/oracle/9.0.1/lib LOGDIR (unset)

PATH=.​:.​:/home/shap/bin​:/bin​:/usr/bin​:/usr/X11R6/bin​:/usr/local/bin​:/usr/local/oracle/9.0.1/bin​:/usr/local/oracle/9.0.1/bin PERL_BADLANG (unset) SHELL=/bin/bash [shap@​dshap shap]$ perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration​: Platform​: osname=linux\, osvers=2.4.18-alt7-smp\, archname=i386-linux-thread-multi uname='linux mash.office.altlinux.ru 2.4.18-alt7-smp #1 smp thu jun 6 11​:43​:56 msd 2002 i686 unknown unknown gnulinux ' config_args='-des -Darchname=i386-linux -Dd_dosuid -Ud_csh -Duseshrplib -Dlibperl=libperl.so.5.8 -Doptimize=-pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686 -Dinstallprefix=/usr -Dprefix=/usr -Dprivlib=/usr/lib/perl5 -Darchlib=/usr/lib/perl5/i386-linux -Dvendorprefix=/usr -Dvendorlib=/usr/lib/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl/i386-linux -Dsiteprefix=/usr/local -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.0 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.0/i386-linux -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dcf_by=ALT Linux Team -Dmyhostname=localhost -Dperladmin=root@​localhost -Dinc_version_list=5.6.1 5.6.0 -Dpager=/usr/bin/less -isR -Di_shadow -Di_syslog -Dusethreads -Duseithreads -Duselargefiles -Ui_db -Di_gdbm -Di_ndbm -Di_sdbm -Ui_odbm' 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=undef use64bitall=undef uselongdouble=undef usemymalloc=n\, bincompat5005=undef Compiler​: cc='cc'\, ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm'\, optimize='-pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686'\, cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm' ccversion=''\, gccversion='3.2.1 (ALT Linux\, build 3.2.1-alt2)'\, gccosandvers='' intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=1234 d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=12 ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8 alignbytes=4\, prototype=define Linker and Libraries​: ld='cc'\, ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil libc=/lib/libc-2.2.6.so\, so=so\, useshrplib=true\, libperl=libperl.so.5.8 gnulibc_version='2.2.6' Dynamic Linking​: dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-rdynamic' cccdlflags='-fpic'\, lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl)​: Compile-time options​: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Built under linux Compiled at Dec 30 2002 15​:10​:05 @​INC​: /usr/lib/perl5/i386-linux /usr/lib/perl5 /usr/local/lib/perl5/site_perl/5.8.0/i386-linux /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/i386-linux /usr/lib/perl5/vendor_perl /usr/lib/perl5/vendor_perl .

-- attachment 1 ------------------------------------------------------ url​: http​://rt.perl.org/rt2/attach/52445/39725/ff5406/oci7.c.diff

-- attachment 2 ------------------------------------------------------ url​: http​://rt.perl.org/rt2/attach/52445/39726/ce4c2a/dbdimp.c.diff

-- attachment 3 ------------------------------------------------------ url​: http​://rt.perl.org/rt2/attach/52445/39727/15614a/oci8.c.diff

-- attachment 4 ------------------------------------------------------ url​: http​://rt.perl.org/rt2/attach/52445/39728/c161e5/Oracle.xs.diff

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.8.0 & 633 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 21 years ago

From @timbunce

On Wed\, Feb 19\, 2003 at 10​:55​:41PM +0100\, H.Merijn Brand wrote​:

On Wed 19 Feb 2003 21​:33\, "Dmitry A. Shapovalov" (via RT) \perlbug\-followup@&#8203;perl\.org wrote​:

# New Ticket Created by "Dmitry A. Shapovalov" # Please include the string​: [perl #21304] # in the subject line of all future correspondence about this issue. # \<URL​: http​://rt.perl.org/rt2/Ticket/Display.html?id=21304 >

Greetings\,

Here is the micro patch to DBD​::Oracle-1.12 module. The problem was the following\, when you turn on high level debugging ( DBI->trace(2) or greater ) Perl crashes with "Segmentation failed" message. I found that DBILOGFP is no longer an FILE structute and PerlIO_printf should be used instead of fprintf to output logging information.

I /think/ this issue is already being addressed.

Since DBD-Oracle is not a CORE module\, I think you'd better take these kind of changes to the place where they belong​: bi-dev \dbi\-dev@&#8203;perl\.org\, but as I know that the DBD-Oracle maintainer is listening in on this list too\, I'm sure he has seen it\, and will check it against the current version.

For your information\, he *is* working towards a new version\, but wanted to leave a stable DBI module before going on with DBD​::Oracle.

All true. Thanks.

Tim.

p5pRT commented 21 years ago

@jhi - Status changed from 'new' to 'resolved'