ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] perl bug [gellyfish@gellyfish.com: Re: [ID 20020104.007] coredump on dbmclose]
@ 2002-01-05 11:17 Mikhail Zabaluev
  0 siblings, 0 replies; only message in thread
From: Mikhail Zabaluev @ 2002-01-05 11:17 UTC (permalink / raw)
  To: devel; +Cc: cray


[-- Attachment #1.1: Type: text/plain, Size: 31 bytes --]

Вот и ответ на perlbug report.

[-- Attachment #1.2: Type: message/rfc822, Size: 2589 bytes --]

From: Jonathan Stowe <gellyfish@gellyfish.com>
To: Mikhail Zabaluev <av1046@comtv.ru>
Cc: <perl5-porters@perl.org>
Subject: Re: [ID 20020104.007] coredump on dbmclose
Date: Sat, 5 Jan 2002 10:03:34 +0000 (GMT)
Message-ID: <Pine.LNX.4.33.0201050958370.5428-100000@orpheus.gellyfish.com>

On Sat, 5 Jan 2002, Mikhail Zabaluev wrote:

> perl crashes on the following program:
>
>
> #!/usr/bin/perl
>
> package Authen;
>
> sub new {
>         my $proto = shift;
>         my $class = ref($proto) || $proto;
>         my $self  = {};
>         bless($self,$class);
>         my %LT;
>         dbmopen(%LT, "test_dbmopen", 0666) || die "Can't open test_dbm.db
> +because of
> $!\n";
>         $self->{'LT'} = \%LT;
>         return $self;
> }
>
> sub DESTROY {
>        	my $self = shift;
>        	dbmclose(%{$self->{'LT'}});
>        	return 1;
> }
>
> package main;
>
> $test = Authen->new();
>

You can stop the core by changing the assignment of the *reference* to the
tied hash to :

   %{$self->{'LT'}} = %LT;

I am just peering at Perl_pp_untie to discover why it coredumps when it
should warn that you are untying an untied thing :)

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-05 11:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-05 11:17 [devel] perl bug [gellyfish@gellyfish.com: Re: [ID 20020104.007] coredump on dbmclose] Mikhail Zabaluev

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git