[pypy-commit] stmgc c7-refactor: Update demo2.c, but it still fails probably because of a core bug

arigo noreply at buildbot.pypy.org
Mon Feb 24 16:25:03 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: c7-refactor
Changeset: r832:894bb43b4c0a
Date: 2014-02-24 16:24 +0100
http://bitbucket.org/pypy/stmgc/changeset/894bb43b4c0a/

Log:	Update demo2.c, but it still fails probably because of a core bug

diff --git a/c7/demo/demo2.c b/c7/demo/demo2.c
--- a/c7/demo/demo2.c
+++ b/c7/demo/demo2.c
@@ -158,11 +158,15 @@
         w_prev = w_newnode;
     }
 
-    //_stm_minor_collect();       /* hack.. */
-    //POP_ROOT(global_chained_list); --- remains in the shadowstack
+    POP_ROOT(global_chained_list);   /* update value */
+    assert(global_chained_list->value == -1);
+    PUSH_ROOT(global_chained_list);
 
     stm_commit_transaction();
 
+    POP_ROOT(global_chained_list);   /* update value */
+    assert(global_chained_list->value == -1);
+    PUSH_ROOT(global_chained_list);  /* remains forever in the shadow stack */
 
     printf("setup ok\n");
 }
@@ -175,11 +179,13 @@
 {
     int status;
     stm_register_thread_local(&stm_thread_local);
+    PUSH_ROOT(global_chained_list);  /* remains forever in the shadow stack */
 
     while (check_sorted() == -1) {
         bubble_run();
     }
 
+    POP_ROOT(global_chained_list);
     assert(stm_thread_local.shadowstack == stm_thread_local.shadowstack_base);
     stm_unregister_thread_local(&stm_thread_local);
     status = sem_post(&done); assert(status == 0);


More information about the pypy-commit mailing list