New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to free unreferenced scalar: SV... #9389
Comments
From cappella@glacier.mikecappella.comCreated by cappella@glacier.mikecappella.comI'm hitting what appears to be a bug in creating an array of qr's: Attempt to free unreferenced scalar: SV 0x8066318, Perl interpreter: 0x804e000 at ./t.pl line 137. The code and output is below. Note the error message and the resulting output $ cat t.pl my @ignore_list = ( $ echo 'Peer verification:' | perl ./t.pl Perl Info
|
From p5p@spam.wizbit.beOn Sat Jun 21 14:59:59 2008, cappella@glacier.mikecappella.com wrote:
On perl-5.8.8 I see empty elements for index 127-131. If I add: use strict in the code then I do get *** glibc detected *** Also: the /o modifier in your regexes does nothing. If I use: my @ignore_list = ( Then I do get the expected output. Can you try this work around and confirm that the error goes away? Kind regards, Bram |
The RT System itself - Status changed from 'new' to 'open' |
From mike-perl@cappella.usBram via RT wrote:
My full code uses strict mode. This was a code segment. I don't recall
I have a number of patterns with variable interpolation - the /o was for I'm curious - why is it best to never use /o ? Even with variable
It appears you've made two changes to the test case: removing /o and On my older system i686 linux system, I get a simple and immediate "Out
This is the workaround I am using essentially, but with multiple push() Thanks for the fast follow-up !
|
From p5p@spam.wizbit.be
I advice against using /o because it can make the code less maintable (as (And the times it does have an influence it can come back to haunt you. Seen When can /o go wrong? From a bug report: #!/usr/bin/perl -l MATCH: bar Most people code expect to see the output: What is happening is that the 'compile only once' flag of m/^bar$/o is If you really intend to evaluate some variable only once then it is my advice That is instead of: #!/usr/bin/perl -l I would advice to write: #!/usr/bin/perl -l This (IMHO) makes it somewhat clearer what the intend is. Kind regards, Bram |
From p5p@spam.wizbit.beA binary search revealed that this was fixed with change 30211. http://public.activestate.com/cgi-bin/perlbrowse/p/30211 Subject: [perl #41484] qr// stack bug |
p5p@spam.wizbit.be - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#56202 (status was 'resolved')
Searchable as RT56202$
The text was updated successfully, but these errors were encountered: