[pypy-commit] stmgc default: clean up shadowstack in demo_random for leaveframe
Raemi
noreply at buildbot.pypy.org
Tue Aug 12 17:50:05 CEST 2014
Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch:
Changeset: r1304:8e8c594bbad1
Date: 2014-08-12 17:51 +0200
http://bitbucket.org/pypy/stmgc/changeset/8e8c594bbad1/
Log: clean up shadowstack in demo_random for leaveframe
diff --git a/c7/demo/demo_random.c b/c7/demo/demo_random.c
--- a/c7/demo/demo_random.c
+++ b/c7/demo/demo_random.c
@@ -393,6 +393,16 @@
}
}
}
+ push_roots();
+ stm_commit_transaction();
+
+ /* even out the shadow stack before leaveframe: */
+ stm_start_inevitable_transaction(&stm_thread_local);
+ while (td.num_roots > 0) {
+ td.num_roots--;
+ objptr_t t;
+ STM_POP_ROOT(stm_thread_local, t);
+ }
stm_commit_transaction();
stm_rewind_jmp_leaveframe(&stm_thread_local, &rjbuf);
More information about the pypy-commit
mailing list