Jerry Gay (via RT) wrote:
# New Ticket Created by Jerry Gay
# Please include the string: [perl #51104]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=51104 >
during the build of languages/c99, specifically:
..\..\parrot.exe -o src\CPP_PGE2AST.pbc --output-pbc src\CPP_PGE2AST.pir
boom.
msvcr80.dll!strlen(unsigned char * buf=0x00000400) Line 81 Asm
libparrot.dll!read_macro(YYSTYPE * valp=0x0017fb8c, parrot_interp_t
* interp=0x03ab1248, void * yyscanner=0x03be5ec0) Line 991 + 0xb
bytes C
libparrot.dll!yylex(YYSTYPE * valp=0x0017fb8c, void *
yyscanner=0x03be5ec0, parrot_interp_t * interp=0x03ab1248) Line 425 +
0x11 bytes C
libparrot.dll!yyparse(void * yyscanner=0x03be5ec0, parrot_interp_t *
interp=0x03ab1248) Line 2601 + 0x14 bytes C
libparrot.dll!compile_to_bytecode(parrot_interp_t *
interp=0x03ab1248, const char * const sourcefile=0x03ab1219, const
char * const output_file=0x03ab11f8) Line 951 + 0xd bytes C
libparrot.dll!imcc_run(parrot_interp_t * interp=0x03ab1248, const
char * sourcefile=0x03ab1219, int argc=1, const char * *
argv=0x03ab11c8) Line 1051 + 0x11 bytes C
parrot.exe!main(int argc=1, const char * * argv=0x03ab11c8) Line 56
+ 0x15 bytes C
parrot.exe!__tmainCRTStartup() Line 586 + 0x17 bytes C
kernel32.dll!76d019f1()
[Frames below may be incorrect and/or missing, no symbols loaded for
kernel32.dll]
ntdll.dll!7775d109()
at line 990 in imcc.l, valp is uninitialized. it's full of bad
pointers. i haven't tracked down why. any help?
I think this is the same as "[perl#47978][C99][IMCC] double free".
The issue seems to be caused by languages/c99/src/preamble, where:
.local $iter_loop:
Consider this test program.
$cat m.pir
.macro test
.local $iter_loop:
.endm
$ parrot -o m.pbc --output-pbc m.pir
compilers/imcc/imcc.l:992: failed assertion 'valp->s'
(Remove the colon and it parses again.)
I could track it down as far as read_macro in imcc.l, where line 1015
does not fill valp, and returns the token MACRO.
c = yylex(valp, yyscanner, interp);
Ron