bug-bash
[Top][All Lists]
Advanced

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

Re: history -r a; history -c; history -r b gives segfault


From: Chet Ramey
Subject: Re: history -r a; history -c; history -r b gives segfault
Date: Mon, 11 Jun 2018 11:10:28 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 6/10/18 3:28 AM, Edward Huff wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu'
> -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
> -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  -D_GNU_SOURCE
> -DRECYCLES_PIDS -DDEFAULT_PATH_VALUE='/usr/local/bin:/usr/bin'  -O2 -g
> -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
> -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong
> -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
> -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection
> -Wno-parentheses -Wno-format-security
> uname output: Linux elite.mainst 4.16.12-300.fc28.x86_64 #1 SMP Fri May 25
> 21:13:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
> Machine Type: x86_64-redhat-linux-gnu
> 
> Bash Version: 4.4
> Patch Level: 19
> Release Status: release
> 
> Description:
> Segfault from reading a history file not starting with # with
> HISTTIMEFORMAT set and history_multiline_entries nonzero and
> with the history cleared and read on the same input line.
> 
> Repeat-By:
> 
> env -i bash --noprofile --norc
> echo $'#1\necho a'>a
> echo 'echo b'>b
> HISTTIMEFORMAT='%s '
> history -r a # force history_multiline_entries to be nonzero
> history -c; history -r b # force history_length to be zero when reading
> Segmentation fault (core dumped)

Thanks for the report. This fix will be in the next devel branch push.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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