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 endTag is handled.

All other test/html/parser tests are ok with the fix.

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

Commit messages:
 - Test fix
 - Test fix
 - 7172359: HTML parser StackOverflowError on invalid HTML: <li> tag inside an 
<option>

Changes: https://git.openjdk.org/jdk/pull/10279/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10279&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-7172359
  Stats: 52 lines in 2 files changed: 51 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/10279.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10279/head:pull/10279

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

Reply via email to