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
"double free or corruption" "Invalid write of size 4" in File::Glob? #12430
Comments
From bohica@ntlworld.comCreated by bohica@ntlworld.com*** glibc detected *** perl: double free or corruption (!prev): 0x098b2180 *** Self contained script below is the smallest I can come up with that illustrates this problem. I know it is rather specific. Changing almost any of the numbers of files created makes the problem go away. valgrind output suggests a "Invalid write of size 4". This reported via perlbug in 5.17.4 but it happens in 5.16.0 and 5.16.1 too. *** glibc detected *** perl: double free or corruption (!prev): 0x08e60240 *** valgrind output: ==2984== Invalid write of size 4 Seems to suggest File::Glob. Has worked with various Perls before 5.16.0. Loads of other people with different Perl versions on perl monks have found it fails too - see http://www.perlmonks.org/?node_id=994686 Perl Info
|
From bohica@ntlworld.comHere is the script in question: use strict; my @md = (1..305); my $path = "/tmp/x"; foreach (@md) { foreach (@mp) { |
bohica@ntlworld.com - Status changed from 'new' to 'open' |
From bohica@ntlworld.comchromatic on perl monks posted the following patch (see link to He said: I reproduced this with bleadperl. This patch fixes the problem and all 001 diff --git a/ext/File-Glob/Glob.xs b/ext/File-Glob/Glob.xs |
From @cpansproutOn Thu Sep 20 11:21:55 2012, bohica wrote:
I’m the guilty part who wrote that code. I don’t think that patch is PUTBACK is necessary to make the current stack pointer visible to -- Father Chrysostomos |
From chromatic@wgz.orgOn Thursday, September 20, 2012 01:08:29 PM Father Chrysostomos via RT wrote:
That patch isn't correct. I tried it again and it's obviously wrong (which is
While running the example code, doglob happens to reallocate the stack. -- c |
From @cpansproutOn Thu Sep 20 13:20:08 2012, chromatic@wgz.org wrote:
iterate() is not extending the stack before copying to it. I have a -- Father Chrysostomos |
From @cpansproutOn Thu Sep 20 14:26:33 2012, sprout wrote:
Now applied as a6636b4. -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
From ambrus@math.bme.huSee also bug #121602 which is a duplicate of this bug I found because the fix isn't applied to maint-5.16 yet. |
Migrated from rt.perl.org#114984 (status was 'resolved')
Searchable as RT114984$
The text was updated successfully, but these errors were encountered: