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

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



On Mon, 2018-10-08 at 16:02 +0000, Daniel Shahaf wrote:
> Daniel Shahaf wrote on Mon, 08 Oct 2018 15:49 +0000:
> > 
> > I did.  If someone wants to look into it (not necessarly Peter), be my
> > guest.
> It's crashing on the 'print $manpath' line in B02.

Next step is to see if that code chunk on its own is responsible,

 typeset MANPATH
 manpath=(/ /)
 typeset -UT MANPATH manpath
 print $manpath

--- that's going to need to be within a function to have the right
effect, so

() {
  typeset MANPATH
  manpath=(/ /)
  typeset -UT MANPATH manpath
  print $manpath
}

--- or if there's some precursor, and if the latter whether $manpath is
accessible without a crash at the end of the previous test.  If yes to
both it's going to be interesting, but that seems unlikely.  If there's
a precursor hopefully it's some previous assignment to manpath or
MANPATH that can be tracked down and added to the above by hand.
Printing out "$manpath $MANPATH ${(t)manpath} ${(t)MANPATH}" at the top
of the test (before it starts crashing) might or might not help.

Presumably, then, the bin_typeset call is leaving manpath in a bad
state.  This is certainly a somewhat hybrid case as manpath is a special
while -T is for user tying --- so this could be down to consistently
making sure the specialness stays.  It's not clear from what I've seen
so far if the valgrind error is actually within the above code.

pws



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