Install Term::ReadLine::Gnu Run CPAN. Do anything nontrivial. Quit CPAN. Perl segfaults.
Created attachment 8061 [details] A log of it all going wrong in gdb
Created attachment 8062 [details] A PERLIO_DEBUG log of it all going wrong
Please paste output from 'emerge info'.
Created attachment 8085 [details] output of "emerge info" Perl wasn't actually installed using emerge because that always segfaults. However, I did apply both gentoo patches and reinstall both libperl and perl from a gentoo-compatible source tree.
Created attachment 8086 [details] The script used to patch my perl source tree See comments in "emergeinfo" attachment.
Created attachment 8087 [details] The script used to configure perl Someone in the perl development team suggested that -fomit-frame-pointer might help. It didn't. But since gdb can debug without a frame pointer, I tried it.
Created attachment 8088 [details] Log of it all going wrong in valgrind This almost seems to be the most telling because if you consider the layout of a stdio structure, this would seem to be attempting to close the same fd twice. I should therefore see an error from strace on the close() on the fd?
This bug has Perl rt ticket number 20793. The last few lines of strace look like: munmap(0x40324000, 266240) = 0 munmap(0x40468000, 266240) = 0 close(3) = 0 munmap(0x40313000, 4096) = 0 close(4) = 0 close(4) = -1 EBADF (Bad file descriptor) munmap(0x40314000, 4096) = 0 --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++ So it is closing a descriptor twice. It appears that this is because T::RL::Gnu is causing the descriptor to go refcount -1. Note that the descriptor numbers differ between running perl in gdb and running it under strace or valgrind.
Reassigning bugs due to lack of time.
This is now a problem for the Perl maintainers, I think. It's gone away in the latest gentoos, but the code surrounding it isn't pretty. I have passed the relevant information on to rt.perl. S.
is this still an open issue?
Don't think so. rt.perl.<whatever> and Hiro got onto it.
closed for inactivity/upstream action