Skip to content

Commit 6409235

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: Revert "ext/session: Fix memory leak due to multiple exception happening during session abort"
2 parents 6e664a0 + 3b8aac8 commit 6409235

3 files changed

Lines changed: 1 addition & 47 deletions

File tree

ext/session/session.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include "ext/standard/url_scanner_ex.h"
4242
#include "ext/standard/info.h"
4343
#include "zend_smart_str.h"
44-
#include "zend_exceptions.h"
4544
#include "ext/standard/url.h"
4645
#include "ext/standard/basic_functions.h"
4746
#include "ext/standard/head.h"
@@ -1725,16 +1724,8 @@ PHPAPI php_session_status php_get_session_status(void)
17251724
static bool php_session_abort(void)
17261725
{
17271726
if (PS(session_status) == php_session_active) {
1728-
if ((PS(mod_data) || PS(mod_user_implemented)) && PS(mod)->s_close) {
1729-
zend_object *old_exception = EG(exception);
1730-
EG(exception) = NULL;
1731-
1727+
if (PS(mod_data) || PS(mod_user_implemented)) {
17321728
PS(mod)->s_close(&PS(mod_data));
1733-
if (!EG(exception)) {
1734-
EG(exception) = old_exception;
1735-
} else if (old_exception) {
1736-
zend_exception_set_previous(EG(exception), old_exception);
1737-
}
17381729
}
17391730
PS(session_status) = php_session_none;
17401731
return true;

ext/session/tests/sessionhandler_validateid_return_type.phpt

Lines changed: 0 additions & 35 deletions
This file was deleted.

ext/session/tests/user_session_module/session_set_save_handler_class_012.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ var_dump(session_id(), $oldHandler, ini_get('session.save_handler'), $handler->i
4343
--EXPECTF--
4444
*** Testing session_set_save_handler() : incorrect arguments for existing handler open ***
4545
Open:
46-
47-
Warning: SessionHandler::close(): Parent session handler is not open in %s on line %d
4846
SessionHandler::open() expects exactly 2 arguments, 0 given
4947

5048
Warning: Undefined global variable $_SESSION in %s on line %d

0 commit comments

Comments
 (0)