php / php/php-src

Core dumped in Zend/zend_weakrefs.c

Open
#15,867 5 comments 1 reaction 1 assignee View on GitHub

@arnaud-lb is already working on this.

Since Sep 13, 2024.

Bug Category: Engine Status: Verified
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

The following code:

<?php
class HasDtor {
public function __destruct() {
global $w, $all;
for ($i = 0; $i < 10; $fusion++) {
$v = new stdClass();
$all[] = $v;
$w[$v] = $i;
}
}
}
$w = new WeakMap();
$w[$o] = new HasDtor();

Resulted in this output:

/php-src/Zend/zend_weakrefs.c:198: void zend_weakrefs_notify(zend_object *): Assertion `tagged_ptr && "Tracking of the IS_OBJ_WEAKLY_REFERENCE flag should be precise"' failed.
Aborted (core dumped)
PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.