summaryrefslogtreecommitdiff
path: root/ext/curl/php_curl.h
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2012-12-21 17:28:20 +0100
committerNikita Popov <nikic@php.net>2012-12-21 17:28:20 +0100
commit14f133036cfa6c2ab3f5eb9af3a0c0b29ed5d554 (patch)
tree93465630e33919888323fd1f172f24bf5dc7830f /ext/curl/php_curl.h
parentffb848b275a085917413c171a79cbfdb1d0159d2 (diff)
downloadphp-git-14f133036cfa6c2ab3f5eb9af3a0c0b29ed5d554.tar.gz
Fix crash when last yielded value is a closure
If zend_generator_close is called from within zend_generator_resume (e.g. due to a return statement) then all the EGs will still be using the values from the generator. That's why the stack frame has to be the last thing that is dtored, otherwise some other dtor that is using EG(current_execute_data) might access the already freed memory segment. This was the case with the closure dtor. The fix is to move the dtors for key and value to the start of the handler. This way the stack frame is the last thing that is freed.
Diffstat (limited to 'ext/curl/php_curl.h')
0 files changed, 0 insertions, 0 deletions