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

Re: mikachu/badarrays (Re: Valgrind testing, ideas)



On Jun 1, 11:22pm, Mikael Magnusson wrote:
} Subject: Re: mikachu/badarrays (Re: Valgrind testing, ideas)
}
} On Wed, May 31, 2017 at 7:47 AM, Bart Schaefer
} <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > It also appears we've run out of bits for PM_CACHELEN and PM_CHECKEN,
} > the 19 and 20 bit positions are are now occupied by PM_DONTIMPORT_SUID
} > and PM_SINGLE, though I suppose PM_KSHSTORED and PM_ZSHSTORED could do
} > double duty as they won't apply to arrays and functions at once.
} 
} The existing code probably does something fun like assigning these
} flags based on the order of flags in the TYPESET_OPTSTR define.

Indeed, that's the case.  So that means it's now essentially impossible
to add any more options to typeset, because bit positions 19+ are used
by values that must be assigned in the IPDEF(...) structs for params
used/set by the shell.  In other words adding "cC" at the end of the
TYPEST_OPTSTR is now going to be broken by other things, unless we
add some special-case code.

} If you don't use typeset -c/-C for anything, then none of the new code
} should be activated and it is indeed expected that things would work.

As I mentioned:

} > I tried forcing both of the new
} > flags on for non-special PM_ARRAY params in createparam()

So they were getting used everywhere, even without "typeset -c".  What
remained broken after that was the code that resizes an existing array.



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