Simon Glover wrote:
On Tue, 19 Nov 2002, Steve Fink wrote:------------------------------------------------------------ t/op/lexicals.t 6 1536 6 6 100.00% 1-6 t/pmc/multiarra 2 512 3 2 66.67% 2-3 t/pmc/scratchpa 3 768 3 3 100.00% 1-3I can get these to fail on Linux/x86 with gcc if I turn optimization on (and only if running with --gc-debug). I would guess that it's some kind of memory-related bug, but I haven't been able to track it down yet.
gcc 2.95.2, everything compiled -g -O3 (except core_cg)
Failed Test Status Wstat Total Fail Failed List of failed
-------------------------------------------------------------------------------
t/op/lexicals.t 6 1 16,67% 3
With my patch all tests succeed. So we definitely need to check processor registers for PMC/Buffers.
If setjmp does save all the registers as i386/gcc does, the setjmp is enough. For other architectures/compilers we need some assembler code, to put all processor registers in Parrot_jump_buff. A look at the sources of gcc/config/* or ruby shows how to do it ;-)
Also instead of set_jmp, we need Parrot_set_jmp, which saves registers.
Simon
leo