Commits

Armin Rigo  committed 1bb21a8

A failing test.

  • Participants
  • Parent commits 4643020
  • Branches stm-gc

Comments (0)

Files changed (1)

File pypy/rpython/memory/gc/test/test_stmgc.py

         sr2.s1 = t
         self.gc.commit_transaction()
 
+    def test_commit_with_ref_to_local_copy(self):
+        tr, tr_adr = self.malloc(SR)
+        self.select_thread(1)
+        sr_adr = self.gc.stm_writebarrier(tr_adr)
+        assert sr_adr != tr_adr
+        sr = llmemory.cast_adr_to_ptr(sr_adr, lltype.Ptr(SR))
+        sr.sr2 = sr
+        self.gc.commit_transaction()
+        assert sr.sr2 == tr
+
     def test_commit_transaction_no_references(self):
         py.test.skip("rewrite me")
         s, s_adr = self.malloc(S)