Skip to content

show gcc / clang sanitizer findings as issues #2084

@Kinokin

Description

@Kinokin

gcc and clang can instrument the created binary with additional checks like

  • detect illegal memory usage
  • commands causing undefined behavior

An example output from clang looks like

==9442== ERROR: AddressSanitizer heap-use-after-free on address 0x7f7ddab8c084 at pc 0x403c8c bp 0x7fff87fb82d0 sp 0x7fff87fb82c8
READ of size 4 at 0x7f7ddab8c084 thread T0
#0 0x403c8c in main example_UseAfterFree.cc:4
#1 0x7f7ddabcac4d in __libc_start_main ??:0

(see https://clang.llvm.org/docs/AddressSanitizer.html)

The feature request would be to define a file format for sonar-cxx to upload the sanitizer issues detected on tests

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions