Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r1826:ea1bad49a23b
Date: 2015-06-14 11:36 +0200
http://bitbucket.org/pypy/stmgc/changeset/ea1bad49a23b/

Log:    compiling with _STM_NURSERY_ZEROED=1 in non-debug mode would not
        actually clean up the nursery. Crash. Took a while to figure this
        out

diff --git a/c8/stm/nursery.c b/c8/stm/nursery.c
--- a/c8/stm/nursery.c
+++ b/c8/stm/nursery.c
@@ -464,7 +464,6 @@
     }
     OPT_ASSERT((nursery_used & 7) == 0);
 
-#ifndef NDEBUG
     /* reset the nursery by zeroing it */
     char *realnursery;
     realnursery = REAL_ADDRESS(pseg->pub.segment_base, _stm_nursery_start);
@@ -476,8 +475,9 @@
                        (NURSERY_END - _stm_nursery_start) - nursery_used);
 
 #else
+# ifndef NDEBUG
     memset(realnursery, 0xa0, nursery_used);
-#endif
+# endif
 #endif
 
     pseg->pub.nursery_current = (stm_char *)_stm_nursery_start;
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to