-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 'typeset -T' regression involving subshells (re: 1f5287c)
The issue 704 regression test added to types.sh in the referenced commit crashes on some systems. ASan traced the problem to a use after free in nv_restore() in subshell.c, so the problem looked like a problem with virtual subshells right off the bat. Further tracing led me to the probable root cause in nv_settype() in nvdisc.c. That function contains some hackery that temporarily disables the virtual subshell handling by setting sh.subshell to 0. It was added in ksh 93t+ 2010-05-27. This commit replaces that with a sh_subfork() call that makes a virtual subshell fork before a variable changes types in one.
- Loading branch information
Showing
3 changed files
with
8 additions
and
8 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