The following code segfaults with parrot poicephalus
.sub _MAIN
$I0=1
if$I0 < 2 goto LBL1
LBL1:
end
ret
.end
Fix at your leisure :)
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
The code works if you put a space between "if" and "$I0":
.sub _MAIN
$I0=1
if $I0 < 2 goto LBL1
LBL1:
end
ret
.end
--
matt diephouse
http://matt.diephouse.com
Right, but the pir parser shouldn't segfault on bad input.
--
Dan
--------------------------------------it's like this-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
> The following code segfaults with parrot poicephalus
> .sub _MAIN
> $I0=1
> if$I0 < 2 goto LBL1
^^^^^
Segfault in the lexer. Bad.
349 sprintf(label, "%s%d", yytext, frames->label);
(gdb) p frames
$1 = (struct macro_frame_t *) 0x0
leo
I didn't know how or why or what a frame is in this
context which is why this isn't a patch :)
>> Segfault in the lexer. Bad.
>>
>> 349 sprintf(label, "%s%d", yytext,
>> frames->label);
>> (gdb) p frames
>> $1 = (struct macro_frame_t *) 0x0
> I didn't know how or why or what a frame is in this
> context which is why this isn't a patch :)
No problem. The syntax {ID}$ is used internally during the expansion of
local labels inside macros, which happen to be accumulated in frame
structures.
Fixed.
Thanks for reporting,
leo