You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/04/04 23:19:59 UTC

svn commit: r1584915 - in /tomcat/trunk: java/org/apache/catalina/session/StandardSession.java webapps/docs/changelog.xml

Author: markt
Date: Fri Apr  4 21:19:58 2014
New Revision: 1584915

URL: http://svn.apache.org/r1584915
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56339
Avoid an infinite loop if an application calls session.invalidate() from the session destroyed event for that session.

Modified:
    tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=1584915&r1=1584914&r2=1584915&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Fri Apr  4 21:19:58 2014
@@ -808,7 +808,9 @@ public class StandardSession implements 
         synchronized (this) {
             // Check again, now we are inside the sync so this code only runs once
             // Double check locking - isValid needs to be volatile
-            if (!isValid)
+            // The check of expiring is to ensure that an infinite loop is not
+            // entered as per bug 56339
+            if (expiring || !isValid)
                 return;
 
             if (manager == null)

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1584915&r1=1584914&r2=1584915&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Apr  4 21:19:58 2014
@@ -70,6 +70,11 @@
         the expanded directory is deleted first, any attempt to load a new class
         during undeploy will fail. (markt)
       </fix>
+      <fix>
+        <bug>56339</bug>: Avoid an infinite loop if an application calls
+        <code>session.invalidate()</code> from the session destroyed event for
+        that session. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org