[Israel.pm] Counting my scalars
semuelf at 012.net.il
Wed Jun 27 13:19:17 PDT 2007
After reading some docs, (especially perldiag) I understood that it's
not that I have a unfree-ed scalar. It's that I have free (SvREFCNT_dec)
a scalar more times then it was referenced.
And then when Perl tries to free it itself, it found out that that
reference count is already zero. And that is the meaning of the error.
>From: Shmuel Fomberg [mailto:semuelf at 012.net.il]
>Sent: Sunday, June 24, 2007 10:12 PM
>To: 'Perl in Israel'
>Subject: [Israel.pm] Counting my scalars
>I solved my own problem. What triggered the error was:
>unsigned char value = SvTRUE(POPs);
>I changed it with POPi and everything worked. (donno why... :-( )
>Anyway, now I'm playing with my favorite embedding-perl, and getting:
>Attempt to free unreferenced scalar: SV 0x3fece4 during global
>Can anyone tell me how do I inspect the scalars that are left?
>>From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
>>Of Shmuel Fomberg
>>Sent: Thursday, June 21, 2007 8:39 PM
>>To: perl at perl.org.il
>>Subject: [Israel.pm] FW: Examining Perl's Stack
>>I am trying to write an XS code, but getting weird results. After a
>>of experiencing and debugging, I found out that a function does not
>>the currect parameters. I suspect that by doing something wrong, I
>>managed to corrupt Perl's stack.
>>So my question is: how do I examine Perl's stack?
>>The program is very simple. Something like this:
>>my $obj = mymodule::create(); # XS
>>mymodule::do_something($obj, 1, 2, 3); # XS
>>The program crashes on the "do_something".
>>Perl mailing list
>>Perl at perl.org.il
>>No virus found in this incoming message.
>>Checked by AVG Free Edition.
>>Version: 7.5.472 / Virus Database: 269.9.1/854 - Release Date:
>Perl mailing list
>Perl at perl.org.il
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.5.472 / Virus Database: 269.9.6/865 - Release Date:
More information about the Perl