. . .
This GDB was configured as "i586-suse-linux"...
(gdb) r runtime/parrot/library/config.pbc
Starting program: /usr/src/parrot/disassemble runtime/parrot/library/config.pbc
[New Thread 16384 (LWP 24464)]
[New Thread 32769 (LWP 24466)]
[New Thread 16386 (LWP 24467)]
[New Thread 32771 (LWP 24468)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 24464)]
0x08083966 in Parrot_disassemble (interpreter=0x8253d00) at src/embed.c:880
(gdb) bt
#0 0x08083966 in Parrot_disassemble (interpreter=0x8253d00) at src/embed.c:880
#1 0x08082871 in do_dis (interpreter=0x8253d00) at src/disassemble.c:99
#2 0x0808283f in main (argc=2, argv=0xbffff554) at src/disassemble.c:79
(gdb)
I find disassemble useful, but it seems subject to periodic bit rot.
So, I think I would like to write some basic tests for it. Is it worth
extending Parrot::Test to include disassemble_output_is, etc., or should
I do something more special-purpose?
-- Bob Rogers
http://rgrjr.dyndns.org/
------------------------------------------------------------------------
Index: embed.c
===================================================================
--- embed.c (revision 7955)
+++ embed.c (working copy)
@@ -877,7 +877,7 @@
if (line->label)
PIO_printf(interpreter, "L%li:\t", line->label->number);
c = pdb->file->source + line->source_offset;
- while (*c != '\n' && c)
+ while (*c && *c != '\n')
PIO_printf(interpreter, "%c", *(c++));
PIO_printf(interpreter, "\n");
line = line->next;
Not knowing any of the surrounding code, shouldn't that be
while (c && *c != '\n')
Matt
--
"Computer Science is merely the post-Turing Decline of Formal Systems Theory."
-???
The memory handling was broken and disassemble didn't know how to handle
PMC constants.
Fixed - rev 7971.
Thanks for testing,
leo
Fixed - rev 7971.
Thanks for testing,
leo
I'm sorry, but I'm still seeing the same syndrome in r8070, segfaulting
in the same place, though now for only a subset of *.pbc files . . .
-- Bob
------------------------------------------------------------------------
rogers@rgrjr> ./disassemble ./runtime/parrot/library/dumper.pbc
Segmentation fault
rogers@rgrjr> for file in `find . -name '*.pbc'`; do if [ 0 == `./disassemble $file | wc -l` ]; then echo $file; fi; done
./runtime/parrot/library/Data/Dumper/Base.pbc
./runtime/parrot/library/Data/Sort.pbc
./runtime/parrot/library/Stream/Combiner.pbc
./runtime/parrot/library/Stream/Writer.pbc
./runtime/parrot/library/Stream/ParrotIO.pbc
./runtime/parrot/library/Stream/Lines.pbc
./runtime/parrot/library/Stream/Filter.pbc
./runtime/parrot/library/Stream/Replay.pbc
./runtime/parrot/library/Stream/Coroutine.pbc
./runtime/parrot/library/dumper.pbc
rogers@rgrjr>
Yet another uninitialized pointer variable - fixed.
> -- Bob
Thanks for reporting.
BTW could you/someone make a test for disassemble, to be included in
"make fulltest" where, after "make test", plenty of pbcs are populating
the tree. The test should skip the skipped t/native_pbc though.
Thanks,
leo
Bob Rogers wrote:
>
> I'm sorry, but I'm still seeing the same syndrome in r8070, segfaulting
> in the same place, though now for only a subset of *.pbc files . . .
Yet another uninitialized pointer variable - fixed.
Great; thanks.
Thanks for reporting.
BTW could you/someone make a test for disassemble, to be included in
"make fulltest" where, after "make test", plenty of pbcs are populating
the tree. The test should skip the skipped t/native_pbc though.
Thanks,
leo
I'd be happy to, but won't have time before late next week. So if
someone else wants to beat me to it, go for it.
-- Bob