You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
free_obj for objects referenced in the main symbol table may be called only once
the executor has already shut down. php_zip_cancel_callback() may attempt to
invoke a user callback, which will terminate the process because user code is
not expected to be executed at this point. We solve this by using the dtor_obj
handler instead, which is called earlier in the shutdown sequence.
Technically, this allows some shenanigans with escaping __destruct functions,
but given destructors are useful, this may not be worth solving.
For reference:
class MyZipArchive extends ZipArchive {
public function __destruct() {
global $leak;
$leak = $this;
}
}
new MyZipArchive;
$file = __DIR__ . '/gh18907.zip';
$leak->open($file, ZIPARCHIVE::CREATE);
$leak->addFromString('test', 'test');
0 commit comments