[pypy-commit] stmgc c8-gil-like: compiling with _STM_NURSERY_ZEROED=1 in non-debug mode would not

arigo noreply at buildbot.pypy.org
Sun Jun 14 11:35:36 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: c8-gil-like
Changeset: r1824:15af88362d03
Date: 2015-06-14 11:36 +0200
http://bitbucket.org/pypy/stmgc/changeset/15af88362d03/

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
@@ -471,7 +471,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);
@@ -483,8 +482,9 @@
                        (NURSERY_END - _stm_nursery_start) - nursery_used);
 
 #else
+# ifndef NDEBUG
     memset(realnursery, 0xa0, nursery_used);
-#endif
+# endif
 #endif
 
     pseg->total_throw_away_nursery += nursery_used;


More information about the pypy-commit mailing list