Commit 3b8aac8dad4 for php.net

commit 3b8aac8dad4482ddd3f6ff71a2669cb5307e4012
Merge: 06f9389d691 3073948885d
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date:   Tue Mar 10 20:28:59 2026 +0100

    Merge branch 'PHP-8.4' into PHP-8.5

    * PHP-8.4:
      Revert "ext/session: Fix memory leak due to multiple exception happening during session abort"

diff --cc NEWS
index dbdb7c906c7,5380688ce3d..4e31fff2ead
--- a/NEWS
+++ b/NEWS
@@@ -21,14 -9,10 +21,10 @@@ PH
    . Fixed re-entrancy issue on php_pcre_match_impl, php_pcre_replace_impl,
      php_pcre_split_impl, and php_pcre_grep_impl. (David Carlier)

 -- PGSQL:
 -  . Fixed preprocessor silently guarding PGSQL_SUPPRESS_TIMESTAMPS support
 -    due to a typo. (KentarouTakeda)
 -
 +- Phar:
 +  . Fixed bug GH-21333 (use after free when unlinking entries during iteration
 +    of a compressed phar). (David Carlier)
 +
- - Session:
-   . Fix memory leak due to multiple exception happening during session abort.
-     (arshidkv12)
-
  - SNMP:
    . Fixed bug GH-21336 (SNMP::setSecurity() undefined behavior with
      NULL arguments). (David Carlier)
diff --cc ext/session/session.c
index 9d2431a2e33,70e1673d87f..489f82d6f14
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@@ -1751,19 -1740,11 +1750,11 @@@ PHPAPI php_session_status php_get_sessi
  	return PS(session_status);
  }

 -static zend_result php_session_abort(void) /* {{{ */
 +static zend_result php_session_abort(void)
  {
  	if (PS(session_status) == php_session_active) {
- 		if ((PS(mod_data) || PS(mod_user_implemented)) && PS(mod)->s_close) {
- 			zend_object *old_exception = EG(exception);
- 			EG(exception) = NULL;
-
+ 		if (PS(mod_data) || PS(mod_user_implemented)) {
  			PS(mod)->s_close(&PS(mod_data));
- 			if (!EG(exception)) {
- 				EG(exception) = old_exception;
- 			} else if (old_exception) {
- 				zend_exception_set_previous(EG(exception), old_exception);
- 			}
  		}
  		PS(session_status) = php_session_none;
  		return SUCCESS;