bug-texinfo
[Top][All Lists]
Advanced

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

"info -f ./bash.info" seg faults on search commands


From: Keith Thompson
Subject: "info -f ./bash.info" seg faults on search commands
Date: Fri, 21 Dec 2018 15:43:09 -0800

I've encountered a segmentation fault in the "info" command.
It shows up when reading a non-compressed "bash.info" file, but not
when reading the equivalent "bash.info.gz" file.

To reproduce on my system:

    $ cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=18.04
    DISTRIB_CODENAME=bionic
    DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
    $ info --version | head -n 1
    info (GNU texinfo) 6.5
    $ bash --version | head -n 1
    GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu)
    $ cp /usr/share/info/bash.info.gz .
    $ sha1sum bash.info.gz
    517a9cafc8fa95b637486838f885e7d1e1529969  bash.info.gz
    $ info -f ./bash.info.gz
        'i' arrays
        # shows section 6.7 Arrays
        's' arrays
        # highlights occurrences of "Arrays" on page
    $ gunzip -v bash.info.gz
    bash.info.gz:    73.5% -- replaced with bash.info
    $ sha1sum bash.info
    4c4948d13b12ec3dabac7b6d06142a263e42e753  bash.info
    $ info -f ./bash.info
        'i' arrays
        # shows section 6.7 Arrays
        's' arrays
        # Segmentation fault (core dumped)

The same problem occurs with texinfo built from the latest source in git:
    commit 32abb3ac2a99770980f49fb4564526e9e53cbac3 (HEAD -> master,
origin/master, origin/HEAD)
    Author: Gavin Smith <address@hidden>
    Date:   2018-12-02 10:26:33 +0000

It occurs with several different versions of the Bash documentation,
so you should be able to reproduce it, but a copy of the bash.info.gz
file I used is available at

    https://drive.google.com/open?id=15JxJfcoABFbOdGEV58Baevdm6Dii9yio

Note that the Ubuntu "bash-doc" package installs a compressed
"bash.info.gz", so "info bash" won't normally reproduce the problem.
I encountered the problem because I installed a newer version of bash
from source, which installs an uncompressed "bash.info".  (I updated
my $INFOPATH to point to the newer bash.info.)  But the problem occurs
with an uncompressed version of the system-installed "bash.info.gz".

So far, I haven't reproduced the problem with other info files.

When I run the "info" command under gdb, I get the following traceback
(texinfo built from the latest source in git):

    (gdb) where
    #0  display_update_node_text (address@hidden) at display.c:516
    #1  0x000055555555f492 in display_update_one_window
(address@hidden) at display.c:703
    #2  0x000055555555f62d in display_update_display () at display.c:87
    #3  0x0000555555577e95 in info_read_and_dispatch () at session.c:238
    #4  0x000055555557808b in info_session (ref_list=<optimized out>,
user_filename=<optimized out>, error=<optimized out>) at session.c:221
    #5  0x000055555555c76f in main (argc=<optimized out>,
argv=<optimized out>) at info.c:1082
    (gdb)

Workaround: Manually gzip the installed "bash.info" file.


-- 
Keith Thompson <address@hidden>



reply via email to

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