SonarCSS stack overflow

Versions

  • SonarQube 7.2.1 on CentOS x64
  • SonarCSS 1.0 (build 457)
  • Sonar-Scanner CLI 3.2.0.1227 on Windows 10 x64.

To reproduce

  1. With the attached sonar-project.properties and test.css file.
    ** Note I’ve suffixed them with .txt so I can upload them. Is there a better way for me to do this?sonar-project.properties.txt (131 Bytes)
    test.css.txt (657 Bytes)

  2. Run ‘sonar-scanner’, it produces a stack overflow error.
    ** Removing the last line of comment, it then runs fine.
    ** It seems that the specific line giving us grief is https://github.com/SonarSource/sonar-css/blob/master/sonar-css-plugin/src/main/java/org/sonar/css/plugin/CssLexer.java#L40.

  3. Workaround - Increase stack size by ‘SONAR_SCANNER_OPTS="-Xss10m" sonar-scanner’.

p.s. I don’t seem to be able to find a preview for my report. Can you please advise how to do so? Just want to make sure my post is not mis-formatted.

Hi and thanks for your feedback,

I didn’t create an issue github because there already one about this issue:
https://github.com/SonarSource/sonar-css/issues/107
We are able to reproduce, so we should be able to fix it in SonarCSS 1.1.

Alban

2 Likes