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

[FATAL 5.005_03 & 5.005_60] Segfault in Perl_pad_free #406

Closed
p5pRT opened this issue Aug 20, 1999 · 2 comments
Closed

[FATAL 5.005_03 & 5.005_60] Segfault in Perl_pad_free #406

p5pRT opened this issue Aug 20, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 20, 1999

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

Searchable as RT1241$

@p5pRT
Copy link
Author

p5pRT commented Aug 20, 1999

From @schwern

$ perl -cw Schema.pm
Global symbol "%COLUMNS" requires explicit package name at Schema.pm line 203.
syntax error at Schema.pm line 233, near "no strict ="
Segmentation fault

Simliar error with 5.005_60...

$ /usr/local/perl5.005_60/bin/perl -cw Schema.pm
Global symbol "%COLUMNS" requires explicit package name at Schema.pm line 203.
syntax error at Schema.pm line 233, near "no strict ="
defined(%hash) is deprecated at Schema.pm line 235.
(Maybe you should just omit the defined()?)
Segmentation fault

No core file was generated. Fortunately, I happen to have 5.005_60
compiled with debugging flags​:

Program received signal SIGSEGV, Segmentation fault.
0x807fc88 in Perl_pad_free (po=6) at op.c​:496
496 SvPADTMP_off(PL_curpad[po]);
(gdb) bt
#0 0x807fc88 in Perl_pad_free (po=6) at op.c​:496
#1 0x8080068 in S_op_clear (o=0x823e848) at op.c​:723
#2 0x807fe70 in Perl_op_free (o=0x823e848) at op.c​:650
#3 0x807fe15 in Perl_op_free (o=0x823e6c8) at op.c​:638
#4 0x807fe15 in Perl_op_free (o=0x823de88) at op.c​:638
#5 0x807fe15 in Perl_op_free (o=0x8240488) at op.c​:638
#6 0x807fe15 in Perl_op_free (o=0x823fbc8) at op.c​:638
#7 0x807fe15 in Perl_op_free (o=0x823fa48) at op.c​:638
#8 0x807fe15 in Perl_op_free (o=0x823fb48) at op.c​:638
#9 0x807fe15 in Perl_op_free (o=0x8243ec8) at op.c​:638
#10 0x807fe15 in Perl_op_free (o=0x8243f08) at op.c​:638
#11 0x807fe15 in Perl_op_free (o=0x8243988) at op.c​:638
#12 0x8088abf in Perl_newSUB (floor=84, o=0x823e0c8, proto=0x0,
  block=0x8243988) at op.c​:4010
#13 0x807cb8d in Perl_yyparse () at perly.y​:293
#14 0x805bcbb in S_parse_body (args=0xbffffb74) at perl.c​:951
#15 0x80d517e in Perl_vdefault_protect (excpt=0xbffffb84,
  body=0x805b330 <S_parse_body>, args=0xbffffb54) at scope.c​:44
#16 0x80d50b0 in Perl_default_protect (excpt=0xbffffb84,
  body=0x805b330 <S_parse_body>) at scope.c​:25
#17 0x805b23f in perl_parse (my_perl=0x8128408, xsinit=0x8059758 <xs_init>,
  argc=3, argv=0xbffffc34, env=0x0) at perl.c​:630
#18 0x80596f9 in main (argc=3, argv=0xbffffc34, env=0xbffffc44)
  at perlmain.c​:51

Some other useful information​:
(gdb) print **PL_curpad
$15 = {sv_any = 0x0, sv_refcnt = 2147483170, sv_flags = 8388608}
That ref count is a wee high, no?

I'm sorry, I can't provide a copy of the module which caused the
problem, its kinda confidential. I'll try to break it down into a
simple case, but somehow I doubt I can do that.

Summary of my perl5 (revision 5.0 version 5 subversion 60) configuration​:
  Platform​:
  osname=linux, osvers=2.2.10, archname=i686-linux
  uname='linux athens 2.2.10 #3 smp mon aug 2 16​:48​:09 edt 1999 i686 unknown '
  config_args=''
  hint=previous, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  use64bits=undef usemultiplicity=undef
  Compiler​:
  cc='gcc', optimize='-g', gccversion=2.95.1 19990809 (prerelease)
  cppflags='-Dbool=char -DHAS_BOOL -DDEBUGGING -DDEBUGGING_MSTATS -DDEBUGGING_OPS'
  ccflags ='-Dbool=char -DHAS_BOOL -DDEBUGGING -DDEBUGGING_MSTATS -DDEBUGGING_OPS'
  stdchar='char', d_stdstdio=define, usevfork=false
  intsize=4, longsize=4, ptrsize=4, doublesize=8
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib
  libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lrt -lc -lposix -lcrypt
  libc=/lib/libc-2.1.2.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
  cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl)​:
  Compile-time options​: DEBUGGING
  Built under linux
  Compiled at Aug 17 1999 18​:05​:39
  %ENV​:
  PERL5LIB="/home/schwern/lib/perl5/site_perl/5.005"
  @​INC​:
  /home/schwern/lib/perl5/site_perl/5.005/i686-linux
  /home/schwern/lib/perl5/site_perl/5.005
  /usr/local/perl5.005_60/lib/i686-linux
  /usr/local/perl5.005_60/lib
  /usr/local/perl5.005_60/lib/site_perl/5.00560/i686-linux
  /usr/local/perl5.005_60/lib/site_perl
  .

--

Michael G Schwern schwern@​pobox.com
  http​://www.pobox.com/~schwern
  /(?​:(?​:(1)[.-]?)?\(?(\d{3})\)?[.-]?)?(\d{3})[.-]?(\d{4})(x\d+)?/i

@p5pRT
Copy link
Author

p5pRT commented Aug 20, 1999

From @schwern

On Fri, Aug 20, 1999 at 12​:54​:00PM -0400, Spider Boardman wrote​:

I don't know what gdb means by '$15'. What would be the result of

\(gdb\) print PL\_curpad\[6\]\[0\]

The high sv_refcnt you saw is normal for things marked readonly
at compile time, since it helps to keep the constants around.

(gdb) print PL_curpad[6][0]
Cannot access memory at address 0x55555555.

Okay, I can see this is going to be a painful debugging process, so
I'm just going to give you guys a copy of the code causing the error.
However, I'm about to leave for TPC in like, 5 minutes. I'll send the
code along later, sorry to be a tease!

--

Michael G Schwern schwern@​pobox.com
  http​://www.pobox.com/~schwern
  /(?​:(?​:(1)[.-]?)?\(?(\d{3})\)?[.-]?)?(\d{3})[.-]?(\d{4})(x\d+)?/i

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

No branches or pull requests

1 participant