Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Disassembler issues and URM

1 view
Skip to first unread message

Marcus Thiesen

unread,
Sep 28, 2003, 2:53:37 PM9/28/03
to perl6-internals
Hi,

I've been playing with Parrot for the last two days trying to get the
disassembler working, but I was not very successful. As I mentioned
earlier in my patch email there were some issues in the debug.c file due
to some uninitialized variables. The second SEGFAULT I get happens due
to some strange memory management issues I don't fully understand.
The disassembler calls Parrots own sprintf function to throw simple
chars out on a string when it gets another op decoded (Backtrace is
below). What I found out till now is that it is somewhere deep down in
the smallobjects.c and the arena structures.
It seems as if the initialized size of 1024 is not big enough and he
tries to reallocate some more objects, but that does not work somehow.
Though he sets the new size to 4096 the free_list somehow points to a
wrong value after some additions, thus returning a bad ptr in
get_free_object and thus creating a bad n value that leads to the SEGV.
As I said, I have no clue what is happening there, sound like an
uninitialized value problem, but I couldn't make out where that
happened. BTW this happens when I try to disassemble one of my example
programs (testmmu2.urm) that has quite a long bytecode. With shorter
pbcs this does not happen, as it the overflow is connected to the amount
of ops used.

BTW, I managed to write a urm.in for the Configure.pl script and made my
urmc package relative to the parrot root (assuming it in languages/urm).
Now it is completely integrated into the Parrot build process and should
be even more platform independent than e.g. perl6, which has hardcoded /
in it's perl6.in :-)
http://perl.thiesenweb.de/urmc-0.3.tar.bz2

Have fun,
Marcus

Program received signal SIGSEGV, Segmentation fault.
0x08134102 in get_free_object (interpreter=0x819bb60, pool=0x81bc438)
at smallobject.c:143
143 arena->dod_flags[ n >> ARENA_FLAG_SHIFT ] &=
#0 0x08134102 in get_free_object (interpreter=0x819bb60,
pool=0x81bc438) at smallobject.c:143
#1 0x080f6ae4 in get_free_buffer (interpreter=0x819bb60,
pool=0x81bc438) at headers.c:55
#2 0x080f6eb3 in new_string_header (interpreter=0x819bb60, flags=8192)
at headers.c:194
#3 0x0808c735 in string_make (interpreter=0x819bb60,
buffer=0x816bb8c, len=2, encoding=0x816e140, flags=8192,
type=0x8198ba0) at string.c:234
#4 0x080f8926 in Parrot_vsprintf_c (interpreter=0x819bb60,
pat=0x816bb8c "%c", args=0xbffffa88 "6") at misc.c:49
#5 0x080fbb14 in PIO_printf (interpreter=0x819bb60, s=0x816bb8c "%c")
at io/io.c:664
#6 0x080c7b78 in Parrot_disassemble (interpreter=0x819bb60)
at embed.c:525
#7 0x0804980c in main (argc=2, argv=0xbffffb14) at disassemble.c:54

--
---------------------------------------------------------
|Marcus Thiesen ICQ# 108989768|
---------------------------------------------------------
| www.thiesenweb.de |
---------------------------------------------------------
28A7 37CC AE2C BB6C D56D 8A3D E614 E56B 7546 75F2

signature.asc

Leopold Toetsch

unread,
Sep 29, 2003, 5:37:44 AM9/29/03
to mar...@thiesenweb.de, perl6-i...@perl.org
Marcus Thiesen <mar...@thiesenweb.de> wrote:
> --=-7T7g/ui9TX4p7KWNi2Gq
> Content-Type: text/plain
> Content-Transfer-Encoding: quoted-printable

> Hi,

> I've been playing with Parrot for the last two days trying to get the
> disassembler working, but I was not very successful. As I mentioned
> earlier in my patch email there were some issues in the debug.c file due
> to some uninitialized variables. The second SEGFAULT I get happens due
> to some strange memory management issues I don't fully understand.

Thanks for reporting, fixed.

leo

Leopold Toetsch

unread,
Sep 29, 2003, 8:16:04 AM9/29/03
to mar...@thiesenweb.de, perl6-i...@perl.org
Marcus Thiesen <mar...@thiesenweb.de> wrote:

> BTW, I managed to write a urm.in for the Configure.pl script and made my
> urmc package relative to the parrot root (assuming it in languages/urm).
> Now it is completely integrated into the Parrot build process and should
> be even more platform independent than e.g. perl6, which has hardcoded /
> in it's perl6.in :-)
> http://perl.thiesenweb.de/urmc-0.3.tar.bz2

I have integrated the tarball into the tree. (I had to add 2 "use lib..."
statements).

So urm is in CVS now, thanks.

> Have fun,
> Marcus

leo

Dan Sugalski

unread,
Sep 29, 2003, 8:50:53 AM9/29/03
to Leopold Toetsch, mar...@thiesenweb.de, perl6-i...@perl.org

Cool. I see it's GPL'd, which is fine, but I'm thinking it's time to start
getting more formal with requiring licenses and noting ownership for stuff
that goes into the parrot tree, so everyone can keep it straight and know
what they're contributing to. (Parrot proper's AL/GPL owned by TPF, some
of languages is GPL with copyrights owned by various people, ICU is
something else entirely and IBM's, and we really need to keep this
straight)

Dan

Marcus Thiesen

unread,
Sep 29, 2003, 8:59:52 AM9/29/03
to perl6-i...@perl.org
On Mon, 2003-09-29 at 14:50, Dan Sugalski wrote:
> Cool. I see it's GPL'd, which is fine, but I'm thinking it's time to start
> getting more formal with requiring licenses and noting ownership for stuff
> that goes into the parrot tree, so everyone can keep it straight and know
> what they're contributing to. (Parrot proper's AL/GPL owned by TPF, some
> of languages is GPL with copyrights owned by various people, ICU is
> something else entirely and IBM's, and we really need to keep this
> straight)

Actually you got this file RESPONSIBLE_PARTIES which notes down some of
this stuff.
For the languages I would recommend something like a required MAINTAINER
file in every language dir that tells who is actively maintaining the
stuff and a list in language/ that tells owner, license, maintainer or
something.

Have fun,
Marcus

signature.asc
0 new messages