bug-prolog
[Top][All Lists]
Advanced

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

Stack overflows with gprolog 1.2.8?


From: Erik Max Francis
Subject: Stack overflows with gprolog 1.2.8?
Date: Tue, 13 Nov 2001 19:39:36 -0800

address@hidden:~/tmp% uname -a
Linux oxygen 2.2.16 #7 Sat Apr 28 20:05:48 PDT 2001 i686 unknown
address@hidden:~/tmp% gprolog --version
Prolog top-Level (GNU Prolog) 1.2.8
By Daniel Diaz
Copyright (C) 1999-2001 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.

Configured with ./configure --disable-ebp.

When I do any kind of serious search, I hit a stack overflow:

Fatal Error: local stack overflow (size: 3192 Kb, environment variable
used: LOCALSZ)

I also see trail stack overflows.  I certainly know what stack overflows
are and why they're happening, but don't those stack sizes seem awfully
low for modern machines?

Here's a sample program which causes the stack overflows:

address@hidden:~/tmp% gprolog
GNU Prolog 1.2.8
By Daniel Diaz
Copyright (C) 1999-2001 Daniel Diaz
| ?- [user].
compiling user for byte code...
not(P) :- call(P), !, fail.
not(_).

subset([], [_|_]).
subset([A|X], Y) :- member(A, Y), subset(X, Y).

unique([]).
unique([_]).
unique([X, Y]) :- X \= Y.
unique([H|T]) :- not(member(H, T)), unique(T).
[^D]
user compiled, 9 lines read - 1526 bytes written, 7715 ms

yes
| ?- subset(X, [a, b, c]), unique(X).

X = [] ? [;]

X = [a] ? [;]

X = [a] ? [;]

Fatal Error: local stack overflow (size: 3192 Kb, environment variable
used: LOCALSZ)

Is there any way to tweak these stack sizes?  Sorry if there is and it's
documented; I couldn't find anything obvious in the documentation.

-- 
 Erik Max Francis / address@hidden / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Laws are silent in time of war.
\__/ Cicero
    Esperanto reference / http://www.alcyone.com/max/lang/esperanto/
 An Esperanto reference for English speakers.



reply via email to

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