Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] libffi-3.4.6-build/libffi-3.4.6/src/closures.c:37: included_from: Included from here. libffi-3.4.6-build/libffi-3.4.6/src/closures.c: scope_hint: In function 'ffi_closure_alloc' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:1960:56: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libffi-3.4.6-build/libffi-3.4.6/x86_64-redhat-linux-gnu/include/ffi.h:506:36: note: in definition of macro 'FFI_FN' libffi-3.4.6-build/libffi-3.4.6/src/closures.c:1004:23: note: in expansion of macro 'add_segment_exec_offset' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:4157:8: note: in expansion of macro 'PREACTION' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:4258:5: note: in expansion of macro 'POSTACTION' libffi-3.4.6-build/libffi-3.4.6/x86_64-redhat-linux-gnu/include/ffi.h:506:36: note: in definition of macro 'FFI_FN' libffi-3.4.6-build/libffi-3.4.6/src/closures.c:1004:23: note: in expansion of macro 'add_segment_exec_offset' # 1958| (mmap_exec_offset((b),(s)) == (S)->exec_offset) # 1959| # 1960|-> # define add_segment_exec_offset(p,S) ((char*)(p) + (S)->exec_offset) # 1961| # define sub_segment_exec_offset(p,S) ((char*)(p) - (S)->exec_offset) # 1962| Error: GCC_ANALYZER_WARNING (CWE-476): [#def2] libffi-3.4.6-build/libffi-3.4.6/src/closures.c:572: included_from: Included from here. libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c: scope_hint: In function 'add_segment' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:3380:24: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:1320:30: note: in expansion of macro 'mmap' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:3525:26: note: in expansion of macro 'CALL_MMAP' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:3558:10: note: in expansion of macro 'is_initialized' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:1958:4: note: in expansion of macro 'mmap_exec_offset' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:3594:13: note: in expansion of macro 'check_segment_merge' # 3378| char* old_top = (char*)m->top; # 3379| msegmentptr oldsp = segment_holding(m, old_top); # 3380|-> char* old_end = oldsp->base + oldsp->size; # 3381| size_t ssize = pad_request(sizeof(struct malloc_segment)); # 3382| char* rawsp = old_end - (ssize + FOUR_SIZE_T_SIZES + CHUNK_ALIGN_MASK); Error: GCC_ANALYZER_WARNING (CWE-476): [#def3] libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c: scope_hint: In function 'sys_trim' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:3680:17: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:4283:10: note: in expansion of macro 'PREACTION' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:2462:38: note: in definition of macro 'RTCHECK' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:4285:19: note: in expansion of macro 'ok_address' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:4317:16: note: in expansion of macro 'cinuse' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c:4326:19: note: in expansion of macro 'should_trim' libffi-3.4.6-build/libffi-3.4.6/src/dlmalloc.c: scope_hint: In function 'sys_trim' # 3678| if (is_mmapped_segment(sp)) { # 3679| if (HAVE_MMAP && # 3680|-> sp->size >= extra && # 3681| !has_segment_link(m, sp)) { /* can't shrink if pinned */ # 3682| size_t newsize = sp->size - extra; Error: COMPILER_WARNING (CWE-477): [#def4] libffi-3.4.6-build/libffi-3.4.6/src/java_raw_api.c: scope_hint: In function 'ffi_java_raw_call' libffi-3.4.6-build/libffi-3.4.6/src/java_raw_api.c:317:3: warning[-Wdeprecated-declarations]: 'ffi_java_raw_to_ptrarray' is deprecated # 317 | ffi_java_raw_to_ptrarray (cif, raw, avalue); # | ^~~~~~~~~~~~~~~~~~~~~~~~ libffi-3.4.6-build/libffi-3.4.6/src/java_raw_api.c:76:1: note: declared here # 76 | ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args) # | ^~~~~~~~~~~~~~~~~~~~~~~~ # 315| { # 316| void **avalue = (void**) alloca (cif->nargs * sizeof (void*)); # 317|-> ffi_java_raw_to_ptrarray (cif, raw, avalue); # 318| ffi_call (cif, fn, rvalue, avalue); # 319| ffi_java_rvalue_to_raw (cif, rvalue); Error: COMPILER_WARNING (CWE-477): [#def5] libffi-3.4.6-build/libffi-3.4.6/src/java_raw_api.c: scope_hint: In function 'ffi_java_translate_args' libffi-3.4.6-build/libffi-3.4.6/src/java_raw_api.c:328:3: warning[-Wdeprecated-declarations]: 'ffi_java_raw_size' is deprecated # 328 | ffi_java_raw *raw = (ffi_java_raw*)alloca (ffi_java_raw_size (cif)); # | ^~~~~~~~~~~~ libffi-3.4.6-build/libffi-3.4.6/src/java_raw_api.c:45:1: note: declared here # 45 | ffi_java_raw_size (ffi_cif *cif) # | ^~~~~~~~~~~~~~~~~ # 326| void **avalue, void *user_data) # 327| { # 328|-> ffi_java_raw *raw = (ffi_java_raw*)alloca (ffi_java_raw_size (cif)); # 329| ffi_raw_closure *cl = (ffi_raw_closure*)user_data; # 330| Error: COMPILER_WARNING (CWE-477): [#def6] libffi-3.4.6-build/libffi-3.4.6/src/java_raw_api.c:331:3: warning[-Wdeprecated-declarations]: 'ffi_java_ptrarray_to_raw' is deprecated # 331 | ffi_java_ptrarray_to_raw (cif, avalue, raw); # | ^~~~~~~~~~~~~~~~~~~~~~~~ libffi-3.4.6-build/libffi-3.4.6/src/java_raw_api.c:157:1: note: declared here # 157 | ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw) # | ^~~~~~~~~~~~~~~~~~~~~~~~ # 329| ffi_raw_closure *cl = (ffi_raw_closure*)user_data; # 330| # 331|-> ffi_java_ptrarray_to_raw (cif, avalue, raw); # 332| (*cl->fun) (cif, rvalue, (ffi_raw*)raw, cl->user_data); # 333| ffi_java_raw_to_rvalue (cif, rvalue); Error: COMPILER_WARNING (CWE-477): [#def7] libffi-3.4.6-build/libffi-3.4.6/src/java_raw_api.c: scope_hint: In function 'ffi_prep_java_raw_closure' libffi-3.4.6-build/libffi-3.4.6/src/java_raw_api.c:369:3: warning[-Wdeprecated-declarations]: 'ffi_prep_java_raw_closure_loc' is deprecated # 369 | return ffi_prep_java_raw_closure_loc (cl, cif, fun, user_data, cl); # | ^~~~~~ libffi-3.4.6-build/libffi-3.4.6/src/java_raw_api.c:337:1: note: declared here # 337 | ffi_prep_java_raw_closure_loc (ffi_java_raw_closure* cl, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 367| void *user_data) # 368| { # 369|-> return ffi_prep_java_raw_closure_loc (cl, cif, fun, user_data, cl); # 370| } # 371| Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] libffi-3.4.6-build/libffi-3.4.6/src/tramp.c: scope_hint: In function 'tramp_table_alloc' libffi-3.4.6-build/libffi-3.4.6/src/tramp.c:483:17: warning[-Wanalyzer-malloc-leak]: leak of 'table' # 481| code = table->code_table; # 482| parm = table->parm_table; # 483|-> for (i = 0; i < tramp_globals.ntramp; i++) # 484| { # 485| tramp = &tramp_array[i]; Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] libffi-3.4.6-build/libffi-3.4.6/src/tramp.c:483:17: warning[-Wanalyzer-malloc-leak]: leak of 'tramp_array' # 481| code = table->code_table; # 482| parm = table->parm_table; # 483|-> for (i = 0; i < tramp_globals.ntramp; i++) # 484| { # 485| tramp = &tramp_array[i]; Error: GCC_ANALYZER_WARNING (CWE-416): [#def10] libffi-3.4.6-build/libffi-3.4.6/src/tramp.c:555:22: warning[-Wanalyzer-use-after-free]: use after 'free' of 'table' # 553| struct tramp_table *table = tramp->table; # 554| # 555|-> tramp->next = table->free; # 556| tramp->prev = NULL; # 557| if (table->free != NULL) Error: GCC_ANALYZER_WARNING (CWE-457): [#def11] libffi-3.4.6-build/libffi-3.4.6/src/tramp.c: scope_hint: In function 'tramp_add' libffi-3.4.6-build/libffi-3.4.6/src/tramp.c:555:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*table.free' # 553| struct tramp_table *table = tramp->table; # 554| # 555|-> tramp->next = table->free; # 556| tramp->prev = NULL; # 557| if (table->free != NULL)
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-192.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | libffi-3.4.6-3.fc42 |
store-results-to | /tmp/tmpyd964qic/libffi-3.4.6-3.fc42.tar.xz |
time-created | 2024-11-13 01:29:26 |
time-finished | 2024-11-13 01:30:39 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpyd964qic/libffi-3.4.6-3.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpyd964qic/libffi-3.4.6-3.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |