mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 11:42:21 +00:00
In ksh93r a crash can occur after switching from emacs mode to vi
mode[*]:
$ ENV=/./dev/null ksh2006 -o emacs
$ echo ${.sh.version}
Version M 1993-12-28 r
$ set -o vi
$ <Esc> <r> <r> # This triggers the memory fault
Commit 129614b9
added the OpenSUSE patch for this crash. This commit
adds the regression test for it.
[*]: https://bugzilla.opensuse.org/show_bug.cgi?id=179917
This commit is contained in:
parent
14352ba0a7
commit
5ca7c325e3
1 changed files with 17 additions and 0 deletions
|
@ -733,5 +733,22 @@ w echo "Exit status is: $?"
|
||||||
u Exit status is: 1
|
u Exit status is: 1
|
||||||
!
|
!
|
||||||
|
|
||||||
|
((SHOPT_ESH)) && ((SHOPT_VSH)) && tst $LINENO <<"!"
|
||||||
|
L crash after switching from emacs to vi mode
|
||||||
|
|
||||||
|
# In ksh93r using the vi 'r' command after switching from emacs mode could
|
||||||
|
# trigger a memory fault: https://bugzilla.opensuse.org/show_bug.cgi?id=179917
|
||||||
|
|
||||||
|
d 15
|
||||||
|
w exec $SHELL -o emacs
|
||||||
|
u emacs
|
||||||
|
w set -o vi
|
||||||
|
u set -o vi
|
||||||
|
c \Erri
|
||||||
|
w echo Success
|
||||||
|
u echo
|
||||||
|
r ^Success\r?\n$
|
||||||
|
!
|
||||||
|
|
||||||
# ======
|
# ======
|
||||||
exit $((Errors<125?Errors:125))
|
exit $((Errors<125?Errors:125))
|
||||||
|
|
Loading…
Reference in a new issue