Terminal.app crashes with Japanese IME input when text wraps to next line

Environment:

  • macOS 26.3 (25D125)
  • Terminal.app 2.15 (466)
  • Apple Silicon
  • Input method: Japanese (Romaji) - built-in Kotoeri

Issue: Terminal.app crashes consistently when typing Japanese text using the built-in Japanese input method (Romaji) and the input line wraps beyond the terminal width.

Steps to Reproduce:

  1. Open Terminal.app with default profile (Basic)
  2. Set terminal window width to ~80 columns
  3. Start typing Japanese text using macOS built-in Japanese input (Romaji)
  4. Continue typing until the text wraps to the next line
  5. Wait a few seconds after the wrap occurs
  6. Terminal.app crashes

Key info from crash report:

  • Crash thread name: (input method 992 com.apple.inputmethod.Kotoeri.RomajiTyping)
  • ASI: BUG IN CLIENT OF LIBMALLOC: memory corruption of free block
  • Exception: EXC_BREAKPOINT (SIGTRAP)
  • Stack trace involves: IMKInputSession_Modern setMarkedTextSendTextInputEventNSTextInputContext
  • The crash occurs in _xzm_xzone_malloc_freelist_outlined called from _CFRuntimeCreateInstance__CFStringCreateImmutableFunnel3+[NSString stringWithUTF8String:]

Notes:

  • Does NOT occur with paste input, only with live IME typing
  • Does NOT occur with ASCII-only input
  • Reproducible multiple times per week with normal Japanese usage
  • iTerm2 does not exhibit this issue
  • The crash appears to be a use-after-free or buffer miscalculation in Terminal.app's handling of marked text (未確定文字列) during line wrapping

Has anyone else experienced this? Any known workarounds other than switching to iTerm2?

Terminal.app crashes with Japanese IME input when text wraps to next line
 
 
Q