Subject: [SWIPL] Creating terms from external C under FreeBSD.

From: Yan Guiborat <[email-masked]>
Date: Wed, 27 Feb 2002 09:59:24 GMT+1

Hello,

I wrote, a little while ago, about a problem while creating 
term in a C foreign predicate.

At Term creation, with PL_new_term_ref() or 
PL_new_term_refs functions, my application started being 
swapped by the pager, and them, after a while, I receive a 
nice core file of 600 Megs wich is the size of my swap 
partition.
I guessed there could be something wrong with mmap() 
function under FreeBSD, I so reconfigured SWI-Prolog, with 
this time the mmapping desabled, and compile it with its 
debug information.
This time, my application get a segmentation fault instead 
of going into its weird swapping.

It seems to come from the file PL_wam.c, in function 
open_foreign_frame() where "fr" pointer is on 0x0 and a 
make the segmentation fault a few lines after.

Here is the point where I am, and I don't feel so 
confortable modifying the Wam machine and the way it manage 
the stack.

I must add that I just remembered that my pl library is 
compiled as a .a file, could it be the reason of my 
problem ?

Any help will be great thanks, may be someone have already 
found the same problem ? 

--------------------------------------
Yan Guiborat.
French Exchange Student,
Tampere University of Technology.
e-mail:[email-masked].       
--------------------------------------
______________________________________________________
Boîte aux lettres - Caramail - http://www.caramail.com