Author: Armin Rigo <[email protected]>
Branch: stacklet
Changeset: r46349:e1f9abfbbc90
Date: 2011-08-07 18:37 +0200
http://bitbucket.org/pypy/pypy/changeset/e1f9abfbbc90/

Log:    add an assert.

diff --git a/pypy/translator/c/src/stacklet/stacklet.c 
b/pypy/translator/c/src/stacklet/stacklet.c
--- a/pypy/translator/c/src/stacklet/stacklet.c
+++ b/pypy/translator/c/src/stacklet/stacklet.c
@@ -315,6 +315,8 @@
 {
   char *p = (char *)ptr;
   long delta = p - context->stack_start;
+  assert(((unsigned long)delta) <
+         (unsigned long)(context->stack_stop - context->stack_start));
   if (((unsigned long)delta) < ((unsigned long)context->stack_saved)) {
     /* a pointer to a saved away word */
     char *c = (char *)(context + 1);
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to