Bug 92372 - readline crashes when "5" is pressed with numlock off
Summary: readline crashes when "5" is pressed with numlock off
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: readline
Version: 9
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Jay Turner
URL:
Whiteboard:
: 112048 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-05 15:47 UTC by Need Real Name
Modified: 2015-01-08 00:05 UTC (History)
3 users (show)

Fixed In Version: 4.3-7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-06-25 09:32:55 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2003-06-05 15:47:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
when a program uses readline, if you press the key "5" on an azerty belgian
keyboard on the numeric part, with numlock off, readline enters in a recursive
loop finally segfaulting:


here's a stacktrace when used with lftp 2.6.3, bu it also happens with for
instance bc, pftp, smbclient, ...


(gdb) info stack
#0  0x40036795 in _rl_dispatch_subseq () from /usr/lib/libreadline.so.4
#1  0x4003677e in _rl_dispatch () from /usr/lib/libreadline.so.4
#2  0x40036803 in _rl_dispatch_subseq () from /usr/lib/libreadline.so.4
#3  0x4003677e in _rl_dispatch () from /usr/lib/libreadline.so.4
...
#209527 0x4003677e in _rl_dispatch () from /usr/lib/libreadline.so.4
#209528 0x40036803 in _rl_dispatch_subseq () from
/usr/lib/libreadline.so.4
#209529 0x4003677e in _rl_dispatch () from /usr/lib/libreadline.so.4
#209530 0x40036af9 in _rl_dispatch_subseq () from
/usr/lib/libreadline.so.4
#209531 0x40036ab4 in _rl_dispatch_subseq () from
/usr/lib/libreadline.so.4
#209532 0x4003677e in _rl_dispatch () from /usr/lib/libreadline.so.4
#209533 0x400364d0 in readline_internal_char () from
/usr/lib/libreadline.so.4
#209534 0x40036695 in readline_internal_char () from
/usr/lib/libreadline.so.4
#209535 0x400366ce in readline_internal_char () from
/usr/lib/libreadline.so.4
#209536 0x4003619f in readline () from /usr/lib/libreadline.so.4
#209537 0x080693fb in lftp_readline ()
#209538 0x08067042 in ReadlineFeeder::NextCmd(CmdExec*, char const*) (
    this=0x80f0b40, exec=0x80e74e8, prompt=0x80ea020 "lftp :~> ")
    at lftp.cc:133
#209539 0x0806bc43 in CmdExec::Do() ()
#209540 0x0807f8f5 in SMTask::Schedule() ()
#209541 0x0806632c in WaitDone(CmdExec*) (exec=0x80e74e8) at lftp.cc:73
#209542 0x08066a12 in main (argc=1, argv=0xbfffe564) at lftp.cc:377
#209543 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6


recursive loop? ;)  (and be prepared to press <enter> a long time in
gdb)
---Type <return> to continue, or q <return> to quit--- grrggrg =)


Version-Release number of selected component (if applicable):
readline-4.3-5 

How reproducible:
Always

Steps to Reproduce:
1. lftp or any other program using libreadline
2. press 5 with numlock off
3. it has segfaulted
    

Actual Results:  segfault

Expected Results:  nothing should happen

Additional info:

Comment 1 Tim Waugh 2003-06-24 15:10:48 UTC
Which console are you using?  Looks similar to bug #97937.

Comment 2 Need Real Name 2003-06-24 17:30:16 UTC
i'm using Eterm 0.9.2-1, it doesn't do it under xterm, neither rxvt, neither
text console, probably because of the keymapping?

i can attach my slightly modified inputrc if you want, but  i don't think this
is important
(basically i've only added "\eOc": forward-word
"\eOd": backward-word
 for my Eterm :) )


anyway i've mailed the readline gnu development team and they've answered:

> So i've recompiled readline 4.3, tried with LD_LIBRARY_PATH, and the
> same problem happens

This has been fixed for months.

ftp://ftp.cwru.edu/pub/bash/readline-4.3-patches/readline43-001

Comment 3 Tim Waugh 2003-06-25 09:32:55 UTC
Thanks for the pointer to the patch.  Fixed package will appear in rawhide shortly.

Comment 4 Tim Waugh 2003-12-13 23:22:07 UTC
*** Bug 112048 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.