Re: Help: Oracle OCI C code --> Lucid Lisp --> segmentation violation :(

From: Christopher Hoover <ch+_at_cs.cmu.edu>
Date: Thu, 28 Jul 1994 22:26:11 GMT
Message-ID: <Cto8zo.AAF.3_at_cs.cmu.edu>


In article <31936a$cd4_at_anaxagoras.ils.nwu.edu>, Marek Lugowski <lugowski_at_ils.nwu.edu> wrote:
>
>What the problem is:
>====================
>
>Can't get Oracle version 7.0.16.0.2 :) Oracle Call Interfaces code for C
>to load into Lucid Lisp 4.0.1 (with latest patches for AIX 3.2.5) *and*
>run the OCI functions. The loading is fine, returning T. The call to
>"orlon" returns "segmentation violation" error from Lisp; actually from
>within the function call.
>
>We're doing this on a client that talks over SQL*Net (physically TCP/IP)
>to a server machine next door. We can do everything via a test program;
>it is the OCI black magic that is beyond us.
>
>
>What we would like to know:
>===========================
>
>How can we get more info on this situation from Lisp. Is there a way to
>make this work? Oracle told us to go away.

Lucid Common Lisp 4.1 under SunOS 4.x will display foreign frames symbolically in backtraces. If your foreign code falls over, you'll at least get a very good idea where it is happening. In fact the SunoS 4.x 4.1 release can write out the foreign symbol table in a format that gdb can understand, which makes it possible to attach to the lisp process and debug your C code symbolically.

You say you are using AIX, so you'll have to find out if these features are available in some AIX release. I don't know.

Also note: if you are using multiple lisp processes you should also realize that the scheduler continues to run while lisp is in foreign code land and it can switch you into a different process before lisp returns to lisp land. This can rather easily lead to re-entrant calls into your C code and the C library. This often works less than ideally. I wrap most of my foreign calls with LCL:WITH-SCHEDULING-INHIBITED for safety.

  • Chris. (ch_at_lks.csi.com)
Received on Fri Jul 29 1994 - 00:26:11 CEST

Original text of this message