Skip to content

writing to magic variables connected to the selected output GV when its IO object has been cleared crashes perl #20733

Closed
@sigdevel

Description

@sigdevel

Description

Tested at 5.15.78-2.el7.3.x86_64 (RED OS release MUROM 7.3.2 - Centos based system), but also reproduced this bug on other platforms x86_64.

Steps to Reproduce

Fonded several examples were found using endless recursion and causing falls.
Insert this string and run with perl -e or run string from file.

while(()){$0=();int""}((unpack("p>",pack("P"))))
for(0){$0=('',unpack('P>',pack('P')))}
sub o{}*STDOUT=0;{{$~=0}{()}}

Expected behavior

Is it correct that the interpreter does not processing such samples (even with the flag -w) and just calling SEGFAULT when trying to address the memory areas inaccessible to recording?

Perl configuration

perl version: v5.30.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions