Bug 465908 - Assertion failure on glob assignment
Summary: Assertion failure on glob assignment
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-07 03:26 UTC by Michael Chapman
Modified: 2008-11-06 04:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-06 04:06:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Chapman 2008-10-07 03:26:56 UTC
Description of problem:

The following Perl script generates an assertion failure:

$ perl -e 'BEGIN { $::{A} = \1 }; index "", A; *B = $::{A}'
Assertion ((((shplep)->sv_flags & (0x00004000|0x00008000)) == 0x00008000) && (((svtype)((shplep)->sv_flags & 0xff)) == SVt_PVGV || ((svtype)((shplep)->sv_flags & 0xff)) == SVt_PVLV)) failed: file "sv.c", line 3212 at -e line 1.

Removing the index statement clears the error:

$ perl -e 'BEGIN { $::{A} = \1 }; *B = $::{A}'
# no error

Version-Release number of selected component (if applicable):

$ rpm -q perl
perl-5.10.0-34.fc9.i386


Additional info:

The BEGIN block is effectively equivalent to:

  use constant A => 1;

This also generates the same error.

index does not need to be executed, it merely has to be used on A somewhere in the script. For instance:

  index "", A if 0;

produces the same error. The problem appears to be related to Perl's upgrading of the constant to attach Boyer-Moore magic:

$ perl -mDevel::Peek=Dump -e 'BEGIN { $::{A} = \1 } Dump $::{A}'  # good
SV = RV(0x9638200) at 0x96381f4
  REFCNT = 1
  FLAGS = (ROK)
  RV = 0x9638234
  SV = IV(0x9638230) at 0x9638234
    REFCNT = 1
    FLAGS = (IOK,READONLY,pIOK)
    IV = 1
$ perl -mDevel::Peek=Dump -e 'BEGIN { $::{A} = \1 } index "", A if 0; Dump $::{A}'  # bad
SV = RV(0x80a1208) at 0x80a11fc
  REFCNT = 1
  FLAGS = (ROK)
  RV = 0x80a123c
  SV = PVGV(0x8099720) at 0x80a123c
    REFCNT = 2
    FLAGS = (PADTMP,SMG,POK,READONLY,pPOK,VALID,EVALED)
    IV = 100
    PV = 0x80a56ac "1"\0
    CUR = 1
    LEN = 4
    MAGIC = 0x80a9fb4
      MG_VIRTUAL = &PL_vtbl_bm
      MG_TYPE = PERL_MAGIC_bm(B)
    FLAGS = 0
    RARE = 49
    PREVIOUS = 0
    USEFUL = 100

Comment 1 Fedora Update System 2008-10-13 11:27:47 UTC
perl-5.10.0-35.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/perl-5.10.0-35.fc9

Comment 2 Fedora Update System 2008-10-16 02:06:37 UTC
perl-5.10.0-37.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update perl'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8826

Comment 3 Fedora Update System 2008-10-31 10:24:28 UTC
perl-5.10.0-38.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update perl'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8826

Comment 4 Fedora Update System 2008-11-06 04:06:14 UTC
perl-5.10.0-38.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.