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

Perl_gv_fullname4(SV *, const GV *, const char *, _Bool): Assertion `((((_gvstash)->sv_flags & (0x00004000|0x00008000)) == 0x00008000) && (((svtype)((_gvstash)->sv_flags & 0xff)) == SVt_PVGV || ((svty #15605

Closed
p5pRT opened this issue Sep 16, 2016 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 16, 2016

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

Searchable as RT129285$

@p5pRT
Copy link
Author

p5pRT commented Sep 16, 2016

From @geeknik

Triggered in v5.25.5 (v5.25.4-130-g7aa7bbc) w/ AFL + ASAN.

./perl -e 'sub z{}z$^D=B'
{
1 TYPE = leave ===> NULL
  TARG = 1
  FLAGS = (VOID,KIDS,PARENS,SLABBED)
  PRIVATE = (REFC)
  REFCNT = 1
  {
2 TYPE = enter ===> 3
  FLAGS = (UNKNOWN,SLABBED,MORESIB)
  }
  {
3 TYPE = nextstate ===> 4
  FLAGS = (VOID,SLABBED,MORESIB)
  LINE = 1
  PACKAGE = "main"
  SEQ = 4294967248
  }
  {
5 TYPE = entersub ===> 1
  FLAGS = (VOID,KIDS,STACKED,SLABBED)
  {
6 TYPE = null ===> (5)
  (was list)
  FLAGS = (UNKNOWN,KIDS,SLABBED)
  {
4 TYPE = pushmark ===> 7
  FLAGS = (SCALAR,SLABBED,MORESIB)
  }
  {
8 TYPE = sassign ===> 9
  FLAGS = (SCALAR,KIDS,MOD,STACKED,SLABBED,MORESIB)
  PRIVATE = (0x2)
  {
7 TYPE = const ===> 10
  FLAGS = (SCALAR,SLABBED,MORESIB)
  PRIVATE = (BARE)
  SV = PV("B"\0)
  }
  {
11 TYPE = null ===> (8)
  (was rv2sv)
  FLAGS = (SCALAR,KIDS,REF,MOD,SPECIAL,SLABBED)
  PRIVATE = (0x1)
  {
10 TYPE = gvsv ===> 8
  FLAGS = (SCALAR,SLABBED)
  GV = main​::\x04
  }
  }
  }
  {
12 TYPE = null ===> (6)
  (was rv2cv)
  FLAGS = (SCALAR,KIDS,SLABBED)
  PRIVATE = (0xa1)
  {
9 TYPE = gv ===> 5
  FLAGS = (SCALAR,SLABBED)
perl​: gv.c​:2397​: void Perl_gv_fullname4(SV *, const GV *, const char *, _Bool)​: Assertion `((((_gvstash)->sv_flags & (0x00004000|0x00008000)) == 0x00008000) && (((svtype)((_gvstash)->sv_flags & 0xff)) == SVt_PVGV || ((svtype)((_gvstash)->sv_flags & 0xff)) == SVt_PVLV))' failed.
Aborted

@p5pRT
Copy link
Author

p5pRT commented Jan 22, 2017

From zefram@fysh.org

Brian Carpenter wrote​:

Triggered in v5.25.5 (v5.25.4-130-g7aa7bbc) w/ AFL + ASAN.
./perl -e 'sub z{}z$^D=B'

I can't reproduce the assertion failure. perl -V?

-zefram

@p5pRT
Copy link
Author

p5pRT commented Jan 22, 2017

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jan 22, 2017

From @geeknik

./perl -e 'sub z{}z$^D=B'

1 leave LISTOP(0x619000009e58) ===> [0x0]
  TARG = 1
  FLAGS = (VOID,KIDS,PARENS,SLABBED)
  PRIVATE = (REFC)
  REFCNT = 1
  |
2 +--enter OP(0x619000009e20) ===> 3 [nextstate 0x619000009ea0]
  | FLAGS = (UNKNOWN,SLABBED,MORESIB)
  |
3 +--nextstate COP(0x619000009ea0) ===> 4 [pushmark 0x61500000fd88]
  | FLAGS = (VOID,SLABBED,MORESIB)
  | LINE = 1
  | PACKAGE = "main"
  | SEQ = 4294967248
  |
5 +--entersub UNOP(0x619000009f00) ===> 1 [leave 0x619000009e58]
  FLAGS = (VOID,KIDS,STACKED,SLABBED)
  |
6 +--null (ex-list) UNOP(0x619000009f40) ===> 5 [entersub 0x619000009f00]
  FLAGS = (UNKNOWN,KIDS,SLABBED)
  |
4 +--pushmark OP(0x61500000fd88) ===> 7 [const 0x61500000fdc8]
  | FLAGS = (SCALAR,SLABBED,MORESIB)
  |
8 +--sassign BINOP(0x61500000fd30) ===> 9 [gv 0x61500000fe88]
  | FLAGS = (SCALAR,KIDS,MOD,STACKED,SLABBED,MORESIB)
  | PRIVATE = (0x2)
  | |
7 | +--const SVOP(0x61500000fdc8) ===> 10 [gvsv 0x61500000fec8]
  | | FLAGS = (SCALAR,SLABBED,MORESIB)
  | | PRIVATE = (BARE)
  | | SV = PV("B"\0)
  | |
11 | +--null (ex-rv2sv) UNOP(0x61500000fe08) ===> 8 [sassign 0x61500000fd30]
  | FLAGS = (SCALAR,KIDS,REF,MOD,SPECIAL,SLABBED)
  | PRIVATE = (0x1)
  | |
10 | +--gvsv SVOP(0x61500000fec8) ===> 8 [sassign 0x61500000fd30]
  | FLAGS = (SCALAR,SLABBED)
  | GV = main​::\x04
  |
12 +--null (ex-rv2cv) UNOP(0x61500000fe48) ===> 6 [null 0x619000009f40]
  FLAGS = (SCALAR,KIDS,SLABBED)
  PRIVATE = (0xa1)
  |
9 +--gv SVOP(0x61500000fe88) ===> 5 [entersub 0x619000009f00]
  FLAGS = (SCALAR,SLABBED)
perl​: gv.c​:2449​: void Perl_gv_fullname4(SV *, const GV *, const char *, _Bool)​: Assertion `((((_gvstash)->sv_flags & (0x00004000|0x00008000)) == 0x00008000) && (((svtype)((_gvstash)->sv_flags & 0xff)) == SVt_PVGV || ((svtype)((_gvstash)->sv_flags & 0xff)) == SVt_PVLV))' failed.
Aborted

./perl -Ilib -V
Summary of my perl5 (revision 5 version 25 subversion 10) configuration​:
  Commit id​: 8ff713d
  Platform​:
  osname=linux
  osvers=3.16.0-4-amd64
  archname=x86_64-linux
  uname='linux debian-nyc-02 3.16.0-4-amd64 #1 smp debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 gnulinux '
  config_args='-des -Dusedevel -DDEBUGGING -Dcc=afl-clang-fast -Doptimize=-O2 -g'
  hint=previous
  useposix=true
  d_sigaction=define
  useithreads=undef
  usemultiplicity=undef
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  bincompat5005=undef
  Compiler​:
  cc='afl-clang-fast'
  ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
  optimize='-O2 -g'
  cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='4.2.1 Compatible Debian Clang 3.5.0 (tags/RELEASE_350/final)'
  gccosandvers=''
  intsize=4
  longsize=8
  ptrsize=8
  doublesize=8
  byteorder=12345678
  doublekind=3
  d_longlong=define
  longlongsize=8
  d_longdbl=define
  longdblsize=16
  longdblkind=3
  ivtype='long'
  ivsize=8
  nvtype='double'
  nvsize=8
  Off_t='off_t'
  lseeksize=8
  alignbytes=8
  prototype=define
  Linker and Libraries​:
  ld='afl-clang-fast'
  ldflags =' -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/local/lib /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/local/lib /usr/include/x86_64-linux-gnu /usr/lib /usr/local/lib /usr/include/x86_64-linux-gnu /usr/lib /usr/local/lib /usr/include/x86_64-linux-gnu /usr/lib
  libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.19.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.19'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags='-Wl,-E'
  cccdlflags='-fPIC'
  lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong'

Characteristics of this binary (from libperl)​:
  Compile-time options​:
  DEBUGGING
  HAS_TIMES
  PERLIO_LAYERS
  PERL_COPY_ON_WRITE
  PERL_DONT_CREATE_GVSV
  PERL_MALLOC_WRAP
  PERL_OP_PARENT
  PERL_PRESERVE_IVUV
  PERL_USE_DEVEL
  USE_64_BIT_ALL
  USE_64_BIT_INT
  USE_LARGE_FILES
  USE_LOCALE
  USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC
  USE_LOCALE_TIME
  USE_PERLIO
  USE_PERL_ATOF
  Built under linux
  Compiled at Jan 22 2017 17​:05​:21
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.25.7/x86_64-linux
  /usr/local/lib/perl5/site_perl/5.25.7
  /usr/local/lib/perl5/5.25.7/x86_64-linux
  /usr/local/lib/perl5/5.25.7
  .

@p5pRT
Copy link
Author

p5pRT commented Jan 23, 2017

From @iabyn

On Sun, Jan 22, 2017 at 02​:09​:54PM -0800, Brian Carpenter via RT wrote​:

./perl -e 'sub z{}z$^D=B'
[snip]

9 +--gv SVOP(0x61500000fe88) ===> 5 [entersub 0x619000009f00]
FLAGS = (SCALAR,SLABBED)
perl​: gv.c​:2449​: void Perl_gv_fullname4(SV *, const GV *, const char *, _Bool)​: Assertion `((((_gvstash)->sv_flags & (0x00004000|0x00008000)) == 0x00008000) && (((svtype)((_gvstash)->sv_flags & 0xff)) == SVt_PVGV || ((svtype)((_gvstash)->sv_flags & 0xff)) == SVt_PVLV))' failed.
Aborted

Requires an unthreaded perl to reproduce. Fixed by the following

commit e18c411
Author​: David Mitchell <davem@​iabyn.com>
AuthorDate​: Mon Jan 23 16​:12​:38 2017 +0000
Commit​: David Mitchell <davem@​iabyn.com>
CommitDate​: Mon Jan 23 16​:49​:46 2017 +0000

  dump.c​: handle GV being really a ref to a CV
 
  RT #129285
 
  These days a 'GV' can actually just be a ref to a CV when the only thing
  that would be stored in the glob is a CV. Update S_do_op_dump_bar() to
  handle this. Formerly it would trigger an assert on a non-threaded build.
 
  In fact, incorporate the fixed logic into a static function,
  S_gv_display(), that is shared by both S_do_op_dump_bar() and
  Perl_debop(); so both
 
  perl -Dx
 
  and
 
  perl -Dt
 
  get the benefit.
 
  Also for the -Dx case, make it display the raw address of the GV too.

--
"Emacs isn't a bad OS once you get used to it.
It just lacks a decent editor."

@p5pRT
Copy link
Author

p5pRT commented Jan 24, 2017

@iabyn - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release today of Perl 5.26.0, this and 210 other issues have been
resolved.

Perl 5.26.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.26.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

@khwilliamson - Status changed from 'pending release' 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