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/asan.c -- /usr/bin/clang-18 -g -MD -MT Sanitizers/CMakeFiles/sanitizers.dir/asan.c.o -MF Sanitizers/CMakeFiles/sanitizers.dir/asan.c.o.d -o Sanitizers/CMakeFiles/sanitizers.dir/asan.c.o -c /home/runner/work/nightly-builds/nightly-builds/Sanitizers/asan.c

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

Target: sanitizers

Target Type: object file

Source: Sanitizers/asan.c

Language: C

stderr:

/home/runner/work/nightly-builds/nightly-builds/Sanitizers/asan.c:5:13: warning: Result of 'calloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'char *' [clang-analyzer-unix.MallocSizeof]
    5 |   char* x = calloc(10, sizeof(char*));
      |   ~~~~~     ^~~~~~     ~~~~~~~~~~~~~
/home/runner/work/nightly-builds/nightly-builds/Sanitizers/asan.c:5:13: note: Result of 'calloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'char *'
    5 |   char* x = calloc(10, sizeof(char*));
      |   ~~~~~     ^~~~~~     ~~~~~~~~~~~~~
/home/runner/work/nightly-builds/nightly-builds/Sanitizers/asan.c:7:10: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
    7 |   return x[5];
      |          ^~~~
/home/runner/work/nightly-builds/nightly-builds/Sanitizers/asan.c:5:13: note: Memory is allocated
    5 |   char* x = calloc(10, sizeof(char*));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/nightly-builds/nightly-builds/Sanitizers/asan.c:6:3: note: Memory is released
    6 |   free(x);
      |   ^~~~~~~
/home/runner/work/nightly-builds/nightly-builds/Sanitizers/asan.c:7:10: note: Use of memory after it is freed
    7 |   return x[5];
      |          ^~~~
Status: 0
Loading...