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

[BUG 5.005_62 Assertation failed: "pp_ctl.c" line 2443] #727

Closed
p5pRT opened this issue Oct 15, 1999 · 5 comments
Closed

[BUG 5.005_62 Assertation failed: "pp_ctl.c" line 2443] #727

p5pRT opened this issue Oct 15, 1999 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 15, 1999

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

Searchable as RT1629$

@p5pRT
Copy link
Author

p5pRT commented Oct 15, 1999

From @schwern

$ perl-devel -dw /usr/local/perl5.005_62/bin/pod2text

Loading DB routines from perl5db.pl version 1.0403
Emacs support available.

Enter h or `h h' for help, run `perldoc perldebug' for more help.

Assertion failed​: file "pp_ctl.c", line 2443.
Compilation failed in require at /usr/local/perl5.005_62/lib/5.00562/Carp.pm line 97.
Debugged program terminated. Use q to quit or R to restart,
  use O inhibit_exit to avoid stopping after program termination,
  h q, h R or h O to get additional info.
  DB<1>

Well, whatever it is, it ain't good. The program runs fine with -d,
only -dw causes the problem.

I get the same problem under _60 and _61 (except the assertation is at
line 2430 and I get no error from Carp)

Summary of my perl5 (revision 5.0 version 5 subversion 62) configuration​:
  Platform​:
  osname=linux, osvers=2.2.10, archname=i686-linux
  uname='linux athens 2.2.10 #3 smp mon aug 2 16​:48​:09 edt 1999 i686 unknown '
  config_args=''
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  use64bits=undef usemultiplicity=undef
  Compiler​:
  cc='cc', optimize='-g', gccversion=2.95.2 19990906 (prerelease)
  cppflags='-Dbool=char -DHAS_BOOL -DDEBUGGING -I/usr/local/include -DDEBUGGING_OPS -DDEBUGGING_MSTATS -fno-strict-aliasing'
  ccflags ='-Dbool=char -DHAS_BOOL -DDEBUGGING -I/usr/local/include -DDEBUGGING_OPS -DDEBUGGING_MSTATS -fno-strict-aliasing'
  stdchar='char', d_stdstdio=define, usevfork=false
  intsize=4, longsize=4, ptrsize=4, doublesize=8
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib
  libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
  libc=/lib/libc-2.1.2.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
  cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl)​:
  Compile-time options​: DEBUGGING
  Built under linux
  Compiled at Oct 16 1999 00​:14​:14
  @​INC​:
  /usr/local/perl5.005_62/lib/5.00562/i686-linux
  /usr/local/perl5.005_62/lib/5.00562
  /usr/local/perl5.005_62/lib/site_perl/5.00562/i686-linux
  /usr/local/perl5.005_62/lib/site_perl
  .

@p5pRT
Copy link
Author

p5pRT commented Oct 16, 1999

From @gsar

On Sat, 16 Oct 1999 02​:45​:00 EDT, Michael G Schwern wrote​:

$ perl-devel -dw /usr/local/perl5.005_62/bin/pod2text

Loading DB routines from perl5db.pl version 1.0403
Emacs support available.

Enter h or `h h' for help, run `perldoc perldebug' for more help.

Assertion failed​: file "pp_ctl.c", line 2443.
Compilation failed in require at /usr/local/perl5.005_62/lib/5.00562/Carp.pm l
ine 97.

Try this patch.

Sarathy
gsar@​activestate.com

Inline Patch
-----------------------------------8<-----------------------------------
Change 4395 by gsar@auger on 1999/10/16 17:18:36

	assumption about @_ always being non-REAL doesn't hold when
	debugger is running; DB::sub() can call arbitrary stuff
	that modifies @_ at will

Affected files ...

... //depot/perl/pp_hot.c#139 edit

Differences ...

==== //depot/perl/pp_hot.c#139 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c.~1~	Sat Oct 16 10:18:40 1999
+++ perl/pp_hot.c	Sat Oct 16 10:18:40 1999
@@ -2537,7 +2537,13 @@
 	    			  "%p entersub preparing @_\n", thr));
 #endif
 	    av = (AV*)PL_curpad[0];
-	    assert(!AvREAL(av));
+	    if (AvREAL(av)) {
+		/* @_ is normally not REAL--this should only ever
+		 * happen when DB::sub() calls things that modify @_ */
+		av_clear(av);
+		AvREAL_off(av);
+		AvREIFY_on(av);
+	    }
 #ifndef USE_THREADS
 	    cx->blk_sub.savearray = GvAV(PL_defgv);
 	    GvAV(PL_defgv) = (AV*)SvREFCNT_inc(av);
End of Patch.

@p5pRT
Copy link
Author

p5pRT commented Oct 16, 1999

From @gsar

On Sat, 16 Oct 1999 10​:38​:01 PDT, I wrote​:

Assertion failed​: file "pp_ctl.c", line 2443.
Compilation failed in require at /usr/local/perl5.005_62/lib/5.00562/Carp.pm
l
ine 97.

Try this patch.
[...]
Change 4395 by gsar@​auger on 1999/10/16 17​:18​:36

You'll need this to go along with it also.

Sarathy
gsar@​activestate.com

Inline Patch
-----------------------------------8<-----------------------------------
Change 4397 by gsar@auger on 1999/10/16 18:30:14

	another bug in change#3386 (CATCH_SET wasn't reverted correctly)

Affected files ...

... //depot/perl/perl.c#175 edit

Differences ...

==== //depot/perl/perl.c#175 (text) ====
Index: perl/perl.c
--- perl/perl.c.~1~	Sat Oct 16 11:30:18 1999
+++ perl/perl.c	Sat Oct 16 11:30:18 1999
@@ -1244,7 +1244,7 @@
 	CATCH_SET(TRUE);
 	call_xbody((OP*)&myop, FALSE);
 	retval = PL_stack_sp - (PL_stack_base + oldmark);
-	CATCH_SET(FALSE);
+	CATCH_SET(oldcatch);
     }
     else {
 	cLOGOP->op_other = PL_op;
End of Patch.

@p5pRT
Copy link
Author

p5pRT commented Oct 16, 1999

From @schwern

Those two appear to have done the trick. Thanks.

Is there any way a test can be set up to catch its reappearance in the
future, or is it too intermitent to properly test?

On Sat, Oct 16, 1999 at 11​:49​:54AM -0700, Gurusamy Sarathy wrote​:

On Sat, 16 Oct 1999 10​:38​:01 PDT, I wrote​:

Assertion failed​: file "pp_ctl.c", line 2443.
Compilation failed in require at /usr/local/perl5.005_62/lib/5.00562/Carp.pm
l
ine 97.

Try this patch.
[...]
Change 4395 by gsar@​auger on 1999/10/16 17​:18​:36

You'll need this to go along with it also.

--

Michael G Schwern schwern@​pobox.com
  http​://www.pobox.com/~schwern
  /(?​:(?​:(1)[.-]?)?\(?(\d{3})\)?[.-]?)?(\d{3})[.-]?(\d{4})(x\d+)?/i

@p5pRT
Copy link
Author

p5pRT commented Oct 16, 1999

From @gsar

On Sat, 16 Oct 1999 16​:10​:15 EDT, Michael G Schwern wrote​:

Those two appear to have done the trick. Thanks.

Is there any way a test can be set up to catch its reappearance in the
future, or is it too intermitent to properly test?

One could write a simple debugger using DB.pm, and run the
entire testsuite with it.

Sarathy
gsar@​activestate.com

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