On Wed, Aug 20, 2025 at 3:48 PM Grisha Levit <grishale...@gmail.com> wrote:
> You can reproduce this by adding a key binding to your terminal emulator
> to send \003\033 for some key combination. This worked for me in both
> Terminal.app and iTerm, though it might take a few rounds of entering
> incremental search mode and hitting the custom key combination.

Or on Linux by injecting a SIGINT with strace:

strace --trace-fds 0 -e read --inject=read:signal=SIGINT:when=2 \
    -E INPUTRC=/ -E HISTFILE= -E PS1='$ ' \
    -E ASAN_OPTIONS="${ASAN_OPTIONS:+$ASAN_OPTONS:}detect_leaks=0" \
    ./bash --norc -in <<< $'\cR\e'

$ read(0, "\22", 1)                       = 1
(reverse-i-search)`': read(0, "\33", 1)                       = 1
--- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} ---
$ --- SIGINT {si_signo=SIGINT, si_code=SI_USER, si_pid=303292, si_uid=1000} ---
=================================================================
==303292==ERROR: AddressSanitizer: heap-use-after-free on address ...
WRITE of size 4 at 0xe6bad49e037c thread T0
    #0 0xbf85676577b0 in _rl_search_getchar isearch.c:322:18
...

Reply via email to