Skip to content

UB when freeing a cloned _ZendTestFiber #16388

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$fiber = new _ZendTestFiber(function (): int {
});
$fusion = $fiber;
clone $fusion;

Resulted in this output:

/php-src/ext/zend_test/fiber.c:205:3: runtime error: member access within misaligned address 0x736574646e657a5f for type 'zend_test_fiber' (aka 'struct _zend_test_fiber'), which requires 8 byte alignment

To reproduce:

-d "zend_extension=/php-src/modules/opcache.so" -d "opcache.enable_cli=1"

There are some similar issues, not sure if it is a dup.

PHP Version

nightly

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions