[Top][All Lists]

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

Re: Tracing causes segfault when catching exception

From: Jasper Taylor
Subject: Re: Tracing causes segfault when catching exception
Date: Thu, 18 Sep 2008 18:26:14 +0100
User-agent: Thunderbird (X11/20080724)

Quick follow-up -- I just tried this again, having recompiled gprolog without any C flags, and now the bug does not occur. The following trace output is produced, which is more or less what I would expect...

| ?- 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 ?
      2    2  Fail: '$catch'(_17 is text,_16,fail,on_exception,3,true) ?
      1    1  Fail: on_exception(_16,_17 is text,fail) ?

| ?-

...so it is something to do with compiler optimization.

Jasper Taylor wrote:
Hi Daniel,

This happens on Ubuntu Linux 8.04 (files are in Windows partition but that shouldn't matter) on a Macbook with a Core 2 Duo processor. Because my main problem depends on the flags used to compile gprolog, I rebuilt it with -O and -O3, and got the problem both times.

Here's the gcc version info:

$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

Hope this helps. Let me know if you'd like me to test it in Windows or MacOS.


Daniel Diaz wrote:
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...

Bug-prolog mailing list

reply via email to

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