]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid the access to NULL memory while gc marks.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Thu, 17 Sep 2009 21:38:24 +0000 (23:38 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Thu, 17 Sep 2009 21:38:24 +0000 (23:38 +0200)
src/thread.c

index ad43c809d3b14676bfa6601e722b2c92a19f40de..ecc44f3f5f9fb69ede902d06d52971600405e273 100644 (file)
@@ -45,7 +45,8 @@ mark_one_thread (struct thread_state *thread)
   }
 #endif
 
-  mark_byte_stack (thread->m_byte_stack_list);
+  if (thread->m_byte_stack_list)
+    mark_byte_stack (thread->m_byte_stack_list);
 
   mark_catchlist (thread->m_catchlist);
 
@@ -91,7 +92,8 @@ unmark_threads (void)
   struct thread_state *iter;
 
   for (iter = all_threads; iter; iter = iter->next_thread)
-    unmark_byte_stack (iter->m_byte_stack_list);
+    if (iter->m_byte_stack_list)
+      unmark_byte_stack (iter->m_byte_stack_list);
 }
 
 static void