Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
widechar-enabled libedit problem on amd64
Hi -
a -current libedit crashes for me on amd64 if I attempt
tabcompletion, the stacktrace is:
#0 0x00007f7f00000000 in ?? ()
#1 0x00007f7ffd81738b in fn_complete (el=0x7f7ffdb22800,
complet_func=0x7f7ffd817630 <fn_filename_completion_function>,
attempted_completion_function=0, word_break=<value optimized out>,
special_prefixes=<value optimized out>, app_func=0x7f7f00000000,
query_items=100, completion_type=0x0, over=0x0, point=0x0, end=0x0)
at /home/drochner/src/lib/libedit/filecomplete.c:473
#2 0x00007f7ffd817420 in _el_fn_complete (el=0x7f7ffdb03100,
ch=<value optimized out>)
at /home/drochner/src/lib/libedit/filecomplete.c:544
#3 0x00007f7ffd81a876 in el_wgets (el=0x7f7ffdb22800, nread=0x621b1c)
at /home/drochner/src/lib/libedit/read.c:619
#4 0x00007f7ffd81ace2 in el_gets (el=0x7f7ffdb03100, nread=0x7f7ffdb030ed)
at /home/drochner/src/lib/libedit/eln.c:76
#5 0x000000000040ba7e in preadbuffer ()
#6 0x00000000004129c1 in xxreadtoken ()
#7 0x0000000000412bc4 in readtoken ()
#8 0x0000000000412e57 in parsecmd ()
#9 0x000000000040e32a in cmdloop ()
#10 0x000000000040e6b9 in main ()
Note the app_func argument to fn_complete -- it should be NULL.
This looks like a compiler bug, see:
(gdb) x/20i _el_fn_complete
0x7f7ffd8173da <_el_fn_complete>: sub $0x28,%rsp
0x7f7ffd8173de <_el_fn_complete+4>: movq $0x0,0x20(%rsp)
0x7f7ffd8173e7 <_el_fn_complete+13>: movq $0x0,0x18(%rsp)
0x7f7ffd8173f0 <_el_fn_complete+22>: movq $0x0,0x10(%rsp)
0x7f7ffd8173f9 <_el_fn_complete+31>: movq $0x0,0x8(%rsp)
0x7f7ffd817402 <_el_fn_complete+40>: movq $0x64,(%rsp)
0x7f7ffd81740a <_el_fn_complete+48>: xor %r9d,%r9d
0x7f7ffd81740d <_el_fn_complete+51>: xor %r8d,%r8d
0x7f7ffd817410 <_el_fn_complete+54>:
lea 2178057(%rip),%rcx # 0x7f7ffda2b020
<rl_deprep_term_function+6
4>
0x7f7ffd817417 <_el_fn_complete+61>: xor %edx,%edx
0x7f7ffd817419 <_el_fn_complete+63>: xor %esi,%esi
0x7f7ffd81741b <_el_fn_complete+65>: callq 0x7f7ffd808434 <fn_complete@plt>
The xor to registers clears only the lower 32 bits (in particular of r9).
Don't know what to do yet -- it doesn't crash if compiled without WIDECHAR,
or with -O0, although the generated code still looks as wrong as above.
best regards
Matthias
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Home |
Main Index |
Thread Index |
Old Index