Skip Menu |
 

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 28365
Status: resolved
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: xmltwig [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.18
  • 1.19
Fixed in: (no value)



Subject: Segfault when a variable is destroyed after using weaken a large number of times (between 23K and 24K)
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1184770260-9449-8"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 1190
Download (untitled) / with headers
text/plain 1.1k
As per the descriptive title. I create a tree with a single root and thousands of children. The link from the root to the first child is strong, as is the link from each node to its next sibling. The link from each node to the root is weakened. The program crashes when the root goes out of scope. See the attached code which tries to find the esact number. Change the $NB_ELT_INIT and the $STEP values to find it. Note that the limit can vary (23790 and 23810 in my limited tests). I had the same problem with XML::Twig, which also builds a tree, at about the same number of nodes. Twig uses weaken several times for each node though, so that might be an element. Note that it is not the total number of weaken that counts, just the number in the block in which the variables are in scope. This behaviour happens in Scalar::Util 1.18 and 1.19 perl -v: This is perl, v5.8.8 built for i486-linux-gnu-thread-multi Note that I have had reports of bugs in XML::Twig that look suspiciously like they could come from this problem, on various machines (just today: Solaris in c.l.p.m, perl 5.8.5 and 5.8.8, and perl v5.8.7 built for i386-freebsd-64int by mail). I hope that helps __ mirod
Subject: gen_internal_big_doc
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1184770259-9449-7"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="gen_internal_big_doc"
Content-Disposition: inline; filename="gen_internal_big_doc"
Content-Transfer-Encoding: base64
Content-Length: 751
Download gen_internal_big_doc
application/octet-stream 751b

Message body not shown because it is not plain text.

MIME-Version: 1.0 (Apple Message framework v752.2)
X-Spam-Status: No, hits=-0.4 required=8.0 tests=BAYES_05,DKIM_POLICY_SIGNSOME,DK_POLICY_SIGNSOME,SPF_NEUTRAL
In-Reply-To: <rt-3.6.HEAD-9449-1184770266-224.28365-4-0 [...] rt.cpan.org>
X-Mailer: Apple Mail (2.752.2)
Received-SPF: neutral (x1.develooper.com: 67.19.103.170 is neither permitted nor denied by domain of gbarr [...] pobox.com)
References: <RT-Ticket-28365 [...] rt.cpan.org> <rt-3.6.HEAD-9449-1184770266-224.28365-4-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"; delsp="yes"; format="flowed"
X-RT-Original-Encoding: US-ASCII
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 73A2F4D8047 for <bug-Scalar-List-Utils [...] rt.cpan.org>; Wed, 18 Jul 2007 20:09:17 -0400 (EDT)
Received: (qmail 18005 invoked by alias); 19 Jul 2007 00:09:17 -0000
Received: from aa.67.1343.static.theplanet.com (HELO mail.goingon.net) (67.19.103.170) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 18 Jul 2007 17:09:14 -0700
Received: from [10.50.21.2] (client-63.249.42.207.dfw.buz.net [63.249.42.207]) by mail.goingon.net (Postfix) with ESMTP id 166084895D for <bug-Scalar-List-Utils [...] rt.cpan.org>; Wed, 18 Jul 2007 19:09:09 -0500 (CDT)
Delivered-To: cpan-bug+scalar-list-utils [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #28365] Segfault when a variable is destroyed after using weaken a large number of times (between 23K and 24K)
Return-Path: <gbarr [...] pobox.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Scalar-List-Utils [...] rt.cpan.org
Date: Wed, 18 Jul 2007 19:09:07 -0500
Message-Id: <8C6A6131-32A5-4676-A1AA-DE0428E39C4A [...] pobox.com>
To: bug-Scalar-List-Utils [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Graham Barr <gbarr [...] pobox.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-31083-1184803776-1728.28365-0-0 [...] rt.cpan.org>
Content-Length: 280
Download (untitled) / with headers
text/plain 280b
On Jul 18, 2007, at 9:51 AM, via RT wrote: Show quoted text
> As per the descriptive title.
Scalar::Util::weaken is just giving access to a C function inside perl. If there is a bug with weak references then it should be reported using the perlbug script to report a core perl bug. Graham.
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VERIFIED,DK_POLICY_SIGNSOME,DK_SIGNED,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-31083-1184803776-1728.28365-6-0 [...] rt.cpan.org>
Content-Disposition: inline
Received-SPF: pass (x1.develooper.com: domain of xmltwig [...] gmail.com designates 64.233.162.227 as permitted sender)
References: <RT-Ticket-28365 [...] rt.cpan.org> <rt-3.6.HEAD-9449-1184770266-224.28365-4-0 [...] rt.cpan.org> <8C6A6131-32A5-4676-A1AA-DE0428E39C4A [...] pobox.com> <rt-3.6.HEAD-31083-1184803776-1728.28365-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id F3DE04D82E0 for <bug-Scalar-List-Utils [...] rt.cpan.org>; Wed, 18 Jul 2007 21:41:22 -0400 (EDT)
Received: (qmail 32681 invoked by alias); 19 Jul 2007 01:41:22 -0000
Received: from nz-out-0506.google.com (HELO nz-out-0506.google.com) (64.233.162.227) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 18 Jul 2007 18:41:19 -0700
Received: by nz-out-0506.google.com with SMTP id x7so308595nzc for <bug-Scalar-List-Utils [...] rt.cpan.org>; Wed, 18 Jul 2007 18:41:15 -0700 (PDT)
Received: by 10.115.107.1 with SMTP id j1mr2087325wam.1184809275020; Wed, 18 Jul 2007 18:41:15 -0700 (PDT)
Received: by 10.114.53.14 with HTTP; Wed, 18 Jul 2007 18:41:14 -0700 (PDT)
Delivered-To: cpan-bug+scalar-list-utils [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #28365] Segfault when a variable is destroyed after using weaken a large number of times (between 23K and 24K)
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=su5meifWfrUS1Cbb+5FwTKcICIZ6+8NUNMFk+0cRNmYhruMX66Gkbj9ZeFQFKpF6fLqAzC32SJqT4Do0XfBknlncDXGZw3WtYwQz/2FVEV+1y64GKtcmTm1JdLU7NwtU1eDZ1g2mfIlvODC21xHoVTkNGIYFPvrtq0ti/19/ZLM=
Return-Path: <xmltwig [...] gmail.com>
Dkim-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=grIB+C2lXav8MBBSBEolOSERlvX9xwdxugRcRLCj0q6uaa3ksHji8Zh+2FPbCPcc+UWlQjjERlItcSgZVRP51NZV3e4mvp1wTVSaobCmkCgZInGoSOmlc8mcCaQ51yVUWkWxeWkveJOpb/LxVTI7CrYxMuH4ATGq3mpQYQvy46U=
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Scalar-List-Utils [...] rt.cpan.org
Date: Thu, 19 Jul 2007 03:41:14 +0200
Message-Id: <c3cb2b690707181841h2a814b80y13f50a1d25f4ba5b [...] mail.gmail.com>
To: bug-Scalar-List-Utils [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: "Michel Rodriguez" <xmltwig [...] gmail.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-31124-1184809290-872.28365-0-0 [...] rt.cpan.org>
Content-Length: 474
Download (untitled) / with headers
text/plain 474b
On 7/19/07, Graham Barr via RT <bug-Scalar-List-Utils@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=28365 > > > On Jul 18, 2007, at 9:51 AM, via RT wrote:
> > As per the descriptive title.
> > Scalar::Util::weaken is just giving access to a C function inside > perl. If there is a bug with weak references then it should be > reported using the perlbug script to report a core perl bug.
Thanks Graham, I have just sent the bug report. -- mirod
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-7330-1242308174-1175.28365-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 18
closing old ticket


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.