Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad interaction between XML::Parser and Storable #6633

Closed
p5pRT opened this issue Jul 15, 2003 · 4 comments
Closed

Bad interaction between XML::Parser and Storable #6633

p5pRT opened this issue Jul 15, 2003 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 15, 2003

Migrated from rt.perl.org#23004 (status was 'resolved')

Searchable as RT23004$

@p5pRT
Copy link
Author

p5pRT commented Jul 15, 2003

From kevin@moore-and-moore.com

Below is a demo script which dies under perl 5.8.0, but works fine under
5.6.1. Tested on RedHat 8 & 9 (fails) and RedHat 7.3 (works) on i386
(perl -V output for RedHat 9 at end). The error message is​:

Assertion flags == 0 failed​: file "Storable.xs", line 2336 at
./bugger.pl line 6.

Here is the script​:


#!/usr/bin/perl -w
use test_bug;
use Storable;
my $a = test_bug->new;
$a->load_dat('<bug><test>0</test></bug>');
my $b = Storable​::dclone($a);


Here is what I've got in the "test_bug.pm" file​:


package test_bug;
use XML​::Parser;
return 1;
sub new
{
  my $type = shift;
  my $class = ref($type) || $type;
  my $self = {};
  $self->{test} = undef;
  return bless $self, $class;
}
sub load_dat
{
  my $self = shift;
  my $xml_dat = shift;
  my $tag;
  my $p1 = new XML​::Parser(Style => 'Tree');
  my $parsed_data = $p1->parse($xml_dat);
  shift @​{$parsed_data};
  $parsed_data = shift @​{$parsed_data};
  shift @​{$parsed_data};
  $tag = shift @​{$parsed_data};
# $tag now eq 'test', but setting tag to 'test' eliminates error
  $self->{$tag} = "anything you want";
}
__END__


This is about as small as I can make it without eliminating the error;
simplifying the scripts any more (e.g., incorporating test_bug.pm into
bugger.pl) makes the error go away.

Regards,

Kevin Moore

perl -V output (RedHat 9 box)​:

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration​:
  Platform​:
  osname=linux, osvers=2.4.20-2.48smp,
archname=i386-linux-thread-multi
  uname='linux str'
  config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -g
-Dmyhostname=localhost -Dperladmin=root@​localhost -Dcc=gcc -Dcf_by=Red
Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux
-Dvendorprefix=/usr -Dsiteprefix=/usr
-Dotherlibdirs=/usr/lib/perl5/5.8.0 -Duseshrplib -Dusethreads
-Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db
-Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio
-Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less
-isr'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=define use5005threads=undef'
useithreads=define usemultiplicity=
  useperlio= d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=undef use64bitall=un uselongdouble=
  usemymalloc=, bincompat5005=undef
  Compiler​:
  cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
  optimize='',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
  ccversion='', gccversion='3.2.2 20030213 (Red Hat Linux 8.0
3.2.2-1)', gccosandvers=''
gccversion='3.2.2 200302'
  intsize=e, longsize= , ptrsize=p, doublesize=8, byteorder=1234
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  ivtype='long'
k', ivsize=4'
ivtype='long'
known_ext, nvtype='double'
o_nonbl', nvsize=, Off_t='', lseeksize=8
  alignbytes=4, prototype=define
  Linker and Libraries​:
  ld='gcc'
l', ldflags =' -L/usr/local/lib'
ldf'
  libpth=/usr/local/lib /lib /usr/lib
  libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
  perllibs=
  libc=/lib/libc-2.3.1.so, so=so, useshrplib=true, libperl=libper
  gnulibc_version='2.3.1'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so', d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
  cccdlflags='-fPIC'
ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5', lddlflags='s
Unicode/Normalize
XS/A'

Characteristics of this binary (from libperl)​:
  Compile-time options​: DEBUGGING MULTIPLICITY USE_ITHREADS
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Locally applied patches​:
  MAINT18379
  Built under linux
  Compiled at Feb 18 2003 22​:19​:53
  %ENV​:
  PERL5LIB="/home/kevin/dloads/perl/lib/perl5/site_perl​:"
  @​INC​:
 
/home/kevin/dloads/perl/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
  /home/kevin/dloads/perl/lib/perl5/site_perl/5.8.0
  /home/kevin/dloads/perl/lib/perl5/site_perl
  /usr/lib/perl5/5.8.0/i386-linux-thread-multi
  /usr/lib/perl5/5.8.0
  /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
  /usr/lib/perl5/site_perl/5.8.0
  /usr/lib/perl5/site_perl
  /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
  /usr/lib/perl5/vendor_perl/5.8.0
  /usr/lib/perl5/vendor_perl
  /usr/lib/perl5/5.8.0/i386-linux-thread-multi
  /usr/lib/perl5/5.8.0
  .

@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2003

From @andk

Kevin Moore (via RT) <perlbug-followup@​perl.org> writes​:

Below is a demo script which dies under perl 5.8.0, but works fine under
5.6.1. Tested on RedHat 8 & 9 (fails) and RedHat 7.3 (works) on i386
(perl -V output for RedHat 9 at end). The error message is​:

Assertion flags == 0 failed​: file "Storable.xs", line 2336 at
./bugger.pl line 6.

Confirmed on bleadperl. Blame analysis says, it is so since patch 15893.

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Oct 1, 2003

From guest@guest.guest.xxxxxxxx

This appears to have been solved in Storable-2.08 (and, I believe, perl
5.8.1). The thread "Storable Error" on perl.perl5.porters (Jul 23rd
through Aug 11th) has more info. I think this can be closed.

@p5pRT
Copy link
Author

p5pRT commented Jun 1, 2006

@smpeters - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant