where MyParser is really just a small passes along data to some other code that a colleague wrote. MyParser looks like:$page = contents of some web page $url = url of that web page $len = #bytes of that web page $parsed = MyParser($url, $page, $len)
i know that parser works fine. however, the first time i call this, i get errors like this from GDBchar* MyParser(char* url, char* page, int len) { char *pool; int ret; pool = (char*)malloc(2*len+1); // parsing page ret = parser(url, page, pool, 2*len+1); if(ret > 0) { return pool; } else { return '0'; } }
i dont know why i get errors regarding Perl_sv_setpv since i dont make any use (to my knowledge!) of the perl stack here. can anyone please offer some advice? I throw myself on the mercy of the perl monks!#0 0x000000398d6a22fd in Perl_sv_setpv () from /usr/lib64/perl5/5.8.6 +/x86_64-linux-thread-multi/CORE/libperl.so #1 0x00002aaaae180ded in XS_main_MyParser (my_perl=0x505010, cv=0xb36 +1b0) at getandParseWithC_pl_fa1e.c:400 #2 0x000000398d69b67e in Perl_pp_entersub () from /usr/lib64/perl5/5.8.6/x86_64-linux-thread-multi/CORE/libperl. +so #3 0x000000398d67f3cd in Perl_runops_debug () from /usr/lib64/perl5/5.8.6/x86_64-linux-thread-multi/CORE/libperl. +so #4 0x000000398d639dbe in perl_run () from /usr/lib64/perl5/5.8.6/x86_ +64-linux-thread-multi/CORE/libperl.so #5 0x0000000000401a01 in main ()
In reply to some help with inline C by downer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |