Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14132

Very long content token string parameter triggers a StackOverflowError

    Details

    • Similar Issues:

      Description

      A string parameter more than a couple of hundred characters in length triggers a StackOverflowError when it gets parsed by ContentBuilder.

      Here's a partial stack trace for a BUILD_LOG_MULTILINE_REGEX content token with a long regex="..." parameter (-XX:MaxJavaStackTraceDepth=16384 JVM option required to see the bottom of the stack trace, because the number of stack frames is larger than the default printed depth):

      ...
      at java.util.regex.Matcher.search(Matcher.java:1105)
      at java.util.regex.Matcher.find(Matcher.java:535)
      at hudson.plugins.emailext.plugins.ContentBuilder$Tokenizer.find(ContentBuilder.java:184)
      at hudson.plugins.emailext.plugins.ContentBuilder.replaceTokensWithContent(ContentBuilder.java:106)
      at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:88)
      at hudson.plugins.emailext.ExtendedEmailPublisher.getContent(ExtendedEmailPublisher.java:536)
      at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:363)
      at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:273)
      at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:265)
      at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:225)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      

        Attachments

          Activity

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              sarowe Steve Rowe
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: