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

report-converter [INFO] No 'lsan' results can be found #4280

Open
Katze719 opened this issue Jun 28, 2024 · 4 comments · May be fixed by #4288
Open

report-converter [INFO] No 'lsan' results can be found #4280

Katze719 opened this issue Jun 28, 2024 · 4 comments · May be fixed by #4288
Labels
bug 🐛 report-converter 🔄 tools 🛠️ Meta-tag for all the additional tools supplied with CodeChecker: plist2html, tu_collector, etc.

Comments

@Katze719
Copy link

Katze719 commented Jun 28, 2024

Describe the bug
report-converter is saying "No 'lsan' results can be found" when there clearly is a leak detected and in the file

CodeChecker version

[INFO 2024-06-28 11:09] - CodeChecker analyzer version:
---------------------------------------------------------------
Kind                 | Version                                 
---------------------------------------------------------------
Base package version | 6.23.1                                  
Package build date   | 2023-12-14T14:38                        
Git commit ID (hash) | 2a8fa6e711a4ff591280a79fe8798dee2507d984
Git tag information  | 6.23.1                                  
---------------------------------------------------------------

[INFO 2024-06-28 11:09] - CodeChecker web version:
------------------------------------------------------------------------------
Kind                                | Version                                 
------------------------------------------------------------------------------
Base package version                | 6.23.1                                  
Package build date                  | 2023-12-14T14:38                        
Git commit ID (hash)                | 2a8fa6e711a4ff591280a79fe8798dee2507d984
Git tag information                 | 6.23.1                                  
Server supported Thrift API version | 6.54                                    
Client Thrift API version           | 6.54                                    
------------------------------------------------------------------------------

To Reproduce
Steps to reproduce the behaviour:

  1. have a text file (test.out) with this content:
==17727==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0x49c2ad in __interceptor_malloc /projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:129:3
    #1 0x4ce525 in main files/lsan2.c:5:9

Direct leak of 5 byte(s) in 1 object(s) allocated from:
    #0 0x49c2ad in __interceptor_malloc /projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:129:3
    #1 0x4ce543 in main files/lsan2.c:7:16

SUMMARY: AddressSanitizer: 12 byte(s) leaked in 2 allocation(s).
  1. report-converter -t lsan -o report ./test.out
  2. See error:
    [INFO] - No 'lsan' results can be found in '...'

Expected behaviour
report-converter found a leak

Desktop (please complete the following information)

  • OS: Linux ubuntu22.04 (WSL2)
@whisperity whisperity added bug 🐛 tools 🛠️ Meta-tag for all the additional tools supplied with CodeChecker: plist2html, tu_collector, etc. report-converter 🔄 labels Jul 1, 2024
bruntib added a commit to bruntib/codechecker that referenced this issue Jul 8, 2024
Some analyzer tools (e.g. sanitizers) give an output that contains
relative source file paths. When report-converter is executed from a
directory where these absolute paths are not valid, then reports are
simply not generated. If all reports contain such a relative path, then
this message is given by report-converter:

No 'lsan' results can be found in '...'

This message is obviously false.

This patch allows non-existing file paths in the analyzer outputs. Using
further CodeChecker commands (store, parse, etc.) will emit an error
message on these paths anyway, but at least we get rid of the
incomprehensible error message above.

Fixes Ericsson#4280
@bruntib
Copy link
Contributor

bruntib commented Jul 8, 2024

Hi,

Make sure that files/lsan2.c relative path is valid relative to the current working directory when report-converter is executed. I also created a patch to solve this issue.

@bruntib bruntib closed this as completed Jul 8, 2024
@bruntib bruntib reopened this Jul 8, 2024
@bruntib
Copy link
Contributor

bruntib commented Jul 8, 2024

Sorry, closed accidentally. I didn't mean to close it until the patch is merged.

@Katze719
Copy link
Author

Katze719 commented Jul 8, 2024

Oh, thanks for letting me know. I wasn't aware that the report-converter requires access to the source files.

@bruntib
Copy link
Contributor

bruntib commented Jul 8, 2024

Actually, report-converter doesn't require access to these files, but almost all other CodeChecker commands do. For this reason my first thought was printing a comprehensible error message, why report-converter didn't generate any reports and still abort report generation. I chose this current solution, because this way "CodeChecker parse" can provide some statistics at least. But all other CodeChecker commands will emit an error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 report-converter 🔄 tools 🛠️ Meta-tag for all the additional tools supplied with CodeChecker: plist2html, tu_collector, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants