1--TEST--
2Bug #81430 (Attribute instantiation leaves dangling execute_data pointer)
3--EXTENSIONS--
4zend_test
5--INI--
6memory_limit=20M
7zend_test.observer.enabled=1
8zend_test.observer.observe_all=1
9--FILE--
10<?php
11
12#[\Attribute]
13class A {
14    public function __construct() {
15        array_map("str_repeat", ["\xFF"], [100000000]); // cause a bailout
16    }
17}
18
19#[A]
20function B() {}
21
22$r = new \ReflectionFunction("B");
23call_user_func([$r->getAttributes(A::class)[0], 'newInstance']);
24?>
25--EXPECTF--
26<!-- init '%s' -->
27<file '%s'>
28  <!-- init A::__construct() -->
29  <A::__construct>
30
31Fatal error: Allowed memory size of %d bytes exhausted %s in %s on line %d
32  </A::__construct>
33</file '%s'>
34