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

indirect.pm fails assertions with threaded perl #16893

Closed
p5pRT opened this issue Mar 16, 2019 · 10 comments
Closed

indirect.pm fails assertions with threaded perl #16893

p5pRT opened this issue Mar 16, 2019 · 10 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 16, 2019

Migrated from rt.perl.org#133938 (status was 'open')

Searchable as RT133938$

@p5pRT
Copy link
Author

p5pRT commented Mar 16, 2019

From @shlomif

indirect.pm-asserts-fail.md

:Author​: Shlomi Fish
:Email​: shlomif@​cpan.org
:Date​: 2019-03-16 16​:33

Hi all!

After building perl using​:

```
#!/bin/sh
rm -f config.sh Policy.sh
sh Configure -de -Dprefix="$HOME"/apps/perl/bleadperl-debug
-Doptimize='-g3' \
  -DDEBUGGING \
  -Dman1dir=none -Dman3dir=none \
  -Duseithreads -Dusedevel
```

on bleadperl​:

```
[shlomif@​telaviv1 perl]$ git show | head -5
commit 4fa9266
Author​: Karl Williamson <khw@​cpan.org>
Date​: Fri Mar 15 11​:11​:11 2019 -0600

  inline.h​: Improve comment
[shlomif@​telaviv1 perl]$
```

running all tests successfully and installing. Then I get​:

```
[shlomif@​telaviv1 perl]$ -t perl/core
[shlomif@​telaviv1 perl]$
/home/shlomif/apps/perl/bleadperl-debug/bin/cpan5.29.9 -i indirect
Loading internal logger. Log​::Log4perl recommended for better logging
Reading '/home/shlomif/.cpan/Metadata'
  Database was generated on Sat, 16 Mar 2019 12​:17​:02 GMT
Running install for module 'indirect'
CPAN​: Digest​::SHA loaded ok (v6.02)
CPAN​: Compress​::Zlib loaded ok (v2.084)
Checksum for
/home/shlomif/.cpan/sources/authors/id/V/VP/VPIT/indirect-0.38.tar.
gz ok
CPAN​: Archive​::Tar loaded ok (v2.32)
indirect-0.38/
indirect-0.38/Changes
indirect-0.38/indirect.xs
indirect-0.38/lib/
indirect-0.38/Makefile.PL
indirect-0.38/MANIFEST
indirect-0.38/META.json
indirect-0.38/META.yml
indirect-0.38/README
indirect-0.38/samples/
indirect-0.38/t/
indirect-0.38/xsh/
indirect-0.38/xsh/caps.h
indirect-0.38/xsh/debug.h
indirect-0.38/xsh/hints.h
indirect-0.38/xsh/mem.h
indirect-0.38/xsh/ops.h
indirect-0.38/xsh/ptable.h
indirect-0.38/xsh/threads.h
indirect-0.38/xsh/util.h
indirect-0.38/t/00-load.t
indirect-0.38/t/09-load-threads.t
indirect-0.38/t/10-args.t
indirect-0.38/t/11-line.t
indirect-0.38/t/12-env.t
indirect-0.38/t/20-good.t
indirect-0.38/t/21-bad.t
indirect-0.38/t/22-bad-mixed.t
indirect-0.38/t/23-bad-notaint.t
indirect-0.38/t/30-scope.t
indirect-0.38/t/31-hints.t
indirect-0.38/t/32-global.t
indirect-0.38/t/33-compilation-errors.t
indirect-0.38/t/40-threads.t
indirect-0.38/t/41-threads-teardown.t
indirect-0.38/t/42-threads-global.t
indirect-0.38/t/45-memory.t
indirect-0.38/t/46-stress.t
indirect-0.38/t/47-stress-use.t
indirect-0.38/t/50-external.t
indirect-0.38/t/51-dd-newlines.t
indirect-0.38/t/lib/
indirect-0.38/t/testcases/
indirect-0.38/t/testcases/babycart_in_heredoc.pl
indirect-0.38/t/testcases/rt115392.pl
indirect-0.38/t/lib/indirect/
indirect-0.38/t/lib/Test/
indirect-0.38/t/lib/VPIT/
indirect-0.38/t/lib/VPIT/TestHelpers.pm
indirect-0.38/t/lib/Test/Leaner.pm
indirect-0.38/t/lib/indirect/Test0/
indirect-0.38/t/lib/indirect/Test1/
indirect-0.38/t/lib/indirect/Test2.pm
indirect-0.38/t/lib/indirect/Test3.pm
indirect-0.38/t/lib/indirect/Test4.pm
indirect-0.38/t/lib/indirect/Test5.pm
indirect-0.38/t/lib/indirect/TestCompilationError.pm
indirect-0.38/t/lib/indirect/TestRequired1.pm
indirect-0.38/t/lib/indirect/TestRequired2.pm
indirect-0.38/t/lib/indirect/TestRequired3X.pm
indirect-0.38/t/lib/indirect/TestRequired3Y.pm
indirect-0.38/t/lib/indirect/TestRequired4/
indirect-0.38/t/lib/indirect/TestRequired5/
indirect-0.38/t/lib/indirect/TestRequired6.pm
indirect-0.38/t/lib/indirect/TestRequiredGlobal.pm
indirect-0.38/t/lib/indirect/TestRequired5/a0.pm
indirect-0.38/t/lib/indirect/TestRequired5/b0.pm
indirect-0.38/t/lib/indirect/TestRequired5/c0.pm
indirect-0.38/t/lib/indirect/TestRequired5/d0.pm
indirect-0.38/t/lib/indirect/TestRequired4/a0.pm
indirect-0.38/t/lib/indirect/TestRequired4/b0.pm
indirect-0.38/t/lib/indirect/TestRequired4/c0.pm
indirect-0.38/t/lib/indirect/Test1/il1.pm
indirect-0.38/t/lib/indirect/Test1/il2.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/
indirect-0.38/t/lib/indirect/Test0/Oooooo/
indirect-0.38/t/lib/indirect/Test0/Oooooo/Pppppppp.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/Vvvvvvv.pm
indirect-0.38/samples/indirect.pl
indirect-0.38/lib/indirect.pm
'YAML' not installed, will not store persistent state
CPAN​: CPAN​::Meta​::Requirements loaded ok (v2.140)
CPAN​: Parse​::CPAN​::Meta loaded ok (v2.150010)
CPAN​: CPAN​::Meta loaded ok (v2.150010)
CPAN​: Module​::CoreList loaded ok (v5.20190320)
Configuring V/VP/VPIT/indirect-0.38.tar.gz with Makefile.PL
Checking if this is gcc 3.4 on Windows trying to link against an import
library.
.. no
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for indirect
Writing MYMETA.yml and MYMETA.json
  VPIT/indirect-0.38.tar.gz
  /home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9 Makefile.PL -- OK
Running make for V/VP/VPIT/indirect-0.38.tar.gz
cp lib/indirect.pm blib/lib/indirect.pm
Running Mkbootstrap for indirect ()
chmod 644 "indirect.bs"
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs blib/arch/auto/indirect/indirect.bs 644
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
"/home/shlomif/apps/per
l/bleadperl-debug/lib/5.29.9/ExtUtils/xsubpp" -typemap
'/home/shlomif/apps/perl
/bleadperl-debug/lib/5.29.9/ExtUtils/typemap' indirect.xs > indirect.xsc
mv indirect.xsc indirect.c
cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-aliasing
-pip
e -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFS
ET_BITS=64 -g3 -DVERSION=\"0.38\" -DXS_VERSION=\"0.38\" -fPIC
"-I/home/shlomif
/apps/perl/bleadperl-debug/lib/5.29.9/x86_64-linux-thread-multi/CORE"
indirect
.c
rm -f blib/arch/auto/indirect/indirect.so
cc -shared -g3 -L/usr/local/lib -fstack-protector-strong indirect.o -o
blib/a
rch/auto/indirect/indirect.so \
  \

chmod 755 blib/arch/auto/indirect/indirect.so
  VPIT/indirect-0.38.tar.gz
  /usr/bin/make -- OK
Running make test for VPIT/indirect-0.38.tar.gz
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs blib/arch/auto/indirect/indirect.bs 644
PERL_DL_NONLAZY=1 "/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
"-MEx
tUtils​::Command​::MM" "-MTest​::Harness" "-e" "undef
*Test​::Harness​::Switches; tes
t_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t ................ 1/1 # Testing indirect 0.38, Perl 5.029009,
/home/s
hlomif/apps/perl/bleadperl-debug/bin/perl5.29.9
t/00-load.t ................ ok
t/09-load-threads.t ........ # Using threads 2.22
# Using threads​::shared 1.6
t/09-load-threads.t ........ ok
t/10-args.t ................ ok
t/11-line.t ................ ok
t/12-env.t ................. ok
t/20-good.t ................ ok
t/21-bad.t ................. ok
t/22-bad-mixed.t ........... ok
t/23-bad-notaint.t ......... ok
t/30-scope.t ............... ok
t/31-hints.t ............... ok
t/32-global.t .............. ok
t/33-compilation-errors.t .. # Using IO​::Handle 1.40
# Using IO​::Select 1.40
# Using IPC​::Open3 1.20
t/33-compilation-errors.t .. ok
t/40-threads.t ............. # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/40-threads.t ............. No subtests run
t/41-threads-teardown.t .... # Using threads 2.22
# Using threads​::shared 1.6
t/41-threads-teardown.t .... ok
t/42-threads-global.t ...... # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/42-threads-global.t ...... No subtests run
t/45-memory.t .............. ok
t/46-stress.t .............. ok
t/47-stress-use.t .......... ok
t/50-external.t ............ ok
t/51-dd-newlines.t ......... skipped​: Could not load Devel​::Declare 0.006007

Test Summary Report


t/40-threads.t (Wstat​: 134 Tests​: 0 Failed​: 0)
  Non-zero wait status​: 134
  Parse errors​: No plan found in TAP output
t/42-threads-global.t (Wstat​: 134 Tests​: 0 Failed​: 0)
  Non-zero wait status​: 134
  Parse errors​: No plan found in TAP output
Files=21, Tests=4517, 15 wallclock secs ( 2.41 usr 0.12 sys + 12.29 cusr
0.85
csys = 15.67 CPU)
Result​: FAIL
Failed 2/21 test programs. 0/4517 subtests failed.
make​: *** [Makefile​:1071​: test_dynamic] Error 255
  VPIT/indirect-0.38.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try​:
  reports VPIT/indirect-0.38.tar.gz
[shlomif@​telaviv1 perl]$
```

I am on mageia v7 x86-64 ( https://en.wikipedia.org/wiki/Mageia ).

```


Flags​:
  category=core
  severity=low


Site configuration information for perl 5.29.9​:

Configured by shlomif at Sat Mar 16 15​:07​:03 IST 2019.

Summary of my perl5 (revision 5 version 29 subversion 9) configuration​:
  Commit id​: 4fa9266
  Platform​:
  osname=linux
  osvers=5.0.2-desktop-1.mga7
  archname=x86_64-linux-thread-multi
  uname='linux telaviv1.shlomifish.org 5.0.2-desktop-1.mga7 #1 smp wed
mar 13 23​:39​:29 utc 2019 x86_64 x86_64 x86_64 gnulinux '
  config_args='-de -Dprefix=/home/shlomif/apps/perl/bleadperl-debug
-Doptimize=-g3 -DDEBUGGING -Dman1dir=none -Dman3dir=none -Duseithreads
-Dusedevel'
  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 ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
  optimize='-g3'
  cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='8.3.1 20190315'
  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 =' -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib
/lib64 /usr/lib64 /usr/local/lib64
  libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
-lgdbm_compat
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.29.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.29'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags='-Wl,-E'
  cccdlflags='-fPIC'
  lddlflags='-shared -g3 -L/usr/local/lib -fstack-protector-strong'


@​INC for perl 5.29.9​:

/home/shlomif/apps/perl/bleadperl-debug/lib/site_perl/5.29.9/x86_64-linux-thread-multi
  /home/shlomif/apps/perl/bleadperl-debug/lib/site_perl/5.29.9

/home/shlomif/apps/perl/bleadperl-debug/lib/5.29.9/x86_64-linux-thread-multi
  /home/shlomif/apps/perl/bleadperl-debug/lib/5.29.9


Environment for perl 5.29.9​:
  HOME=/home/shlomif
  LANG=en_GB.UTF-8
  LANGUAGE=en_GB​:en
  LC_ADDRESS=en_US.UTF-8
  LC_COLLATE=en_US.UTF-8
  LC_CTYPE=en_US.UTF-8
  LC_IDENTIFICATION=en_GB.UTF-8
  LC_MEASUREMENT=en_GB.UTF-8
  LC_MESSAGES=en_US.UTF-8
  LC_MONETARY=en_US.UTF-8
  LC_NAME=en_GB.UTF-8
  LC_NUMERIC=en_GB.UTF-8
  LC_PAPER=en_US.UTF-8
  LC_SOURCED=1
  LC_TELEPHONE=en_US.UTF-8
  LC_TIME=en_GB.UTF-8
  LD_LIBRARY_PATH=​:/home/shlomif/apps/to-del-ncurses/lib
  LOGDIR (unset)

PATH=/home/shlomif/Download/unpack/perl/p5/emcc-build/perl-emcc-build​:/home/shlomif/bin​:/usr/local/bin​:/usr/bin​:/usr/local/games​:/usr/games​:/usr/lib64/qt4/bin​:/usr/lib64/qt5/bin​:/bin
  PERLBREW_ROOT=/home/shlomif/apps/perl/brew
  PERL_BADLANG (unset)
  PERL_MM_USE_DEFAULT=1
  SHELL=/bin/zsh

```

--
Shlomi Fish http​://www.shlomifish.org/

Buddha has the Chuck Norris nature.

Please reply to list if it's a mailing list post - http​://shlom.in/reply .

@p5pRT
Copy link
Author

p5pRT commented Mar 17, 2019

From @jkeenan

On Sat, 16 Mar 2019 14​:51​:14 GMT, shlomif@​gmail.com wrote​:

indirect.pm-asserts-fail.md

:Author​: Shlomi Fish
:Email​: shlomif@​cpan.org
:Date​: 2019-03-16 16​:33

Hi all!

After building perl using​:

```
#!/bin/sh
rm -f config.sh Policy.sh
sh Configure -de -Dprefix="$HOME"/apps/perl/bleadperl-debug
-Doptimize='-g3' \
-DDEBUGGING \
-Dman1dir=none -Dman3dir=none \
-Duseithreads -Dusedevel
```

on bleadperl​:

```
[shlomif@​telaviv1 perl]$ git show | head -5
commit 4fa9266
Author​: Karl Williamson <khw@​cpan.org>
Date​: Fri Mar 15 11​:11​:11 2019 -0600

inline.h​: Improve comment
[shlomif@​telaviv1 perl]$
```

running all tests successfully and installing. Then I get​:

```
[shlomif@​telaviv1 perl]$ -t perl/core
[shlomif@​telaviv1 perl]$
/home/shlomif/apps/perl/bleadperl-debug/bin/cpan5.29.9 -i indirect
Loading internal logger. Log​::Log4perl recommended for better logging
Reading '/home/shlomif/.cpan/Metadata'
Database was generated on Sat, 16 Mar 2019 12​:17​:02 GMT
Running install for module 'indirect'
CPAN​: Digest​::SHA loaded ok (v6.02)
CPAN​: Compress​::Zlib loaded ok (v2.084)
Checksum for
/home/shlomif/.cpan/sources/authors/id/V/VP/VPIT/indirect-0.38.tar.
gz ok
CPAN​: Archive​::Tar loaded ok (v2.32)
indirect-0.38/
indirect-0.38/Changes
indirect-0.38/indirect.xs
indirect-0.38/lib/
indirect-0.38/Makefile.PL
indirect-0.38/MANIFEST
indirect-0.38/META.json
indirect-0.38/META.yml
indirect-0.38/README
indirect-0.38/samples/
indirect-0.38/t/
indirect-0.38/xsh/
indirect-0.38/xsh/caps.h
indirect-0.38/xsh/debug.h
indirect-0.38/xsh/hints.h
indirect-0.38/xsh/mem.h
indirect-0.38/xsh/ops.h
indirect-0.38/xsh/ptable.h
indirect-0.38/xsh/threads.h
indirect-0.38/xsh/util.h
indirect-0.38/t/00-load.t
indirect-0.38/t/09-load-threads.t
indirect-0.38/t/10-args.t
indirect-0.38/t/11-line.t
indirect-0.38/t/12-env.t
indirect-0.38/t/20-good.t
indirect-0.38/t/21-bad.t
indirect-0.38/t/22-bad-mixed.t
indirect-0.38/t/23-bad-notaint.t
indirect-0.38/t/30-scope.t
indirect-0.38/t/31-hints.t
indirect-0.38/t/32-global.t
indirect-0.38/t/33-compilation-errors.t
indirect-0.38/t/40-threads.t
indirect-0.38/t/41-threads-teardown.t
indirect-0.38/t/42-threads-global.t
indirect-0.38/t/45-memory.t
indirect-0.38/t/46-stress.t
indirect-0.38/t/47-stress-use.t
indirect-0.38/t/50-external.t
indirect-0.38/t/51-dd-newlines.t
indirect-0.38/t/lib/
indirect-0.38/t/testcases/
indirect-0.38/t/testcases/babycart_in_heredoc.pl
indirect-0.38/t/testcases/rt115392.pl
indirect-0.38/t/lib/indirect/
indirect-0.38/t/lib/Test/
indirect-0.38/t/lib/VPIT/
indirect-0.38/t/lib/VPIT/TestHelpers.pm
indirect-0.38/t/lib/Test/Leaner.pm
indirect-0.38/t/lib/indirect/Test0/
indirect-0.38/t/lib/indirect/Test1/
indirect-0.38/t/lib/indirect/Test2.pm
indirect-0.38/t/lib/indirect/Test3.pm
indirect-0.38/t/lib/indirect/Test4.pm
indirect-0.38/t/lib/indirect/Test5.pm
indirect-0.38/t/lib/indirect/TestCompilationError.pm
indirect-0.38/t/lib/indirect/TestRequired1.pm
indirect-0.38/t/lib/indirect/TestRequired2.pm
indirect-0.38/t/lib/indirect/TestRequired3X.pm
indirect-0.38/t/lib/indirect/TestRequired3Y.pm
indirect-0.38/t/lib/indirect/TestRequired4/
indirect-0.38/t/lib/indirect/TestRequired5/
indirect-0.38/t/lib/indirect/TestRequired6.pm
indirect-0.38/t/lib/indirect/TestRequiredGlobal.pm
indirect-0.38/t/lib/indirect/TestRequired5/a0.pm
indirect-0.38/t/lib/indirect/TestRequired5/b0.pm
indirect-0.38/t/lib/indirect/TestRequired5/c0.pm
indirect-0.38/t/lib/indirect/TestRequired5/d0.pm
indirect-0.38/t/lib/indirect/TestRequired4/a0.pm
indirect-0.38/t/lib/indirect/TestRequired4/b0.pm
indirect-0.38/t/lib/indirect/TestRequired4/c0.pm
indirect-0.38/t/lib/indirect/Test1/il1.pm
indirect-0.38/t/lib/indirect/Test1/il2.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/
indirect-0.38/t/lib/indirect/Test0/Oooooo/
indirect-0.38/t/lib/indirect/Test0/Oooooo/Pppppppp.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/Vvvvvvv.pm
indirect-0.38/samples/indirect.pl
indirect-0.38/lib/indirect.pm
'YAML' not installed, will not store persistent state
CPAN​: CPAN​::Meta​::Requirements loaded ok (v2.140)
CPAN​: Parse​::CPAN​::Meta loaded ok (v2.150010)
CPAN​: CPAN​::Meta loaded ok (v2.150010)
CPAN​: Module​::CoreList loaded ok (v5.20190320)
Configuring V/VP/VPIT/indirect-0.38.tar.gz with Makefile.PL
Checking if this is gcc 3.4 on Windows trying to link against an
import
library.
.. no
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for indirect
Writing MYMETA.yml and MYMETA.json
VPIT/indirect-0.38.tar.gz
/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9 Makefile.PL
-- OK
Running make for V/VP/VPIT/indirect-0.38.tar.gz
cp lib/indirect.pm blib/lib/indirect.pm
Running Mkbootstrap for indirect ()
chmod 644 "indirect.bs"
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs blib/arch/auto/indirect/indirect.bs
644
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
"/home/shlomif/apps/per
l/bleadperl-debug/lib/5.29.9/ExtUtils/xsubpp" -typemap
'/home/shlomif/apps/perl
/bleadperl-debug/lib/5.29.9/ExtUtils/typemap' indirect.xs >
indirect.xsc
mv indirect.xsc indirect.c
cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-
aliasing
-pip
e -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFS
ET_BITS=64 -g3 -DVERSION=\"0.38\" -DXS_VERSION=\"0.38\" -fPIC
"-I/home/shlomif
/apps/perl/bleadperl-debug/lib/5.29.9/x86_64-linux-thread-multi/CORE"
indirect
.c
rm -f blib/arch/auto/indirect/indirect.so
cc -shared -g3 -L/usr/local/lib -fstack-protector-strong indirect.o
-o
blib/a
rch/auto/indirect/indirect.so \
\

chmod 755 blib/arch/auto/indirect/indirect.so
VPIT/indirect-0.38.tar.gz
/usr/bin/make -- OK
Running make test for VPIT/indirect-0.38.tar.gz
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs blib/arch/auto/indirect/indirect.bs
644
PERL_DL_NONLAZY=1 "/home/shlomif/apps/perl/bleadperl-
debug/bin/perl5.29.9"
"-MEx
tUtils​::Command​::MM" "-MTest​::Harness" "-e" "undef
*Test​::Harness​::Switches; tes
t_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t ................ 1/1 # Testing indirect 0.38, Perl
5.029009,
/home/s
hlomif/apps/perl/bleadperl-debug/bin/perl5.29.9
t/00-load.t ................ ok
t/09-load-threads.t ........ # Using threads 2.22
# Using threads​::shared 1.6
t/09-load-threads.t ........ ok
t/10-args.t ................ ok
t/11-line.t ................ ok
t/12-env.t ................. ok
t/20-good.t ................ ok
t/21-bad.t ................. ok
t/22-bad-mixed.t ........... ok
t/23-bad-notaint.t ......... ok
t/30-scope.t ............... ok
t/31-hints.t ............... ok
t/32-global.t .............. ok
t/33-compilation-errors.t .. # Using IO​::Handle 1.40
# Using IO​::Select 1.40
# Using IPC​::Open3 1.20
t/33-compilation-errors.t .. ok
t/40-threads.t ............. # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/40-threads.t ............. No subtests run
t/41-threads-teardown.t .... # Using threads 2.22
# Using threads​::shared 1.6
t/41-threads-teardown.t .... ok
t/42-threads-global.t ...... # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/42-threads-global.t ...... No subtests run
t/45-memory.t .............. ok
t/46-stress.t .............. ok
t/47-stress-use.t .......... ok
t/50-external.t ............ ok
t/51-dd-newlines.t ......... skipped​: Could not load Devel​::Declare
0.006007

Test Summary Report
-------------------
t/40-threads.t (Wstat​: 134 Tests​: 0 Failed​: 0)
Non-zero wait status​: 134
Parse errors​: No plan found in TAP output
t/42-threads-global.t (Wstat​: 134 Tests​: 0 Failed​: 0)
Non-zero wait status​: 134
Parse errors​: No plan found in TAP output
Files=21, Tests=4517, 15 wallclock secs ( 2.41 usr 0.12 sys + 12.29
cusr
0.85
csys = 15.67 CPU)
Result​: FAIL
Failed 2/21 test programs. 0/4517 subtests failed.
make​: *** [Makefile​:1071​: test_dynamic] Error 255
VPIT/indirect-0.38.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module,
try​:
reports VPIT/indirect-0.38.tar.gz
[shlomif@​telaviv1 perl]$
```

I am on mageia v7 x86-64 ( https://en.wikipedia.org/wiki/Mageia ).

```

My research so far indicates that it is the combination of -Duseithreads AND -DDEBUGGING that causes the failures in two tests in indirect's test suite. I.e., I do *not* get the failures when I build with threads or with debugging individually.

This also appears to be the case with these two failures reported by Andreas​:

http​://www.cpantesters.org/cpan/report/6df6fa7e-3840-11e9-99ca-ba6e2b878bbe

http​://www.cpantesters.org/cpan/report/f3ffdba6-3852-11e9-a75d-ac272b878bbe

Can you confirm that it is the combination of these two configure options that generates the failures?

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Mar 17, 2019

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

@p5pRT
Copy link
Author

p5pRT commented Mar 17, 2019

From @jkeenan

On Sun, 17 Mar 2019 00​:07​:58 GMT, jkeenan wrote​:

On Sat, 16 Mar 2019 14​:51​:14 GMT, shlomif@​gmail.com wrote​:

indirect.pm-asserts-fail.md

:Author​: Shlomi Fish
:Email​: shlomif@​cpan.org
:Date​: 2019-03-16 16​:33

Hi all!

After building perl using​:

```
#!/bin/sh
rm -f config.sh Policy.sh
sh Configure -de -Dprefix="$HOME"/apps/perl/bleadperl-debug
-Doptimize='-g3' \
-DDEBUGGING \
-Dman1dir=none -Dman3dir=none \
-Duseithreads -Dusedevel
```

on bleadperl​:

```
[shlomif@​telaviv1 perl]$ git show | head -5
commit 4fa9266
Author​: Karl Williamson <khw@​cpan.org>
Date​: Fri Mar 15 11​:11​:11 2019 -0600

inline.h​: Improve comment
[shlomif@​telaviv1 perl]$
```

running all tests successfully and installing. Then I get​:

```
[shlomif@​telaviv1 perl]$ -t perl/core
[shlomif@​telaviv1 perl]$
/home/shlomif/apps/perl/bleadperl-debug/bin/cpan5.29.9 -i indirect
Loading internal logger. Log​::Log4perl recommended for better logging
Reading '/home/shlomif/.cpan/Metadata'
Database was generated on Sat, 16 Mar 2019 12​:17​:02 GMT
Running install for module 'indirect'
CPAN​: Digest​::SHA loaded ok (v6.02)
CPAN​: Compress​::Zlib loaded ok (v2.084)
Checksum for
/home/shlomif/.cpan/sources/authors/id/V/VP/VPIT/indirect-0.38.tar.
gz ok
CPAN​: Archive​::Tar loaded ok (v2.32)
indirect-0.38/
indirect-0.38/Changes
indirect-0.38/indirect.xs
indirect-0.38/lib/
indirect-0.38/Makefile.PL
indirect-0.38/MANIFEST
indirect-0.38/META.json
indirect-0.38/META.yml
indirect-0.38/README
indirect-0.38/samples/
indirect-0.38/t/
indirect-0.38/xsh/
indirect-0.38/xsh/caps.h
indirect-0.38/xsh/debug.h
indirect-0.38/xsh/hints.h
indirect-0.38/xsh/mem.h
indirect-0.38/xsh/ops.h
indirect-0.38/xsh/ptable.h
indirect-0.38/xsh/threads.h
indirect-0.38/xsh/util.h
indirect-0.38/t/00-load.t
indirect-0.38/t/09-load-threads.t
indirect-0.38/t/10-args.t
indirect-0.38/t/11-line.t
indirect-0.38/t/12-env.t
indirect-0.38/t/20-good.t
indirect-0.38/t/21-bad.t
indirect-0.38/t/22-bad-mixed.t
indirect-0.38/t/23-bad-notaint.t
indirect-0.38/t/30-scope.t
indirect-0.38/t/31-hints.t
indirect-0.38/t/32-global.t
indirect-0.38/t/33-compilation-errors.t
indirect-0.38/t/40-threads.t
indirect-0.38/t/41-threads-teardown.t
indirect-0.38/t/42-threads-global.t
indirect-0.38/t/45-memory.t
indirect-0.38/t/46-stress.t
indirect-0.38/t/47-stress-use.t
indirect-0.38/t/50-external.t
indirect-0.38/t/51-dd-newlines.t
indirect-0.38/t/lib/
indirect-0.38/t/testcases/
indirect-0.38/t/testcases/babycart_in_heredoc.pl
indirect-0.38/t/testcases/rt115392.pl
indirect-0.38/t/lib/indirect/
indirect-0.38/t/lib/Test/
indirect-0.38/t/lib/VPIT/
indirect-0.38/t/lib/VPIT/TestHelpers.pm
indirect-0.38/t/lib/Test/Leaner.pm
indirect-0.38/t/lib/indirect/Test0/
indirect-0.38/t/lib/indirect/Test1/
indirect-0.38/t/lib/indirect/Test2.pm
indirect-0.38/t/lib/indirect/Test3.pm
indirect-0.38/t/lib/indirect/Test4.pm
indirect-0.38/t/lib/indirect/Test5.pm
indirect-0.38/t/lib/indirect/TestCompilationError.pm
indirect-0.38/t/lib/indirect/TestRequired1.pm
indirect-0.38/t/lib/indirect/TestRequired2.pm
indirect-0.38/t/lib/indirect/TestRequired3X.pm
indirect-0.38/t/lib/indirect/TestRequired3Y.pm
indirect-0.38/t/lib/indirect/TestRequired4/
indirect-0.38/t/lib/indirect/TestRequired5/
indirect-0.38/t/lib/indirect/TestRequired6.pm
indirect-0.38/t/lib/indirect/TestRequiredGlobal.pm
indirect-0.38/t/lib/indirect/TestRequired5/a0.pm
indirect-0.38/t/lib/indirect/TestRequired5/b0.pm
indirect-0.38/t/lib/indirect/TestRequired5/c0.pm
indirect-0.38/t/lib/indirect/TestRequired5/d0.pm
indirect-0.38/t/lib/indirect/TestRequired4/a0.pm
indirect-0.38/t/lib/indirect/TestRequired4/b0.pm
indirect-0.38/t/lib/indirect/TestRequired4/c0.pm
indirect-0.38/t/lib/indirect/Test1/il1.pm
indirect-0.38/t/lib/indirect/Test1/il2.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/
indirect-0.38/t/lib/indirect/Test0/Oooooo/
indirect-0.38/t/lib/indirect/Test0/Oooooo/Pppppppp.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/Vvvvvvv.pm
indirect-0.38/samples/indirect.pl
indirect-0.38/lib/indirect.pm
'YAML' not installed, will not store persistent state
CPAN​: CPAN​::Meta​::Requirements loaded ok (v2.140)
CPAN​: Parse​::CPAN​::Meta loaded ok (v2.150010)
CPAN​: CPAN​::Meta loaded ok (v2.150010)
CPAN​: Module​::CoreList loaded ok (v5.20190320)
Configuring V/VP/VPIT/indirect-0.38.tar.gz with Makefile.PL
Checking if this is gcc 3.4 on Windows trying to link against an
import
library.
.. no
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for indirect
Writing MYMETA.yml and MYMETA.json
VPIT/indirect-0.38.tar.gz
/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9 Makefile.PL
-- OK
Running make for V/VP/VPIT/indirect-0.38.tar.gz
cp lib/indirect.pm blib/lib/indirect.pm
Running Mkbootstrap for indirect ()
chmod 644 "indirect.bs"
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs blib/arch/auto/indirect/indirect.bs
644
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
"/home/shlomif/apps/per
l/bleadperl-debug/lib/5.29.9/ExtUtils/xsubpp" -typemap
'/home/shlomif/apps/perl
/bleadperl-debug/lib/5.29.9/ExtUtils/typemap' indirect.xs >
indirect.xsc
mv indirect.xsc indirect.c
cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-
aliasing
-pip
e -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFS
ET_BITS=64 -g3 -DVERSION=\"0.38\" -DXS_VERSION=\"0.38\" -fPIC
"-I/home/shlomif
/apps/perl/bleadperl-debug/lib/5.29.9/x86_64-linux-thread-multi/CORE"
indirect
.c
rm -f blib/arch/auto/indirect/indirect.so
cc -shared -g3 -L/usr/local/lib -fstack-protector-strong indirect.o
-o
blib/a
rch/auto/indirect/indirect.so \
\

chmod 755 blib/arch/auto/indirect/indirect.so
VPIT/indirect-0.38.tar.gz
/usr/bin/make -- OK
Running make test for VPIT/indirect-0.38.tar.gz
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs blib/arch/auto/indirect/indirect.bs
644
PERL_DL_NONLAZY=1 "/home/shlomif/apps/perl/bleadperl-
debug/bin/perl5.29.9"
"-MEx
tUtils​::Command​::MM" "-MTest​::Harness" "-e" "undef
*Test​::Harness​::Switches; tes
t_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t ................ 1/1 # Testing indirect 0.38, Perl
5.029009,
/home/s
hlomif/apps/perl/bleadperl-debug/bin/perl5.29.9
t/00-load.t ................ ok
t/09-load-threads.t ........ # Using threads 2.22
# Using threads​::shared 1.6
t/09-load-threads.t ........ ok
t/10-args.t ................ ok
t/11-line.t ................ ok
t/12-env.t ................. ok
t/20-good.t ................ ok
t/21-bad.t ................. ok
t/22-bad-mixed.t ........... ok
t/23-bad-notaint.t ......... ok
t/30-scope.t ............... ok
t/31-hints.t ............... ok
t/32-global.t .............. ok
t/33-compilation-errors.t .. # Using IO​::Handle 1.40
# Using IO​::Select 1.40
# Using IPC​::Open3 1.20
t/33-compilation-errors.t .. ok
t/40-threads.t ............. # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/40-threads.t ............. No subtests run
t/41-threads-teardown.t .... # Using threads 2.22
# Using threads​::shared 1.6
t/41-threads-teardown.t .... ok
t/42-threads-global.t ...... # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/42-threads-global.t ...... No subtests run
t/45-memory.t .............. ok
t/46-stress.t .............. ok
t/47-stress-use.t .......... ok
t/50-external.t ............ ok
t/51-dd-newlines.t ......... skipped​: Could not load Devel​::Declare
0.006007

Test Summary Report
-------------------
t/40-threads.t (Wstat​: 134 Tests​: 0 Failed​: 0)
Non-zero wait status​: 134
Parse errors​: No plan found in TAP output
t/42-threads-global.t (Wstat​: 134 Tests​: 0 Failed​: 0)
Non-zero wait status​: 134
Parse errors​: No plan found in TAP output
Files=21, Tests=4517, 15 wallclock secs ( 2.41 usr 0.12 sys + 12.29
cusr
0.85
csys = 15.67 CPU)
Result​: FAIL
Failed 2/21 test programs. 0/4517 subtests failed.
make​: *** [Makefile​:1071​: test_dynamic] Error 255
VPIT/indirect-0.38.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module,
try​:
reports VPIT/indirect-0.38.tar.gz
[shlomif@​telaviv1 perl]$
```

I am on mageia v7 x86-64 ( https://en.wikipedia.org/wiki/Mageia ).

```

My research so far indicates that it is the combination of
-Duseithreads AND -DDEBUGGING that causes the failures in two tests in
indirect's test suite. I.e., I do *not* get the failures when I build
with threads or with debugging individually.

This also appears to be the case with these two failures reported by
Andreas​:

http​://www.cpantesters.org/cpan/report/6df6fa7e-3840-11e9-99ca-
ba6e2b878bbe

http​://www.cpantesters.org/cpan/report/f3ffdba6-3852-11e9-a75d-
ac272b878bbe

Can you confirm that it is the combination of these two configure
options that generates the failures?

Thank you very much.

Building with threads and debugging, I have (I think) narrowed this down to breakage between v5.27.3 and v5.27.4. However, 'Porting/bisect.pl' is not DWIMming for me -- at least not when called with this pattern of arguments​:

#####
perl Porting/bisect.pl --start=v5.26.0 --end=v5.28.0 -Duseithreads -DDEBUGGING --module=indirect
#####

The program terminates at the start commit but, even if I know that at the start tag 'indirect' gets installed, the program reports that it exits 256 instead of 0 and the bisection program terminates.

Anyone have suggestions for better bisecting?

Thank you very much.
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Mar 17, 2019

From @jkeenan

On Sun, 17 Mar 2019 02​:00​:00 GMT, jkeenan wrote​:

On Sun, 17 Mar 2019 00​:07​:58 GMT, jkeenan wrote​:

On Sat, 16 Mar 2019 14​:51​:14 GMT, shlomif@​gmail.com wrote​:

indirect.pm-asserts-fail.md

:Author​: Shlomi Fish
:Email​: shlomif@​cpan.org
:Date​: 2019-03-16 16​:33

Hi all!

After building perl using​:

```
#!/bin/sh
rm -f config.sh Policy.sh
sh Configure -de -Dprefix="$HOME"/apps/perl/bleadperl-debug
-Doptimize='-g3' \
-DDEBUGGING \
-Dman1dir=none -Dman3dir=none \
-Duseithreads -Dusedevel
```

on bleadperl​:

```
[shlomif@​telaviv1 perl]$ git show | head -5
commit 4fa9266
Author​: Karl Williamson <khw@​cpan.org>
Date​: Fri Mar 15 11​:11​:11 2019 -0600

inline.h​: Improve comment
[shlomif@​telaviv1 perl]$
```

running all tests successfully and installing. Then I get​:

```
[shlomif@​telaviv1 perl]$ -t perl/core
[shlomif@​telaviv1 perl]$
/home/shlomif/apps/perl/bleadperl-debug/bin/cpan5.29.9 -i indirect
Loading internal logger. Log​::Log4perl recommended for better
logging
Reading '/home/shlomif/.cpan/Metadata'
Database was generated on Sat, 16 Mar 2019 12​:17​:02 GMT
Running install for module 'indirect'
CPAN​: Digest​::SHA loaded ok (v6.02)
CPAN​: Compress​::Zlib loaded ok (v2.084)
Checksum for
/home/shlomif/.cpan/sources/authors/id/V/VP/VPIT/indirect-0.38.tar.
gz ok
CPAN​: Archive​::Tar loaded ok (v2.32)
indirect-0.38/
indirect-0.38/Changes
indirect-0.38/indirect.xs
indirect-0.38/lib/
indirect-0.38/Makefile.PL
indirect-0.38/MANIFEST
indirect-0.38/META.json
indirect-0.38/META.yml
indirect-0.38/README
indirect-0.38/samples/
indirect-0.38/t/
indirect-0.38/xsh/
indirect-0.38/xsh/caps.h
indirect-0.38/xsh/debug.h
indirect-0.38/xsh/hints.h
indirect-0.38/xsh/mem.h
indirect-0.38/xsh/ops.h
indirect-0.38/xsh/ptable.h
indirect-0.38/xsh/threads.h
indirect-0.38/xsh/util.h
indirect-0.38/t/00-load.t
indirect-0.38/t/09-load-threads.t
indirect-0.38/t/10-args.t
indirect-0.38/t/11-line.t
indirect-0.38/t/12-env.t
indirect-0.38/t/20-good.t
indirect-0.38/t/21-bad.t
indirect-0.38/t/22-bad-mixed.t
indirect-0.38/t/23-bad-notaint.t
indirect-0.38/t/30-scope.t
indirect-0.38/t/31-hints.t
indirect-0.38/t/32-global.t
indirect-0.38/t/33-compilation-errors.t
indirect-0.38/t/40-threads.t
indirect-0.38/t/41-threads-teardown.t
indirect-0.38/t/42-threads-global.t
indirect-0.38/t/45-memory.t
indirect-0.38/t/46-stress.t
indirect-0.38/t/47-stress-use.t
indirect-0.38/t/50-external.t
indirect-0.38/t/51-dd-newlines.t
indirect-0.38/t/lib/
indirect-0.38/t/testcases/
indirect-0.38/t/testcases/babycart_in_heredoc.pl
indirect-0.38/t/testcases/rt115392.pl
indirect-0.38/t/lib/indirect/
indirect-0.38/t/lib/Test/
indirect-0.38/t/lib/VPIT/
indirect-0.38/t/lib/VPIT/TestHelpers.pm
indirect-0.38/t/lib/Test/Leaner.pm
indirect-0.38/t/lib/indirect/Test0/
indirect-0.38/t/lib/indirect/Test1/
indirect-0.38/t/lib/indirect/Test2.pm
indirect-0.38/t/lib/indirect/Test3.pm
indirect-0.38/t/lib/indirect/Test4.pm
indirect-0.38/t/lib/indirect/Test5.pm
indirect-0.38/t/lib/indirect/TestCompilationError.pm
indirect-0.38/t/lib/indirect/TestRequired1.pm
indirect-0.38/t/lib/indirect/TestRequired2.pm
indirect-0.38/t/lib/indirect/TestRequired3X.pm
indirect-0.38/t/lib/indirect/TestRequired3Y.pm
indirect-0.38/t/lib/indirect/TestRequired4/
indirect-0.38/t/lib/indirect/TestRequired5/
indirect-0.38/t/lib/indirect/TestRequired6.pm
indirect-0.38/t/lib/indirect/TestRequiredGlobal.pm
indirect-0.38/t/lib/indirect/TestRequired5/a0.pm
indirect-0.38/t/lib/indirect/TestRequired5/b0.pm
indirect-0.38/t/lib/indirect/TestRequired5/c0.pm
indirect-0.38/t/lib/indirect/TestRequired5/d0.pm
indirect-0.38/t/lib/indirect/TestRequired4/a0.pm
indirect-0.38/t/lib/indirect/TestRequired4/b0.pm
indirect-0.38/t/lib/indirect/TestRequired4/c0.pm
indirect-0.38/t/lib/indirect/Test1/il1.pm
indirect-0.38/t/lib/indirect/Test1/il2.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/
indirect-0.38/t/lib/indirect/Test0/Oooooo/
indirect-0.38/t/lib/indirect/Test0/Oooooo/Pppppppp.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/Vvvvvvv.pm
indirect-0.38/samples/indirect.pl
indirect-0.38/lib/indirect.pm
'YAML' not installed, will not store persistent state
CPAN​: CPAN​::Meta​::Requirements loaded ok (v2.140)
CPAN​: Parse​::CPAN​::Meta loaded ok (v2.150010)
CPAN​: CPAN​::Meta loaded ok (v2.150010)
CPAN​: Module​::CoreList loaded ok (v5.20190320)
Configuring V/VP/VPIT/indirect-0.38.tar.gz with Makefile.PL
Checking if this is gcc 3.4 on Windows trying to link against an
import
library.
.. no
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for indirect
Writing MYMETA.yml and MYMETA.json
VPIT/indirect-0.38.tar.gz
/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9
Makefile.PL
-- OK
Running make for V/VP/VPIT/indirect-0.38.tar.gz
cp lib/indirect.pm blib/lib/indirect.pm
Running Mkbootstrap for indirect ()
chmod 644 "indirect.bs"
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs
blib/arch/auto/indirect/indirect.bs
644
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
"/home/shlomif/apps/per
l/bleadperl-debug/lib/5.29.9/ExtUtils/xsubpp" -typemap
'/home/shlomif/apps/perl
/bleadperl-debug/lib/5.29.9/ExtUtils/typemap' indirect.xs >
indirect.xsc
mv indirect.xsc indirect.c
cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-
aliasing
-pip
e -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFS
ET_BITS=64 -g3 -DVERSION=\"0.38\" -DXS_VERSION=\"0.38\" -fPIC
"-I/home/shlomif
/apps/perl/bleadperl-debug/lib/5.29.9/x86_64-linux-thread-
multi/CORE"
indirect
.c
rm -f blib/arch/auto/indirect/indirect.so
cc -shared -g3 -L/usr/local/lib -fstack-protector-strong
indirect.o
-o
blib/a
rch/auto/indirect/indirect.so \
\

chmod 755 blib/arch/auto/indirect/indirect.so
VPIT/indirect-0.38.tar.gz
/usr/bin/make -- OK
Running make test for VPIT/indirect-0.38.tar.gz
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs
blib/arch/auto/indirect/indirect.bs
644
PERL_DL_NONLAZY=1 "/home/shlomif/apps/perl/bleadperl-
debug/bin/perl5.29.9"
"-MEx
tUtils​::Command​::MM" "-MTest​::Harness" "-e" "undef
*Test​::Harness​::Switches; tes
t_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t ................ 1/1 # Testing indirect 0.38, Perl
5.029009,
/home/s
hlomif/apps/perl/bleadperl-debug/bin/perl5.29.9
t/00-load.t ................ ok
t/09-load-threads.t ........ # Using threads 2.22
# Using threads​::shared 1.6
t/09-load-threads.t ........ ok
t/10-args.t ................ ok
t/11-line.t ................ ok
t/12-env.t ................. ok
t/20-good.t ................ ok
t/21-bad.t ................. ok
t/22-bad-mixed.t ........... ok
t/23-bad-notaint.t ......... ok
t/30-scope.t ............... ok
t/31-hints.t ............... ok
t/32-global.t .............. ok
t/33-compilation-errors.t .. # Using IO​::Handle 1.40
# Using IO​::Select 1.40
# Using IPC​::Open3 1.20
t/33-compilation-errors.t .. ok
t/40-threads.t ............. # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/40-threads.t ............. No subtests run
t/41-threads-teardown.t .... # Using threads 2.22
# Using threads​::shared 1.6
t/41-threads-teardown.t .... ok
t/42-threads-global.t ...... # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/42-threads-global.t ...... No subtests run
t/45-memory.t .............. ok
t/46-stress.t .............. ok
t/47-stress-use.t .......... ok
t/50-external.t ............ ok
t/51-dd-newlines.t ......... skipped​: Could not load Devel​::Declare
0.006007

Test Summary Report
-------------------
t/40-threads.t (Wstat​: 134 Tests​: 0 Failed​: 0)
Non-zero wait status​: 134
Parse errors​: No plan found in TAP output
t/42-threads-global.t (Wstat​: 134 Tests​: 0 Failed​: 0)
Non-zero wait status​: 134
Parse errors​: No plan found in TAP output
Files=21, Tests=4517, 15 wallclock secs ( 2.41 usr 0.12 sys +
12.29
cusr
0.85
csys = 15.67 CPU)
Result​: FAIL
Failed 2/21 test programs. 0/4517 subtests failed.
make​: *** [Makefile​:1071​: test_dynamic] Error 255
VPIT/indirect-0.38.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this
module,
try​:
reports VPIT/indirect-0.38.tar.gz
[shlomif@​telaviv1 perl]$
```

I am on mageia v7 x86-64 ( https://en.wikipedia.org/wiki/Mageia ).

```

My research so far indicates that it is the combination of
-Duseithreads AND -DDEBUGGING that causes the failures in two tests
in
indirect's test suite. I.e., I do *not* get the failures when I
build
with threads or with debugging individually.

This also appears to be the case with these two failures reported by
Andreas​:

http​://www.cpantesters.org/cpan/report/6df6fa7e-3840-11e9-99ca-
ba6e2b878bbe

http​://www.cpantesters.org/cpan/report/f3ffdba6-3852-11e9-a75d-
ac272b878bbe

Can you confirm that it is the combination of these two configure
options that generates the failures?

Thank you very much.

Building with threads and debugging, I have (I think) narrowed this
down to breakage between v5.27.3 and v5.27.4. However,
'Porting/bisect.pl' is not DWIMming for me -- at least not when called
with this pattern of arguments​:

#####
perl Porting/bisect.pl --start=v5.26.0 --end=v5.28.0 -Duseithreads
-DDEBUGGING --module=indirect
#####

The program terminates at the start commit but, even if I know that at
the start tag 'indirect' gets installed, the program reports that it
exits 256 instead of 0 and the bisection program terminates.

Anyone have suggestions for better bisecting?

Thank you very much.

Manual bisection points to this commit​:

#####
commit f14cf36
Author​: Tony Cook <tony@​develop-help.com>
AuthorDate​: Mon Aug 14 11​:52​:39 2017 +1000
Commit​: Tony Cook <tony@​develop-help.com>
CommitDate​: Mon Sep 4 14​:47​:29 2017 +1000

(perl #131746) avoid undefined behaviour in Copy() etc

These functions depend on C library functions which have undefined behaviour when passed NULL pointers, even when passed a zero 'n' value.

Some compilers use this information, ie. assume the pointers are non-NULL when optimizing any following code, so we do need to prevent such unguarded calls.

My initial thought was to add conditionals to each macro to skip the call to the library function when n is zero, but this adds a cost to every use of these macros, even when the n value is always true.

So instead I added asserts() which will give us a much more visible indicator of such broken code and revealed the pp_caller and Glob.xs issues also patched here.
#####

Tony, can you take a look?

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Mar 17, 2019

From @jkeenan

On Sun, 17 Mar 2019 02​:40​:36 GMT, jkeenan wrote​:

On Sun, 17 Mar 2019 02​:00​:00 GMT, jkeenan wrote​:

On Sun, 17 Mar 2019 00​:07​:58 GMT, jkeenan wrote​:

On Sat, 16 Mar 2019 14​:51​:14 GMT, shlomif@​gmail.com wrote​:

indirect.pm-asserts-fail.md

:Author​: Shlomi Fish
:Email​: shlomif@​cpan.org
:Date​: 2019-03-16 16​:33

Hi all!

After building perl using​:

```
#!/bin/sh
rm -f config.sh Policy.sh
sh Configure -de -Dprefix="$HOME"/apps/perl/bleadperl-debug
-Doptimize='-g3' \
-DDEBUGGING \
-Dman1dir=none -Dman3dir=none \
-Duseithreads -Dusedevel
```

on bleadperl​:

```
[shlomif@​telaviv1 perl]$ git show | head -5
commit 4fa9266
Author​: Karl Williamson <khw@​cpan.org>
Date​: Fri Mar 15 11​:11​:11 2019 -0600

inline.h​: Improve comment
[shlomif@​telaviv1 perl]$
```

running all tests successfully and installing. Then I get​:

```
[shlomif@​telaviv1 perl]$ -t perl/core
[shlomif@​telaviv1 perl]$
/home/shlomif/apps/perl/bleadperl-debug/bin/cpan5.29.9 -i
indirect
Loading internal logger. Log​::Log4perl recommended for better
logging
Reading '/home/shlomif/.cpan/Metadata'
Database was generated on Sat, 16 Mar 2019 12​:17​:02 GMT
Running install for module 'indirect'
CPAN​: Digest​::SHA loaded ok (v6.02)
CPAN​: Compress​::Zlib loaded ok (v2.084)
Checksum for
/home/shlomif/.cpan/sources/authors/id/V/VP/VPIT/indirect-
0.38.tar.
gz ok
CPAN​: Archive​::Tar loaded ok (v2.32)
indirect-0.38/
indirect-0.38/Changes
indirect-0.38/indirect.xs
indirect-0.38/lib/
indirect-0.38/Makefile.PL
indirect-0.38/MANIFEST
indirect-0.38/META.json
indirect-0.38/META.yml
indirect-0.38/README
indirect-0.38/samples/
indirect-0.38/t/
indirect-0.38/xsh/
indirect-0.38/xsh/caps.h
indirect-0.38/xsh/debug.h
indirect-0.38/xsh/hints.h
indirect-0.38/xsh/mem.h
indirect-0.38/xsh/ops.h
indirect-0.38/xsh/ptable.h
indirect-0.38/xsh/threads.h
indirect-0.38/xsh/util.h
indirect-0.38/t/00-load.t
indirect-0.38/t/09-load-threads.t
indirect-0.38/t/10-args.t
indirect-0.38/t/11-line.t
indirect-0.38/t/12-env.t
indirect-0.38/t/20-good.t
indirect-0.38/t/21-bad.t
indirect-0.38/t/22-bad-mixed.t
indirect-0.38/t/23-bad-notaint.t
indirect-0.38/t/30-scope.t
indirect-0.38/t/31-hints.t
indirect-0.38/t/32-global.t
indirect-0.38/t/33-compilation-errors.t
indirect-0.38/t/40-threads.t
indirect-0.38/t/41-threads-teardown.t
indirect-0.38/t/42-threads-global.t
indirect-0.38/t/45-memory.t
indirect-0.38/t/46-stress.t
indirect-0.38/t/47-stress-use.t
indirect-0.38/t/50-external.t
indirect-0.38/t/51-dd-newlines.t
indirect-0.38/t/lib/
indirect-0.38/t/testcases/
indirect-0.38/t/testcases/babycart_in_heredoc.pl
indirect-0.38/t/testcases/rt115392.pl
indirect-0.38/t/lib/indirect/
indirect-0.38/t/lib/Test/
indirect-0.38/t/lib/VPIT/
indirect-0.38/t/lib/VPIT/TestHelpers.pm
indirect-0.38/t/lib/Test/Leaner.pm
indirect-0.38/t/lib/indirect/Test0/
indirect-0.38/t/lib/indirect/Test1/
indirect-0.38/t/lib/indirect/Test2.pm
indirect-0.38/t/lib/indirect/Test3.pm
indirect-0.38/t/lib/indirect/Test4.pm
indirect-0.38/t/lib/indirect/Test5.pm
indirect-0.38/t/lib/indirect/TestCompilationError.pm
indirect-0.38/t/lib/indirect/TestRequired1.pm
indirect-0.38/t/lib/indirect/TestRequired2.pm
indirect-0.38/t/lib/indirect/TestRequired3X.pm
indirect-0.38/t/lib/indirect/TestRequired3Y.pm
indirect-0.38/t/lib/indirect/TestRequired4/
indirect-0.38/t/lib/indirect/TestRequired5/
indirect-0.38/t/lib/indirect/TestRequired6.pm
indirect-0.38/t/lib/indirect/TestRequiredGlobal.pm
indirect-0.38/t/lib/indirect/TestRequired5/a0.pm
indirect-0.38/t/lib/indirect/TestRequired5/b0.pm
indirect-0.38/t/lib/indirect/TestRequired5/c0.pm
indirect-0.38/t/lib/indirect/TestRequired5/d0.pm
indirect-0.38/t/lib/indirect/TestRequired4/a0.pm
indirect-0.38/t/lib/indirect/TestRequired4/b0.pm
indirect-0.38/t/lib/indirect/TestRequired4/c0.pm
indirect-0.38/t/lib/indirect/Test1/il1.pm
indirect-0.38/t/lib/indirect/Test1/il2.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/
indirect-0.38/t/lib/indirect/Test0/Oooooo/
indirect-0.38/t/lib/indirect/Test0/Oooooo/Pppppppp.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/Vvvvvvv.pm
indirect-0.38/samples/indirect.pl
indirect-0.38/lib/indirect.pm
'YAML' not installed, will not store persistent state
CPAN​: CPAN​::Meta​::Requirements loaded ok (v2.140)
CPAN​: Parse​::CPAN​::Meta loaded ok (v2.150010)
CPAN​: CPAN​::Meta loaded ok (v2.150010)
CPAN​: Module​::CoreList loaded ok (v5.20190320)
Configuring V/VP/VPIT/indirect-0.38.tar.gz with Makefile.PL
Checking if this is gcc 3.4 on Windows trying to link against an
import
library.
.. no
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for indirect
Writing MYMETA.yml and MYMETA.json
VPIT/indirect-0.38.tar.gz
/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9
Makefile.PL
-- OK
Running make for V/VP/VPIT/indirect-0.38.tar.gz
cp lib/indirect.pm blib/lib/indirect.pm
Running Mkbootstrap for indirect ()
chmod 644 "indirect.bs"
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs
blib/arch/auto/indirect/indirect.bs
644
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
"/home/shlomif/apps/per
l/bleadperl-debug/lib/5.29.9/ExtUtils/xsubpp" -typemap
'/home/shlomif/apps/perl
/bleadperl-debug/lib/5.29.9/ExtUtils/typemap' indirect.xs >
indirect.xsc
mv indirect.xsc indirect.c
cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-
strict-
aliasing
-pip
e -fstack-protector-strong -I/usr/local/include
-D_LARGEFILE_SOURCE
-D_FILE_OFFS
ET_BITS=64 -g3 -DVERSION=\"0.38\" -DXS_VERSION=\"0.38\" -fPIC
"-I/home/shlomif
/apps/perl/bleadperl-debug/lib/5.29.9/x86_64-linux-thread-
multi/CORE"
indirect
.c
rm -f blib/arch/auto/indirect/indirect.so
cc -shared -g3 -L/usr/local/lib -fstack-protector-strong
indirect.o
-o
blib/a
rch/auto/indirect/indirect.so \
\

chmod 755 blib/arch/auto/indirect/indirect.so
VPIT/indirect-0.38.tar.gz
/usr/bin/make -- OK
Running make test for VPIT/indirect-0.38.tar.gz
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs
blib/arch/auto/indirect/indirect.bs
644
PERL_DL_NONLAZY=1 "/home/shlomif/apps/perl/bleadperl-
debug/bin/perl5.29.9"
"-MEx
tUtils​::Command​::MM" "-MTest​::Harness" "-e" "undef
*Test​::Harness​::Switches; tes
t_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t ................ 1/1 # Testing indirect 0.38, Perl
5.029009,
/home/s
hlomif/apps/perl/bleadperl-debug/bin/perl5.29.9
t/00-load.t ................ ok
t/09-load-threads.t ........ # Using threads 2.22
# Using threads​::shared 1.6
t/09-load-threads.t ........ ok
t/10-args.t ................ ok
t/11-line.t ................ ok
t/12-env.t ................. ok
t/20-good.t ................ ok
t/21-bad.t ................. ok
t/22-bad-mixed.t ........... ok
t/23-bad-notaint.t ......... ok
t/30-scope.t ............... ok
t/31-hints.t ............... ok
t/32-global.t .............. ok
t/33-compilation-errors.t .. # Using IO​::Handle 1.40
# Using IO​::Select 1.40
# Using IPC​::Open3 1.20
t/33-compilation-errors.t .. ok
t/40-threads.t ............. # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/40-threads.t ............. No subtests run
t/41-threads-teardown.t .... # Using threads 2.22
# Using threads​::shared 1.6
t/41-threads-teardown.t .... ok
t/42-threads-global.t ...... # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/42-threads-global.t ...... No subtests run
t/45-memory.t .............. ok
t/46-stress.t .............. ok
t/47-stress-use.t .......... ok
t/50-external.t ............ ok
t/51-dd-newlines.t ......... skipped​: Could not load
Devel​::Declare
0.006007

Test Summary Report
-------------------
t/40-threads.t (Wstat​: 134 Tests​: 0 Failed​: 0)
Non-zero wait status​: 134
Parse errors​: No plan found in TAP output
t/42-threads-global.t (Wstat​: 134 Tests​: 0 Failed​: 0)
Non-zero wait status​: 134
Parse errors​: No plan found in TAP output
Files=21, Tests=4517, 15 wallclock secs ( 2.41 usr 0.12 sys +
12.29
cusr
0.85
csys = 15.67 CPU)
Result​: FAIL
Failed 2/21 test programs. 0/4517 subtests failed.
make​: *** [Makefile​:1071​: test_dynamic] Error 255
VPIT/indirect-0.38.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this
module,
try​:
reports VPIT/indirect-0.38.tar.gz
[shlomif@​telaviv1 perl]$
```

I am on mageia v7 x86-64 ( https://en.wikipedia.org/wiki/Mageia
).

```

My research so far indicates that it is the combination of
-Duseithreads AND -DDEBUGGING that causes the failures in two tests
in
indirect's test suite. I.e., I do *not* get the failures when I
build
with threads or with debugging individually.

This also appears to be the case with these two failures reported
by
Andreas​:

Andreas reported this problem upstream. See​:
https://rt.cpan.org/Ticket/Display.html?id=127118

http​://www.cpantesters.org/cpan/report/6df6fa7e-3840-11e9-99ca-
ba6e2b878bbe

http​://www.cpantesters.org/cpan/report/f3ffdba6-3852-11e9-a75d-
ac272b878bbe

Can you confirm that it is the combination of these two configure
options that generates the failures?

Thank you very much.

Building with threads and debugging, I have (I think) narrowed this
down to breakage between v5.27.3 and v5.27.4. However,
'Porting/bisect.pl' is not DWIMming for me -- at least not when
called
with this pattern of arguments​:

#####
perl Porting/bisect.pl --start=v5.26.0 --end=v5.28.0 -Duseithreads
-DDEBUGGING --module=indirect
#####

The program terminates at the start commit but, even if I know that
at
the start tag 'indirect' gets installed, the program reports that it
exits 256 instead of 0 and the bisection program terminates.

Anyone have suggestions for better bisecting?

Thank you very much.

Manual bisection points to this commit​:

#####
commit f14cf36
Author​: Tony Cook <tony@​develop-help.com>
AuthorDate​: Mon Aug 14 11​:52​:39 2017 +1000
Commit​: Tony Cook <tony@​develop-help.com>
CommitDate​: Mon Sep 4 14​:47​:29 2017 +1000

(perl #131746) avoid undefined behaviour in Copy() etc

These functions depend on C library functions which have undefined
behaviour when passed NULL pointers, even when passed a zero 'n'
value.

Some compilers use this information, ie. assume the pointers are non-
NULL when optimizing any following code, so we do need to prevent such
unguarded calls.

My initial thought was to add conditionals to each macro to skip the
call to the library function when n is zero, but this adds a cost to
every use of these macros, even when the n value is always true.

So instead I added asserts() which will give us a much more visible
indicator of such broken code and revealed the pp_caller and Glob.xs
issues also patched here.
#####

Tony, can you take a look?

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Mar 17, 2019

From @shlomif

Hi,

On Sun, Mar 17, 2019 at 2​:07 AM James E Keenan via RT <
perlbug-followup@​perl.org> wrote​:

On Sat, 16 Mar 2019 14​:51​:14 GMT, shlomif@​gmail.com wrote​:

indirect.pm-asserts-fail.md

:Author​: Shlomi Fish
:Email​: shlomif@​cpan.org
:Date​: 2019-03-16 16​:33

Hi all!

After building perl using​:

```
#!/bin/sh
rm -f config.sh Policy.sh
sh Configure -de -Dprefix="$HOME"/apps/perl/bleadperl-debug
-Doptimize='-g3' \
-DDEBUGGING \
-Dman1dir=none -Dman3dir=none \
-Duseithreads -Dusedevel
```

on bleadperl​:

```
[shlomif@​telaviv1 perl]$ git show | head -5
commit 4fa9266
Author​: Karl Williamson <khw@​cpan.org>
Date​: Fri Mar 15 11​:11​:11 2019 -0600

inline.h​: Improve comment
[shlomif@​telaviv1 perl]$
```

running all tests successfully and installing. Then I get​:

```
[shlomif@​telaviv1 perl]$ -t perl/core
[shlomif@​telaviv1 perl]$
/home/shlomif/apps/perl/bleadperl-debug/bin/cpan5.29.9 -i indirect
Loading internal logger. Log​::Log4perl recommended for better logging
Reading '/home/shlomif/.cpan/Metadata'
Database was generated on Sat, 16 Mar 2019 12​:17​:02 GMT
Running install for module 'indirect'
CPAN​: Digest​::SHA loaded ok (v6.02)
CPAN​: Compress​::Zlib loaded ok (v2.084)
Checksum for
/home/shlomif/.cpan/sources/authors/id/V/VP/VPIT/indirect-0.38.tar.
gz ok
CPAN​: Archive​::Tar loaded ok (v2.32)
indirect-0.38/
indirect-0.38/Changes
indirect-0.38/indirect.xs
indirect-0.38/lib/
indirect-0.38/Makefile.PL
indirect-0.38/MANIFEST
indirect-0.38/META.json
indirect-0.38/META.yml
indirect-0.38/README
indirect-0.38/samples/
indirect-0.38/t/
indirect-0.38/xsh/
indirect-0.38/xsh/caps.h
indirect-0.38/xsh/debug.h
indirect-0.38/xsh/hints.h
indirect-0.38/xsh/mem.h
indirect-0.38/xsh/ops.h
indirect-0.38/xsh/ptable.h
indirect-0.38/xsh/threads.h
indirect-0.38/xsh/util.h
indirect-0.38/t/00-load.t
indirect-0.38/t/09-load-threads.t
indirect-0.38/t/10-args.t
indirect-0.38/t/11-line.t
indirect-0.38/t/12-env.t
indirect-0.38/t/20-good.t
indirect-0.38/t/21-bad.t
indirect-0.38/t/22-bad-mixed.t
indirect-0.38/t/23-bad-notaint.t
indirect-0.38/t/30-scope.t
indirect-0.38/t/31-hints.t
indirect-0.38/t/32-global.t
indirect-0.38/t/33-compilation-errors.t
indirect-0.38/t/40-threads.t
indirect-0.38/t/41-threads-teardown.t
indirect-0.38/t/42-threads-global.t
indirect-0.38/t/45-memory.t
indirect-0.38/t/46-stress.t
indirect-0.38/t/47-stress-use.t
indirect-0.38/t/50-external.t
indirect-0.38/t/51-dd-newlines.t
indirect-0.38/t/lib/
indirect-0.38/t/testcases/
indirect-0.38/t/testcases/babycart_in_heredoc.pl
indirect-0.38/t/testcases/rt115392.pl
indirect-0.38/t/lib/indirect/
indirect-0.38/t/lib/Test/
indirect-0.38/t/lib/VPIT/
indirect-0.38/t/lib/VPIT/TestHelpers.pm
indirect-0.38/t/lib/Test/Leaner.pm
indirect-0.38/t/lib/indirect/Test0/
indirect-0.38/t/lib/indirect/Test1/
indirect-0.38/t/lib/indirect/Test2.pm
indirect-0.38/t/lib/indirect/Test3.pm
indirect-0.38/t/lib/indirect/Test4.pm
indirect-0.38/t/lib/indirect/Test5.pm
indirect-0.38/t/lib/indirect/TestCompilationError.pm
indirect-0.38/t/lib/indirect/TestRequired1.pm
indirect-0.38/t/lib/indirect/TestRequired2.pm
indirect-0.38/t/lib/indirect/TestRequired3X.pm
indirect-0.38/t/lib/indirect/TestRequired3Y.pm
indirect-0.38/t/lib/indirect/TestRequired4/
indirect-0.38/t/lib/indirect/TestRequired5/
indirect-0.38/t/lib/indirect/TestRequired6.pm
indirect-0.38/t/lib/indirect/TestRequiredGlobal.pm
indirect-0.38/t/lib/indirect/TestRequired5/a0.pm
indirect-0.38/t/lib/indirect/TestRequired5/b0.pm
indirect-0.38/t/lib/indirect/TestRequired5/c0.pm
indirect-0.38/t/lib/indirect/TestRequired5/d0.pm
indirect-0.38/t/lib/indirect/TestRequired4/a0.pm
indirect-0.38/t/lib/indirect/TestRequired4/b0.pm
indirect-0.38/t/lib/indirect/TestRequired4/c0.pm
indirect-0.38/t/lib/indirect/Test1/il1.pm
indirect-0.38/t/lib/indirect/Test1/il2.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/
indirect-0.38/t/lib/indirect/Test0/Oooooo/
indirect-0.38/t/lib/indirect/Test0/Oooooo/Pppppppp.pm
indirect-0.38/t/lib/indirect/Test0/Fffff/Vvvvvvv.pm
indirect-0.38/samples/indirect.pl
indirect-0.38/lib/indirect.pm
'YAML' not installed, will not store persistent state
CPAN​: CPAN​::Meta​::Requirements loaded ok (v2.140)
CPAN​: Parse​::CPAN​::Meta loaded ok (v2.150010)
CPAN​: CPAN​::Meta loaded ok (v2.150010)
CPAN​: Module​::CoreList loaded ok (v5.20190320)
Configuring V/VP/VPIT/indirect-0.38.tar.gz with Makefile.PL
Checking if this is gcc 3.4 on Windows trying to link against an
import
library.
.. no
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for indirect
Writing MYMETA.yml and MYMETA.json
VPIT/indirect-0.38.tar.gz
/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9 Makefile.PL
-- OK
Running make for V/VP/VPIT/indirect-0.38.tar.gz
cp lib/indirect.pm blib/lib/indirect.pm
Running Mkbootstrap for indirect ()
chmod 644 "indirect.bs"
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs blib/arch/auto/indirect/indirect.bs
644
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
"/home/shlomif/apps/per
l/bleadperl-debug/lib/5.29.9/ExtUtils/xsubpp" -typemap
'/home/shlomif/apps/perl
/bleadperl-debug/lib/5.29.9/ExtUtils/typemap' indirect.xs >
indirect.xsc
mv indirect.xsc indirect.c
cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-
aliasing
-pip
e -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFS
ET_BITS=64 -g3 -DVERSION=\"0.38\" -DXS_VERSION=\"0.38\" -fPIC
"-I/home/shlomif
/apps/perl/bleadperl-debug/lib/5.29.9/x86_64-linux-thread-multi/CORE"
indirect
.c
rm -f blib/arch/auto/indirect/indirect.so
cc -shared -g3 -L/usr/local/lib -fstack-protector-strong indirect.o
-o
blib/a
rch/auto/indirect/indirect.so \
\

chmod 755 blib/arch/auto/indirect/indirect.so
VPIT/indirect-0.38.tar.gz
/usr/bin/make -- OK
Running make test for VPIT/indirect-0.38.tar.gz
"/home/shlomif/apps/perl/bleadperl-debug/bin/perl5.29.9"
-MExtUtils​::Command​::MM
-e 'cp_nonempty' -- indirect.bs blib/arch/auto/indirect/indirect.bs
644
PERL_DL_NONLAZY=1 "/home/shlomif/apps/perl/bleadperl-
debug/bin/perl5.29.9"
"-MEx
tUtils​::Command​::MM" "-MTest​::Harness" "-e" "undef
*Test​::Harness​::Switches; tes
t_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t ................ 1/1 # Testing indirect 0.38, Perl
5.029009,
/home/s
hlomif/apps/perl/bleadperl-debug/bin/perl5.29.9
t/00-load.t ................ ok
t/09-load-threads.t ........ # Using threads 2.22
# Using threads​::shared 1.6
t/09-load-threads.t ........ ok
t/10-args.t ................ ok
t/11-line.t ................ ok
t/12-env.t ................. ok
t/20-good.t ................ ok
t/21-bad.t ................. ok
t/22-bad-mixed.t ........... ok
t/23-bad-notaint.t ......... ok
t/30-scope.t ............... ok
t/31-hints.t ............... ok
t/32-global.t .............. ok
t/33-compilation-errors.t .. # Using IO​::Handle 1.40
# Using IO​::Select 1.40
# Using IPC​::Open3 1.20
t/33-compilation-errors.t .. ok
t/40-threads.t ............. # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/40-threads.t ............. No subtests run
t/41-threads-teardown.t .... # Using threads 2.22
# Using threads​::shared 1.6
t/41-threads-teardown.t .... ok
t/42-threads-global.t ...... # Using threads 2.22
# Using threads​::shared 1.6
perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.
t/42-threads-global.t ...... No subtests run
t/45-memory.t .............. ok
t/46-stress.t .............. ok
t/47-stress-use.t .......... ok
t/50-external.t ............ ok
t/51-dd-newlines.t ......... skipped​: Could not load Devel​::Declare
0.006007

Test Summary Report
-------------------
t/40-threads.t (Wstat​: 134 Tests​: 0 Failed​: 0)
Non-zero wait status​: 134
Parse errors​: No plan found in TAP output
t/42-threads-global.t (Wstat​: 134 Tests​: 0 Failed​: 0)
Non-zero wait status​: 134
Parse errors​: No plan found in TAP output
Files=21, Tests=4517, 15 wallclock secs ( 2.41 usr 0.12 sys + 12.29
cusr
0.85
csys = 15.67 CPU)
Result​: FAIL
Failed 2/21 test programs. 0/4517 subtests failed.
make​: *** [Makefile​:1071​: test_dynamic] Error 255
VPIT/indirect-0.38.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module,
try​:
reports VPIT/indirect-0.38.tar.gz
[shlomif@​telaviv1 perl]$
```

I am on mageia v7 x86-64 ( https://en.wikipedia.org/wiki/Mageia ).

```

My research so far indicates that it is the combination of -Duseithreads
AND -DDEBUGGING that causes the failures in two tests in indirect's test
suite. I.e., I do *not* get the failures when I build with threads or with
debugging individually.

This also appears to be the case with these two failures reported by
Andreas​:

http​://www.cpantesters.org/cpan/report/6df6fa7e-3840-11e9-99ca-ba6e2b878bbe

http​://www.cpantesters.org/cpan/report/f3ffdba6-3852-11e9-a75d-ac272b878bbe

Can you confirm that it is the combination of these two configure options
that generates the failures?

Indeed. With either of these options removed - "cpan -i indirect" works.

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

--
Shlomi Fish http​://www.shlomifish.org/

Buddha has the Chuck Norris nature.

Please reply to list if it's a mailing list post - http​://shlom.in/reply .

@p5pRT
Copy link
Author

p5pRT commented Mar 17, 2019

From @khwilliamson

On 3/17/19 8​:38 AM, Shlomi Fish wrote​:

Hi,

On Sun, Mar 17, 2019 at 2​:07 AM James E Keenan via RT
<perlbug-followup@​perl.org <mailto​:perlbug-followup@​perl.org>> wrote​:

On Sat\, 16 Mar 2019 14&#8203;:51&#8203;:14 GMT\, shlomif@&#8203;gmail\.com
\<mailto&#8203;:shlomif@&#8203;gmail\.com> wrote&#8203;:
 > indirect\.pm\-asserts\-fail\.md \<http&#8203;://indirect\.pm\-asserts\-fail\.md>
 >
 > :Author&#8203;: Shlomi Fish
 > :Email&#8203;: shlomif@&#8203;cpan\.org \<mailto&#8203;:shlomif@&#8203;cpan\.org>
 > :Date&#8203;: 2019\-03\-16 16&#8203;:33
 >
 > Hi all\!
 >
 > After building perl using&#8203;:
 >
 > \`\`\`
 > \#\!/bin/sh
 > rm \-f config\.sh Policy\.sh
 > sh Configure \-de \-Dprefix="$HOME"/apps/perl/bleadperl\-debug
 > \-Doptimize='\-g3' \\
 >     \-DDEBUGGING  \\
 >     \-Dman1dir=none \-Dman3dir=none \\
 >     \-Duseithreads \-Dusedevel
 > \`\`\`
 >
 > on bleadperl&#8203;:
 >
 > \`\`\`
 > \[shlomif@&#8203;telaviv1 perl\]$ git show | head \-5
 > commit 4fa9266363598bc31684f549c2c8ce8c6664d137
 > Author&#8203;: Karl Williamson \<khw@&#8203;cpan\.org \<mailto&#8203;:khw@&#8203;cpan\.org>>
 > Date&#8203;:   Fri Mar 15 11&#8203;:11&#8203;:11 2019 \-0600
 >
 > inline\.h&#8203;: Improve comment
 > \[shlomif@&#8203;telaviv1 perl\]$
 > \`\`\`
 >
 > running all tests successfully and installing\. Then I get&#8203;:
 >
 > \`\`\`
 > \[shlomif@&#8203;telaviv1 perl\]$ \-t perl/core
 > \[shlomif@&#8203;telaviv1 perl\]$
 > /home/shlomif/apps/perl/bleadperl\-debug/bin/cpan5\.29\.9 \-i indirect
 > Loading internal logger\. Log&#8203;::Log4perl recommended for better logging
 > Reading '/home/shlomif/\.cpan/Metadata'
 >   Database was generated on Sat\, 16 Mar 2019 12&#8203;:17&#8203;:02 GMT
 > Running install for module 'indirect'
 > CPAN&#8203;: Digest&#8203;::SHA loaded ok \(v6\.02\)
 > CPAN&#8203;: Compress&#8203;::Zlib loaded ok \(v2\.084\)
 > Checksum for
 > /home/shlomif/\.cpan/sources/authors/id/V/VP/VPIT/indirect\-0\.38\.tar\.
 > gz ok
 > CPAN&#8203;: Archive&#8203;::Tar loaded ok \(v2\.32\)
 > indirect\-0\.38/
 > indirect\-0\.38/Changes
 > indirect\-0\.38/indirect\.xs
 > indirect\-0\.38/lib/
 > indirect\-0\.38/Makefile\.PL
 > indirect\-0\.38/MANIFEST
 > indirect\-0\.38/META\.json
 > indirect\-0\.38/META\.yml
 > indirect\-0\.38/README
 > indirect\-0\.38/samples/
 > indirect\-0\.38/t/
 > indirect\-0\.38/xsh/
 > indirect\-0\.38/xsh/caps\.h
 > indirect\-0\.38/xsh/debug\.h
 > indirect\-0\.38/xsh/hints\.h
 > indirect\-0\.38/xsh/mem\.h
 > indirect\-0\.38/xsh/ops\.h
 > indirect\-0\.38/xsh/ptable\.h
 > indirect\-0\.38/xsh/threads\.h
 > indirect\-0\.38/xsh/util\.h
 > indirect\-0\.38/t/00\-load\.t
 > indirect\-0\.38/t/09\-load\-threads\.t
 > indirect\-0\.38/t/10\-args\.t
 > indirect\-0\.38/t/11\-line\.t
 > indirect\-0\.38/t/12\-env\.t
 > indirect\-0\.38/t/20\-good\.t
 > indirect\-0\.38/t/21\-bad\.t
 > indirect\-0\.38/t/22\-bad\-mixed\.t
 > indirect\-0\.38/t/23\-bad\-notaint\.t
 > indirect\-0\.38/t/30\-scope\.t
 > indirect\-0\.38/t/31\-hints\.t
 > indirect\-0\.38/t/32\-global\.t
 > indirect\-0\.38/t/33\-compilation\-errors\.t
 > indirect\-0\.38/t/40\-threads\.t
 > indirect\-0\.38/t/41\-threads\-teardown\.t
 > indirect\-0\.38/t/42\-threads\-global\.t
 > indirect\-0\.38/t/45\-memory\.t
 > indirect\-0\.38/t/46\-stress\.t
 > indirect\-0\.38/t/47\-stress\-use\.t
 > indirect\-0\.38/t/50\-external\.t
 > indirect\-0\.38/t/51\-dd\-newlines\.t
 > indirect\-0\.38/t/lib/
 > indirect\-0\.38/t/testcases/
 > indirect\-0\.38/t/testcases/babycart\_in\_heredoc\.pl
\<http&#8203;://babycart\_in\_heredoc\.pl>
 > indirect\-0\.38/t/testcases/rt115392\.pl \<http&#8203;://rt115392\.pl>
 > indirect\-0\.38/t/lib/indirect/
 > indirect\-0\.38/t/lib/Test/
 > indirect\-0\.38/t/lib/VPIT/
 > indirect\-0\.38/t/lib/VPIT/TestHelpers\.pm
 > indirect\-0\.38/t/lib/Test/Leaner\.pm
 > indirect\-0\.38/t/lib/indirect/Test0/
 > indirect\-0\.38/t/lib/indirect/Test1/
 > indirect\-0\.38/t/lib/indirect/Test2\.pm
 > indirect\-0\.38/t/lib/indirect/Test3\.pm
 > indirect\-0\.38/t/lib/indirect/Test4\.pm
 > indirect\-0\.38/t/lib/indirect/Test5\.pm
 > indirect\-0\.38/t/lib/indirect/TestCompilationError\.pm
 > indirect\-0\.38/t/lib/indirect/TestRequired1\.pm
 > indirect\-0\.38/t/lib/indirect/TestRequired2\.pm
 > indirect\-0\.38/t/lib/indirect/TestRequired3X\.pm
 > indirect\-0\.38/t/lib/indirect/TestRequired3Y\.pm
 > indirect\-0\.38/t/lib/indirect/TestRequired4/
 > indirect\-0\.38/t/lib/indirect/TestRequired5/
 > indirect\-0\.38/t/lib/indirect/TestRequired6\.pm
 > indirect\-0\.38/t/lib/indirect/TestRequiredGlobal\.pm
 > indirect\-0\.38/t/lib/indirect/TestRequired5/a0\.pm \<http&#8203;://a0\.pm>
 > indirect\-0\.38/t/lib/indirect/TestRequired5/b0\.pm \<http&#8203;://b0\.pm>
 > indirect\-0\.38/t/lib/indirect/TestRequired5/c0\.pm \<http&#8203;://c0\.pm>
 > indirect\-0\.38/t/lib/indirect/TestRequired5/d0\.pm \<http&#8203;://d0\.pm>
 > indirect\-0\.38/t/lib/indirect/TestRequired4/a0\.pm \<http&#8203;://a0\.pm>
 > indirect\-0\.38/t/lib/indirect/TestRequired4/b0\.pm \<http&#8203;://b0\.pm>
 > indirect\-0\.38/t/lib/indirect/TestRequired4/c0\.pm \<http&#8203;://c0\.pm>
 > indirect\-0\.38/t/lib/indirect/Test1/il1\.pm \<http&#8203;://il1\.pm>
 > indirect\-0\.38/t/lib/indirect/Test1/il2\.pm \<http&#8203;://il2\.pm>
 > indirect\-0\.38/t/lib/indirect/Test0/Fffff/
 > indirect\-0\.38/t/lib/indirect/Test0/Oooooo/
 > indirect\-0\.38/t/lib/indirect/Test0/Oooooo/Pppppppp\.pm
 > indirect\-0\.38/t/lib/indirect/Test0/Fffff/Vvvvvvv\.pm
 > indirect\-0\.38/samples/indirect\.pl \<http&#8203;://indirect\.pl>
 > indirect\-0\.38/lib/indirect\.pm \<http&#8203;://indirect\.pm>
 > 'YAML' not installed\, will not store persistent state
 > CPAN&#8203;: CPAN&#8203;::Meta&#8203;::Requirements loaded ok \(v2\.140\)
 > CPAN&#8203;: Parse&#8203;::CPAN&#8203;::Meta loaded ok \(v2\.150010\)
 > CPAN&#8203;: CPAN&#8203;::Meta loaded ok \(v2\.150010\)
 > CPAN&#8203;: Module&#8203;::CoreList loaded ok \(v5\.20190320\)
 > Configuring V/VP/VPIT/indirect\-0\.38\.tar\.gz with Makefile\.PL
 > Checking if this is gcc 3\.4 on Windows trying to link against an
 > import
 > library\.
 > \.\. no
 > Checking if your kit is complete\.\.\.
 > Looks good
 > Generating a Unix\-style Makefile
 > Writing Makefile for indirect
 > Writing MYMETA\.yml and MYMETA\.json
 >   VPIT/indirect\-0\.38\.tar\.gz
 >   /home/shlomif/apps/perl/bleadperl\-debug/bin/perl5\.29\.9 Makefile\.PL
 > \-\- OK
 > Running make for V/VP/VPIT/indirect\-0\.38\.tar\.gz
 > cp lib/indirect\.pm \<http&#8203;://indirect\.pm> blib/lib/indirect\.pm
\<http&#8203;://indirect\.pm>
 > Running Mkbootstrap for indirect \(\)
 > chmod 644 "indirect\.bs \<http&#8203;://indirect\.bs>"
 > "/home/shlomif/apps/perl/bleadperl\-debug/bin/perl5\.29\.9"
 > \-MExtUtils&#8203;::Command&#8203;::MM
 >  \-e 'cp\_nonempty' \-\- indirect\.bs \<http&#8203;://indirect\.bs>
blib/arch/auto/indirect/indirect\.bs \<http&#8203;://indirect\.bs>
 > 644
 > "/home/shlomif/apps/perl/bleadperl\-debug/bin/perl5\.29\.9"
 > "/home/shlomif/apps/per
 > l/bleadperl\-debug/lib/5\.29\.9/ExtUtils/xsubpp"  \-typemap
 > '/home/shlomif/apps/perl
 > /bleadperl\-debug/lib/5\.29\.9/ExtUtils/typemap'  indirect\.xs >
 > indirect\.xsc
 > mv indirect\.xsc indirect\.c
 > cc \-c   \-D\_REENTRANT \-D\_GNU\_SOURCE \-fwrapv \-DDEBUGGING \-fno\-strict\-
 > aliasing
 > \-pip
 > e \-fstack\-protector\-strong \-I/usr/local/include \-D\_LARGEFILE\_SOURCE
 > \-D\_FILE\_OFFS
 > ET\_BITS=64 \-g3   \-DVERSION=\\"0\.38\\" \-DXS\_VERSION=\\"0\.38\\" \-fPIC
 > "\-I/home/shlomif
 > /apps/perl/bleadperl\-debug/lib/5\.29\.9/x86\_64\-linux\-thread\-multi/CORE"
 > indirect
 > \.c
 > rm \-f blib/arch/auto/indirect/indirect\.so
 > cc  \-shared \-g3 \-L/usr/local/lib \-fstack\-protector\-strong  indirect\.o
 > \-o
 > blib/a
 > rch/auto/indirect/indirect\.so  \\
 >       \\
 >
 > chmod 755 blib/arch/auto/indirect/indirect\.so
 >   VPIT/indirect\-0\.38\.tar\.gz
 >   /usr/bin/make \-\- OK
 > Running make test for VPIT/indirect\-0\.38\.tar\.gz
 > "/home/shlomif/apps/perl/bleadperl\-debug/bin/perl5\.29\.9"
 > \-MExtUtils&#8203;::Command&#8203;::MM
 >  \-e 'cp\_nonempty' \-\- indirect\.bs \<http&#8203;://indirect\.bs>
blib/arch/auto/indirect/indirect\.bs \<http&#8203;://indirect\.bs>
 > 644
 > PERL\_DL\_NONLAZY=1 "/home/shlomif/apps/perl/bleadperl\-
 > debug/bin/perl5\.29\.9"
 > "\-MEx
 > tUtils&#8203;::Command&#8203;::MM" "\-MTest&#8203;::Harness" "\-e" "undef
 > \*Test&#8203;::Harness&#8203;::Switches; tes
 > t\_harness\(0\, 'blib/lib'\, 'blib/arch'\)" t/\*\.t
 > t/00\-load\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. 1/1 \# Testing indirect 0\.38\, Perl
 > 5\.029009\,
 > /home/s
 > hlomif/apps/perl/bleadperl\-debug/bin/perl5\.29\.9
 > t/00\-load\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/09\-load\-threads\.t \.\.\.\.\.\.\.\. \# Using threads 2\.22
 > \# Using threads&#8203;::shared 1\.6
 > t/09\-load\-threads\.t \.\.\.\.\.\.\.\. ok
 > t/10\-args\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/11\-line\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/12\-env\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/20\-good\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/21\-bad\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/22\-bad\-mixed\.t \.\.\.\.\.\.\.\.\.\.\. ok
 > t/23\-bad\-notaint\.t \.\.\.\.\.\.\.\.\. ok
 > t/30\-scope\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/31\-hints\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/32\-global\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/33\-compilation\-errors\.t \.\. \# Using IO&#8203;::Handle 1\.40
 > \# Using IO&#8203;::Select 1\.40
 > \# Using IPC&#8203;::Open3 1\.20
 > t/33\-compilation\-errors\.t \.\. ok
 > t/40\-threads\.t \.\.\.\.\.\.\.\.\.\.\.\.\. \# Using threads 2\.22
 > \# Using threads&#8203;::shared 1\.6
 > perl5\.29\.9&#8203;: indirect\.xs&#8203;:264&#8203;: indirect\_map\_store&#8203;: Assertion
 > \`\(\(void\*\)\(oi\->buf\)\) \!
 > = 0' failed\.
 > t/40\-threads\.t \.\.\.\.\.\.\.\.\.\.\.\.\. No subtests run
 > t/41\-threads\-teardown\.t \.\.\.\. \# Using threads 2\.22
 > \# Using threads&#8203;::shared 1\.6
 > t/41\-threads\-teardown\.t \.\.\.\. ok
 > t/42\-threads\-global\.t \.\.\.\.\.\. \# Using threads 2\.22
 > \# Using threads&#8203;::shared 1\.6
 > perl5\.29\.9&#8203;: indirect\.xs&#8203;:264&#8203;: indirect\_map\_store&#8203;: Assertion
 > \`\(\(void\*\)\(oi\->buf\)\) \!
 > = 0' failed\.
 > t/42\-threads\-global\.t \.\.\.\.\.\. No subtests run
 > t/45\-memory\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/46\-stress\.t \.\.\.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/47\-stress\-use\.t \.\.\.\.\.\.\.\.\.\. ok
 > t/50\-external\.t \.\.\.\.\.\.\.\.\.\.\.\. ok
 > t/51\-dd\-newlines\.t \.\.\.\.\.\.\.\.\. skipped&#8203;: Could not load Devel&#8203;::Declare
 > 0\.006007
 >
 > Test Summary Report
 > \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
 > t/40\-threads\.t           \(Wstat&#8203;: 134 Tests&#8203;: 0 Failed&#8203;: 0\)
 >   Non\-zero wait status&#8203;: 134
 >   Parse errors&#8203;: No plan found in TAP output
 > t/42\-threads\-global\.t    \(Wstat&#8203;: 134 Tests&#8203;: 0 Failed&#8203;: 0\)
 >   Non\-zero wait status&#8203;: 134
 >   Parse errors&#8203;: No plan found in TAP output
 > Files=21\, Tests=4517\, 15 wallclock secs \( 2\.41 usr  0\.12 sys \+ 12\.29
 > cusr
 > 0\.85
 > csys = 15\.67 CPU\)
 > Result&#8203;: FAIL
 > Failed 2/21 test programs\. 0/4517 subtests failed\.
 > make&#8203;: \*\*\* \[Makefile&#8203;:1071&#8203;: test\_dynamic\] Error 255
 >   VPIT/indirect\-0\.38\.tar\.gz
 >   /usr/bin/make test \-\- NOT OK
 > //hint// to see the cpan\-testers results for installing this module\,
 > try&#8203;:
 >   reports VPIT/indirect\-0\.38\.tar\.gz
 > \[shlomif@&#8203;telaviv1 perl\]$
 > \`\`\`
 >
 > I am on mageia v7 x86\-64 \( https://en.wikipedia.org/wiki/Mageia \)\.
 >
 > \`\`\`
 >

My research so far indicates that it is the combination of
\-Duseithreads AND \-DDEBUGGING that causes the failures in two tests
in indirect's test suite\.  I\.e\.\, I do \*not\* get the failures when I
build with threads or with debugging individually\.

This also appears to be the case with these two failures reported by
Andreas&#8203;:

http&#8203;://www\.cpantesters\.org/cpan/report/6df6fa7e\-3840\-11e9\-99ca\-ba6e2b878bbe

http&#8203;://www\.cpantesters\.org/cpan/report/f3ffdba6\-3852\-11e9\-a75d\-ac272b878bbe

Can you confirm that it is the combination of these two configure
options that generates the failures?

Indeed. With either of these options removed - "cpan -i indirect" works.

Note that without -DDEBUGGING, asserts are no-ops, so of course it won't
get an assertion error without that option. What this really means is
that this fails on threaded builds, and on unthreaded there is a
problem, but it doesn't affect the outcome of the test cases.

Thank you very much\.

\-\- 
James E Keenan \(jkeenan@&#8203;cpan\.org \<mailto&#8203;:jkeenan@&#8203;cpan\.org>\)

--
Shlomi Fish http​://www.shlomifish.org/

Buddha has the Chuck Norris nature.

Please reply to list if it's a mailing list post - http​://shlom.in/reply .

@p5pRT
Copy link
Author

p5pRT commented Mar 17, 2019

From @tonycoz

On Sat, 16 Mar 2019 07​:51​:14 -0700, shlomif@​gmail.com wrote​:

indirect.pm-asserts-fail.md

perl5.29.9​: indirect.xs​:264​: indirect_map_store​: Assertion
`((void*)(oi->buf)) !
= 0' failed.

This is a bug in indirect.

Copy() is built on top of memcpy(), and it causes undefined behaviour if you supply a NULL pointer to memcpy() even if no data is being copied.

When I was working on #131746 I had two possible solutions​:

a) add conditionals to the Copy() etc macros so they're safe if "n" is zero.

b) assert() that the pointers are non-NULL

The problem with a) is that every call to the macros pay the cost, even code that correctly only calls these macros with non-NULL pointers.

It also means that there's no indication to CPAN modules that use these macros that they're doing something undefined in older perls, since older perls wouldn't have the conditionals, and might still be supplying NULL pointers, resulting in undefined behaviour on older perls.

So I went with b) so rather than hiding undefined behaviour bugs, a -DDEBUGGING build will scream about them.

Tony

@vpit
Copy link
Contributor

vpit commented Apr 20, 2020

This was fixed in indirect 0.39, released 9 months ago, so I'm closing this ticket.

From an user's perspective, it wasn't really clear that Copy() had the same shortcomings as memcpy() : perlapi says "The XSUB-writer's interface to the C "memcpy" function", which is quite vague, and perlguts says nothing. This change was probably the best theoretical solution, but it did cause breakage where it could have fixed user land code instead. I still think it's a missed opportunity, as the NULL check would have been optimized away by any sane compiler in most cases.

@vpit vpit closed this as completed Apr 20, 2020
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

2 participants