Graeme.Ambler@bristol.ac.uk
2003-Jun-27 18:12 UTC
[Rd] Update on "Shift-Return causes segfault (PR#3293)"
Hi all, I don't read this list, so if anyone wants to respond could they please copy me so that I see what is happening. After several exchanges between myself, Marc Schwartz and Peter Dalgaard, we have come to the following conclusions: a) Shift-Return does not cause a segfault on most terminals, only Kde's Konsole. b) The bug is easily reproducable there. c) The "real" bug is that the control sequence Meta-Shift-O followed by any character causes a segfault on every terminal type we have access to. d) For some reason, Kde's Konsole interprets Shift-Return as "Meta-Shift-O Shift-M", which is the source of the original bug report. e) The most helpful error message we can generate is: Program received signal SIGSEGV, Segmentation fault. 0x400dd7fe in _rl_dispatch_subseq () from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libreadline.so.4 implying that there is some strange interaction going on with readline, and that the bug may be in readline rather than R. f) The bug does not seem to be present in R-1.6.2, though this is only my experience, not anyone elses. Peter Dalgaard HAS reproduced the bug in R-1.7.0. I hope this is all clear. If there is anything that is not, please get back to me and I will attempt to clarify what I meant! Graeme.
Peter Dalgaard BSA
2003-Jun-27 18:59 UTC
[Rd] Update on "Shift-Return causes segfault (PR#3293)"
Graeme.Ambler@bristol.ac.uk writes:> e) The most helpful error message we can generate is: > > Program received signal SIGSEGV, Segmentation fault. > 0x400dd7fe in _rl_dispatch_subseq () > from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libreadline.so.4 > > implying that there is some strange interaction going on with readline, and > that the bug may be in readline rather than R. > > f) The bug does not seem to be present in R-1.6.2, though this is only my > experience, not anyone elses. Peter Dalgaard HAS reproduced the bug in > R-1.7.0...and I just now found a SuSE machine still running 1.6.0 which is also immune to the problem. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
p.dalgaard@biostat.ku.dk
2003-Jun-27 23:42 UTC
[Rd] Update on "Shift-Return causes segfault (PR#3293)"
Graeme Ambler <Graeme.Ambler@bristol.ac.uk> writes:> > What version of readline is linked to R 1.6.0 on that system? > Probably version 4.1 --- I remember in the past always having to install the > readline41-4.1-xx package to get R to work. Perhaps Martyn should go back to > linking against that in the short term until the bug in readline can be > squashed? Or does R-1.7.x need some additional functionality provided by > readline-4.3?Probably not, but it would be a pain to get RH8 users to install the readline41 stuff (does it exist in RPM form on that platform)? However, it should work to add the line "\M-OM":accept-line to your ~/.inputrc file. That should make the KDE shift-Return sequence work like an ordinary Return. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
Graeme.Ambler@bristol.ac.uk
2003-Jun-28 00:15 UTC
[Rd] Update on "Shift-Return causes segfault (PR#3293)"
I've just rebuilt an rpm from the RedHat SRPM and the patches from ftp.gnu.org and R no longer crashes in any of the cases I have previously described. I can let anyone who wants have a copy of the modified rpms for both RH8 and RH9. The patch numbers are incremented one from the originals, so they should update cleanly on any system. I guess you can probably close this bug now. It's a bit annoying that RH didn't apply the patches themselves for RH9, since the relevant one came out about 6 months before RH9 was released! Graeme. On Friday 27 Jun 2003 19:06, John W. Eaton wrote:> On 27-Jun-2003, I wrote: > | Making the following change in readline.c seems to avoid the infinite > | loop, but I don't know whether it is the correct fix. > > It isn't. :-/ There are 5 patches on ftp.gnu.org in the > /pub/gnu/readline/readline-4.3-patches. The first one covers this > problem: > > Bug-Description: > > Pressing certain key sequences causes an infinite loop in > _rl_dispatch_subseq with the `key' argument set to 256. This eventually > causes bash to exceed the stack size limit and crash with a segmentation > violation. > > Patch: > > *** ../readline-4.3/bind.c Thu Jan 24 11:15:52 2002 > --- bind.c Wed Jul 31 09:11:18 2002 > *************** > *** 312,316 **** > and the function bound to `a' to be executed when the user > types `abx', leaving `bx' in the input queue. */ > ! if (k.function /* && k.type == ISFUNC */) > { > map[ANYOTHERKEY] = k; > --- 312,316 ---- > and the function bound to `a' to be executed when the user > types `abx', leaving `bx' in the input queue. */ > ! if (k.function && ((k.type == ISFUNC && k.function !> rl_do_lowercase_version) || k.type == ISMACR)) { > map[ANYOTHERKEY] = k; > > jwe
Marc Schwartz
2003-Jul-07 14:54 UTC
[Rd] Update on "Shift-Return causes segfault (PR#3293)"
Hi all, I wanted to post an update on this issue and let you know that RH has closed the bug indicating that the issue has been resolved with readline version 4.3-7. So far, I have not seen an updated RPM specifically for RH 8.0 or RH 9 via the Red Hat Network. However the comments on RH's Bugzilla indicate that an update is available for "Rawhide" which is RH's test-bed platform version of the OS. I could not get on the RH FTP server this morning, thus I checked RPMSEEK and found the following for i386 platforms: A Rawhide SRPM at: http://rpmseek.com/rpm/readline-4.3-7.src.html?hl=com&cs=readline:PN:0 :0:0:673600 A Rawhide RPM at: http://rpmseek.com/rpm/readline-4.3-7.i386.html?hl=com&cs=readline:PN: 0:0:0:674020 And the Rawhide Devel RPM at: http://rpmseek.com/rpm/readline-devel-4.3-7.i386.html?hl=com&cs=readli ne:PN:0:0:0:674021 Note that the dates of the above RPMs are 6/25/2003, which is 3 days before I filed the bug report, so it would appear that RH was already aware of the problem in readline 4.3-5. HTH, Marc Schwartz