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)
Created attachment 8308 [details, diff] Patch to linux/hints.sh to add lpthread to wanted libs
Created attachment 8309 [details, diff] Patch to 5.8.0-r9 ebuild to patch for lpthread
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.
Fixed in 5.8.0-r10.