compile

command_line: /opt/hostedtoolcache/cmake/4.2.1/x64/cmake-4.2.1-linux-x86_64/bin/cmake -E __run_co_compile --tidy=clang-tidy-18;--extra-arg-before=--driver-mode=gcc --source=/home/runner/work/nightly-builds/nightly-builds/Sanitizers/msan.c -- /usr/bin/clang-18 -g -MD -MT Sanitizers/CMakeFiles/sanitizers.dir/msan.c.o -MF Sanitizers/CMakeFiles/sanitizers.dir/msan.c.o.d -o Sanitizers/CMakeFiles/sanitizers.dir/msan.c.o -c /home/runner/work/nightly-builds/nightly-builds/Sanitizers/msan.c

working_directory: "/home/runner/work/nightly-builds/nightly-builds/build"

Target: sanitizers

Target Type: object file

Source: Sanitizers/msan.c

Language: C

stderr:

/home/runner/work/nightly-builds/nightly-builds/Sanitizers/msan.c:6:13: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'char *' [clang-analyzer-unix.MallocSizeof]
    6 |   char* a = malloc(10 * sizeof(char*));
      |   ~~~~~     ^~~~~~      ~~~~~~~~~~~~~
/home/runner/work/nightly-builds/nightly-builds/Sanitizers/msan.c:6:13: note: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'char *'
    6 |   char* a = malloc(10 * sizeof(char*));
      |   ~~~~~     ^~~~~~      ~~~~~~~~~~~~~
/home/runner/work/nightly-builds/nightly-builds/Sanitizers/msan.c:9:5: warning: Potential leak of memory pointed to by 'a' [clang-analyzer-unix.Malloc]
    9 |     printf("xx\n");
      |     ^
/home/runner/work/nightly-builds/nightly-builds/Sanitizers/msan.c:6:13: note: Memory is allocated
    6 |   char* a = malloc(10 * sizeof(char*));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/nightly-builds/nightly-builds/Sanitizers/msan.c:8:7: note: Assuming the condition is true
    8 |   if (a[argc])
      |       ^~~~~~~
/home/runner/work/nightly-builds/nightly-builds/Sanitizers/msan.c:8:3: note: Taking true branch
    8 |   if (a[argc])
      |   ^
/home/runner/work/nightly-builds/nightly-builds/Sanitizers/msan.c:9:5: note: Potential leak of memory pointed to by 'a'
    9 |     printf("xx\n");
      |     ^
Status: 0
Loading...