#1557: pbc_disassemble fails on large PBCs
----------------------+-----------------------------------------------------
Reporter: plobsing | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: none | Version: 2.2.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
----------------------+-----------------------------------------------------
Changes (by Util):
* cc: Util (added)
Comment:
Here is a partial analysis, tested on r45670:
I don't think that this problem is really about the size of the .pbc file.
This problem occurs with *any* PBC built from PIR containing Unicode
literal strings. Only large PIR modules happen to contain Unicode literals
right now, hence the appearance that PBC size is an element of the
problem.
For example, the following code complies to .pbc and executes correctly,
but fails to disassemble:
$ cat unicode_minimal_crash.pir
{{{
.sub _main
$S0 = 'd'
$I0 = index unicode:"abc\x{a0}def", $S0
print "The answer is "
say $I0
end
.end
}}}
$ ./parrot -o unicode_minimal_crash.pbc unicode_minimal_crash.pir
$ ./parrot unicode_minimal_crash.pbc
{{{
The answer is 4
}}}
$ ./pbc_disassemble unicode_minimal_crash.pbc
{{{
=head1 Constant-table
PMC_CONST(0): 'ParrotInterpreter'
PMC_CONST(1): abc def
PMC_CONST(2): d
PMC_CONST(3): The answer is
PMC_CONST(4): unicode_minimal_crash.pir
PMC_CONST(5):
PMC_CONST(6): _main
=cut
# Seq_Op_Num- Relative-PC SrcLn#:
# Current Source Filename 'unicode_minimal_crash.pir'
000000000000-000000000000 000003: set_s_sc S0,"d"
000000000001-000000000003 000004: index_i_sc_s I0,"abcInvalid
character for UTF-8 encoding
}}}
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1557#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets