On Wed, Aug 20, 2025 at 3:37 PM Chet Ramey <chet.ra...@case.edu> wrote:
>
> On 8/20/25 1:45 PM, penguin p wrote:
> >
> >  > https://cgit.git.savannah.gnu.org/cgit/bash.git/?h=devel <https://
> > cgit.git.savannah.gnu.org/cgit/bash.git/?h=devel>
> >
> > Sorry, I am not able to build using the Mac, so I go into arch linux then
> > build and tested over there.
> >
> > I pressed so hard I got this error
> > ```
> > This is workbench@ArchLinux: ~/works/bash
> > $ ^C
> > This is workbench@ArchLinux: ~/works/bash
> > $ ^C
> > This is workbench@ArchLinux: ~/works/bash
>
> What's the exact key sequence you're inputting, and are you still sending
> ESC after ^C from your keyboard config? (And why do you do that?)
>
> I assume you're typing ^R^C and your keyboard is sending ^R^C^[, right?
>
> > =================================================================
> > ==1078506==ERROR: AddressSanitizer: heap-use-after-free on address
> > 0x7c315f7e217c at pc 0x55bc1d03b545 bp 0x7ffdbdb3c920 sp 0x7ffdbdb3c910
> > WRITE of size 4 at 0x7c315f7e217c thread T0
> >      #0 0x55bc1d03b544 in _rl_search_getchar /home/arch/works/bash/lib/
> > readline/isearch.c:322
>
> This is probably the same issue Grisha identified initially: handling
> SIGINT in rl_read_key ends up invalidating the search context, and then
> rl_read_key returns -1, which _rl_search_getchar tries to assign to
> cxt->c_lastc. But I'd like to be able to reproduce it.
>

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.

Reply via email to