Here is the backtrace for this bug after recompiling with -O0.

On 5/25/20 11:18 AM, Nathaniel Beaver wrote:
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
Thread 1 (process 29784):
#0  0x00007ffff78d05d7 in ioctl () at ../sysdeps/unix/syscall-template.S:78
No locals.
#1  0x00005555555745eb in info_gather_typeahead (wait=0) at session.c:458
        i = 0
        tty = 0
        space_avail = 512
        chars_avail = 0
        input = "\240\322\377\377\377\177", '\000' <repeats 18 times>, 
"\260\322\377\377\377\177\000\000\230\322\377\377\377\177\000\000\230\333|UUU\000\000\340\322\377\377\377\177\000\000\030\322\377\377\377\177\000\000\020\322\377\377\377\177\000\000p\326\377\377\377\177",
 '\000' <repeats 20 times>, 
"\377\377\377\177\000\000\000\321m\000\067v\020|\000\323\377\377\377\177\000\000L\324\377\377\377\177\000\000\227\330|UUU\000\000\360\"~\367\377\177\000\000\230\330|UUU\000\000\000\333|UUU\000\000\000\000\000\000\000\000\000\000\023{\207\367\377\177\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000
 @\335\367\377\177\000\000\000"...
#2  0x000055555557440d in fill_input_buffer (wait=0) at session.c:388
        success = 21845
#3  0x00005555555743e2 in info_any_buffered_input_p () at session.c:374
No locals.
#4  0x000055555555c01e in display_update_line (pl_num=41, 
printed_line=0x5555557ce210 "Cannot find node 'Inde'", pl_bytes=23, 
pl_chars=23) at display.c:217
        display = 0x5555557cbd20
        entry = 0x5555557cd300
#5  0x000055555555cd7f in display_update_node_text (win=0x5555557cba40) at 
display.c:550
        delim = 10
        tb_printed_line = {base = 0x5555557ce210 "Cannot find node 'Inde'", 
size = 512, off = 24}
        iter = {limit = 0x5555557cd898 "", in_shift = false, state = {__count = 
0, __value = {__wch = 0, __wchb = "\000\000\000"}}, next_done = true, cur = 
{ptr = 0x5555557cd897 "\n", bytes = 1, wc_valid = true, wc = 10 L'\n', buf = 
'\000' <repeats 23 times>}}
        bol_iter = {limit = 0x5555557cd898 "", in_shift = false, state = 
{__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}, next_done = 
true, cur = {ptr = 0x5555557cd880 "Cannot find node 'Inde'\n", bytes = 1, 
wc_valid = true, wc = 67 L'C', buf = '\000' <repeats 16 times>, 
"\220\331\377\377\377\177\000"}}
        bol_ref_index = 0
        bol_match_index = 0
        bol_ref_highlighted = 0
        finish = 0
#6  0x000055555555d2c8 in display_update_one_window (win=0x5555557cba40) at 
display.c:701
        line_index = 0
        display = 0x5555557cbd20
#7  0x00005555555838c2 in vwindow_message_in_echo_area (format=0x55555559ce58 
"Cannot find node '%s'", ap=0x7fffffffd600) at window.c:1000
No locals.
#8  0x0000555555574f34 in vinfo_error (format=0x55555559ce58 "Cannot find node 
'%s'", ap=0x7fffffffd600) at session.c:826
No locals.
#9  0x000055555557503c in info_error (format=0x55555559ce58 "Cannot find node 
'%s'") at session.c:845
        ap = {{gp_offset = 8, fp_offset = 48, overflow_arg_area = 
0x7fffffffd6e0, reg_save_area = 0x7fffffffd620}}
#10 0x0000555555578f01 in info_handle_pointer (label=0x55555559f40e "Next", 
window=0x5555557cbb80) at session.c:2946
        description = 0x5555557cf960 "Inde"
        node = 0x0
#11 0x0000555555579407 in forward_move_node_structure (window=0x5555557cbb80, 
behaviour=0) at session.c:3104
No locals.
#12 0x00005555555787da in info_move_to_next_xref (window=0x5555557cbb80, 
count=1) at session.c:2709
        last_hist_index = 0
        starting_hist_index = 0
        initial_nodename = 0x5555557ce9d0 "Top"
#13 0x0000555555574181 in info_read_and_dispatch () at session.c:250
        cmd = 0x5555555786c2 <info_move_to_next_xref>
        count = 1
#14 0x00005555555740c2 in info_session (ref_list=0x5555557cb480, 
user_filename=0x0, error=0x0) at session.c:218
No locals.
#15 0x00005555555696a6 in main (argc=0, argv=0x7fffffffd9b0) at info.c:1079
        getopt_long_index = 32767
        init_file = 0x0
        error = 0x0
quit

Reply via email to