Your message dated Tue, 9 Jun 2026 12:26:39 +0530
with message-id <[email protected]>
and subject line Re: ksh: KEYBD trap with undefined associative-array elements 
kills shell
has caused the Debian Bug report #940989,
regarding ksh: KEYBD trap with undefined associative-array elements kills shell
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
940989: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940989
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ksh
Version: 2020.0.0~beta1-1
Severity: normal

Dear Maintainer,

My .env file contains

        typeset -A SH_ktbl; SH_ktbl['   ']=".sh.edchar=$'\026\t'"
        trap 'eval "${SH_ktbl[${.sh.edchar}]}"' KEYBD

(Replaces tab with ^V-tab; suggested by David Korn to disable
command-name and filename completion so tabs can be entered normally.)

But, in an apparent memory race condition, perhaps due to undefined
array elements, the new 2020 version soon gives "double free or
corruption (fasttop)" and kills the shell.

(For my situation,

        trap "[[ \${.sh.edchar} == $'\t' ]] && .sh.edchar=$'\026\t'" KEYBD

is a less-efficient workaround.)

Bill


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 5.2.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1), LANGUAGE=en_US 
(charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages ksh depends on:
ii  binfmt-support  2.2.0-2
ii  libc6           2.29-2

ksh recommends no packages.

ksh suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 1.0.0~beta.1-1

This was a defect in the AT&T ksh2020 codebase (2020.0.0~beta1-1), the
abandoned upstream branch that the bug was filed against.

Debian's ksh source was since replaced by ksh93u+m and does not carry
this regression.

Reproduced and confirmed:

  - 2020.0.0~beta1-1   -> SIGABRT (double free), confirmed on arm64
  - 1.0.0~beta.1-1     -> no crash
  - 1.0.10-4 (current) -> no crash

Closing as fixed by the ksh93u+m migration.

Thanks for the report, and sorry this took a while.

Anuradha

--- End Message ---

Reply via email to