Re: after upgrade: glibc detected *** /usr/bin/perl: double free or corruption
Graham Barr <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.ldap,gmane.comp.lang.perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
On Oct 3, 2008, at 10:05 AM, Peter Daum wrote:
>> Anyway, I suspect the issue is todo with calling s/// on the
>> element of a tied hash.
>> See if this reproduces the issue.
>> {
>> package Foo;
>> use Tie::Hash;
>> use base qw(Tie::StdHash);
>> sub new {
>> my $proto = shift;
>> my $inner = bless {};
>> my %outer;
>> tie %outer, __PACKAGE__, $inner;
>> bless \%outer;
>> }
>> }
>> $self = Foo->new;
>> ($self->{prog_name} = $0) =~ s|^.*/([^/]+)$|$1|;
>
> That's it: Same thing - the program is aborted with a stack trace!
> (Btw: this is happening with glibc-2.7 on Debian "lenny")
>
> So: what's the big difference between just assigning a value and
> calling s/// ?
> Is there anything else that shouldn't be done on a tied hash?
No it should work. Now that you can reproduce it, and using only
modules that come with Perl, I would suggest you report the issue
using perlbug. perlbug will attach info about the perl build you are
using.
Graham.