1. Pypy
  2. Untitled project
  3. pypy

Commits

Armin Rigo  committed 16fca4f

Fixes

  • Participants
  • Parent commits d33ea92
  • Branches stm-thread-2

Comments (0)

Files changed (3)

File pypy/module/sys/currentframes.py

View file
 Implementation of the 'sys._current_frames()' routine.
 """
 from pypy.interpreter import gateway
+from pypy.interpreter.error import OperationError
 
 app = gateway.applevel('''
 "NOT_RPYTHON"

File pypy/module/thread/stm.py

View file
         return ec_cache.get()
 
     def setvalue(self, value):
-        if not self.seen_main_ec:
+        if not self.seen_main_ec and value is not None:
             value._signals_enabled = 1    # the main thread is enabled
             self._mainthreadident = rthread.get_ident()
             self.seen_main_ec = True

File rpython/rtyper/memory/gc/stmtls.py

View file
         while i > 0:
             i -= 1
             root = llop.stm_threadlocalref_lladdr(llmemory.Address, i)
-            self._trace_drag_out(root, None)
+            if self.points_to_valid_gc_object(root):
+                self._trace_drag_out(root, None)
 
     def trace_and_drag_out_of_nursery(self, obj):
         # This is called to fix the references inside 'obj', to ensure that