Bug 129626 - lang/p5-Tcl segfaults on i386 and amd64 on FreeBSD 7
Summary: lang/p5-Tcl segfaults on i386 and amd64 on FreeBSD 7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-14 05:50 UTC by bruce
Modified: 2011-06-26 16:20 UTC (History)
0 users

See Also:


Attachments
patch-p5-Tcl.diff (345 bytes, patch)
2009-07-13 22:16 UTC, Cezary Morga
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bruce 2008-12-14 05:50:04 UTC
Port p5-Tcl segfaults on i386 and amd64 on FreeBSD 7 unless environment variable PERL_DL_NONLAZY is set.

How-To-Repeat: bruce@nx7400b Tkx-1.05 $ cat /tmp/a.pl
#!/usr/bin/perl

use Tcl;

print "whatever\n";
bruce@nx7400b Tkx-1.05 $ PERL_DL_NONLAZY=1 perl /tmp/a.pl
whatever
bruce@nx7400b Tkx-1.05 $ perl /tmp/a.pl
Segmentation fault: 11
bruce@nx7400b Tkx-1.05 $ gdb perl
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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 "i386-marcel-freebsd"...(no debugging symbols found)...
(gdb) run /tmp/a.pl
Starting program: /usr/bin/perl /tmp/a.pl
(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)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x282d4cc1 in boot_Tcl () from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Tcl/Tcl.so
(gdb) where
#0  0x282d4cc1 in boot_Tcl () from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Tcl/Tcl.so
#1  0x280f9ee1 in Perl_pp_entersub () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#2  0x280f8685 in Perl_runops_standard () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#3  0x2809f0b0 in S_call_body () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#4  0x2809fd4d in Perl_call_sv () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#5  0x280a00b1 in Perl_call_list () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#6  0x280d2f04 in Perl_newATTRSUB () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#7  0x280d1c66 in Perl_utilize () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#8  0x280c6b2d in Perl_yyparse () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#9  0x280a215f in S_parse_body () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#10 0x280a2e18 in perl_parse () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#11 0x08049037 in main ()
(gdb)

On amd-64 machine running FreeBSD 7.0p3:
[bruce@orca 33] x > gdb /usr/local/bin/perl
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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 "amd64-marcel-freebsd"...(no debugging symbols found)...
(gdb) run /tmp/a.pl
Starting program: /usr/local/bin/perl /tmp/a.pl
(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)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x0000000800f036ed in boot_Tcl () from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Tcl/Tcl.so
(gdb) where
#0  0x0000000800f036ed in boot_Tcl ()
   from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Tcl/Tcl.so
#1  0x00000008006ba5f6 in Perl_pp_entersub () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#2  0x00000008006b8eae in Perl_runops_standard ()
   from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#3  0x0000000800666fc5 in Perl_call_sv () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#4  0x000000080066738c in Perl_call_list () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#5  0x0000000800696703 in Perl_newATTRSUB () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#6  0x00000008006954f3 in Perl_utilize () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#7  0x000000080068b191 in Perl_yyparse () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#8  0x0000000800669101 in S_parse_body () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#9  0x0000000800669d4e in perl_parse () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
#10 0x0000000000401600 in main ()
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-12-14 07:24:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->perl

Over to maintainer.
Comment 2 Cezary Morga 2009-07-13 22:16:00 UTC
Although this is a bit late I think it's better late than never :)

It seems the problem is known to p5-Tcl developers for quite a time now 
(http://rt.cpan.org/Public/Bug/Display.html?id=21181) but was left 
unaddressed. So, I guess, the only solution to keep the port in fairly 
usable state is to disable stubs. Patch in attachment.

-- 
Cezary Morga
Comment 3 Cezary Morga 2009-07-13 22:20:32 UTC
Just a thought, it might be possible to remove mark BROKEN from 
x11-toolkits/p5-Tcl-Tk if previous p5-Tcl patch will be applied.

-- 
Cezary Morga
"Five exclamation marks, the sure sign of an insane mind." (Terry Pratchett)
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2011-03-05 19:01:15 UTC
Even though the bug linked in the PR is now dead I was still able to
reproduce this problem.

-- 
Eitan Adler
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2011-06-26 04:06:08 UTC
Responsible Changed
From-To: perl->sunpoet

I'll take it.
Comment 6 dfilter service freebsd_committer freebsd_triage 2011-06-26 16:19:42 UTC
sunpoet     2011-06-26 15:19:29 UTC

  FreeBSD ports repository

  Modified files:
    lang/p5-Tcl          Makefile 
  Log:
  - Use --nousestubs to prevent segfaults
  
  PR:             ports/129626
  Submitted by:   Bruce Albrecht <bruce@freebsd.zuhause.org>
  
  Revision  Changes    Path
  1.40      +3 -3      ports/lang/p5-Tcl/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 Po-Chuan Hsieh freebsd_committer freebsd_triage 2011-06-26 16:19:46 UTC
State Changed
From-To: open->closed

Committed. Thanks!