Hi,

Thanks for all your suggestions. I had tried couple of things over the weekend. Now I have few new things on the AIX shared libraries issue. I just want to see if you have any input

1.  I tried using Repos.exp generated by XS module. Looks like it works. So I do not have to change the Makfile that is generated by MakeMaker tool.

2. I have modified my test program to call more functions from different shared libraries. They all seem to work, except the XS_Repos_fetch_version() and few similar funcations which gives core-dump. The code-line that might be causing the problem is

======
 +329  XS(XS_Repos_fetch_version)
  +330  {
  +331      dXSARGS;
  +332      if (items != 7)
  +333          Perl_croak(aTHX_ "Usage: Repos::fetch_version(handle, commonName,
productName, objectIRIDs, branchIRIDs, versionNums, filePathNames)");
  +334      {
  +335  #line 227 "Repos.xs"
  +336        int         fetch_status = 0;
  +337        int         prod_name_status = 0;
  +338        char**      fetchVersionErrorsStack = (char **)NULL;
  +339        OCIEnv*     envhp;
  +340        OCIError*   errhp;
  +341        OCISvcCtx*  svchp;
  +342  #line 343 "Repos.c"
  +343          db_handle *     handle;
  +344          char *  commonName = (char *)SvPV(ST(1),PL_na);
  +345          char *  productName = (char *)SvPV(ST(2),PL_na);
  +346          char ** objectIRIDs = XS_unpack_charPtrPtr(ST(3));
  +347          char ** branchIRIDs = XS_unpack_charPtrPtr(ST(4));
  +348          int *   versionNums = (int *)XS_unpack_intPtr(ST(5));
  +349          char ** filePathNames = XS_unpack_charPtrPtr(ST(6));
  +350
  +351          if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
  +352              handle = (db_handle *)SvIV((SV*)SvRV( ST(0) ));
  +353          else{
  +354              warn( "Repos::fetch_version() -- handle is not a blessed SV re
ference" );
  +355              XSRETURN_UNDEF;
  +356          };
  +357  #line 243 "Repos.xs"
  +358        envhp = (OCIEnv*) handle->env_hp;
 +359        errhp = (OCIError*) handle->err_hp;
  +360        svchp = (OCISvcCtx*) handle->svc_hp;
  +361
  +362       fprintf(stderr, "\n In fetch_version()  before set_repos_p_n \n");
====

When I pass less than 7 parameters, I get an error from line # 333. However, when I pass wrong db_handle, I get a core dump.

I will be looking into the source code for XS_unpack_charPtrPtr() and see if that is causing the core dump.

Let me know if you have any know issues with XS_unpack_charPtrPtr().

I have also attached output of "perl -V" to this mail.

Thanks,

___Nagesh.

----- The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.  ------

 
=========
$ which perl5.6
/pletool/nayyagar/bin/perl5.6
$ perl5.6 -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=aix, osvers=4.3.3.0, archname=aix
    uname='aix paaixq01 3 4 00011d8f4c00 '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -I/usr/local/include -q32 -D_LARGE_FILES -qlonglong',
    optimize='-O',
    cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -I/usr/local/include'
    ccversion='5.0.2.1', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib -b32'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lbind -lnsl -ldbm -ldl -lld -lm -lC -lc -lcrypt -lbsd -lPW -liconv
    perllibs=-lbind -lnsl -ldl -lld -lm -lC -lc -lcrypt -lbsd -lPW -liconv
    libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -bE:/net/pacific/users/tnguyen/ade_aix/perl5.6.1/lib/5.6.1/aix/CORE/perl.exp'
    cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lC -lc -L/usr/local/lib'
 

Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under aix
  Compiled at Nov 28 2001 12:29:34
  @INC:
    /net/pacific/users/tnguyen/ade_aix/perl5.6.1/lib/5.6.1/aix
    /net/pacific/users/tnguyen/ade_aix/perl5.6.1/lib/5.6.1
    /net/pacific/users/tnguyen/ade_aix/perl5.6.1/lib/site_perl/5.6.1/aix
    /net/pacific/users/tnguyen/ade_aix/perl5.6.1/lib/site_perl/5.6.1
    /net/pacific/users/tnguyen/ade_aix/perl5.6.1/lib/site_perl
    .
$
=======

Reply via email to