Bug 61945

Summary: infinite recursion in Jasper compilation of a recursive JSP tagfile
Product: Tomcat 9 Reporter: Matthew Firth <tomcat-dev>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: regression CC: tomcat-dev
Priority: P2    
Version: 9.0.2   
Target Milestone: -----   
Hardware: PC   
OS: All   
Attachments: demo WAR that generates StackOverflowError upon invocation of index.jsp

Description Matthew Firth 2017-12-31 02:52:15 UTC
Created attachment 35632 [details]
demo WAR that generates StackOverflowError upon invocation of index.jsp

A tagfile that contains recursive invocation of itself cannot be compiled under Tomcat 9.0.2.   Works OK works OK in 8.5.24.

Sample WAR attached.  Invoking /recursive-taglib/index.jsp causes java.lang.StackOverflowError.
Comment 1 Remy Maucherat 2018-01-02 14:55:01 UTC
Thanks for the test case. Although it could need to be further reviewed, I think a change to what prototype mode did was not right. The fix will be in 9.0.3.