Commits

Armin Rigo  committed a51c7cc

Fix an obscure issue where destructed SHADOWSTACKREFs could still be
occasionally traced, leading to crashes.

  • Participants
  • Parent commits aacdc4e

Comments (0)

Files changed (1)

File rpython/memory/gctransform/shadowstack.py

         from rpython.rlib import _rffi_stacklet as _c
         h = shadowstackref.context
         h = llmemory.cast_adr_to_ptr(h, _c.handle)
-        llmemory.raw_free(shadowstackref.base)
+        base = shadowstackref.base
+        shadowstackref.base    = llmemory.NULL
+        shadowstackref.top     = llmemory.NULL
+        shadowstackref.context = llmemory.NULL
+        llmemory.raw_free(base)
         if h:
             _c.destroy(h)