develooper Front page | perl.perl5.porters | Postings from July 2019

[perl #134258] BBC: commit 2a56a87f causes hang inSyntax-Keyword-Try t/11loop.t

Thread Next
From:
James E Keenan
Date:
July 2, 2019 18:01
Subject:
[perl #134258] BBC: commit 2a56a87f causes hang inSyntax-Keyword-Try t/11loop.t
Message ID:
rt-4.0.24-27792-1562090502-1879.134258-75-0@perl.org
# New Ticket Created by  James E Keenan 
# Please include the string:  [perl #134258]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134258 >


This breakage was mentioned in 
https://rt.perl.org/Ticket/Display.html?id=134252, but it appears that 
the breakage occurred in a different, earlier commit than the one cited 
in that ticket for Data::Alias.

The problem is that this distro's t/11loop.t now hangs indefinitely and 
has to be Ctrl-C-ed.  All other files in the distro's test suite PASS.

I explored a subset of the range denoted by this command:

#####
$ git log --format=fuller --reverse 
dad02c36c1a921140fb776f8e4db80b751a00b53..9d15d64eb1a348ee92a700e57145d4f6f01bf21f
#####

Manually bisecting -- because Porting/bisect.pl doesn't, AFAIK, handle 
hanging tests well -- I identified this commit as the first at which the 
hang occurs:

#####
commit 2a56a87fe357165c2bf7fc0d0f54565fef60bb9a
Author:     David Mitchell <davem@iabyn.com>
AuthorDate: Fri Apr 5 15:38:24 2019 +0100
Commit:     David Mitchell <davem@iabyn.com>
CommitDate: Mon Jun 24 11:40:06 2019 +0100

scalarvoid(): remove anti-recursion deferring

Perl_scalarvoid() used to recursively work its way down an
optree marking ops as being in the appropriate context.

Around 5.22.0 the code was changed to avoid recursion, and
instead to malloc a buffer (if necessary) to maintain a
list of deferred child ops that need visiting. This stopped
perl crashing if the optree (and thus the recursion) was
too deep, but it introduced a potential leak. For example

use warnings FATAL => qw(void); $a = "abc"; length $a ;

The fatal warning causes scalarvoid() to leak the deferred
buffer.

This commit removes the deferred mechanism, and instead
makes use of the newish OP_PARENT mechanism to iterate over
the optree, following each kid, then back up via the parent
pointer to the next sibling etc.
#####

Thank you very much.
Jim Keenan

#####
Summary of my perl5 (revision 5 version 31 subversion 2) configuration:
   Commit id: 2a56a87fe357165c2bf7fc0d0f54565fef60bb9a
   Platform:
     osname=freebsd
     osvers=11.2-stable
     archname=amd64-freebsd-thread-multi
     uname='freebsd perlmonger.nycbug.org 11.2-stable freebsd 
11.2-stable #0 r339445: sat oct 20 00:08:11 utc 2018 
root@perlmonger.nycbug.org:usrobjusrsrcsysgeneric amd64 '
     config_args='-des -Dusedevel -Uversiononly 
-Dprefix=/home/jkeenan/testing/2a56a87fe357165c2bf7fc0d0f54565fef60bb9a 
-Dman1dir=none -Dman3dir=none -Duseithreads -Doptimize=-O2 -pipe 
-fstack-protector -fno-strict-aliasing'
     hint=recommended
     useposix=true
     d_sigaction=define
     useithreads=define
     usemultiplicity=define
     use64bitint=define
     use64bitall=define
     uselongdouble=undef
     usemymalloc=n
     default_inc_excludes_dot=define
     bincompat5005=undef
   Compiler:
     cc='cc'
     ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H 
-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include 
-D_FORTIFY_SOURCE=2'
     optimize='-O2 -pipe -fstack-protector -fno-strict-aliasing'
     cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H 
-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
     ccversion=''
     gccversion='4.2.1 Compatible FreeBSD Clang 6.0.1 
(tags/RELEASE_601/final 335540)'
     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='cc'
     ldflags ='-pthread -Wl,-E  -fstack-protector-strong -L/usr/local/lib'
     libpth=/usr/lib /usr/local/lib /usr/lib/clang/6.0.1/lib /usr/lib
     libs=-lpthread -lgdbm -ldl -lm -lcrypt -lutil
     perllibs=-lpthread -ldl -lm -lcrypt -lutil
     libc=
     so=so
     useshrplib=false
     libperl=libperl.a
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_dlopen.xs
     dlext=so
     d_dlsymun=undef
     ccdlflags=' '
     cccdlflags='-DPIC -fPIC'
     lddlflags='-shared  -L/usr/local/lib -fstack-protector-strong'


Characteristics of this binary (from libperl):
   Compile-time options:
     HAS_TIMES
     MULTIPLICITY
     PERLIO_LAYERS
     PERL_COPY_ON_WRITE
     PERL_DONT_CREATE_GVSV
     PERL_IMPLICIT_CONTEXT
     PERL_MALLOC_WRAP
     PERL_OP_PARENT
     PERL_PRESERVE_IVUV
     PERL_USE_DEVEL
     USE_64_BIT_ALL
     USE_64_BIT_INT
     USE_ITHREADS
     USE_LARGE_FILES
     USE_LOCALE
     USE_LOCALE_COLLATE
     USE_LOCALE_CTYPE
     USE_LOCALE_NUMERIC
     USE_LOCALE_TIME
     USE_PERLIO
     USE_PERL_ATOF
     USE_REENTRANT_API
   Built under freebsd
   Compiled at Jul  2 2019 17:37:41
   %ENV:
     PERL2DIR="/home/jkeenan/gitwork/perl2"
     PERL_WORKDIR="/home/jkeenan/gitwork/perl"
   @INC:
     lib
 
/home/jkeenan/testing/2a56a87fe357165c2bf7fc0d0f54565fef60bb9a/lib/perl5/site_perl/5.31.2/amd64-freebsd-thread-multi
 
/home/jkeenan/testing/2a56a87fe357165c2bf7fc0d0f54565fef60bb9a/lib/perl5/site_perl/5.31.2
 
/home/jkeenan/testing/2a56a87fe357165c2bf7fc0d0f54565fef60bb9a/lib/perl5/5.31.2/amd64-freebsd-thread-multi
 
/home/jkeenan/testing/2a56a87fe357165c2bf7fc0d0f54565fef60bb9a/lib/perl5/5.31.2
#####


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