Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on IRIX #744

Closed
p5pRT opened this issue Oct 20, 1999 · 2 comments
Closed

Segfault on IRIX #744

p5pRT opened this issue Oct 20, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 20, 1999

Migrated from rt.perl.org#1667 (status was 'resolved')

Searchable as RT1667$

@p5pRT
Copy link
Author

p5pRT commented Oct 20, 1999

From jarausch@numa1.igpm.rwth-aachen.de

Trying to run (pure perl no .xs)

perl -MDevel​::ptkdb -e0 (version Devel-ptkdb-1.106 / Tk800.015)
I get
(dbx) run -MDevel​::ptkdb -e0
Process 133037 (perl) started
Process 133037​: region 0 zero size ignoredl
Process 133037​: region 0 zero size ignoredl
Process 133037​: region 0 zero size ignoredl
Process 133037 (perl) stopped on signal SIGSEGV​: Segmentation violation (default) at [Perl_peep​:6190 +0x8,0x5ff06480]
6190 if (o->op_next->op_type != OP_LEAVESUBLV) {
(dbx) where

0 Perl_peep(o = 0x101ab470) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:6190, 0x5ff06480]
  1 Perl_peep(o = 0x101ac5a0) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:6104, 0x5ff05e04]
  2 Perl_peep(o = 0x101ac560) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:6104, 0x5ff05e04]
  3 Perl_peep(o = 0x101ac480) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:6104, 0x5ff05e04]
  4 Perl_peep(o = 0x101ac440) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:6104, 0x5ff05e04]
  5 Perl_peep(o = 0x101ac360) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:6104, 0x5ff05e04]
  6 Perl_peep(o = 0x101ac320) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:6104, 0x5ff05e04]
  7 Perl_ck_sort(o = 0x101ab500) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:5612, 0x5ff03e6c]
  8 Perl_convert(type = 150, flags = 64, o = 0x101ab500) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:2180, 0x5fef525c]
  9 Perl_yyparse() ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/perly.y"​:395, 0x5feeb6d0]
  10 S_doeval(gimme = 0, startop = (nil)) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/pp_ctl.c"​:2627, 0x5ff8a0e0]
  11 Perl_pp_require() ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/pp_ctl.c"​:3023, 0x5ff8c30c]
  12 Perl_runops_standard() ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/run.c"​:25, 0x5ff332b4]
  13 S_call_xbody(myop = 0x7fff2050, is_eval = 0) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/perl.c"​:1356, 0x5feb5a20]
  14 S_call_body(args = 0x7fff1c08 = "") ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/perl.c"​:1340, 0x5feb597c]
  15 Perl_vdefault_protect(pcur_env = 0x7fff1c30, excpt = 0x7fff2084, body = 0x5feb5910, args = 0x7fff1bc0) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/scope.c"​:45, 0x5ff76cd8]
  16 Perl_default_protect(pcur_env = 0x7fff1c30, excpt = 0x7fff2084, body = 0x5feb5910, ... = <void>) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/scope.c"​:26, 0x5ff76bb4]
  17 Perl_call_sv(sv = 0x10027364, flags = 6) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/perl.c"​:1274, 0x5feb555c]
  18 S_call_list_body(args = 0x7fff21f0 = "") ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/perl.c"​:3056, 0x5febaff4]
  19 Perl_vdefault_protect(pcur_env = 0x7fff2218, excpt = 0x7fff2638, body = 0x5febaf50, args = 0x7fff21b0) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/scope.c"​:45, 0x5ff76cd8]
  20 Perl_default_protect(pcur_env = 0x7fff2218, excpt = 0x7fff2638, body = 0x5febaf50, ... = <void>) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/scope.c"​:26, 0x5ff76bb4]
  21 Perl_call_list(oldscope = 1, paramList = 0x100273f4) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/perl.c"​:2999, 0x5febaa8c]
  22 Perl_newATTRSUB(floor = 81, o = 0x1001ea20, proto = (nil), attrs = (nil), block = 0x10028880) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:4370, 0x5fefef60]
  23 Perl_utilize(aver = 1, floor = 81, version = (nil), id = 0x1001e9a0, arg = (nil)) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:2992, 0x5fef8a54]
  24 Perl_yyparse() ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/perly.y"​:377, 0x5feeb5a8]
  25 S_parse_body(args = 0x7fff2a58 = "") ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/perl.c"​:965, 0x5feb3edc]
  26 Perl_vdefault_protect(pcur_env = 0x7fff2a70, excpt = 0x7fff2e90, body = 0x5feb2d90, args = 0x7fff2a10) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/scope.c"​:45, 0x5ff76cd8]
  27 Perl_default_protect(pcur_env = 0x7fff2a70, excpt = 0x7fff2e90, body = 0x5feb2d90, ... = <void>) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/scope.c"​:26, 0x5ff76bb4]
  28 perl_parse(my_perl = 0x10015010, xsinit = 0x100018b0, argc = 3, argv = 0x7fff2f44, env = (nil)) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/perl.c"​:642, 0x5feb2bec]
  29 main(argc = 3, argv = 0x7fff2f44, env = 0x7fff2f54) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/perlmain.c"​:51, 0x10001828]
  30 __start() ["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M4/csu/crt1text.s"​:177, 0x10001758]

Perl Info


Site configuration information for perl 5.00562:

Configured by jarausch at Wed Oct 20 17:12:17 CST 1999.

Summary of my perl5 (revision 5.0 version 5 subversion 62) configuration:
  Platform:
    osname=irix, osvers=6.5, archname=IP26-irix
    uname='irix64 numa1 6.5 07151439 ip26 '
    config_args='-Dcc=cc -Dprefix=/usr/LOCAL -Dlocincpth=/usr/LOCAL/include -Dloclibpth=/usr/LOCAL/lib'
    hint=previous, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    use64bits=undef usemultiplicity=undef
  Compiler:
    cc='cc', optimize='-g', gccversion=
    cppflags='-D_BSD_TYPES -D_BSD_TIME -I/usr/LOCAL/include -DLANGUAGE_C'
    ccflags ='-D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -I/usr/LOCAL/include -DLANGUAGE_C'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc -n32', ldflags ='-mips4 -Wl,-woff,84 -L/usr/LOCAL/lib'
    libpth=/usr/LOCAL/lib /usr/lib32 /lib32
    libs=-lgdbm -ldb -lm -lc
    libc=/usr/lib32/libc.so, so=so, useshrplib=true, libperl=libperl.so
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-rpath,/usr/LOCAL/lib/perl5/5.00562/IP26-irix/CORE'
    cccdlflags=' ', lddlflags='-n32 -shared -L/usr/LOCAL/lib'

Locally applied patches:
    


@INC for perl 5.00562:
    /usr/LOCAL/lib/perl5/5.00562/IP26-irix
    /usr/LOCAL/lib/perl5/5.00562
    /usr/LOCAL/lib/site_perl/5.00562/IP26-irix
    /usr/LOCAL/lib/site_perl
    .


Environment for perl 5.00562:
    HOME=/usr/people/jarausch
    LANG=C
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=.:/usr/people/jarausch/bin:/usr/PRIVATE/bin:/usr/LOCAL/bin:/usr/LOCAL/teTeX/bin:/usr/bin:/usr/bsd:/bin:/usr/bin/X11:/usr/local/bin:/usr/local/bin/X11:/usr/sbin:/usr/demos/bin
    PERL_BADLANG (unset)
    SHELL=/bin/zsh

@p5pRT
Copy link
Author

p5pRT commented Oct 20, 1999

From @gsar

On Wed, 20 Oct 1999 17​:37​:10 +0200, Helmut Jarausch wrote​:

perl -MDevel​::ptkdb -e0 (version Devel-ptkdb-1.106 / Tk800.015)
I get
(dbx) run -MDevel​::ptkdb -e0
Process 133037 (perl) started
Process 133037​: region 0 zero size ignoredl
Process 133037​: region 0 zero size ignoredl
Process 133037​: region 0 zero size ignoredl
Process 133037 (perl) stopped on signal SIGSEGV​: Segmentation violation (default) at [Pe
rl_peep​:6190 +0x8,0x5ff06480]
6190 if (o->op_next->op_type != OP_LEAVESUBLV) {
(dbx) where

0 Perl_peep(o = 0x101ab470) ["/USR/people/jarausch/Perl/Source/perl5.005_62_G/op.c"​:6
190, 0x5ff06480]

Here's a patch.

Sarathy
gsar@​ActiveState.com

Inline Patch
-----------------------------------8<-----------------------------------
Change 4417 by gsar@auger on 1999/10/20 23:45:03

	avoid coredump on C<sort { my $c; return $a cmp $b } ...>

Affected files ...

... //depot/perl/op.c#204 edit

Differences ...

==== //depot/perl/op.c#204 (text) ====
Index: perl/op.c
--- perl/op.c.~1~	Wed Oct 20 16:45:08 1999
+++ perl/op.c	Wed Oct 20 16:45:08 1999
@@ -6187,7 +6187,7 @@
 	    break;
 
 	case OP_RETURN:
-	    if (o->op_next->op_type != OP_LEAVESUBLV) {
+	    if (o->op_next && o->op_next->op_type != OP_LEAVESUBLV) {
 		o->op_seq = PL_op_seqmax++;
 		break;
 	    }
End of Patch.

Change 4418 by gsar@auger on 1999/10/20 23:49:47

	add test for change#4417

Affected files ...

... //depot/perl/t/op/sort.t#14 edit

Differences ...

==== //depot/perl/t/op/sort.t#14 (xtext) ====
Index: perl/t/op/sort.t
--- perl/t/op/sort.t.~1~	Wed Oct 20 16:49:52 1999
+++ perl/t/op/sort.t	Wed Oct 20 16:49:52 1999
@@ -163,7 +163,10 @@
 
 ## exercise sort builtins... ($a <=> $b already tested)
 @a = ( 5, 19, 1996, 255, 90 );
-@b = sort { $b <=> $a } @a;
+@b = sort {
+    my $dummy;		# force blockness
+    return $b <=> $a
+} @a;
 print ("@b" eq '1996 255 90 19 5' ? "ok 30\n" : "not ok 30\n");
 print "# x = '@b'\n";
 $x = join('', sort { $a cmp $b } @harry);
End of Patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant