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

Bleadperl breaks TOKUHIROM/Module-Build-Pluggable-0.10.tar.gz on Windows #15255

Closed
p5pRT opened this issue Mar 29, 2016 · 11 comments
Closed

Bleadperl breaks TOKUHIROM/Module-Build-Pluggable-0.10.tar.gz on Windows #15255

p5pRT opened this issue Mar 29, 2016 · 11 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 29, 2016

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

Searchable as RT127799$

@p5pRT
Copy link
Author

p5pRT commented Mar 29, 2016

From @chorny

Created by @chorny

Tests pass on perl 5.22.1, and have segfault on 5.23.9.
http​://www.cpantesters.org/cpan/report/63c9657d-6c03-1014-85c9-a74ca7198211
tokuhirom/Module-Build-Pluggable#4

02_requires.t​:

  # Subtest​: Module​::Build​::Pluggable​::Base#requries

03_add_extra_compiler_flags.t​:

  # Subtest​: Module​::Build​::Pluggable​::Base#add_extra_compiler_flags

Problem is in sub Test​::Module​::Build​::Pluggable​::run_build_pl, line "do
'Build.PL';".
https://github.com/tokuhirom/Module-Build-Pluggable/blob/master/lib/Test/Module/Build/Pluggable.pm#L105

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.23.9:

Configured by strawberry-perl at Fri Mar 25 14:42:31 2016.

Summary of my perl5 (revision 5 version 23 subversion 9) configuration:

  Platform:
    osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread-64int
    uname='Win32 strawberry-perl 5.23.9.1 #1 Fri Mar 25 14:40:30 2016 i386'
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags =' -s -O2 -DWIN32  -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing
-mms-bitfields',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='4.9.2', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678,
doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12,
longdblkind=3
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='long
long', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags ='-s -L"C:\STRAWB~1\perl\lib\CORE"
-L"C:\STRAWB~1\c\lib"'
    libpth=C:\STRAWB~1\c\lib C:\STRAWB~1\c\i686-w64-mingw32\lib
C:\STRAWB~1\c\lib\gcc\i686-w64-mingw32\4.9.2
    libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr
-lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr
-lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=, so=dll, useshrplib=true, libperl=libperl523.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -s -L"C:\STRAWB~1\perl\lib\CORE"
-L"C:\STRAWB~1\c\lib"'



@INC for perl 5.23.9:
    C:/Strawberry239/perl/site/lib
    C:/Strawberry239/perl/vendor/lib
    C:/Strawberry239/perl/lib
    .


Environment for perl 5.23.9:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Program Files\Far
Manager\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Strawberry239\c\bin;C:\Strawberry239\perl\site\bin;C:\Strawberry239\perl\bin;C:\Git\cmd
    PERL_BADLANG (unset)
    PERL_HASH_SEED=0x11111111
    SHELL (unset)


-- 
Alexandr Ciornii, http://chorny.net

@p5pRT
Copy link
Author

p5pRT commented Mar 30, 2016

From @iabyn

On Tue, Mar 29, 2016 at 02​:58​:53AM -0700, Alexandr Ciornii wrote​:

Tests pass on perl 5.22.1, and have segfault on 5.23.9.
http​://www.cpantesters.org/cpan/report/63c9657d-6c03-1014-85c9-a74ca7198211
tokuhirom/Module-Build-Pluggable#4

02_requires.t​:

\# Subtest​: Module​::Build​::Pluggable​::Base\#requries

03_add_extra_compiler_flags.t​:

\# Subtest​: Module​::Build​::Pluggable​::Base\#add\_extra\_compiler\_flags

Problem is in sub Test​::Module​::Build​::Pluggable​::run_build_pl, line "do
'Build.PL';".
https://github.com/tokuhirom/Module-Build-Pluggable/blob/master/lib/Test/Module/Build/Pluggable.pm#L105

I can't reproduce on Linux - I tried 5.23.9 and blead.

--
More than any other time in history, mankind faces a crossroads. One path
leads to despair and utter hopelessness. The other, to total extinction.
Let us pray we have the wisdom to choose correctly.
  -- Woody Allen

@p5pRT
Copy link
Author

p5pRT commented Mar 30, 2016

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

@p5pRT
Copy link
Author

p5pRT commented Apr 5, 2016

From @tonycoz

On Wed Mar 30 04​:09​:53 2016, davem wrote​:

I can't reproduce on Linux - I tried 5.23.9 and blead.

Reproduced on Win32​:

perl523.dll!VMem​::Realloc(void * pMem, unsigned __int64 size) Line 178 C++
  perl523.dll!CPerlHost​::Realloc(void * ptr, unsigned __int64 size) Line 63 C++
  perl523.dll!PerlMemRealloc(IPerlMem * piPerl, void * ptr, unsigned __int64 size) Line 302 C++
  perl523.dll!Perl_safesysrealloc(void * where, unsigned __int64 size) Line 274 C
  perl523.dll!Perl_savestack_grow(interpreter * my_perl) Line 146 C
  perl523.dll!Perl_save_pushptrptr(interpreter * my_perl, void * const ptr1, void * const ptr2, const int type) Line 235 C
  perl523.dll!Perl_save_generic_svref(interpreter * my_perl, sv * * sptr) Line 262 C
  perl523.dll!S_sublex_push(interpreter * my_perl) Line 2395 C
  perl523.dll!Perl_yylex(interpreter * my_perl) Line 4648 C
  perl523.dll!Perl_yyparse(interpreter * my_perl, int gramtype) Line 332 C
  perl523.dll!S_doeval_compile(interpreter * my_perl, unsigned char gimme, cv * outside, unsigned long seq, hv * hh) Line 3383 C
  perl523.dll!Perl_pp_require(interpreter * my_perl) Line 4055 C
  perl523.dll!Perl_runops_debug(interpreter * my_perl) Line 2239 C
  perl523.dll!Perl_call_sv(interpreter * my_perl, sv * sv, volatile long flags) Line 2804 C
  perl523.dll!Perl_call_list(interpreter * my_perl, long oldscope, av * paramList) Line 4972 C
  perl523.dll!S_process_special_blocks(interpreter * my_perl, long floor, const char * const fullname, gv * const gv, cv * const cv) Line 8760 C
  perl523.dll!Perl_newATTRSUB_x(interpreter * my_perl, long floor, op * o, op * proto, op * attrs, op * block, char o_is_gv) Line 8688 C
  perl523.dll!Perl_utilize(interpreter * my_perl, int aver, long floor, op * version, op * idop, op * arg) Line 6076 C
  perl523.dll!Perl_yyparse(interpreter * my_perl, int gramtype) Line 352 C
  perl523.dll!S_doeval_compile(interpreter * my_perl, unsigned char gimme, cv * outside, unsigned long seq, hv * hh) Line 3383 C
  perl523.dll!Perl_pp_require(interpreter * my_perl) Line 4055 C
  perl523.dll!Perl_runops_debug(interpreter * my_perl) Line 2239 C
  perl523.dll!Perl_call_sv(interpreter * my_perl, sv * sv, volatile long flags) Line 2804 C
  perl523.dll!Perl_call_list(interpreter * my_perl, long oldscope, av * paramList) Line 4972 C
  perl523.dll!S_process_special_blocks(interpreter * my_perl, long floor, const char * const fullname, gv * const gv, cv * const cv) Line 8760 C
  perl523.dll!Perl_newATTRSUB_x(interpreter * my_perl, long floor, op * o, op * proto, op * attrs, op * block, char o_is_gv) Line 8688 C
  perl523.dll!Perl_utilize(interpreter * my_perl, int aver, long floor, op * version, op * idop, op * arg) Line 6076 C
  perl523.dll!Perl_yyparse(interpreter * my_perl, int gramtype) Line 352 C
  perl523.dll!S_doeval_compile(interpreter * my_perl, unsigned char gimme, cv * outside, unsigned long seq, hv * hh) Line 3383 C
  perl523.dll!Perl_pp_require(interpreter * my_perl) Line 4055 C
  perl523.dll!Perl_runops_debug(interpreter * my_perl) Line 2239 C
  perl523.dll!Perl_call_sv(interpreter * my_perl, sv * sv, volatile long flags) Line 2804 C
  perl523.dll!Perl_call_list(interpreter * my_perl, long oldscope, av * paramList) Line 4972 C
  perl523.dll!S_process_special_blocks(interpreter * my_perl, long floor, const char * const fullname, gv * const gv, cv * const cv) Line 8760 C
  perl523.dll!Perl_newATTRSUB_x(interpreter * my_perl, long floor, op * o, op * proto, op * attrs, op * block, char o_is_gv) Line 8688 C
  perl523.dll!Perl_utilize(interpreter * my_perl, int aver, long floor, op * version, op * idop, op * arg) Line 6076 C
  perl523.dll!Perl_yyparse(interpreter * my_perl, int gramtype) Line 352 C
  perl523.dll!S_doeval_compile(interpreter * my_perl, unsigned char gimme, cv * outside, unsigned long seq, hv * hh) Line 3383 C
  perl523.dll!Perl_pp_require(interpreter * my_perl) Line 4055 C
  perl523.dll!Perl_runops_debug(interpreter * my_perl) Line 2239 C
  perl523.dll!Perl_call_sv(interpreter * my_perl, sv * sv, volatile long flags) Line 2804 C
  perl523.dll!Perl_call_list(interpreter * my_perl, long oldscope, av * paramList) Line 4972 C
  perl523.dll!S_process_special_blocks(interpreter * my_perl, long floor, const char * const fullname, gv * const gv, cv * const cv) Line 8760 C
  perl523.dll!Perl_newATTRSUB_x(interpreter * my_perl, long floor, op * o, op * proto, op * attrs, op * block, char o_is_gv) Line 8688 C
  perl523.dll!Perl_utilize(interpreter * my_perl, int aver, long floor, op * version, op * idop, op * arg) Line 6076 C
  perl523.dll!Perl_yyparse(interpreter * my_perl, int gramtype) Line 352 C
  perl523.dll!S_doeval_compile(interpreter * my_perl, unsigned char gimme, cv * outside, unsigned long seq, hv * hh) Line 3383 C
  perl523.dll!Perl_pp_require(interpreter * my_perl) Line 4055 C
  perl523.dll!Perl_runops_debug(interpreter * my_perl) Line 2239 C
  perl523.dll!Perl_call_sv(interpreter * my_perl, sv * sv, volatile long flags) Line 2804 C
  perl523.dll!Perl_call_list(interpreter * my_perl, long oldscope, av * paramList) Line 4972 C
  perl523.dll!S_process_special_blocks(interpreter * my_perl, long floor, const char * const fullname, gv * const gv, cv * const cv) Line 8760 C
  perl523.dll!Perl_newATTRSUB_x(interpreter * my_perl, long floor, op * o, op * proto, op * attrs, op * block, char o_is_gv) Line 8688 C
  perl523.dll!Perl_utilize(interpreter * my_perl, int aver, long floor, op * version, op * idop, op * arg) Line 6076 C
  perl523.dll!Perl_yyparse(interpreter * my_perl, int gramtype) Line 352 C
  perl523.dll!S_doeval_compile(interpreter * my_perl, unsigned char gimme, cv * outside, unsigned long seq, hv * hh) Line 3383 C
  perl523.dll!Perl_pp_require(interpreter * my_perl) Line 4055 C
  perl523.dll!Perl_runops_debug(interpreter * my_perl) Line 2239 C
  perl523.dll!win32_start_child(void * arg) Line 1744 C++

Trying some debugging.

Tony

@p5pRT
Copy link
Author

p5pRT commented Apr 5, 2016

From @tonycoz

On Mon Apr 04 18​:02​:02 2016, tonyc wrote​:

On Wed Mar 30 04​:09​:53 2016, davem wrote​:

I can't reproduce on Linux - I tried 5.23.9 and blead.

Reproduced on Win32​:

I ran the failing code under DrMemory, which complained about the following bad access​:

Dr. Memory version 1.10.0 build 2 built on Mar 7 2016 23​:05​:08
Dr. Memory results for pid 9884​: "perl.exe"
Application cmdline​: "c​:\perl-blead\bin\perl -Mblib t\02_requires.t"
Recorded 117 suppression(s) from default c​:\Program Files (x86)\Dr. Memory\bin64\suppress-default.txt

Error #1​: UNADDRESSABLE ACCESS beyond heap bounds​: writing 0x00000000049e35f0-0x00000000049e35f8 8 byte(s)
# 0 perl523.dll!Perl_save_pushptrptr [c​:\users\tony\dev\perl\git\perl\scope.c​:232]
# 1 perl523.dll!Perl_newSVpvn_flags [c​:\users\tony\dev\perl\git\perl\sv.c​:9165]
# 2 perl523.dll!Perl_save_generic_svref [c​:\users\tony\dev\perl\git\perl\scope.c​:261]
# 3 perl523.dll!S_sublex_push [c​:\users\tony\dev\perl\git\perl\toke.c​:2392]
# 4 perl523.dll!Perl_yylex [c​:\users\tony\dev\perl\git\perl\toke.c​:4648]
# 5 perl523.dll!VMem​::FreeLock [c​:\users\tony\dev\perl\git\perl\win32\vmem.h​:231]
# 6 perl523.dll!VMem​::Malloc [c​:\users\tony\dev\perl\git\perl\win32\vmem.h​:157]
# 7 perl523.dll!VMem​::FreeLock [c​:\users\tony\dev\perl\git\perl\win32\vmem.h​:231]
# 8 perl523.dll!CPerlHost​::Malloc [c​:\users\tony\dev\perl\git\perl\win32\perlhost.h​:62]
# 9 perl523.dll!PerlMemMalloc [c​:\users\tony\dev\perl\git\perl\win32\perlhost.h​:296]
#10 perl523.dll!Perl_safesysmalloc [c​:\users\tony\dev\perl\git\perl\util.c​:183]
#11 perl523.dll!VMem​::FreeLock [c​:\users\tony\dev\perl\git\perl\win32\vmem.h​:231]
#12 perl523.dll!VMem​::Free [c​:\users\tony\dev\perl\git\perl\win32\vmem.h​:214]
#13 perl523.dll!CPerlHost​::Free [c​:\users\tony\dev\perl\git\perl\win32\perlhost.h​:64]
#14 perl523.dll!Perl_get_context [c​:\users\tony\dev\perl\git\perl\win32\win32thread.c​:31]
#15 perl523.dll!PerlMemFree [c​:\users\tony\dev\perl\git\perl\win32\perlhost.h​:306]
#16 perl523.dll!Perl_sv_clear [c​:\users\tony\dev\perl\git\perl\sv.c​:6650]
#17 perl523.dll!Perl_safesysrealloc [c​:\users\tony\dev\perl\git\perl\util.c​:308]
#18 perl523.dll!VMem​::Malloc [c​:\users\tony\dev\perl\git\perl\win32\vmem.h​:157]
#19 perl523.dll!VMem​::FreeLock [c​:\users\tony\dev\perl\git\perl\win32\vmem.h​:231]
Note​: @​0​:00​:09.070 in thread 11568
Note​: refers to 0 byte(s) beyond last valid byte in prior malloc
Note​: prev lower malloc​: 0x00000000049e1860-0x00000000049e35f0
Note​: allocated here​:
Note​: # 0 replace_malloc [d​:\drmemory_package\common\alloc_replace.c​:2576]
Note​: # 1 perl523.dll!VMem​::FreeLock [c​:\users\tony\dev\perl\git\perl\win32\vmem.h​:231]
Note​: # 2 perl523.dll!CPerlHost​::Malloc [c​:\users\tony\dev\perl\git\perl\win32\perlhost.h​:62]
Note​: # 3 perl523.dll!Perl_get_context [c​:\users\tony\dev\perl\git\perl\win32\win32thread.c​:31]
Note​: # 4 perl523.dll!PerlMemMalloc [c​:\users\tony\dev\perl\git\perl\win32\perlhost.h​:296]
Note​: # 5 perl523.dll!Perl_safesysmalloc [c​:\users\tony\dev\perl\git\perl\util.c​:183]
Note​: # 6 perl523.dll!Perl_ptr_table_store [c​:\users\tony\dev\perl\git\perl\sv.c​:13337]
Note​: # 7 perl523.dll!Perl_ptr_table_fetch [c​:\users\tony\dev\perl\git\perl\sv.c​:13322]
Note​: # 8 perl523.dll!S_sv_dup_common [c​:\users\tony\dev\perl\git\perl\sv.c​:13541]
Note​: # 9 perl523.dll!VMem​::GetLock [c​:\users\tony\dev\perl\git\perl\win32\vmem.h​:224]
Note​: #10 perl523.dll!Perl_si_dup [c​:\users\tony\dev\perl\git\perl\sv.c​:14121]
Note​: #11 perl523.dll!VMem​::Malloc [c​:\users\tony\dev\perl\git\perl\win32\vmem.h​:151]
Note​: instruction​: mov %rax -> (%rcx)

The stack traces look a bit strange, I may need to build with different options to get better traces.

I haven't been able to find a cause yet for the short stack size yet.

Tony

@p5pRT
Copy link
Author

p5pRT commented Apr 5, 2016

From @tonycoz

On Mon Apr 04 19​:03​:11 2016, tonyc wrote​:

The stack traces look a bit strange, I may need to build with
different options to get better traces.

Saner looking stack traces from 32-bit​:

Dr. Memory version 1.10.0 build 2 built on Mar 7 2016 23​:05​:56
Dr. Memory results for pid 8840​: "perl.exe"
Application cmdline​: "perl -Mblib t\02_requires.t"
Recorded 117 suppression(s) from default c​:\Program Files (x86)\Dr. Memory\bin\suppress-default.txt

Error #1​: UNADDRESSABLE ACCESS beyond heap bounds​: writing 0x1427dbc4-0x1427dbc8 4 byte(s)
# 0 perl523.dll!Perl_save_pushptrptr [c​:\users\tony\dev\perl\git\perl\scope.c​:232]
# 1 perl523.dll!Perl_save_generic_svref [c​:\users\tony\dev\perl\git\perl\scope.c​:261]
# 2 perl523.dll!S_sublex_push [c​:\users\tony\dev\perl\git\perl\toke.c​:2392]
# 3 perl523.dll!Perl_yylex [c​:\users\tony\dev\perl\git\perl\toke.c​:4648]
# 4 perl523.dll!Perl_yyparse [c​:\users\tony\dev\perl\git\perl\perly.c​:332]
# 5 perl523.dll!S_doeval_compile [c​:\users\tony\dev\perl\git\perl\pp_ctl.c​:3383]
# 6 perl523.dll!Perl_pp_require [c​:\users\tony\dev\perl\git\perl\pp_ctl.c​:4055]
# 7 perl523.dll!Perl_runops_debug [c​:\users\tony\dev\perl\git\perl\dump.c​:2239]
# 8 perl523.dll!Perl_call_sv [c​:\users\tony\dev\perl\git\perl\win32\perl.c​:2803]
# 9 perl523.dll!Perl_call_list [c​:\users\tony\dev\perl\git\perl\win32\perl.c​:4971]
#10 perl523.dll!S_process_special_blocks [c​:\users\tony\dev\perl\git\perl\win32\op.c​:8758]
#11 perl523.dll!Perl_newATTRSUB_x [c​:\users\tony\dev\perl\git\perl\win32\op.c​:8688]
#12 perl523.dll!Perl_utilize [c​:\users\tony\dev\perl\git\perl\win32\op.c​:6074]
#13 perl523.dll!Perl_yyparse [c​:\users\tony\dev\perl\git\perl\win32\perly.y​:351]
#14 perl523.dll!S_doeval_compile [c​:\users\tony\dev\perl\git\perl\pp_ctl.c​:3383]
#15 perl523.dll!Perl_pp_require [c​:\users\tony\dev\perl\git\perl\pp_ctl.c​:4055]
#16 perl523.dll!Perl_runops_debug [c​:\users\tony\dev\perl\git\perl\dump.c​:2239]
#17 perl523.dll!Perl_call_sv [c​:\users\tony\dev\perl\git\perl\win32\perl.c​:2803]
#18 perl523.dll!Perl_call_list [c​:\users\tony\dev\perl\git\perl\win32\perl.c​:4971]
#19 perl523.dll!S_process_special_blocks [c​:\users\tony\dev\perl\git\perl\win32\op.c​:8758]
Note​: @​0​:00​:04.879 in thread 11008
Note​: refers to 0 byte(s) beyond last valid byte in prior malloc
Note​: prev lower malloc​: 0x1427ccf8-0x1427dbc4
Note​: allocated here​:
Note​: # 0 replace_malloc [d​:\drmemory_package\common\alloc_replace.c​:2576]
Note​: # 1 perl523.dll!VMem​::Malloc [c​:\users\tony\dev\perl\git\perl\win32\vmem.h​:151]
Note​: # 2 perl523.dll!CPerlHost​::Malloc [c​:\users\tony\dev\perl\git\perl\win32\perlhost.h​:62]
Note​: # 3 perl523.dll!PerlMemMalloc [c​:\users\tony\dev\perl\git\perl\win32\perlhost.h​:296]
Note​: # 4 perl523.dll!Perl_safesyscalloc [c​:\users\tony\dev\perl\git\perl\util.c​:435]
Note​: # 5 perl523.dll!Perl_ss_dup [c​:\users\tony\dev\perl\git\perl\sv.c​:14204]
Note​: # 6 perl523.dll!perl_clone_using [c​:\users\tony\dev\perl\git\perl\sv.c​:15202]
Note​: # 7 perl523.dll!PerlProcFork [c​:\users\tony\dev\perl\git\perl\win32\perlhost.h​:1831]
Note​: # 8 perl523.dll!Perl_pp_fork [c​:\users\tony\dev\perl\git\perl\pp_sys.c​:4233]
Note​: # 9 perl523.dll!Perl_runops_debug [c​:\users\tony\dev\perl\git\perl\dump.c​:2239]
Note​: #10 perl523.dll!S_run_body [c​:\users\tony\dev\perl\git\perl\win32\perl.c​:2479]
Note​: #11 perl523.dll!perl_run [c​:\users\tony\dev\perl\git\perl\win32\perl.c​:2402]
Note​: instruction​: mov %ecx -> (%eax)

===========================================================================
FINAL SUMMARY​:

DUPLICATE ERROR COUNTS​:

SUPPRESSIONS USED​:

ERRORS FOUND​:
  1 unique, 1 total unaddressable access(es)
  0 unique, 0 total invalid heap argument(s)
  0 unique, 0 total warning(s)
ERRORS IGNORED​:
Details​: C​:\Users\tony\AppData\Roaming\Dr. Memory\DrMemory-perl.exe.8840.000\results.txt

@p5pRT
Copy link
Author

p5pRT commented Apr 5, 2016

From @iabyn

On Mon, Apr 04, 2016 at 11​:30​:47PM -0700, Tony Cook via RT wrote​:

On Mon Apr 04 19​:03​:11 2016, tonyc wrote​:

The stack traces look a bit strange, I may need to build with
different options to get better traces.

Saner looking stack traces from 32-bit​:

Dr. Memory version 1.10.0 build 2 built on Mar 7 2016 23​:05​:56
Dr. Memory results for pid 8840​: "perl.exe"
Application cmdline​: "perl -Mblib t\02_requires.t"
Recorded 117 suppression(s) from default c​:\Program Files (x86)\Dr. Memory\bin\suppress-default.txt

Error #1​: UNADDRESSABLE ACCESS beyond heap bounds​: writing 0x1427dbc4-0x1427dbc8 4 byte(s)

Hopefully fixed by the following (but not tested on Windows)​:

commit 726368e
Author​: David Mitchell <davem@​iabyn.com>
AuthorDate​: Tue Apr 5 09​:26​:21 2016 +0100
Commit​: David Mitchell <davem@​iabyn.com>
CommitDate​: Tue Apr 5 09​:26​:21 2016 +0100

  ss_dup​: make new savestack have SS_MAXPUSH extra
 
  This fixes RT #perl #127799
 
  My commit v5.23.7-261-g3caf026 made PL_savestack_max claim to have
  allocated less than had actually been claimed (by a margin of SS_MAXPUSH).
  This made the 'check whether the stack needs extending code' slightly
  simpler, and errs on the side of safety. Except​:
 
  Perl_ss_dup(), when duplicating the savestack, makes the new stack
  PL_savestack_max in size, which is large enough to duplicate the existing
  stack, but the new stack no longer has a SS_MAXPUSH margin at the top.
 
  The dSS_ADD family of macros work by assuming there is always such a
  margin​: they push their args onto the stack and only then check whether
  the stack needs growing. This makes the code much more efficient, but of
  course breaks if no margin is present.

Affected files ...
  M sv.c

Differences ...

Inline Patch
diff --git a/sv.c b/sv.c
index 819a250..0200679 100644
--- a/sv.c
+++ b/sv.c
@@ -14182,7 +14182,7 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
 {
     dVAR;
     ANY * const ss	= proto_perl->Isavestack;
-    const I32 max	= proto_perl->Isavestack_max;
+    const I32 max	= proto_perl->Isavestack_max + SS_MAXPUSH;
     I32 ix		= proto_perl->Isavestack_ix;
     ANY *nss;
     const SV *sv;


-- 

"I do not resent criticism, even when, for the sake of emphasis,
it parts for the time with reality".
  -- Winston Churchill, House of Commons, 22nd Jan 1941.

@p5pRT
Copy link
Author

p5pRT commented Apr 5, 2016

From @tonycoz

On Tue Apr 05 01​:35​:22 2016, davem wrote​:

Hopefully fixed by the following (but not tested on Windows)​:
...
- const I32 max = proto_perl->Isavestack_max;
+ const I32 max = proto_perl->Isavestack_max + SS_MAXPUSH;

That fixed it for me.

Tony

@p5pRT
Copy link
Author

p5pRT commented Apr 6, 2016

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

@p5pRT
Copy link
Author

p5pRT commented May 13, 2016

From @khwilliamson

Thank you for submitting this report. You have helped make Perl better.
 
With the release of Perl 5.24.0 on May 9, 2016, this and 149 other issues have been resolved.

Perl 5.24.0 may be downloaded via https://metacpan.org/release/RJBS/perl-5.24.0

@p5pRT p5pRT closed this as completed May 13, 2016
@p5pRT
Copy link
Author

p5pRT commented May 13, 2016

@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
Projects
None yet
Development

No branches or pull requests

1 participant