13

in https://rt.cpan.org/Ticket/Display.html?id=37194#txn-641389 I reopened a bug concerning a Perl crash in conjunction with the libreadline XS bindings. I attached the necessary debug information, but until now there has been no acknowledgement from the maintainer. I want this finally fixed; it's a major inconvenience to not have readline in Devel::REPL and the Perl debugger. My Perl guts and C夫 is nearly non-existent, so I can't do the usual thing and produce a patch on my own. So I would like to employ your help; more eyeballs ↔ shallow bugs and all that.

My questions to you:

  1. Can you reproduce this crash despite -DPERL_USE_SAFE_PUTENV? If yes, let's compare what is the common factor.
  2. Do you know what is the cause and how do you go about finding it?
  3. I have a debugging perl and know how to use gdb, but where do I have to set a breakpoint to observe the crash properly?
Svante
  • 50,694
  • 11
  • 78
  • 122
daxim
  • 39,270
  • 4
  • 65
  • 132
  • Do I have a way to access the debug information without having to sign up for an account on rt.cpan.org? I'd love to look at it but hate having to register for things. – C. K. Young Feb 05 '10 at 16:05
  • Viewing tickets and attachments are publicly accessible. – daxim Feb 08 '10 at 00:50
  • I see. (Apparently it required cookies; my default policy was cookies disabled, and requesting attachments caused me to be sent to a login page instead. :-P) – C. K. Young Feb 08 '10 at 03:35
  • You get that error when you cause Armageddon and clean the wrong gene pool. – Trevoke Feb 09 '10 at 20:26
  • Quick q. daxim: is you application multi-threaded, and multithreading at or around the time of the error? – vladr Mar 06 '10 at 04:25
  • I have no application. The T::R::G tests already crash. Minimal case for panic: `perl -Mblib -MTerm::ReadLine -e'Term::ReadLine->new'`. As you can see, no threads involved. – daxim Mar 07 '10 at 16:31

2 Answers2

1

readline 6.1.000 works fine for me here with Perl 5.10.0 & 5.10.1 (on Mac OS X 10.4, 10.5 & 10.6).

Also OK for me is Perl 5.8.8 & 5.10.1 on RedHat Enterprise Linux 5.3 (this time with readline 5.1).

There seems to be a lot of bug fixes between 5.2 & 6.1, so it might be worth trying the newer (or older!) readline to 5.2

/I3az/

draegtun
  • 22,441
  • 5
  • 48
  • 71
0

The problem was that my perl never had safe putenv. The option is not -DPERL_USE_SAFE_PUTENV, but -Accflags="-DPERL_USE_SAFE_PUTENV".

Doc patches to combat the mistake:

daxim
  • 39,270
  • 4
  • 65
  • 132