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

False GCC4 Linker Error detected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: warnings-plugin
    • Labels:
      None
    • Environment:
      Hudson version : 1.346
      Warnings version : 3.4
      Static Analysis Utilities : 1.4
      Gcc version : 3.4.6
      OS : Linux Red Hat
    • Similar Issues:

      Description

      During warnings parsing, the GCC linker warnings are not correctly detected with GNU Compiler 4 (ld) parser
      A false linker error is detected and the build is set to failed (threshold set to 1 for error)

      I isolated the problem in gcc log file.
      You can find attached :

      • gcc log file
      • 3 C/C++ file associated with the log

      To reproduce the problem:

      • Create a Job Free Style
      • Copy in the workspace the attached files
      • Activate the Scan of Warnings on the log file
      • Activate the GNU Compiler 4 (gcc) and GNU Compiler 4 (ld) parsers

      Results:

      • A linker warning is correctly detected
      • A false error is incorrectly detected and failing the build

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : drulli
          Path:
          trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/parser/Gcc4CompilerParserTest.java
          trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/parser/Gcc4LinkerParserTest.java
          trunk/hudson/plugins/warnings/src/test/resources/hudson/plugins/warnings/parser/issue6563.txt
          http://jenkins-ci.org/commit/31181
          Log:
          JENKINS-6563 Added test case.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/parser/Gcc4CompilerParserTest.java trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/parser/Gcc4LinkerParserTest.java trunk/hudson/plugins/warnings/src/test/resources/hudson/plugins/warnings/parser/issue6563.txt http://jenkins-ci.org/commit/31181 Log: JENKINS-6563 Added test case.
          Hide
          drulli Ulli Hafner added a comment -

          Can you please specify, which warnings are correct and which not? When I parse the log, I get 10 warnings with the GCC 4 Compiler parser and 1 warning with the GCC 4 LD Parser. This seems to be correct for me...

          Show
          drulli Ulli Hafner added a comment - Can you please specify, which warnings are correct and which not? When I parse the log, I get 10 warnings with the GCC 4 Compiler parser and 1 warning with the GCC 4 LD Parser. This seems to be correct for me...
          Hide
          paskalad paskalad added a comment - - edited
          • GCC 4 LD Warning which is incorrect (1)
            File:main.o, Line: 0, Type: gcc4 linker, Priority: High, Category: GCC4 Linker Error
            In function `main':
          • GCC 4 Compiler Warnings which are correct (10)
            File:main.c, Line: 9, Type: gcc4, Priority: Normal, Category: GCC4 Error
            the `gets' function is dangerous and should not be used.
            File:main.c, Line: 2, Type: gcc4, Priority: Normal, Category: GCC4 Error
            return type defaults to `int'
            File:main.c, Line: 9, Type: gcc4, Priority: Normal, Category: GCC4 Error
            implicit declaration of function `gets'
            File:main.c, Line: 10, Type: gcc4, Priority: Normal, Category: GCC4 Error
            implicit declaration of function `sscanf'
            File:main.c, Line: 12, Type: gcc4, Priority: Normal, Category: GCC4 Error
            control reaches end of non-void function
            File:my_ext_class.h, Line: 12, Type: gcc4, Priority: Normal, Category: GCC4 Error
            "/*" within comment
            File:my_ext_class.h, Line: 13, Type: gcc4, Priority: Normal, Category: GCC4 Error
            "/*" within comment
            File:my_ext_class.h, Line: 14, Type: gcc4, Priority: Normal, Category: GCC4 Error
            "/*" within comment
            File:my_ext_class.h, Line: 1, Type: gcc4, Priority: Normal, Category: GCC4 Error
            'H_SSALC_TXE_YM' defined but not used
            File:my_ext_class.h, Line: 11, Type: gcc4, Priority: Normal, Category: GCC4 Error
            "/*" within comment
          Show
          paskalad paskalad added a comment - - edited GCC 4 LD Warning which is incorrect (1) File:main.o, Line: 0, Type: gcc4 linker, Priority: High, Category: GCC4 Linker Error In function `main': GCC 4 Compiler Warnings which are correct (10) File:main.c, Line: 9, Type: gcc4, Priority: Normal, Category: GCC4 Error the `gets' function is dangerous and should not be used. File:main.c, Line: 2, Type: gcc4, Priority: Normal, Category: GCC4 Error return type defaults to `int' File:main.c, Line: 9, Type: gcc4, Priority: Normal, Category: GCC4 Error implicit declaration of function `gets' File:main.c, Line: 10, Type: gcc4, Priority: Normal, Category: GCC4 Error implicit declaration of function `sscanf' File:main.c, Line: 12, Type: gcc4, Priority: Normal, Category: GCC4 Error control reaches end of non-void function File:my_ext_class.h, Line: 12, Type: gcc4, Priority: Normal, Category: GCC4 Error "/*" within comment File:my_ext_class.h, Line: 13, Type: gcc4, Priority: Normal, Category: GCC4 Error "/*" within comment File:my_ext_class.h, Line: 14, Type: gcc4, Priority: Normal, Category: GCC4 Error "/*" within comment File:my_ext_class.h, Line: 1, Type: gcc4, Priority: Normal, Category: GCC4 Error 'H_SSALC_TXE_YM' defined but not used File:my_ext_class.h, Line: 11, Type: gcc4, Priority: Normal, Category: GCC4 Error "/*" within comment
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : drulli
          Path:
          trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/parser/Gcc4LinkerParser.java
          trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/parser/Gcc4LinkerParserTest.java
          http://jenkins-ci.org/commit/31202
          Log:
          [FIXED JENKINS-6563] Fixed false positive in ld parser.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/parser/Gcc4LinkerParser.java trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/parser/Gcc4LinkerParserTest.java http://jenkins-ci.org/commit/31202 Log: [FIXED JENKINS-6563] Fixed false positive in ld parser.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              paskalad paskalad
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: