Re: Bus error

Lindsey Spratt <[email protected]> Wed, 03 Dec 2008 20:11:22 -0500
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
I agree that crashing is a poor way to alert the user to a problem  
with his code.

However, when I ported gprolog to the mac I looked at trying to catch  
this kind of problem and reporting it gracefully but couldn't figure  
out how to do it. Maybe someone else can figure it out (this is  
definitely not my area of expertise).

Regards,
Lindsey


On Dec 3, 2008, at 3:12 PM, Bartholomew Parkis wrote:

> Still, the interpreter shouldn't crash.
>
> On Dec 3, 2008, at 2:56 PM, Lindsey Spratt wrote:
>
>> I think you are getting a stack overflow (there is no proof in  
>> prolog for foo(X) :- \+ foo(X)).
>>
>> Lindsey
>>
>> On Dec 1, 2008, at 1:36 AM, Bartholomew Parkis wrote:
>>
>>> gprolog produces a bus error on my machine when doing the following:
>>>
>>> bmacbook:~/prolog bparkis$ cat test2.pl
>>> foo(X) :- \+ foo(X).
>>> bmacbook:~/prolog bparkis$ gprolog
>>> GNU Prolog 1.3.0
>>> By Daniel Diaz
>>> Copyright (C) 1999-2007 Daniel Diaz
>>> | ?- ['test2.pl'].
>>> compiling /Users/bparkis/prolog/test2.pl for byte code...
>>> /Users/bparkis/prolog/test2.pl compiled, 1 lines read - 357 bytes  
>>> written, 13 ms
>>>
>>> (1 ms) yes
>>> | ?- foo(bar).
>>> Bus error
>>> bmacbook:~/prolog bparkis$
>>>
>>>
>>> My machine/version information:
>>>
>>> bmacbook:~/prolog bparkis$ uname -a
>>> Darwin bmacbook 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10  
>>> 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386
>>> bmacbook:~/prolog bparkis$ gprolog --version
>>> Prolog top-Level (GNU Prolog) 1.3.0
>>> By Daniel Diaz
>>> Copyright (C) 1999-2007 Daniel Diaz
>>> GNU Prolog comes with ABSOLUTELY NO WARRANTY.
>>> You may redistribute copies of GNU Prolog
>>> under the terms of the GNU General Public License.
>>> For more information about these matters, see the files named  
>>> COPYING.
>>>
>>>
>>>
>>> _______________________________________________
>>> Bug-prolog mailing list
>>> [email protected]
>>> http://lists.gnu.org/mailman/listinfo/bug-prolog
>>
>
>
>
> _______________________________________________
> Bug-prolog mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/bug-prolog