libffi-3.4.7-4.fc43

List of Findings

Error: COMPILER_WARNING (CWE-477): [#def1]
libffi-3.4.7/src/java_raw_api.c: scope_hint: In function 'ffi_java_raw_call'
libffi-3.4.7/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.7/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): [#def2]
libffi-3.4.7/src/java_raw_api.c: scope_hint: In function 'ffi_java_translate_args'
libffi-3.4.7/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.7/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): [#def3]
libffi-3.4.7/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.7/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): [#def4]
libffi-3.4.7/src/java_raw_api.c: scope_hint: In function 'ffi_prep_java_raw_closure'
libffi-3.4.7/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.7/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-476): [#def5]
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:1004:15: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:991:1: enter_function: entry to 'ffi_closure_alloc'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:995:6: branch_false: following 'false' branch (when 'code' is non-NULL)...
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:998:9: branch_false: ...to here
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:998:9: call_function: calling 'dlmalloc' from 'ffi_closure_alloc'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:998:9: return_function: returning to 'ffi_closure_alloc' from 'dlmalloc'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:1000:6: branch_true: following 'true' branch...
 branch_true: ...to here
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:1004:15: danger: dereference of NULL '<unknown>'
# 1002|         msegmentptr seg = segment_holding (gm, ptr);
# 1003|   
# 1004|->       *code = FFI_FN (add_segment_exec_offset (ptr, seg));
# 1005|         if (!ffi_tramp_is_supported ())
# 1006|           return ptr;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/dlmalloc.c:3380:19: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:991:1: enter_function: entry to 'ffi_closure_alloc'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:995:6: branch_false: following 'false' branch (when 'code' is non-NULL)...
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:998:9: branch_false: ...to here
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:998:9: call_function: calling 'dlmalloc' from 'ffi_closure_alloc'
# 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): [#def7]
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/dlmalloc.c:3681:15: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:1044:1: enter_function: entry to 'ffi_closure_free'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/closures.c:1055:3: call_function: calling 'dlfree' from 'ffi_closure_free'
# 3679|           if (is_mmapped_segment(sp)) {
# 3680|             if (HAVE_MMAP &&
# 3681|->               sp->size >= extra &&
# 3682|                 !has_segment_link(m, sp)) { /* can't shrink if pinned */
# 3683|               size_t newsize = sp->size - extra;

Error: COMPILER_WARNING (CWE-477): [#def8]
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/java_raw_api.c:317:3: warning[-Wdeprecated-declarations]: 'ffi_java_raw_to_ptrarray' is deprecated
#  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): [#def9]
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/java_raw_api.c:328:3: warning[-Wdeprecated-declarations]: 'ffi_java_raw_size' is deprecated
#  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): [#def10]
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/java_raw_api.c:331:3: warning[-Wdeprecated-declarations]: 'ffi_java_ptrarray_to_raw' is deprecated
#  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): [#def11]
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/java_raw_api.c:369:3: warning[-Wdeprecated-declarations]: 'ffi_prep_java_raw_closure_loc' is deprecated
#  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): [#def12]
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:483:15: warning[-Wanalyzer-malloc-leak]: leak of 'table'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:613:1: enter_function: entry to 'ffi_tramp_alloc'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:619:8: call_function: calling 'ffi_tramp_init' from 'ffi_tramp_alloc'
#  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): [#def13]
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:483:15: warning[-Wanalyzer-malloc-leak]: leak of 'tramp_array'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:613:1: enter_function: entry to 'ffi_tramp_alloc'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:619:8: call_function: calling 'ffi_tramp_init' from 'ffi_tramp_alloc'
#  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): [#def14]
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:555:17: warning[-Wanalyzer-use-after-free]: use after 'free' of 'table'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:613:1: enter_function: entry to 'ffi_tramp_alloc'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:619:8: call_function: calling 'ffi_tramp_init' from 'ffi_tramp_alloc'
#  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): [#def15]
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:555:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*table.free'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:613:1: enter_function: entry to 'ffi_tramp_alloc'
libffi-3.4.7/x86_64-redhat-linux-gnu/../src/tramp.c:619:8: call_function: calling 'ffi_tramp_init' from 'ffi_tramp_alloc'
#  553|     struct tramp_table *table = tramp->table;
#  554|   
#  555|->   tramp->next = table->free;
#  556|     tramp->prev = NULL;
#  557|     if (table->free != NULL)

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-94.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibffi-3.4.7-4.fc43
store-results-to/tmp/tmpfnp3uqmh/libffi-3.4.7-4.fc43.tar.xz
time-created2025-04-25 13:54:50
time-finished2025-04-25 13:56:00
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpfnp3uqmh/libffi-3.4.7-4.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpfnp3uqmh/libffi-3.4.7-4.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9