If I type Ctrl-C into irb twice it promptly segfaults.  It appears to
be going into an infinite loop inside readline, but other
readline-enabled programs on my system (eg. psql, python) have no
problems.

There's a script attached at the end to demonstrate this.

Regards, 

Jeremy Henty 

Script started on Sat Dec  7 17:02:56 2002
[jeremy@ganglion jeremy]$ irb

irb(main):001:0> ^C

irb(main):001:0> Segmentation fault (core dumped)

[jeremy@ganglion jeremy]$ gdb ruby core

GNU gdb 19991004

Copyright 1998 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "i386-redhat-linux"...

Core was generated by `irb                    '.

Program terminated with signal 11, Segmentation fault.

Reading symbols from /usr/local/lib/libruby.so.1.6...done.

Reading symbols from /lib/libdl.so.2...done.

Reading symbols from /lib/libcrypt.so.1...done.

Reading symbols from /lib/libm.so.6...done.

Reading symbols from /lib/libc.so.6...done.

Reading symbols from /lib/ld-linux.so.2...done.

Reading symbols from /usr/local/lib/ruby/1.6/i586-linux/readline.so...done.

Reading symbols from /usr/lib/libreadline.so.3...done.

Reading symbols from /usr/lib/libncurses.so.4...done.

Reading symbols from /lib/libtermcap.so.2...done.

#0  0x401379e9 in __sigaction (sig=2, act=0x402cb560, oact=0xbf80004c)

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:52

52	../sysdeps/unix/sysv/linux/i386/sigaction.c: No such file or directory.

(gdb) where

#0  0x401379e9 in __sigaction (sig=2, act=0x402cb560, oact=0xbf80004c)

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:52

#1  0x402bef49 in rl_clear_signals () from /usr/lib/libreadline.so.3

#2  0x402bec7c in rl_signal_handler () from /usr/lib/libreadline.so.3

#3  0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#4  0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#5  0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#6  0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#7  0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#8  0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#9  0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#10 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#11 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#12 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#13 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#14 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#15 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

---Type <return> to continue, or q <return> to quit---

#16 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#17 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#18 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#19 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#20 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#21 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#22 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#23 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#24 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#25 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#26 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#27 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#28 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#29 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#30 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#31 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

---Type <return> to continue, or q <return> to quit---

#32 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#33 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#34 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#35 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#36 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#37 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#38 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#39 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#40 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#41 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#42 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#43 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#44 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#45 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#46 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#47 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

---Type <return> to continue, or q <return> to quit---

#48 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#49 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#50 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#51 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#52 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#53 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#54 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#55 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#56 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#57 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#58 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#59 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#60 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#61 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

#62 0x402becb2 in rl_signal_handler () from /usr/lib/libreadline.so.3

#63 0x40137c48 in __restore ()

    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127

---Type <return> to continue, or q <return> to quit---q

Quit

(gdb) q

[jeremy@ganglion jeremy]$ uname -a

Linux ganglion.demon.co.uk 2.2.23-0 #1 Thu Dec 5 08:02:38 GMT 2002 i586 unknown

[jeremy@ganglion jeremy]$ gcc --version

2.95.3

[jeremy@ganglion jeremy]$ ruby --version

ruby 1.6.7 (2002-03-01) [i586-linux]

[jeremy@ganglion jeremy]$ exit


Script done on Sat Dec  7 17:04:32 2002