Avoid non-immutable map_ptr indirection - #7394
Conversation
|
This extra patch mostly fixes closure support: https://gist.github.com/nikic/898f766722839d27a9d599f653c80a8c However, there is a problem: For fake closures we want to share static variables between the function and the closure. However, the closure has a separate copy of the function. Without the indirection pointer, they will now have two independent static_variables pointers. |
nikic
left a comment
There was a problem hiding this comment.
As discussed, let's land this after PHP-8.1 has been branched off.
What happened two weeks ago. :) |
|
Do you plan to merge this? |
I already forgot about this. I'll need to fix merge conflicts first. I'll do this when have more time. |
|
@nikic could you please make a quick review once again |
| ZEND_ASSERT(op_array->fn_flags & ZEND_ACC_HEAP_RT_CACHE); | ||
| void *ptr = emalloc(op_array->cache_size + sizeof(void*)); | ||
| void *ptr = emalloc(op_array->cache_size); | ||
| char *run_time_cache = ptr; |
There was a problem hiding this comment.
I think you can drop the ptr variable here and use only run_time_cache.
|
Merged via ddaf64b |
No description provided.