Skip to content

Stack overflow no location #23089

Description

@djarfluka

Description

The following code:

<?php
$a=[]; for($i=0;$i<1000000;$i++){ $a=['k'=>$a]; }
$b=array_merge_recursive($a,$a);
echo "ok\n";

Resulted in this output:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==56==ERROR: AddressSanitizer: stack-overflow on address 0x7ffffca8dff8 (pc 0x7f0bfc038c33 bp 0x7ffffca8e000 sp 0x7ffffca8e000 T0)
    <empty stack>

SUMMARY: AddressSanitizer: stack-overflow
==56==ABORTING
USE_ZEND_ALLOC=0 php -d "opcache.enable=1" -d "opcache.enable_cli=1" -d "opcache.jit=tracing" -d "opcache.jit_hot_loop=1" -d "opcache.jit_hot_func=1" poc.php

PHP Version

8.6.0

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions