Perl 3.0 dumps core on write(); patch
Larry Wall
lwall at jpl-devvax.JPL.NASA.GOV
Fri Sep 15 04:27:08 AEST 1989
In article <399 at wrkof.UUCP> win at incom.de (Winfried Koenig) writes:
: --------------
: 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.
: ...
: --------------
: *** 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)
:
A more correct patch would be:
*** eval.c.old Wed Sep 13 13:20:22 1989
--- eval.c Wed Sep 13 13:24:10 1989
***************
*** 415,422 ****
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;
else
stab = stabent(str_get(st[1]),TRUE);
if (!stab_io(stab)) {
--- 415,424 ----
case O_WRITE:
if (maxarg == 0)
stab = defoutstab;
! else if ((arg[1].arg_type & A_MASK) == A_WORD) {
! if (!(stab = arg[1].arg_ptr.arg_stab))
! stab = defoutstab;
! }
else
stab = stabent(str_get(st[1]),TRUE);
if (!stab_io(stab)) {
More information about the Comp.sources.bugs
mailing list