[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: RFR: 7172359: HTML parser StackOverflowError on invalid HTML: <li> tag inside an <option> [v3]
From:       Alexey Ivanov <aivanov () openjdk ! org>
Date:       2022-09-28 15:11:38
Message-ID: Pui70wuQGmhVbgX8pvLBV0khKNOYRKys4SDWd1AJojA=.d13dab9d-fbf7-461f-8dad-bf60464dcaea () github ! com
[Download RAW message or body]

On Wed, 28 Sep 2022 13:39:45 GMT, Prasanta Sadhukhan <psadhukhan@openjdk.org> wrote:

> > If there is invalid tag, stack terminates but it still tries to recurse through \
> > by calling legalElementContext() which results in StackOverflowError. Fix is to \
> > return if stack is terminated after checking current tag is not valid in current \
> > context 
> > All other test/html/parser as well as other jtreg suite tests are ok with the \
> > fix.
> 
> Prasanta Sadhukhan has updated the pull request incrementally with one additional \
> commit since the last revision: 
> Test fix

Marked as reviewed by aivanov (Reviewer).

test/jdk/javax/swing/text/html/parser/ParserStackOverflow.java line 37:

> 35: public class ParserStackOverflow {
> 36:     /*
> 37:      * li element inside an option will crash \
> javax.swing.text.html.parser.Parser

It doesn't **crash** it.

test/jdk/javax/swing/text/html/parser/ParserStackOverflow.java line 48:

> 46:         kit.read(reader, doc, 0); // StackOverflowError here
> 47: 
> 48:         System.out.println("Succeeded! (no StackOverflowError");

Suggestion:

        System.out.println("Succeeded! (no StackOverflowError)");

The closing parenthesis is missing in the string.

-------------

PR: https://git.openjdk.org/jdk/pull/10279


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic