develooper Front page | perl.perl5.porters | Postings from November 2016

Re: [perl #130010] v5.25.5-184-ga5540cf breaks texinfo

Thread Previous | Thread Next
From:
demerphq
Date:
November 9, 2016 17:27
Subject:
Re: [perl #130010] v5.25.5-184-ga5540cf breaks texinfo
Message ID:
CANgJU+VEr_sKXCBBfwanQ5mFW6=DVBoQYcnoktS+tV8r0g6kAw@mail.gmail.com
On 9 November 2016 at 17:22, Hugo van der Sanden via RT
<perlbug-followup@perl.org> wrote:
> I built and installed blead@392582f8 with './Configure -des -Dcc=gcc -Dprefix=/opt/blead-d0 -Doptimize='-g -O0' -DDEBUGGING -Dusedevel -Uversiononly'.
>
> On attempting the texinfo build, the first point it gives the error can be simplified to this command:
> % ( cd doc && TEXINFO_DEV_SOURCE=1 top_srcdir=".." top_builddir=".." ${PERL} ../tp/texi2any -I . -o texinfo.info texinfo.texi )
> Modification of a read-only value attempted at ../tp/Texinfo/Convert/ParagraphNonXS.pm line 327.
> panic: POPSTACK
> %
>
> After a quick grep for the error message (found in perl.h) and then for PL_no_modify, I rebuilt and installed the perl with this patch:
> --- a/util.c
> +++ b/util.c
> @@ -1877,6 +1877,7 @@ paths reduces CPU cache pressure.
>  void
>  Perl_croak_no_modify(void)
>  {
> +    assert(0);
>      Perl_croak_nocontext( "%s", PL_no_modify);
>  }
>
> On reinvoking the above command, I get a core dump with the backtrace below. I'll try to cut down the repro case, but the backtrace might allow others to make some progress in the meantime.
>
> Hugo
>
> (gdb) where
> #0  0x00007f60916d2cc9 in __GI_raise (sig=sig@entry=6)
>     at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> #1  0x00007f60916d60d8 in __GI_abort () at abort.c:89
> #2  0x00007f60916cbb86 in __assert_fail_base (
>     fmt=0x7f609181c830 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
>     assertion=assertion@entry=0x7de9ce "0", file=file@entry=0x7dcd77 "util.c",
>     line=line@entry=1880,
>     function=function@entry=0x7e25b0 <__PRETTY_FUNCTION__.15620> "Perl_croak_no_modify") at assert.c:92
> #3  0x00007f60916cbc32 in __GI___assert_fail (assertion=0x7de9ce "0",
>     file=0x7dcd77 "util.c", line=1880,
>     function=0x7e25b0 <__PRETTY_FUNCTION__.15620> "Perl_croak_no_modify")
>     at assert.c:101
> #4  0x000000000056162e in Perl_croak_no_modify () at util.c:1880
> #5  0x00000000005ed6f1 in Perl_sv_force_normal_flags (sv=0x712f998, flags=4)
>     at sv.c:5248
> #6  0x00000000005ec24f in Perl_sv_usepvn_flags (sv=0x712f998,
>     ptr=0x7134ac0 "", len=328, flags=256) at sv.c:5087
> #7  0x000000000050afb6 in S_invlist_replace_list_destroys_src (dest=0x712f998,
>     src=0x712f9b0) at regcomp.c:8492
> #8  0x000000000050d26e in Perl__invlist_union_maybe_complement_2nd (
>     a=0x384be30, b=0x712f998, complement_b=false, output=0x7fff2ed01748)
>     at regcomp.c:9243
> #9  0x00000000006fa6d9 in Perl__core_swash_init (pkg=0x7d024a "utf8",
>     name=0x7c5966 "", listsv=0x384bdb8, minbits=1, none=0, invlist=0x384be30,
>     flags_p=0x7fff2ed01990 "\005") at utf8.c:3401
> #10 0x000000000053b7df in Perl__get_regclass_nonbitmap_data (prog=0x38460b0,
>     node=0x3854e5c, doinit=true, listsvp=0x0,
>     only_utf8_locale_ptr=0x7fff2ed01ad0, output_invlist=0x0) at regcomp.c:18080
> #11 0x00000000006f0464 in S_reginclass (prog=0x38460b0, n=0x3854e5c,
>     p=0x2cf63a0 "This is ", p_end=0x2cf63a1 "his is ", utf8_target=false)
>     at regexec.c:9338
> #12 0x00000000006e33e6 in S_regmatch (reginfo=0x7fff2ed024a0,
>     startpos=0x2cf63a0 "This is ", prog=0x3854dc0) at regexec.c:6342
> #13 0x00000000006d8d83 in S_regtry (reginfo=0x7fff2ed024a0,
>     startposp=0x7fff2ed02308) at regexec.c:3641
> #14 0x00000000006d87fb in Perl_regexec_flags (rx=0x384bc80,
>     stringarg=0x2cf63a0 "This is ", strend=0x2cf63a8 "",
>     strbeg=0x2cf63a0 "This is ", minend=1, sv=0x384bbc0, data=0x0, flags=0)
>     at regexec.c:3498
> #15 0x000000000064c198 in Perl_pp_split () at pp.c:6022
> #16 0x000000000055acf1 in Perl_runops_debug () at dump.c:2249
> #17 0x0000000000462aa2 in S_run_body (oldscope=1) at perl.c:2526
> #18 0x0000000000462093 in perl_run (my_perl=0x26cf010) at perl.c:2449
> #19 0x000000000041ef95 in main (argc=7, argv=0x7fff2ed029e8,
>     env=0x7fff2ed02a28) at perlmain.c:123

Thanks. I did the same, and added an sv_dump to the caller of
Perl_croak_no_modify()

For some reason we are trying to process an INVLIST object, which
IIUIR should never be perl visible.

Karl, is this enough for you to dig in?

BTW, you dont need an installed perl to replicate this, I was able to
replicate with the following:

TEXINFO_DEV_SOURCE=1 top_srcdir=".." top_builddir=".." gdb --args
/git_tree/perl/perl -I/git_tree/perl/lib ../tp/texi2any -I . -o
texinfo.info texinfo.texi

Yves

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
SV = INVLIST(0x919d00) at 0x592c4d0
  REFCNT = 1
  FLAGS = (POK,READONLY,PROTECT,pPOK)
  PV = 0x5931a60
    [0] 0x1100 .. 0x115F
    [2] 0x2329 .. 0x232A
    [4] 0x2E80 .. 0x2FFB
    [6] 0x3000 .. 0x303E
    [8] 0x3041 .. 0x4DB5
    [10] 0x4E00 .. 0x9FBB
    [12] 0xA000 .. 0xA4C6
    [14] 0xAC00 .. 0xD7A3
    [16] 0xF900 .. 0xFAD9
    [18] 0xFE10 .. 0xFE19
    [20] 0xFE30 .. 0xFE6B
    [22] 0xFF01 .. 0xFF60
    [24] 0xFFE0 .. 0xFFE6
    [26] 0x20000 .. 0x2FFFD
    [28] 0x30000 .. 0x3FFFD
  CUR = 248
  LEN = 258
perl: util.c:1880: Perl_croak_no_modify: Assertion `0' failed.


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About