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

Parse error on comments in linker file (GCC) (Praqma case 13367)



    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • memory-map-plugin
    • None
    • GCC complient version, 2.1.0-SNAPSHOT


      The comment in the following linker file result in exception from the plugin:

          ram : ORIGIN = 0x00400000, LENGTH = 64M
          rom : ORIGIN = 0x60000000, LENGTH = 16M    /* Change to LENGTH = 32M for larger flash. */

      Reference to file and used example: https://github.com/buep/memory-map-examples/blob/arm-none-eabi-gcc_4.8.4_hello_world/viperlite.ld

      Memory map fails with:

      Memory Map Plugin version 2.1.0-SNAPSHOT (b0dca)
      ERROR: Build step failed with exception
      java.lang.NumberFormatException: For input string: "16/*ChangetoLENGTH=32forlargerflash.*/"
      	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      	at java.lang.Integer.parseInt(Integer.java:492)
      	at java.lang.Integer.parseInt(Integer.java:527)
      	at net.praqma.jenkins.memorymap.util.HexUtils$HexifiableString.convertToHexForm(HexUtils.java:102)
      	at net.praqma.jenkins.memorymap.util.HexUtils$HexifiableString.toValidHexString(HexUtils.java:118)
      	at net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser.getMemory(GccMemoryMapParser.java:56)
      	at net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser.parseConfigFile(GccMemoryMapParser.java:182)
      	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:989)
      	at hudson.FilePath.act(FilePath.java:967)
      	at net.praqma.jenkins.memorymap.MemoryMapRecorder.perform(MemoryMapRecorder.java:138)
      	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
      	at hudson.model.Run.execute(Run.java:1766)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:374)
      Build step 'Memory Map Publisher' marked build as failure

      Required solution:

      • parser should handle comments - of course
      • plugin should not just throw exception to the console... please explain nicely what went wrong and where the problem are - which line couldnt be parsed. That is already part of the exception.
      • it is okay to print relevant part of (or maybe the hole) exception for easier debugging



          bue Bue Petersen created issue -
          bue Bue Petersen made changes -
          Field Original Value New Value
          Summary Parse error on comments in linker file (GCC) Parse error on comments in linker file (GCC) (Praqma case 13367)
          thi Thierry Lacour made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 164880 ] JNJira + In-Review [ 197571 ]


            praqma Praqma Support
            bue Bue Petersen
            0 Vote for this issue
            4 Start watching this issue