🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #164

Perl 3.0 dumps core on write(); patch

#164
From: Winfried Koenig
Date: Wed, 13 Sep 1989 02:20
48 lines
1501 bytes
--------------
On my Interactive UNIX Rel. 2.0.2  Perl 3.0 dumps core
on the command:

write();	# no filehandle, write to stdout

With my patch for eval.c it seems to work.

The same code is also used for close(), but this
command	may be not valide without filehandle.

--------------
With Perl 2.0 the illegal command

write;		# illegal

had the same effect as

write();

but with Perl 3.0 the illegal version is no-op 
and no syntax error. Any help?

--------------
*** eval.c.dist	Wed Sep  6 02:36:05 1989
--- eval.c	Tue Sep 12 19:07:00 1989
***************
*** 409,415 ****
  	STABSET(str);
  	break;
      case O_WRITE:
! 	if (maxarg == 0)
  	    stab = defoutstab;
  	else if ((arg[1].arg_type & A_MASK) == A_WORD)
  	    stab = arg[1].arg_ptr.arg_stab;
--- 409,415 ----
  	STABSET(str);
  	break;
      case O_WRITE:
! 	if (maxarg == 1)
  	    stab = defoutstab;
  	else if ((arg[1].arg_type & A_MASK) == A_WORD)

--
Winfried Koenig			Phone:	+49 69 868707
Arendsstrasse 12		Smart:	win@incom.de
D-6050 Offenbach		Bang:	{unido,watzman}!wrkof!win
West-Germany
Technical Details
Message-ID: <399@wrkof.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!unido!wrkof!win

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!unido!wrkof!win
From: win@wrkof.UUCP (Winfried Koenig)
Newsgroups: comp.sources.bugs
Subject: Perl 3.0 dumps core on write(); patch
Message-ID: <399@wrkof.UUCP>
Date: 13 Sep 89 02:20:07 GMT
Reply-To: win@incom.de (Winfried Koenig)
Organization: Ing.-Buero W. R. Koenig, Offenbach, W. Germany
Lines: 48