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

SECTIONS Regular expression for does not match trailing whitespaces (case 14948)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • memory-map-plugin
    • None
    • Memory Map Plugin 2.1.2, GCC Parser

      The regular expression in GccMemoryMapParser.java Line 92 does not match railing whitespaces.

      Suggestion for a solution: {{SECTIONS\\s*?\\r?\\n?

      {([\\s\\S]*)\\n\\}

      }}

      if your Linker command file looks like this:
      {{SECTION
      {}}
      the regex will not match.

      If it doesn't match, it fails with this stack trace (which is bad either):
      {{Memory Map Plugin version 2.1.2 (cfc34)
      ERROR: Build step failed with exception
      java.lang.NullPointerException
      at java.util.regex.Matcher.getTextLength(Unknown Source)
      at java.util.regex.Matcher.reset(Unknown Source)
      at java.util.regex.Matcher.<init>(Unknown Source)
      at java.util.regex.Pattern.matcher(Unknown Source)
      at net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser.getSections(GccMemoryMapParser.java:102)
      at net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser.parseConfigFile(GccMemoryMapParser.java:180)
      at net.praqma.jenkins.memorymap.parser.MemoryMapConfigFileParserDelegate.invoke(MemoryMapConfigFileParserDelegate.java:58)
      at net.praqma.jenkins.memorymap.parser.MemoryMapConfigFileParserDelegate.invoke(MemoryMapConfigFileParserDelegate.java:40)
      at hudson.FilePath.act(FilePath.java:990)
      at hudson.FilePath.act(FilePath.java:968)
      at net.praqma.jenkins.memorymap.MemoryMapRecorder.perform(MemoryMapRecorder.java:160)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      at hudson.model.Build$BuildExecution.post2(Build.java:185)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      at hudson.model.Run.execute(Run.java:1763)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      Build step 'Memory Map Publisher' marked build as failure}}

            praqma Praqma Support
            freinhard Florian Reinhard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: