[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Segfault with set -o emacs in -c

From: Harald van Dijk
Subject: Segfault with set -o emacs in -c
Date: Sun, 18 Dec 2022 06:35:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnux32
Compiler: clang -mx32
Compilation CFLAGS: -O2
uname output: Linux framework 6.0.12 #1 SMP PREEMPT_DYNAMIC @1664744947 x86_64 
Machine Type: x86_64-pc-linux-gnux32

Bash Version: 5.2
Patch Level: 12
Release Status: release

        bash segfaults if 'set -o emacs' is run when it is executing a command 

        gdb shows:

        Program received signal SIGSEGV, Segmentation fault.
        0x002c64fa in parse_and_execute (string=string@entry=0x3553a0 "set -o emacs", 
from_file=<optimized out>, flags=flags@entry=20) at /h/bash-5.2/builtins/evalstring.c:341
        341      while (*(bash_input.location.string) || parser_expanding_alias 
        (gdb) p bash_input.location.string
        $1 = 0x0

        This is ultimately because:

        static int
        set_edit_mode (on_or_off, option_name)
             int on_or_off;
             char *option_name;
              if (interactive)
                with_input_from_stdin ();

        The assumption here, that if (interactive), input is coming from stdin, 
does not hold when running bash -ic.

        bash -ic 'set -o emacs'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]