[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pl_Err_System() unify_with_occurs_check: Segmentation Violation

From: Daniel Diaz
Subject: Re: Pl_Err_System() unify_with_occurs_check: Segmentation Violation
Date: Thu, 25 Jan 2001 18:22:34 +0100

address@hidden said:
> Hello,
> The Pl_Err_System() function causes a Segmentation Violation  with
> gprolog 1.2.6 / Linux 2.2.16 / PII-MMX.

> To reproduce this I modified the file ExamplesC/examp_c.c by inserting
> the following line:
>  Pl_Err_System(Create_Atom("something")); say in the
> 'first_occurrence' function .

This is due to the fact that using ebp register (by default on ix86/linux) 
implies to use -fomit-frame-pointer for C code. A solution consists in 
examp as follows:
   gplc -C '-fomit-frame-pointer' examp.pl examp_c.c
or with make CFLAGS=-fomit-frame-pointer

In the next versions gplc automatically adds -fomit-frame-pointer if ebp is 
used (this has been patched on the CVS at sourceforge).

> another pb : under the prolog interpreter | ?- unify_with_occurs_check(
> X,X). causes another Segmentation Violation 

> Note: These bugs don't happen with gprolog 1.2.1 or with gprolog 1.2.6
> compiled with -g.

This is due to a simple bug in EnginePl/wam_inst.h:342 replace

Bool Unify_Occurs_Check(WamWord start_u_word, WamWord start_v_word) FC;


Bool Unify_Occurs_Check(WamWord start_u_word, WamWord start_v_word);

(removing FC).

This also is updated on the CVS.

Thank you for your bug report.

> Hope this helps

                 Daniel Diaz
University of Paris 1      INRIA Rocquencourt
75013 Paris FRANCE      78153 Le Chesnay FRANCE
        web: http://pauillac.inria.fr/~diaz
        email: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]