1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-24 15:04:13 +00:00
cde/src/cmd/ksh93/sh
Martijn Dekker 506bd2b23a fix SHOPT_REGRESS crash
If ksh was compiled with -DSHOPT_REGRESS=1, it would immediately
segfault on init. After fixing that, another segfault remained that
occurred when using the --regress= command line option with an
invalid option-argument.

The __regress__ builtin allows tracing a few things (see
'__regress__ --man' after compiling with -DSHOPT_REGRESS=1, or
usage[] in src/cmd/ksh93/bltins/regress.c). It seems of limited
use, but at least it can be used/tested now.

src/cmd/ksh93/sh/init.c: sh_init():
- Move the call to sh_regress_init() up. The crash on init was
  caused by geteuid() being intercepted by regress.c before the
  shp->regress (== sh.regress) pointer was initialised.
- The builtin can also be called using a --regress= option-argument
  on the ksh command line. Before calling b___regress__() to parse
  that, temporarily change error_info.exit so any usage error calls
  exit(3) instead of sh_exit(), as the latter assumes a fully
  defined shell state and this call is done before the shell is
  fully initialised.
2020-08-22 16:03:01 +01:00
..
args.c Fix process substitution combined with redirection (#40) 2020-06-23 23:02:16 +01:00
arith.c silence macro redefinition warnings (re: 7003aba4) 2020-06-16 04:51:21 +02:00
array.c Fix creation of extra associative array element '0' (#101) 2020-07-31 17:32:09 +01:00
bash.c Fix 47 typos in user-facing help and error messages 2020-06-12 01:45:12 +02:00
defs.c Fix 'test'/'[' exit status >1 on error in arithmetic expression 2020-06-12 01:45:15 +02:00
deparse.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
env.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
expand.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
fault.c Fix a fork bomb when vi is run from a script and sent Ctrl-Z (#73) 2020-07-13 19:10:23 +01:00
fcin.c Fix parsing of multibyte characters 2020-06-12 01:45:17 +02:00
init.c fix SHOPT_REGRESS crash 2020-08-22 16:03:01 +01:00
io.c Fix crash, take three (re: e805c7d9, 33858689) 2020-08-11 01:51:31 +01:00
jobs.c Fix crash upon running many subshells (#113) 2020-08-12 18:50:59 +01:00
lex.c Fix command substitutions run on the same line as a here-doc (#91) 2020-07-24 00:03:57 +01:00
macro.c Fix crash upon running many subshells (#113) 2020-08-12 18:50:59 +01:00
main.c Fix an infinite loop related to $_ if ksh is /bin/sh (#90) 2020-07-24 01:20:26 +01:00
name.c sh/name.c: rm ancient binary compat overrides 2020-08-16 04:49:18 +01:00
nvdisc.c Fix unset method in multidimensional arrays (#105) 2020-08-05 18:14:30 +01:00
nvtree.c Fix memory corruption when a compound variable is unset (#49) 2020-06-29 18:08:28 +01:00
nvtype.c Fix crash upon running many subshells (#113) 2020-08-12 18:50:59 +01:00
parse.c Remove unused libcoshell 2020-07-17 19:28:52 +01:00
path.c Fix 'command -p' lookup if hash table entry exists (re: c9ccee86) 2020-08-17 20:23:39 +01:00
pmain.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
shcomp.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
streval.c silence macro redefinition warnings (re: 7003aba4) 2020-06-16 04:51:21 +02:00
string.c printf %H: fix/reduce encoding into entities (re: 8477d2ce) 2020-08-11 08:16:27 +01:00
subshell.c Fix leak and crash upon defining functions in subshells 2020-08-14 00:25:31 +01:00
suid_exec.c Merge dtksh patches from one of the CDE developers (#85) 2020-07-22 06:44:24 +01:00
tdump.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
timers.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
trestore.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
waitevent.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
xec.c Fix 'command -p' lookup if hash table entry exists (re: c9ccee86) 2020-08-17 20:23:39 +01:00