[pypy-svn] r19683 - pypy/dist/pypy/translator/c/src
arigo at codespeak.net
arigo at codespeak.net
Wed Nov 9 17:24:33 CET 2005
Author: arigo
Date: Wed Nov 9 17:24:32 2005
New Revision: 19683
Modified:
pypy/dist/pypy/translator/c/src/stack.h
Log:
fix broken logic for the case diff == 0.
Modified: pypy/dist/pypy/translator/c/src/stack.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/stack.h (original)
+++ pypy/dist/pypy/translator/c/src/stack.h Wed Nov 9 17:24:32 2005
@@ -47,7 +47,7 @@
stack_pointer_pointer. */
diff = &local - stack_base_pointer;
- if (stack_min < diff && diff < stack_max) {
+ if (stack_min <= diff && diff <= stack_max) {
/* common case: we are still in the same thread as last time
we checked, and still in the allowed part of the stack */
return 0;
@@ -73,7 +73,7 @@
baseptr = (char *) RPyThreadTLS_Get(stack_base_pointer_key);
if (baseptr != NULL) {
diff = &local - baseptr;
- if (stack_min < diff && diff < stack_max) {
+ if (stack_min <= diff && diff <= stack_max) {
/* within bounds */
stack_base_pointer = baseptr;
return 0;
More information about the Pypy-commit
mailing list