Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] [long] typeset doesn't report tied parameters (and related issues)



Peter Stephenson wrote on Mon, Oct 08, 2018 at 16:24:04 +0100:
> On Mon, 2018-10-08 at 14:28 +0000, Daniel Shahaf wrote:
> > Peter Stephenson wrote on Mon, 08 Oct 2018 15:10 +0100:
> > I see a failure in a clean build on Debian stretch
> > 
> > [[[
> > Test /home/daniel/src/zsh/./Test/V10private.ztst failed: bad status 139,
> > expected 0 from:
> >  if (( UID )); then
> >    ZTST_verbose=0 $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh private.TMP/B02
> >  else
> >    ZTST_skip="cannot re-run typeset tests when tests run as superuser"
> >  fi
> > Was testing: typeset still works with zsh/param/private module loaded
> > ]]]
> > 
> > It then says "2 failures, 2 skipped" even though no other failures are
> > listed in the output.
> 
> Hmm, I'm guessing all the B02 failures are all down to being re-run from
> V10?  That should be obvious from the output --- the first run of B02 is
> much earlier.  Is that failing for anyone?  (This needs confirming.)
> 

Yes.

% make -s check TESTNUM=B02 ZTST_verbose=2 | tail 
ZTST_test: all tests successful
**************************************
0 successful test scripts, 1 failure, 0 skipped
**************************************
Makefile:187: recipe for target 'check' failed

> > This is with --enable-zsh-debug and modules compiled statically, if that
> > matters.
> 
> Then there's even more you're not telling me --- V10 doesn't get
> compiled in and would be skipped by default in this case.  However, I
> updated the configuration and I'm still not seeing any problems myself.
> 

I don't know what you mean.  V10 normally runs and succeeds in my build.

> There's a reasonable chance valgrind may help with the 139 status.  I
> didn't get any hints from adding it to the combined V10 / B02 test,
> however.

I did.  If someone wants to look into it (not necessarly Peter), be my guest.

==25895== Invalid read of size 8
==25895==    at 0x4823AE: zshlex (lex.c:280)
==25895==    by 0x4ACBC0: parse_event (parse.c:581)
==25895==    by 0x47109D: loop (init.c:146)
==25895==    by 0x47659B: zsh_main (init.c:1757)
==25895==    by 0x420201: main (main.c:93)
==25895==  Address 0x3a is not stack'd, malloc'd or (recently) free'd
==25895== 
==25895== 
==25895== Process terminating with default action of signal 11 (SIGSEGV)
==25895==  Access not within mapped region at address 0x3A
==25895==    at 0x4823AE: zshlex (lex.c:280)
==25895==    by 0x4ACBC0: parse_event (parse.c:581)
==25895==    by 0x47109D: loop (init.c:146)
==25895==    by 0x47659B: zsh_main (init.c:1757)
==25895==    by 0x420201: main (main.c:93)
==25895==  If you believe this happened as a result of a stack
==25895==  overflow in your program's main thread (unlikely but
==25895==  possible), you can try to increase the size of the
==25895==  main thread stack using the --main-stacksize= flag.
==25895==  The main thread stack size used in this run was 8388608.
==25895== 
==25895== HEAP SUMMARY:
==25895==     in use at exit: 238,978 bytes in 8,046 blocks
==25895==   total heap usage: 229,079 allocs, 221,033 frees, 12,615,547 bytes allocated
==25895== 
==25895== LEAK SUMMARY:
==25895==    definitely lost: 0 bytes in 0 blocks
==25895==    indirectly lost: 0 bytes in 0 blocks
==25895==      possibly lost: 0 bytes in 0 blocks
==25895==    still reachable: 238,978 bytes in 8,046 blocks
==25895==         suppressed: 0 bytes in 0 blocks
==25895== Reachable blocks (those to which a pointer was found) are not shown.
==25895== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==25895== 
==25895== For counts of detected and suppressed errors, rerun with: -v
==25895== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
zsh: segmentation fault  valgrind --leak-check=full ../Src/zsh +Z -f ~/src/zsh/Test/ztst.zsh 



Messages sorted by: Reverse Date, Date, Thread, Author