Subject: A question about the FFI

From: Oliver ANDRICH <[email-masked]>
Date: Wed, 6 Sep 1995 03:22:11 +0200 (MET DST)

Hi,

at the moment I try to develop a module, that includes the ncurses lib 
under linux in a way similar to the way the general linux-bindings are 
included. But I get a very nasty problem.

After I included my module and I simply type () for example, the system 
crashes with the following output.

handle_fault error1 !
SIGSEGV cannot be cured. Fault address = 0x38.
Segmentation fault

But if I use the initscr function from the ncurses first, than it doesn't 
crash at all.

Do you have any idea, why that happens? Or has anybody else tried to do 
something like that, a managed to fix it?

---
See ya on the darkside,        "Love is an act of blood and I am bleeding
				a pool in the shape of the heart."
Oliver.                           (Dreamtheater - Space-Dye West)
                                   
--------------------------------------------------------------------------
email: [email-masked]      (reachable only from .de)
http://www.uni-koblenz.de/~andrich       (My dark chamber ]|->)
Gothic: 13:490/2.33 / Fido: 2:2454/130.103 / Vnet: 46:9611/1102.103
--------------------------------------------------------------------------

---

From: Marcus Daniels <[email-masked]>
Date: Wed, 6 Sep 1995 00:51:08 GMT

>>>>> "Oliver" == Oliver ANDRICH <[email-masked]> writes:

Oliver> After I included my module and I simply type () for example,
Oliver> the system crashes with the following output.

Oliver> handle_fault error1 !  SIGSEGV cannot be cured. Fault address
Oliver> = 0x38.  Segmentation fault

Oliver> But if I use the initscr function from the ncurses first, than
Oliver> it doesn't crash at all.

What does the module do on initialization?  Can you get a gdb
backtrace?  (use "signal 11 noprint" in gdb if you are using
a generational GC version of CLISP -- which it appears that you are).

---

From: Oliver ANDRICH <[email-masked]>
Date: Wed, 6 Sep 1995 09:28:54 +0200 (MET DST)

> a generational GC version of CLISP -- which it appears that you are).

Well, as it was my first try with the FFI, I simply copied the linux.lsp 
file from the linux bindings module. :-) I changed all relevant data and 
added my functions as Bruno Haible did in linux.lsp. Well, that is all I 
have done for now. 

---

---

From: Marcus Daniels <[email-masked]>
Date: Wed, 6 Sep 1995 05:05:26 GMT

Oliver,

I can't seem to email to you directly.  If you send me your modified
linux.lsp file, I'll try to reproduce the crash (or tell you what the
problem is).  It is difficult to say without more information...

---

From: Oliver ANDRICH <[email-masked]>
Date: Wed, 6 Sep 1995 12:22:39 +0200 (MET DST)

> I can't seem to email to you directly.  

Yes, indeed. That is the little weirdness at my local university. We are 
not allowed to send or receive mail from outside the de domain. :-(((

> If you send me your modified

Well, I haven't changed anything in linux.lsp, but I started to write my 
own modul. When I am back home, I send you my ncurses.lsp and all what I 
think you need. BTW, I have striped my file to the two basic ncurses 
functions. But you will see that, when you receive my "source" code.

---