Closed GoogleCodeExporter closed 9 years ago
Problem description: Inside the iter() function, the for-loop caused the VM to
create a sequence-iterator structure. This structure was being swept by the GC
despite being properly linked to the roots.
The blame was because the Generator's frame's fo_back was referring to a frame
that was already freed and when heap_gcMarkObj() tried to follow fo_back to the
freed frame, it encountered a C_ASSERT. HOWEVER! The retval from the C_ASSERT
was being ignored when the thread list was being marked!!
Lesson: Make sure the C_ASSERT statements return their error codes!
Solution: In heap_gcMarkObj() do not follow a frame's fo_back reference if that
frame is for a generator function.
Original comment by dwhall...@gmail.com
on 26 Aug 2010 at 6:36
r585
- Made src/tools/pmOdDecoder.py able to accept hex input.
- Added system regression test t329
- Added condition in src/vm/heap.c heap_gcMarkObj() to frame's fo_back is not
followed if the frame is for a generator.
- Added/removed PM_RETURN_IF_ERROR() in heap.c so C_ASSERT() error codes are
returned.
- Leaving iter() in src/lib/__bi.py commented out in case someone finds it
useful
All tests pass. Tested interactively and the test in comment 0 passed.
Mainlined directly.
Original comment by dwhall...@gmail.com
on 26 Aug 2010 at 7:43
Original issue reported on code.google.com by
dwhall...@gmail.com
on 25 Aug 2010 at 2:41Attachments: