Parrot::Interpreter - using Lua

Gabor Szabo szabgab at gmail.com
Sat Dec 20 18:56:42 UTC 2008


Hi,

I am trying embed Parrot into Padre and then run code of various languages
inside Padre, the Perl IDE. Today I tried to run Lua code using
Parrot::Interpreter
but either I made a mistake or for some reason Parrot::Interpreter
cannot load the
lua.pbc. ( I created the latter by cd languages/lua and make).
This was at r34039

Attached is a test script that if accepted should be
/ext/Parrot-Embed/t/lua.t
for now it only tries to load the lua.pbc file but once I can do it I'll
extend the test script to run a a few lines of Lua code.

The output I get with the crash looks like this:

t/lua....1/5 src/pmc_freeze.c:809: failed assertion
'(int)io->image->bufused >= 0'
Backtrace - Obtained 24 stack frames (max trace depth is 32).
  (unknown)
    Parrot_confess
      (unknown)
        Parrot_Class_thaw
          (unknown)
            (unknown)
              (unknown)
                (unknown)
                  Parrot_thaw
                    PackFile_Constant_unpack_pmc
                      PackFile_Constant_unpack
                        PackFile_ConstTable_unpack
                          PackFile_Segment_unpack
                            (unknown)
                              PackFile_Segment_unpack
                                PackFile_unpack
                                  Parrot_readbc
                                    XS_Parrot__Interpreter_load_file
                                      Perl_pp_entersub
                                        Perl_runops_standard
                                          perl_run
                                            main
                                              __libc_start_main
                                                (unknown)
t/lua.... Failed 2/5 subtests

Test Summary Report
-------------------
t/lua (Wstat: 6 Tests: 3 Failed: 0)
  Parse errors: Bad plan.  You planned 5 tests but ran 3.
Files=1, Tests=3,  1 wallclock secs ( 0.03 usr  0.00 sys +  0.07 cusr
0.01 csys =  0.11 CPU)
Result: FAIL


Gabor


More information about the parrot-dev mailing list