[26309] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 8486 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 4 21:05:21 2005

Date: Tue, 4 Oct 2005 18:05:03 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 4 Oct 2005     Volume: 10 Number: 8486

Today's topics:
    Re: threads, XSUB allocated memory, destructors, destru <sisyphus1@nomail.afraid.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 5 Oct 2005 08:35:23 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: threads, XSUB allocated memory, destructors, destruction
Message-Id: <434303e6$0$21046$afc38c87@news.optusnet.com.au>


<xhoster@gmail.com> wrote in message
>
> Could it be that Win32 is also trying to destroy everything twice, and it
> is the destroying of the very first object, but on the second pass, which
> produces the error? (doing so before the message on that one can be
> printed)
>

Perhaps something along those lines is occurring. I've now found that
whenever the script runs without error, the number of times that DESTROY()
gets called is exactly double the number of times it ought to get called. So
the doubling up is definitely happening.

It's just that whenever it segfaults, the printout on the screen indicates
that it's happening on the last object of the array. ie - if there's only
one array involved (simplest scenario), containing x pointer objects, the
segfault apparently occurs the xth time that DESTROY() is called. If it
doesn't segfault at that point, then DESTROY() will be successfully called
2x times.

> I tried moving the DESTROY from XSUB to Perl, and have the Perl DESTROY
> call _destroy.  But now DESTROY is getting called twice again, and we are
> back to seg-faulting.
>

Heh - I'd tried that, too. Didn't help *me*, either :-)

Cheers,
Rob




------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 8486
***************************************


home help back first fref pref prev next nref lref last post