Skip to content

Add ASAN support to the zend allocator #18858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
24 changes: 24 additions & 0 deletions Zend/tests/gh18833.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--TEST--
Bug #18833 (Use after free with weakmaps dependent on destruction order)
--FILE--
<?php

class a {
public static WeakMap $map;
public static Generator $storage;
}

a::$map = new WeakMap;

$closure = function () {
$obj = new a;
a::$map[$obj] = true;
yield $obj;
};
a::$storage = $closure();
a::$storage->current();

echo "ok\n";
?>
--EXPECT--
ok
Loading