Bug 465908 - Assertion failure on glob assignment
Assertion failure on glob assignment
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: perl (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Marcela Mašláňová
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-06 23:26 EDT by Michael Chapman
Modified: 2008-11-05 23:06 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-11-05 23:06:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Chapman 2008-10-06 23:26:56 EDT
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 07:27:47 EDT
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-15 22:06:37 EDT
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 06:24:28 EDT
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-05 23:06:14 EST
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.