[EMAIL PROTECTED] (via RT) wrote:
> Priority is low, since this code is incorrect, but it might help
> resolving other issues.
> 
> the segfault does not appear when not using 'strict'.
> note that no code is executed since it's in a sub that is never
> called at runtime.
> 
> -- CODE BEGINS HERE --
> #!/usr/bin/perl
> use strict;
> sub s { open $X, my $Y, r; }
> -- CODE ENDS HERE --

Thanks for the report, fixed as below in the development version of
perl:

Change 25341 by [EMAIL PROTECTED] on 2005/08/31 14:14:21

        Fix for [perl #37036] perl segfault at 'compile'-time

Affected files ...

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

Differences ...

==== //depot/perl/op.c#702 (text) ====

@@ -5896,6 +5896,7 @@
             (last->op_private & OPpCONST_STRICT) &&
             (oa = first->op_sibling) &&                /* The fh. */
             (oa = oa->op_sibling) &&                   /* The mode. */
+            (oa->op_type == OP_CONST) &&
             SvPOK(((SVOP*)oa)->op_sv) &&
             (mode = SvPVX_const(((SVOP*)oa)->op_sv)) &&
             mode[0] == '>' && mode[1] == '&' &&        /* A dup open. */

Reply via email to