Skip to content

Assertion failure Zend/zend_objects_API.c:189 #17196

@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$dirIterator = new DirectoryIterator('test_dir_ptfi');
$fusion = $dirIterator;
require(__DIR__ . "/run_bcmath_tests_function.inc");
$leftSummands = [
"-0.123912932193769965476541321",
];
run_bcmath_tests($leftSummands, $fusion, "+", bcadd(...));

Resulted in this output:

Number "-0.123912932193769965476541321" (scale 0)
-0.123912932193769965476541321 + ..                             = bcadd(): Argument #2 ($num2) is not well-formed
-0.123912932193769965476541321 + .                              = bcadd(): Argument #3 ($scale) must be of type ?int, DirectoryIterator given

Number "-0.123912932193769965476541321" (scale 10)
-0.123912932193769965476541321 + ..                             = bcadd(): Argument #3 ($scale) must be of type ?int, DirectoryIterator given
-0.123912932193769965476541321 + .                              = bcadd(): Argument #3 ($scale) must be of type ?int, DirectoryIterator given

php: /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_objects_API.c:189: void zend_objects_store_del(zend_object *): Assertion `(!(((uintptr_t)((((zend_executor_globals *) (((char*) _tsrm_ls_cache)+(executor_globals_offset)))->objects_store).object_buckets[handle])) & (1<<0)))' failed.
Aborted (core dumped)

To reproduce:

-d "opcache.jit_hot_func=1" -d "zend_extension=/home/phpfuzz/WorkSpace/flowfusion/php-src/modules/opcache.so" -d "opcache.enable_cli=1" -d "opcache.jit=1254"

you need:run_bcmath_tests_function.inc

PHP Version

nightly

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