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/17 17:46:42 UTC

svn commit: r1588291 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/util/ExceptionUtils.java java/org/apache/tomcat/util/ExceptionUtils.java webapps/docs/changelog.xml

Author: markt
Date: Thu Apr 17 15:46:42 2014
New Revision: 1588291

URL: http://svn.apache.org/r1588291
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/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/jasper/util/ExceptionUtils.java
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/ExceptionUtils.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1588269

Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/util/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/util/ExceptionUtils.java?rev=1588291&r1=1588290&r2=1588291&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/jasper/util/ExceptionUtils.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/util/ExceptionUtils.java Thu Apr 17 15:46:42 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/tc7.0.x/trunk/java/org/apache/tomcat/util/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/ExceptionUtils.java?rev=1588291&r1=1588290&r2=1588291&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/ExceptionUtils.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/ExceptionUtils.java Thu Apr 17 15:46:42 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/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1588291&r1=1588290&r2=1588291&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Apr 17 15:46:42 2014
@@ -92,6 +92,11 @@
         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>
+      <fix>
         <bug>56409</bug>: Avoid <code>StackOverflowError</code> on non-Windows
         systems if a file named <code>\</code> is encountered when scanning for
         TLDs. (mark)



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