-
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 crashes caused by 'typeset -RF' (#47)
Variables created with 'typeset -RF' were being treated as short integers, even though they are actually floating point values. As a result the following example will cause a crash: $ typeset -RF foo=1 $ test "$foo" This is fixed by checking for 'NV_DOUBLE' with 'nv_isattr', which prevents ksh from treating floating point values as short integers due to '== NV_INT16P' excluding 'NV_DOUBLE'. This bugfix was backported from ksh93v- 2013-10-10-alpha. src/cmd/ksh93/sh/array.c, src/cmd/ksh93/sh/name.c, src/cmd/ksh93/sh/nvdisc: - Avoid treating floating point values as short integers by checking for 'NV_DOUBLE' with 'nv_isattr'. src/cmd/ksh93/tests/types.sh: - Add a regression test for the 'typeset -RF' crash. The crash cannot be replicated if 'typeset -RF' sets 'foo' to zero.
- Loading branch information
Showing
6 changed files
with
14 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ | |
* David Korn <[email protected]> * | ||
* * | ||
***********************************************************************/ | ||
#define SH_RELEASE "93u+m 2020-06-26" | ||
#define SH_RELEASE "93u+m 2020-06-28" |
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