Perl 3.0 dumps core on write(); patch

Winfried Koenig win at wrkof.UUCP
Wed Sep 13 12:20:07 AEST 1989


--------------
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 at incom.de
D-6050 Offenbach		Bang:	{unido,watzman}!wrkof!win
West-Germany



More information about the Comp.sources.bugs mailing list