mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
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. |
||
|---|---|---|
| .. | ||
| args.c | ||
| arith.c | ||
| array.c | ||
| bash.c | ||
| defs.c | ||
| deparse.c | ||
| env.c | ||
| expand.c | ||
| fault.c | ||
| fcin.c | ||
| init.c | ||
| io.c | ||
| jobs.c | ||
| lex.c | ||
| macro.c | ||
| main.c | ||
| name.c | ||
| nvdisc.c | ||
| nvtree.c | ||
| nvtype.c | ||
| parse.c | ||
| path.c | ||
| pmain.c | ||
| shcomp.c | ||
| streval.c | ||
| string.c | ||
| subshell.c | ||
| suid_exec.c | ||
| tdump.c | ||
| timers.c | ||
| trestore.c | ||
| waitevent.c | ||
| xec.c | ||