Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: RE: Segfault with Sybase::DBlib bcp
Date: Aug 4 2004 12:18PM

On Wed, 2004-08-04 at 14:04, Avis, Ed wrote:
> Michael Peppler wrote:
> >>This program causes a segfault:
> >>    $Db_fde_bcphdl->bcp_meminit(1);
> >>    $Db_fde_bcphdl->bcp_batch;

> >Sending me a stack trace from the core would be useful.
> #0  0x4013e34a in bcp__endbatch () from /usr/local/sybase/lib/
> #1  0x4013e2f6 in bcp_batch () from /usr/local/sybase/lib/
> #2  0x400f97e1 in XS_Sybase__DBlib_bcp_batch ()

Right - that's what I thought. The segfault happens in the Sybase libs -
not much I really want to do about this. Sybase::DBlib and Sybase::CTlib
are supposed to be thin wrappers around the Sybase APIs. If that
sequence of calls causes a segfault, well, I guess that shows that the
program is incorrect :-)

I don't really want to carry init flags around making sure that the
correct sequence has been followed, although if you want to code a patch
to handle this I'll definitely look at it.

On a slightly different tack - Sybase's DBlibrary is really getting old
now, and a lot of the functionality that you need in interfacing with
ASE is no longer supported (for DB-Lib's BCP API: you can't load data to
a DOL table, for example) so I don't really see the point of spending
much time enhancing the Sybase::DBlib module (unless there's a
glaring/severe bug somewhere, but that's pretty unlikely after 10

Michael Peppler                              Data Migrations, Inc.             
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short
or long term contract positions -