tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1588269 - in /tomcat/trunk: java/org/apache/jasper/util/ExceptionUtils.java java/org/apache/tomcat/util/ExceptionUtils.java webapps/docs/changelog.xml
Date Thu, 17 Apr 2014 14:35:17 GMT
Author: markt
Date: Thu Apr 17 14:35:17 2014
New Revision: 1588269

URL: http://svn.apache.org/r1588269
Log:
Modify generic exception handling so that StackOverflowError is not treated as a fatal error
and can handled and/or logged as required.

Modified:
    tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java
    tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java?rev=1588269&r1=1588268&r2=1588269&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java (original)
+++ tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java Thu Apr 17 14:35:17 2014
@@ -33,6 +33,10 @@ public class ExceptionUtils {
         if (t instanceof ThreadDeath) {
             throw (ThreadDeath) t;
         }
+        if (t instanceof StackOverflowError) {
+            // Swallow silently - it should be recoverable
+            return;
+        }
         if (t instanceof VirtualMachineError) {
             throw (VirtualMachineError) t;
         }

Modified: tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java?rev=1588269&r1=1588268&r2=1588269&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java Thu Apr 17 14:35:17 2014
@@ -33,6 +33,10 @@ public class ExceptionUtils {
         if (t instanceof ThreadDeath) {
             throw (ThreadDeath) t;
         }
+        if (t instanceof StackOverflowError) {
+            // Swallow silently - it should be recoverable
+            return;
+        }
         if (t instanceof VirtualMachineError) {
             throw (VirtualMachineError) t;
         }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1588269&r1=1588268&r2=1588269&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Apr 17 14:35:17 2014
@@ -111,6 +111,11 @@
         Only create XML parsing objects if required and fix associated potential
         memory leak in the default Servlet. (markt)
       </fix>
+      <fix>
+        Modify generic exception handling so that
+        <code>StackOverflowError</code> is not treated as a fatal error and can
+        handled and/or logged as required. (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


Mime
View raw message