Re: Tracing causes segfault when catching exception
Jasper Taylor <[email protected]> Thu, 18 Sep 2008 18:26:14 +0100
| Newsgroups | gmane.comp.gnu.prolog.bugs |
|---|---|
| Message-ID | <[email protected]> |
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) ?
no
{trace}
| ?-
...so it is something to do with compiler optimization.
--Jasper
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.
>
> --Jasper
>
> 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
> [email protected]
> http://lists.gnu.org/mailman/listinfo/bug-prolog