Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MadsNielsen opened this issue Aug 1, 2016 · 4 comments
Assignees
Milestone

Comments

@MadsNielsen
Copy link
Member

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.(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}}

@MadsNielsen MadsNielsen changed the title SECTIONS Regular expression for does not match trailing whitespaces SECTIONS Regular expression for does not match trailing whitespaces (case 14948) Aug 1, 2016
@buep
Copy link
Contributor

buep commented Aug 1, 2016

Reported originally in https://issues.jenkins-ci.org/browse/JENKINS-37061

@AndersHoglund
Copy link
Contributor

If I have white space anywhere in the sections list, for example like this:

.isr_vector + .text+.ARM.extab + .ARM + .preinit_array + .init_array + .fini_array + .data

I get this (funny) message in the log:

Memory Map Plugin version 2.1.2 (cfc34)
The memory section named .isr_vector  not found in map file
Available sections are:
[.isr_vector, .text, .ARM.extab, .ARM, .preinit_array, .init_array, .fini_array, .data, .bss, ._user_heap_stack, .memory_b1_text, /DISCARD/, .ARM.attributes]
Build step 'Memory Map Publisher' marked build as failure
Finished: FAILURE

And the build fails.
If I remove all white spaces it does not fail the build. Map file still not parsed correctly, but that is another issue. Not sure if this white space issue is the same as original posted issue, similar in any case.

Using Jenkins 2.7.1 on Ubuntu 16.04 with arm-gcc 5.4.1:

$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160609 (release) [ARM/embedded-5-branch revision 237715]

@buep
Copy link
Contributor

buep commented Aug 6, 2016

@AndersHoglund - thanks, for reporting more information. We will look at the issue soon and fix it - currently awaiting estimation from and proposed fix from my colleague @MadsNielsen or @Ordojan on fixing this.

@buep
Copy link
Contributor

buep commented Mar 30, 2017

I'm closing the Jenkins CI issue https://issues.jenkins-ci.org/browse/JENKINS-37061, as we only want to use GHI going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants