From yan.guiborat@caramail.com Wed Feb 27 10:03:08 2002
Received: from mail4.caramail.com ([213.193.13.96])
	by swi.psy.uva.nl (8.11.6/8.11.2) with ESMTP id g1R938u05162
	for <prolog@swi.psy.uva.nl>; Wed, 27 Feb 2002 10:03:08 +0100 (MET)
Received: from caramail.com (www7.caramail.com [213.193.13.17])
	by mail4.caramail.com (8.8.8/8.8.8) with SMTP id KAA15000
	for prolog@swi.psy.uva.nl; Wed, 27 Feb 2002 10:03:06 +0100 (MET)
Posted-Date: Wed, 27 Feb 2002 10:03:06 +0100 (MET)
From: Yan Guiborat <yan.guiborat@caramail.com>
To: 'prolog@swi.psy.uva.nl
Message-ID: <1014800364022098@caramail.com>
X-Mailer: Caramail - www.caramail.com
X-Originating-IP: [212.157.192.147]
Mime-Version: 1.0
Date: Wed, 27 Feb 2002 09:59:24 GMT+1
Content-Type: multipart/mixed; boundary="=_NextPart_Caramail_0220981014800364_ID"
Subject: [SWIPL] Creating terms from external C under FreeBSD.

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--=_NextPart_Caramail_0220981014800364_ID
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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:yan.guiborat@caramail.com.       
--------------------------------------
______________________________________________________
Bo=EEte aux lettres - Caramail - http://www.caramail.com


--=_NextPart_Caramail_0220981014800364_ID--

