Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14380 - Perl segfaults horribly and badly on $SIG{RTMIN}
Summary: Perl segfaults horribly and badly on $SIG{RTMIN}
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical
Assignee: Robert Coie (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-22 11:43 UTC by Shevek
Modified: 2003-02-28 20:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to linux/hints.sh to add lpthread to wanted libs (perl-5.8.0-prelink-lpthread.patch,476 bytes, patch)
2003-02-15 12:26 UTC, Robert Coie (RETIRED)
Details | Diff
Patch to 5.8.0-r9 ebuild to patch for lpthread (perl-ebuild.patch,535 bytes, patch)
2003-02-15 12:29 UTC, Robert Coie (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shevek 2003-01-22 11:43:23 UTC
Gentoo built as of 20th January 2003
gcc-3.2 and glibc-2.3.1
perl-5.8.0

root@p405u ~$ perl -e '$SIG{RTMIN} = "DEFAULT"'
Segmentation fault


root@p405u ~$ gdb perl
GNU gdb 5.3
Copyright 2002 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 "i686-pc-linux-gnu"...
(no debugging symbols found)...
(gdb) run -e '$SIG{RTMIN} = "DEFAULT"'
Starting program: /usr/bin/perl -e '$SIG{RTMIN} = "DEFAULT"'
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x080bb5a4 in Perl_sv_free ()
(gdb) bt
#0  0x080bb5a4 in Perl_sv_free ()
#1  0x080a4413 in Perl_magic_setsig ()
#2  0x080a6b82 in Perl_mg_set ()
#3  0x080ae11b in Perl_pp_sassign ()
#4  0x080ae058 in Perl_runops_standard ()
#5  0x0805f2d4 in perl_run ()
#6  0x0805f0ce in perl_run ()
#7  0x0805c7c3 in main ()
#8  0x4006d9c4 in __libc_start_main () from /lib/libc.so.6
(gdb)
Comment 1 Robert Coie (RETIRED) gentoo-dev 2003-02-15 12:26:32 UTC
Created attachment 8308 [details, diff]
Patch to linux/hints.sh to add lpthread to wanted libs
Comment 2 Robert Coie (RETIRED) gentoo-dev 2003-02-15 12:29:15 UTC
Created attachment 8309 [details, diff]
Patch to 5.8.0-r9 ebuild to patch for lpthread
Comment 3 Robert Coie (RETIRED) gentoo-dev 2003-02-15 12:31:44 UTC
As of glibc 2.3, it is required to link with -lpthread to get runtime signal handling working correctly, not just -lc.  Patching the Configure hints file for linux seemed to me to be the cleanest place to make this change.  I tested it on x86, and the segfault problem was fixed.  The concept needs feedback and testing on other arches, as well as confirmation that it does not cause problems with previous versions of glibc.
Comment 4 Robert Coie (RETIRED) gentoo-dev 2003-02-28 20:39:52 UTC
Fixed in 5.8.0-r10.