aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-01-19 15:03:47 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-01-19 15:03:47 -0200
commit0e60572606684458b18febfcef0bc68235b461f4 (patch)
treeeec42d018bfbe9402b7109df7f78d49300f90adb
parent621ef9f7675829234e75b0b3e73afc7a1a74aa16 (diff)
downloadlua-0e60572606684458b18febfcef0bc68235b461f4.tar.gz
lua-0e60572606684458b18febfcef0bc68235b461f4.tar.bz2
lua-0e60572606684458b18febfcef0bc68235b461f4.zip
values holded in open upvalues of suspended threads may be
incorrectly collected
-rw-r--r--bugs39
1 files changed, 39 insertions, 0 deletions
diff --git a/bugs b/bugs
index d4cae38d..efff0bbe 100644
--- a/bugs
+++ b/bugs
@@ -428,6 +428,7 @@ patch = [[
428]], 428]],
429} 429}
430 430
431
431Bug{ 432Bug{
432what = [[`pc' address is invalidated when a coroutine is suspended]], 433what = [[`pc' address is invalidated when a coroutine is suspended]],
433example = [[ 434example = [[
@@ -704,3 +705,41 @@ patch = [[
704]] 705]]
705} 706}
706 707
708
709Bug{
710what = [[values holded in open upvalues of suspended threads may be
711incorrectly collected]],
712
713report = [[Spencer Schumann, 31/12/2004]],
714
715example = [[
716local thread_id = 0
717local threads = {}
718
719function fn(thread)
720 thread_id = thread_id + 1
721 threads[thread_id] = function()
722 thread = nil
723 end
724 coroutine.yield()
725end
726
727while true do
728 local thread = coroutine.create(fn)
729 coroutine.resume(thread, thread)
730end
731]],
732
733patch = [[
734* lgc.c:
735221,224c221,222
736< if (!u->marked) {
737< markobject(st, &u->value);
738< u->marked = 1;
739< }
740---
741> markobject(st, u->v);
742> u->marked = 1;
743]],
744}
745