You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Delete np->dynscope botch; refactor nvflags to uint32_t instead
This commit refactors the local builtin to take advantage of some
changes I intend to submit later as separate pull requests. These are:
- np->nvflags has been expanded from 16-bit to 32-bit. This fixes
the longstanding limitation detailed in a previous ksh2020 bug:
att#1038.
The fix consists of masking out nv_open-centric flags with
explicit uses of the new NV_OPENMASK, rather than implicitly and
obtusely abusing the limitations of unsigned short types.
Here, I take advantage of it for storing NV_DYNAMIC in np->nvflags
and using it from there, which is a safer and more simple choice
long term.
- A bugfix from ksh93v- 2012-08-24 has been backported to fix
a potential segfault that is triggered under ASan when changing
the sizes of np->nvsize and np->nvflags to uint32_t. This cannot
be triggered on the dev branch, but I will submit this individually
soon enough. (I would have already submitted it had I not been
forced to deal with a broken PSU shortly after submitting ksh93#805;
0 out of 10 experience don't recommend).
- Updated comment regarding pitfalls in the ksh93v- and current
implementation of local.
In any case I intend to separate out various fixes from this branch and
submit them as separate pull requests, if only to eventually reduce the
scope of this one to just the local builtin and nothing else (the
sh_funscope refactor for instance fixes an out of bounds bug that has
been on the dev branch for far too long). Unfortunately my life has
been quite hellish lately, so there is no ETA yet.
0 commit comments