# New Ticket Created by "Clinton A. Pierce" # Please include the string: [netlabs #522] # in the subject line of all future correspondence about this issue. # <URL: http://bugs6.perl.org/rt2/Ticket/Display.html?id=522 >
Sometime during or shortly after the 0.0.5 release, BASIC broke with string/stack/GC errors. During program LOAD, Parrot runs off eats a ton of memory (sometimes) and falls over dead (eventually). Someone else in #parrot tried the exact same test without problems. I'm dismayed. To reproduce this bug under any post 0.0.5 CVS update: * Go into the languages/BASIC directory * Start basic using the handler: C:\projects\perl\parrot\languages\BASIC>basic.pl Including stackops.pasm Including alpha.pasm Including dumpstack.pasm Including tokenize.pasm Including basicvar.pasm Including basic.pasm Including instructions.pasm Including expr.pasm 4050 lines Ready * Immediately load wumpus (it won't finish): LOAD wumpus LOADING wumpus.bas... * Wait for segfault (it takes a couple of minutes on my P300). * While you're waiting, watch memory be eaten by Parrot. Calling the sweepoff and collectoff have no effect other than to make the memory-eating much more impressive (and the crash more spectacular). I've got Parrot compiled under Win32 (Win2k) with MSVC++. ** I'd like to offer that BASIC could somehow be incorporated into the test suite for Parrot? Would it help? It's awfully sensitive to problems with strings, stacks, etc. As a general rule, if you can get something like wumpus.bas to load and run in BASIC then things are healthier than not. I could modify BASIC to help. For example, an alternate basic.pl that would create a "batch" version of BASIC instead of an interactive one. (All of the interactive code is in that short Perl script.) To run BASIC in batch mode is simply a matter of replacing MAIN in basic.pl with a MAIN that does something like: save 0 # Seed the runtime stack save "LOAD wumpus" bsr RUNLINE save "RUN" bsr RUNLINE restore I0 # Run's status end This is how my test harness works so I don't have to type programs at it, or wear out my capslock key.