bug-prolog
[Top][All Lists]
Advanced

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

Re: Tracing causes segfault when catching exception


From: Daniel Diaz
Subject: Re: Tracing causes segfault when catching exception
Date: Wed, 17 Sep 2008 10:03:11 +0200
User-agent: Thunderbird 2.0.0.9 (X11/20071209)

Hi Jasper,

can you give me more information about your architecture (OS, compiler, flags used to compiler gprolog,...). BTW it iseems you are under win XP, you should avoid spaces in path names (e.g. Program Files) because gprolog does not handle those spaces correctly...

Sorry for the inconvenience

daniel


Hi all. I am trying to pin down some aberrant behaviour in gprolog which only occurs when built with -O3 c flags. It occurs in a big application and I don't want to report it until I can produce it with a compact example, so I am trying to use 'trace' to see what is going wrong.

Now I have run into the problem that 'trace' causes a segfault when 'catch' is used to get an exception within a program. Here is a script that shows the problem. The file 'excp.pl' contains this definition:

on_exception(Error, Goal, Recovery) :-
        catch(Goal, Error, Recovery).

...and the session goes...

$ gprolog
GNU Prolog 1.3.1
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz
| ?- consult(excp).
compiling /WinXP/Program Files/Simile/Test/excp.pl for byte code...
/WinXP/Program Files/Simile/Test/excp.pl compiled, 2 lines read - 472 bytes written, 9 ms

(4 ms) yes
| ?- on_exception(B, A is text, fail).

no
| ?- trace.
The debugger will first creep -- showing everything (trace)

yes
{trace}
| ?- on_exception(B, A is text, fail).
      1    1  Call: on_exception(_16,_17 is text,fail) ?
      2    2  Call: '$catch'(_17 is text,_16,fail,on_exception,3,true) ?
      3    3  Call: _17 is text ?
      3    3  Exception: _17 is text ?

Fatal Error: Segmentation Violation
      2    2  Fail: '$catch'(_17 is text,$

...any help will be much appreciated!
    --Jasper


_______________________________________________
Bug-prolog mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-prolog



--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.





reply via email to

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