Skip to content

Segmentation fault in Zend/zend_types.h:650 #16773

@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
class Test {
public $prop {
get { echo __METHOD__, "\n"; return $this->prop; }
}
}
function doTest(Test $test) {
$test->prop;
try {
$test->prop[] = 1;
} catch (Error $e) {
}
}
$test = new Test;
doTest($test);
doTest($test);

Resulted in this output:

php-src/Zend/zend_types.h:650:13: runtime error: member access within misaligned address 0x000042857d8f for type 'const zval' (aka 'const struct _zval_struct'), which requires 8 byte alignment
0x000042857d8f: note: pointer points here
 00 52 08 01 02  a0 8f f3 77 c9 55 00 00  70 00 00 00 ff ff ff ff  ff ff ff ff 00 00 00 00  08 00 00

To reproduce: JIT 1011

PHP Version

nightly

Operating System

ubuntu 22.04

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