Steps to reproduce:

$ info -f ./hang_002.info.gz
# Press 'Tab' key three times to try to jump to 'Index' node.

Expected behavior:

info shows error "Cannot find node 'Inde'" but does not enter an infinite loop.

Actual behavior:

info shows error "Cannot find node 'Inde'" and then enters an infinite loop.

Discussion:

The malformed input file hang_002.info.gz has the 'x' missing from "Index", like this:

File: example.info,  Node: First Chapter,  Next: Inde,  Prev: Top,  Up: Top

Version:

$ git describe --tags
texinfo-6.6-364-g63711e8c6
$ git rev-parse HEAD
63711e8c6fafe9b3cde2a2d0be507032d7ee7bf6

Sincerely,

Nathaniel Beaver

Attachment: hang_002.info.gz
Description: application/gzip

Thread 1 (process 22092):
#0  0x00007ffff78ca154 in __GI___libc_write (fd=1, buf=0x5555557bd4f0, 
nbytes=1) at ../sysdeps/unix/sysv/linux/write.c:27
        resultvar = 1
        sc_ret = <optimized out>
        sc_ret = <optimized out>
        resultvar = <optimized out>
        resultvar = <optimized out>
        __arg3 = <optimized out>
        __arg2 = <optimized out>
        __arg1 = <optimized out>
        _a3 = <optimized out>
        _a2 = <optimized out>
        _a1 = <optimized out>
        sc_cancel_oldtype = <optimized out>
        resultvar = <optimized out>
        resultvar = <optimized out>
        __arg3 = <optimized out>
        __arg2 = <optimized out>
        __arg1 = <optimized out>
        _a3 = <optimized out>
        _a2 = <optimized out>
        _a1 = <optimized out>
#1  0x00007ffff78451bd in _IO_new_file_write (f=0x7ffff7ba6760 
<_IO_2_1_stdout_>, data=0x5555557bd4f0, n=1) at fileops.c:1203
        count = <optimized out>
        to_do = 1
#2  0x00007ffff7846f51 in new_do_write (to_do=1, data=0x5555557bd4f0 
"\a\033[48;1HCannot find node 'Inde'::    The first chapter is 
the\033[K\033[12;1H* Index::", ' ' <repeats 12 times>, "Complete 
index.\033[Khis sample.", '-' <repeats 65 times>, "\033[0m\033[1;1HNext"..., 
fp=0x7ffff7ba6760 <_IO_2_1_stdout_>) at fileops.c:457
        count = <optimized out>
        count = <optimized out>
        new_pos = <optimized out>
#3  _IO_new_do_write (fp=0x7ffff7ba6760 <_IO_2_1_stdout_>, data=0x5555557bd4f0 
"\a\033[48;1HCannot find node 'Inde'::    The first chapter is 
the\033[K\033[12;1H* Index::", ' ' <repeats 12 times>, "Complete 
index.\033[Khis sample.", '-' <repeats 65 times>, "\033[0m\033[1;1HNext"..., 
to_do=1) at fileops.c:433
        to_do = 1
        data = 0x5555557bd4f0 "\a\033[48;1HCannot find node 'Inde'::    The 
first chapter is the\033[K\033[12;1H* Index::", ' ' <repeats 12 times>, 
"Complete index.\033[Khis sample.", '-' <repeats 65 times>, 
"\033[0m\033[1;1HNext"...
        fp = 0x7ffff7ba6760 <_IO_2_1_stdout_>
#4  0x00007ffff7844788 in _IO_new_file_sync (fp=0x7ffff7ba6760 
<_IO_2_1_stdout_>) at fileops.c:813
        delta = <optimized out>
#5  0x00007ffff783887d in __GI__IO_fflush (fp=0x7ffff7ba6760 <_IO_2_1_stdout_>) 
at iofflush.c:40
        _IO_acquire_lock_file = 0x7ffff7ba6760 <_IO_2_1_stdout_>
        result = <optimized out>
#6  0x000055555555f53c in display_update_one_window (win=0x5555557bda40) at 
display.c:734
        line_index = 1
        display = 0x5555557bdd80
#7  0x000055555557d1f4 in vwindow_message_in_echo_area 
(format=format@entry=0x55555558d6b2 "Cannot find node '%s'", 
ap=ap@entry=0x7fffffffd600) at window.c:1000
No locals.
#8  0x000055555557120c in vinfo_error (ap=0x7fffffffd600, format=0x55555558d6b2 
"Cannot find node '%s'") at session.c:826
No locals.
#9  info_error (format=0x55555558d6b2 "Cannot find node '%s'") at session.c:845
        ap = {{gp_offset = 8, fp_offset = 48, overflow_arg_area = 
0x7fffffffd6e0, reg_save_area = 0x7fffffffd620}}
#10 0x0000555555571fd1 in info_handle_pointer (label=<optimized out>, 
label@entry=0x55555558f99e "Next", window=window@entry=0x5555557bdb80) at 
session.c:2946
        description = 0x5555557c30d0 "Inde"
        node = 0x0
#11 0x0000555555574449 in forward_move_node_structure 
(window=window@entry=0x5555557bdb80, behaviour=<optimized out>) at 
session.c:3104
No locals.
#12 0x0000555555575868 in info_move_to_next_xref (window=0x5555557bdb80, 
count=1) at session.c:2709
        last_hist_index = 0
        starting_hist_index = 0
        initial_nodename = 0x5555557c1f60 "Top"
#13 0x0000555555577eb9 in info_read_and_dispatch () at session.c:250
        cmd = 0x5555555757b0 <info_move_to_next_xref>
        count = 1
#14 0x000055555557806b in info_session (ref_list=<optimized out>, 
user_filename=<optimized out>, error=<optimized out>) at session.c:218
No locals.
#15 0x000055555555c76f in main (argc=<optimized out>, argv=<optimized out>) at 
info.c:1079
        getopt_long_index = -10040
        init_file = <optimized out>
        error = 0x0
quit

Attachment: example.info.gz
Description: application/gzip

Reply via email to