-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
8 changed files
with
33 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters