elfutils-0.194-2.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-758): [#def1]
/etc/profile.d/debuginfod.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
#    1|-> # $HOME/.profile* or similar files may first set $DEBUGINFOD_URLS.
#    2|   # If $DEBUGINFOD_URLS is not set there, we set it from system *.url files.
#    3|   # $HOME/.*rc or similar files may then amend $DEBUGINFOD_URLS.

Error: SHELLCHECK_WARNING (CWE-563): [#def2]
/etc/profile.d/debuginfod.sh:7:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally).
#    5|   # such as $DEBUGINFOD_MAXSIZE, $DEBUGINFOD_MAXTIME, $DEBUGINFOD_PROGRESS.
#    6|   
#    7|-> prefix="/usr"
#    8|   if [ -z "$DEBUGINFOD_URLS" ]; then
#    9|       DEBUGINFOD_URLS=$(find "/etc/debuginfod" -name "*.urls" -print0 2>/dev/null | xargs -0 cat 2>/dev/null | tr '\n' ' ' || :)

Error: SHELLCHECK_WARNING (CWE-477): [#def3]
/usr/bin/eu-make-debug-archive:71:46: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   69|   done
#   70|   
#   71|-> if [ $kernel = no ] && [ $force_kernel = yes -o -n "$sudo" ]; then
#   72|     usage
#   73|   fi

Error: SHELLCHECK_WARNING (CWE-477): [#def4]
/usr/bin/eu-make-debug-archive:95:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   93|     # Without --force, bail if the kernel installation is not newer.
#   94|     # This file is normally touched by installing new kernels or modules.
#   95|->   if [ $force_kernel = no -a "$archive" -nt "$dep" ]; then
#   96|       exit 0
#   97|     fi

Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
elfutils-0.194/backends/riscv_symbol.c:136:15: warning[-Wanalyzer-null-argument]: use of NULL ‘sname’ where non-null expected
elfutils-0.194/backends/riscv_symbol.c:95:6: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
elfutils-0.194/backends/riscv_symbol.c:99:7: branch_false: ...to here
elfutils-0.194/backends/riscv_symbol.c:99:6: branch_false: following ‘false’ branch...
elfutils-0.194/backends/riscv_symbol.c:101:50: branch_false: ...to here
elfutils-0.194/backends/riscv_symbol.c:102:6: branch_false: following ‘false’ branch...
elfutils-0.194/backends/riscv_symbol.c:107:7: branch_false: ...to here
elfutils-0.194/backends/riscv_symbol.c:107:6: branch_true: following ‘true’ branch (when the strings are equal)...
elfutils-0.194/backends/riscv_symbol.c:109:11: branch_true: ...to here
elfutils-0.194/backends/riscv_symbol.c:113:15: branch_true: following ‘true’ branch (when the strings are equal)...
elfutils-0.194/backends/riscv_symbol.c:113:15: branch_true: ...to here
elfutils-0.194/backends/riscv_symbol.c:117:18: branch_true: following ‘true’ branch...
elfutils-0.194/backends/riscv_symbol.c:120:33: branch_true: ...to here
elfutils-0.194/backends/riscv_symbol.c:135:6: branch_true: following ‘true’ branch (when the strings are equal)...
elfutils-0.194/backends/riscv_symbol.c:136:15: branch_true: ...to here
elfutils-0.194/backends/riscv_symbol.c:136:15: danger: argument 1 (‘sname’) NULL where non-null expected
#  134|        cannot check the offset.  The size always should be zero.  */
#  135|     if (strcmp (name, "__global_pointer$") == 0)
#  136|->     return (((strcmp (sname, ".sdata") == 0
#  137|   	      && sym->st_value == destshdr->sh_addr + 0x800)
#  138|   	     || strcmp (sname, ".got") == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
elfutils-0.194/debuginfod/debuginfod-client.c:311:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ne’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  309|     const unsigned char *public_key = NULL;                                                  
#  310|     int len;
#  311|->   if (X509_PUBKEY_set(&pk, pkey) &&
#  312|         X509_PUBKEY_get0_param(NULL, &public_key, &len, NULL, pk))
#  313|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
elfutils-0.194/debuginfod/debuginfod-client.c:312:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ne’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  310|     int len;
#  311|     if (X509_PUBKEY_set(&pk, pkey) &&
#  312|->       X509_PUBKEY_get0_param(NULL, &public_key, &len, NULL, pk))
#  313|       {
#  314|         uint8_t sha1[SHA_DIGEST_LENGTH];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
elfutils-0.194/debuginfod/debuginfod-client.c:315:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ne’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  313|       {
#  314|         uint8_t sha1[SHA_DIGEST_LENGTH];
#  315|->       SHA1(public_key, len, sha1);
#  316|         memcpy(&keyid, sha1 + 16, 4);
#  317|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
elfutils-0.194/debuginfod/debuginfod-client.c:318:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ne’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  316|         memcpy(&keyid, sha1 + 16, 4);
#  317|       }
#  318|->   X509_PUBKEY_free(pk);
#  319|     return ntohl(keyid);
#  320|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
elfutils-0.194/debuginfod/debuginfod-client.c:328:46: warning[-Wanalyzer-malloc-leak]: leak of ‘ne’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  326|       uint32_t keyid = 0;
#  327|       // Attempt to get the skid from the certificate
#  328|->     const ASN1_OCTET_STRING *skid_asn1_str = X509_get0_subject_key_id(x509);
#  329|       if (skid_asn1_str)
#  330|         {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
elfutils-0.194/debuginfod/debuginfod-client.c:331:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ne’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  329|       if (skid_asn1_str)
#  330|         {
#  331|->         int skid_len = ASN1_STRING_length(skid_asn1_str);
#  332|           memcpy(&keyid, ASN1_STRING_get0_data(skid_asn1_str) + skid_len - sizeof(keyid), sizeof(keyid));
#  333|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
elfutils-0.194/debuginfod/debuginfod-client.c:332:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ne’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  330|         {
#  331|           int skid_len = ASN1_STRING_length(skid_asn1_str);
#  332|->         memcpy(&keyid, ASN1_STRING_get0_data(skid_asn1_str) + skid_len - sizeof(keyid), sizeof(keyid));
#  333|         }
#  334|       else // compute keyid ourselves by hashing public key

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
elfutils-0.194/debuginfod/debuginfod-client.c:336:26: warning[-Wanalyzer-malloc-leak]: leak of ‘ne’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  334|       else // compute keyid ourselves by hashing public key
#  335|         {
#  336|->         EVP_PKEY *pkey = X509_get0_pubkey(x509);
#  337|           keyid = htonl(extract_skid_pk(pkey));
#  338|         }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
elfutils-0.194/debuginfod/debuginfod-client.c:356:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘c’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2565:12: acquire_memory: allocated here
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: release_memory: assuming ‘client’ is NULL
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_false: following ‘false’ branch (when ‘client’ is NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  354|     DIR *dp;
#  355|     struct dirent *entry;
#  356|->   int vfd = c->verbose_fd;
#  357|     
#  358|     char *strtok_context = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
elfutils-0.194/debuginfod/debuginfod-client.c:363:12: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2565:12: acquire_memory: allocated here
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  361|         cert_dir_path = strtok_r(NULL, ":", &strtok_context))
#  362|       {
#  363|->       dp = opendir(cert_dir_path);
#  364|         if(!dp) continue;
#  365|         while((entry = readdir(dp)))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
elfutils-0.194/debuginfod/debuginfod-client.c:365:22: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2565:12: acquire_memory: allocated here
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  363|         dp = opendir(cert_dir_path);
#  364|         if(!dp) continue;
#  365|->       while((entry = readdir(dp)))
#  366|           {
#  367|             // Only consider regular files with common x509 cert extensions

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
elfutils-0.194/debuginfod/debuginfod-client.c:365:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(cert_dir_path)’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  363|         dp = opendir(cert_dir_path);
#  364|         if(!dp) continue;
#  365|->       while((entry = readdir(dp)))
#  366|           {
#  367|             // Only consider regular files with common x509 cert extensions

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
elfutils-0.194/debuginfod/debuginfod-client.c:368:46: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2565:12: acquire_memory: allocated here
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  366|           {
#  367|             // Only consider regular files with common x509 cert extensions
#  368|->           if(entry->d_type != DT_REG || 0 != fnmatch("*.@(der|pem|crt|cer|cert)", entry->d_name, FNM_EXTMATCH)) continue;
#  369|             char certfile[PATH_MAX];
#  370|             strncpy(certfile, cert_dir_path, PATH_MAX - 1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
elfutils-0.194/debuginfod/debuginfod-client.c:382:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&certfile, "r")’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  380|             char *fmt = "";
#  381|             // Attempt to read the fp as DER
#  382|->           if(d2i_X509_fp(cert_fp, &x509))
#  383|               fmt = "der ";
#  384|             // Attempt to read the fp as PEM and assuming the key matches that of the signature add this key to be used

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
elfutils-0.194/debuginfod/debuginfod-client.c:382:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&certfile, "r")’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  380|             char *fmt = "";
#  381|             // Attempt to read the fp as DER
#  382|->           if(d2i_X509_fp(cert_fp, &x509))
#  383|               fmt = "der ";
#  384|             // Attempt to read the fp as PEM and assuming the key matches that of the signature add this key to be used

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
elfutils-0.194/debuginfod/debuginfod-client.c:425:7: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
elfutils-0.194/debuginfod/debuginfod-client.c:2558:1: enter_function: entry to ‘debuginfod_begin’
elfutils-0.194/debuginfod/debuginfod-client.c:2565:12: acquire_memory: allocated here
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2578:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2583:3: call_function: calling ‘load_ima_public_keys’ from ‘debuginfod_begin’
#  423|               }
#  424|           } /* for each file in directory */
#  425|->       closedir(dp);
#  426|       } /* for each directory */
#  427|     

Error: GCC_ANALYZER_WARNING (CWE-415): [#def22]
elfutils-0.194/debuginfod/debuginfod-client.c:697:3: warning[-Wanalyzer-double-free]: double-‘free’ of ‘id’
elfutils-0.194/debuginfod/debuginfod-client.c:640:6: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:644:6: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:644:6: branch_true: following ‘true’ branch (when ‘f’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:644:6: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:646:14: branch_true: following ‘true’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:650:15: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:650:14: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:653:21: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:663:14: branch_false: following ‘false’ branch (when ‘v’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:663:28: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:676:14: branch_true: following ‘true’ branch (when ‘id’ is NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:676:29: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:677:18: acquire_memory: allocated here
elfutils-0.194/debuginfod/debuginfod-client.c:678:14: branch_true: following ‘true’ branch (when ‘version’ is NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:678:34: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:678:15: branch_false: following ‘false’ branch (when the strings are non-equal)...
elfutils-0.194/debuginfod/debuginfod-client.c:700:1: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:646:14: branch_true: following ‘true’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:650:15: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:650:14: branch_true: following ‘true’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:700:1: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:685:8: branch_false: following ‘false’ branch (when ‘version’ is NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:685:8: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:685:8: release_memory: first ‘free’ here
elfutils-0.194/debuginfod/debuginfod-client.c:685:8: branch_false: following ‘false’ branch (when ‘id’ is NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:687:25: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:685:8: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:685:8: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:690:6: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
elfutils-0.194/debuginfod/debuginfod-client.c:693:7: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:693:6: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:696:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:696:3: release_memory: first ‘free’ here
elfutils-0.194/debuginfod/debuginfod-client.c:697:3: danger: second ‘free’ here; first ‘free’ was at [(34)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/33)
#  695|   
#  696|     free (ua);
#  697|->   free (id);
#  698|     free (version);
#  699|     free (utspart);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
elfutils-0.194/debuginfod/debuginfod-client.c:725:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
elfutils-0.194/debuginfod/debuginfod-client.c:1766:1: enter_function: entry to ‘debuginfod_query_server_by_buildid’
elfutils-0.194/debuginfod/debuginfod-client.c:1793:6: branch_true: following ‘true’ branch (when the strings are equal)...
elfutils-0.194/debuginfod/debuginfod-client.c:1802:6: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:1818:6: branch_false: following ‘false’ branch (when ‘vfd < 0’)...
elfutils-0.194/debuginfod/debuginfod-client.c:1821:6: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:1821:6: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:1851:6: branch_true: following ‘true’ branch (when ‘headers_file_envvar’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:1852:5: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:1852:5: call_function: calling ‘add_headers_from_file’ from ‘debuginfod_query_server_by_buildid’
#  723|         if (fgets (s, sizeof(buf), f) == NULL)
#  724|           break;
#  725|->       for (char *c = s; *c != '\0'; ++c)
#  726|           if (!isspace(*c))
#  727|             goto nonempty;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
elfutils-0.194/debuginfod/debuginfod-client.c:725:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
elfutils-0.194/debuginfod/debuginfod-client.c:1766:1: enter_function: entry to ‘debuginfod_query_server_by_buildid’
elfutils-0.194/debuginfod/debuginfod-client.c:1793:6: branch_true: following ‘true’ branch (when the strings are equal)...
elfutils-0.194/debuginfod/debuginfod-client.c:1802:6: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:1818:6: branch_false: following ‘false’ branch (when ‘vfd < 0’)...
elfutils-0.194/debuginfod/debuginfod-client.c:1821:6: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:1821:6: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:1851:6: branch_true: following ‘true’ branch (when ‘headers_file_envvar’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:1852:5: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:1852:5: call_function: calling ‘add_headers_from_file’ from ‘debuginfod_query_server_by_buildid’
#  723|         if (fgets (s, sizeof(buf), f) == NULL)
#  724|           break;
#  725|->       for (char *c = s; *c != '\0'; ++c)
#  726|           if (!isspace(*c))
#  727|             goto nonempty;

Error: CPPCHECK_WARNING (CWE-457): [#def25]
elfutils-0.194/debuginfod/debuginfod-client.c:1499: warning[uninitvar]: Uninitialized variable: bin_sig
# 1497|     int hashalgo = 0;
# 1498|     
# 1499|->   switch (bin_sig[0])
# 1500|       {
# 1501|       case EVM_IMA_XATTR_DIGSIG:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
elfutils-0.194/debuginfod/debuginfod-client.c:2577:32: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
elfutils-0.194/debuginfod/debuginfod-client.c:2565:12: acquire_memory: allocated here
elfutils-0.194/debuginfod/debuginfod-client.c:2567:6: branch_true: following ‘true’ branch (when ‘client’ is non-NULL)...
elfutils-0.194/debuginfod/debuginfod-client.c:2569:11: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2569:10: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-client.c:2571:11: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-client.c:2577:32: throw: if ‘curl_multi_init’ throws an exception...
elfutils-0.194/debuginfod/debuginfod-client.c:2577:32: danger: ‘client’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
# 2575|   
# 2576|         // allocate 1 curl multi handle
# 2577|->       client->server_mhandle = curl_multi_init ();
# 2578|         if (client->server_mhandle == NULL)
# 2579|   	goto out1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def27]
elfutils-0.194/debuginfod/debuginfod-find.c:199:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(build_id, 0)’
elfutils-0.194/debuginfod/debuginfod-find.c:142:6: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-find.c:151:3: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-find.c:164:6: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-find.c:191:10: branch_true: following ‘true’ branch (when ‘any_non_hex != 0’)...
elfutils-0.194/debuginfod/debuginfod-find.c:193:16: branch_true: ...to here
elfutils-0.194/debuginfod/debuginfod-find.c:193:16: acquire_resource: opened here
elfutils-0.194/debuginfod/debuginfod-find.c:194:14: branch_false: following ‘false’ branch...
elfutils-0.194/debuginfod/debuginfod-find.c:199:17: branch_false: ...to here
elfutils-0.194/debuginfod/debuginfod-find.c:199:17: danger: ‘open(build_id, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  197|         if (fd >= 0)
#  198|           {
#  199|->           elf = dwelf_elf_begin (fd);
#  200|             if (elf == NULL)
#  201|               fprintf (stderr, "Cannot open as ELF file %s: %s\n", build_id,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
elfutils-0.194/lib/fixedsizehash.h:107:12: warning[-Wanalyzer-malloc-leak]: leak of ‘nlist_fshash_init(nsyms)’
elfutils-0.194/libelf/nlist.c:59:1: enter_function: entry to ‘nlist’
elfutils-0.194/libelf/nlist.c:74:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/nlist.c:83:3: branch_false: ...to here
elfutils-0.194/libelf/nlist.c:87:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/nlist.c:87:6: branch_false: ...to here
elfutils-0.194/libelf/nlist.c:92:10: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/nlist.c:94:14: branch_true: ...to here
elfutils-0.194/libelf/nlist.c:95:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/nlist.c:99:11: branch_false: ...to here
elfutils-0.194/libelf/nlist.c:110:6: branch_false: following ‘false’ branch (when ‘symscn’ is non-NULL)...
elfutils-0.194/libelf/nlist.c:116:6: branch_false: ...to here
elfutils-0.194/libelf/nlist.c:116:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/nlist.c:125:10: branch_false: ...to here
elfutils-0.194/libelf/nlist.c:126:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/nlist.c:130:12: branch_false: ...to here
elfutils-0.194/libelf/nlist.c:134:11: call_function: calling ‘nlist_fshash_init’ from ‘nlist’
elfutils-0.194/libelf/nlist.c:134:11: return_function: returning to ‘nlist’ from ‘nlist_fshash_init’
elfutils-0.194/libelf/nlist.c:135:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/nlist.c:135:6: branch_false: ...to here
elfutils-0.194/libelf/nlist.c:142:17: branch_true: following ‘true’ branch (when ‘cnt < nsyms’)...
elfutils-0.194/libelf/nlist.c:148:13: branch_true: ...to here
elfutils-0.194/libelf/nlist.c:148:13: throw: if ‘gelf_getsym’ throws an exception...
elfutils-0.194/lib/fixedsizehash.h:107:12: danger: ‘nlist_fshash_init(nsyms)’ leaks here; was allocated at [(20)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/19)
#  105|   
#  106|     /* Adjust the size to be used for the hashing table.  */
#  107|->   nelems = next_prime (MAX ((nelems * 3) / 2, 10));
#  108|   
#  109|     /* Allocate the data structure for the result.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
elfutils-0.194/lib/system.h:224:21: warning[-Wanalyzer-malloc-leak]: leak of ‘into’
elfutils-0.194/libdwfl/core-file.c:282:1: enter_function: entry to ‘dwfl_elf_phdr_memory_callback’
elfutils-0.194/libdwfl/core-file.c:290:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/core-file.c:300:26: branch_false: ...to here
elfutils-0.194/libdwfl/core-file.c:304:8: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/core-file.c:306:10: branch_false: ...to here
elfutils-0.194/libdwfl/core-file.c:316:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/core-file.c:320:10: branch_true: ...to here
elfutils-0.194/libdwfl/core-file.c:332:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/core-file.c:335:7: branch_false: ...to here
elfutils-0.194/libdwfl/core-file.c:335:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/core-file.c:338:7: branch_false: ...to here
elfutils-0.194/libdwfl/core-file.c:338:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/core-file.c:364:13: branch_false: ...to here
elfutils-0.194/libdwfl/core-file.c:365:10: branch_true: following ‘true’ branch (when ‘into’ is NULL)...
elfutils-0.194/libdwfl/core-file.c:367:31: branch_true: ...to here
elfutils-0.194/libdwfl/core-file.c:370:18: acquire_memory: allocated here
elfutils-0.194/libdwfl/core-file.c:371:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/core-file.c:378:23: branch_false: ...to here
elfutils-0.194/libdwfl/core-file.c:378:23: call_function: calling ‘pread_retry’ from ‘dwfl_elf_phdr_memory_callback’
#  222|     do
#  223|       {
#  224|->       ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
#  225|   					       off + recvd));
#  226|         if (ret <= 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
elfutils-0.194/lib/system.h:224:21: warning[-Wanalyzer-malloc-leak]: leak of ‘mem’
elfutils-0.194/libelf/elf_readall.c:68:1: enter_function: entry to ‘__libelf_readall’
elfutils-0.194/libelf/elf_readall.c:73:7: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_readall.c:81:6: branch_false: ...to here
elfutils-0.194/libelf/elf_readall.c:81:6: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_readall.c:87:7: branch_true: ...to here
elfutils-0.194/libelf/elf_readall.c:89:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_readall.c:108:13: branch_false: ...to here
elfutils-0.194/libelf/elf_readall.c:108:13: acquire_memory: allocated here
elfutils-0.194/libelf/elf_readall.c:109:10: branch_true: following ‘true’ branch (when ‘mem’ is non-NULL)...
elfutils-0.194/libelf/elf_readall.c:112:15: branch_true: ...to here
elfutils-0.194/libelf/elf_readall.c:112:15: call_function: calling ‘pread_retry’ from ‘__libelf_readall’
#  222|     do
#  223|       {
#  224|->       ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
#  225|   					       off + recvd));
#  226|         if (ret <= 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
elfutils-0.194/lib/system.h:224:21: warning[-Wanalyzer-malloc-leak]: leak of ‘newp’
elfutils-0.194/libelf/elf_begin.c:1187:1: enter_function: entry to ‘elf_begin’
elfutils-0.194/libelf/elf_begin.c:1191:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_begin.c:1198:6: branch_false: ...to here
elfutils-0.194/libelf/elf_begin.c:1227:10: branch_true: following ‘true’ branch (when ‘ref’ is non-NULL)...
elfutils-0.194/libelf/elf_begin.c:1228:18: call_function: inlined call to ‘lock_dup_elf’ from ‘elf_begin’
#  222|     do
#  223|       {
#  224|->       ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
#  225|   					       off + recvd));
#  226|         if (ret <= 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
elfutils-0.194/lib/system.h:224:21: warning[-Wanalyzer-malloc-leak]: leak of ‘rawchunk’
elfutils-0.194/libelf/elf_getdata_rawchunk.c:58:1: enter_function: entry to ‘elf_getdata_rawchunk’
elfutils-0.194/libelf/elf_getdata_rawchunk.c:60:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:63:7: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:63:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:70:7: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:70:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:79:6: branch_false: following ‘false’ branch (when ‘type <= 27’)...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:94:3: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:100:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:104:7: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:116:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:135:18: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:135:18: acquire_memory: allocated here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:136:10: branch_false: following ‘false’ branch (when ‘rawchunk’ is non-NULL)...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:146:11: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:146:11: call_function: calling ‘pread_retry’ from ‘elf_getdata_rawchunk’
#  222|     do
#  223|       {
#  224|->       ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
#  225|   					       off + recvd));
#  226|         if (ret <= 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
elfutils-0.194/lib/system.h:224:21: warning[-Wanalyzer-malloc-leak]: leak of ‘state.input_buffer’
elfutils-0.194/libdwfl/gzip.c:179:1: enter_function: entry to ‘__libdw_gunzip’
elfutils-0.194/libdwfl/gzip.c:196:6: branch_true: following ‘true’ branch (when ‘mapped’ is NULL)...
elfutils-0.194/libdwfl/gzip.c:198:11: branch_true: ...to here
elfutils-0.194/libdwfl/gzip.c:198:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/gzip.c:200:32: branch_true: ...to here
elfutils-0.194/libdwfl/gzip.c:200:32: acquire_memory: allocated here
elfutils-0.194/libdwfl/gzip.c:201:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/gzip.c:204:23: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:204:23: call_function: calling ‘pread_retry’ from ‘__libdw_gunzip’
#  222|     do
#  223|       {
#  224|->       ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
#  225|   					       off + recvd));
#  226|         if (ret <= 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
elfutils-0.194/lib/system.h:224:21: warning[-Wanalyzer-malloc-leak]: leak of ‘temp_data’
elfutils-0.194/libelf/elf_getarsym.c:73:1: enter_function: entry to ‘elf_getarsym’
elfutils-0.194/libelf/elf_getarsym.c:75:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:82:6: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:87:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:95:6: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:95:6: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getarsym.c:101:7: branch_true: ...to here
elfutils-0.194/libelf/elf_getarsym.c:107:10: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getarsym.c:110:11: branch_true: ...to here
elfutils-0.194/libelf/elf_getarsym.c:110:11: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getarsym.c:112:52: branch_true: ...to here
elfutils-0.194/libelf/elf_getarsym.c:111:14: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:137:19: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:137:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:150:19: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:168:11: call_function: calling ‘read_number_entries’ from ‘elf_getarsym’
elfutils-0.194/libelf/elf_getarsym.c:168:11: return_function: returning to ‘elf_getarsym’ from ‘read_number_entries’
elfutils-0.194/libelf/elf_getarsym.c:168:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:178:23: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:182:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:183:14: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:182:11: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:187:18: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:182:11: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:196:27: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:198:10: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getarsym.c:202:18: branch_true: ...to here
elfutils-0.194/libelf/elf_getarsym.c:204:14: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getarsym.c:206:27: branch_true: ...to here
elfutils-0.194/libelf/elf_getarsym.c:206:27: acquire_memory: allocated here
elfutils-0.194/libelf/elf_getarsym.c:207:18: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:214:29: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:216:18: branch_false: following ‘false’ branch (when ‘newp’ is non-NULL)...
elfutils-0.194/libelf/elf_getarsym.c:223:15: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:228:28: call_function: calling ‘pread_retry’ from ‘elf_getarsym’
#  222|     do
#  223|       {
#  224|->       ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
#  225|   					       off + recvd));
#  226|         if (ret <= 0)

Error: GCC_ANALYZER_WARNING (CWE-121): [#def35]
elfutils-0.194/lib/system.h:224:21: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
elfutils-0.194/libdwfl/image-header.c:61:1: enter_function: entry to ‘__libdw_image_header’
elfutils-0.194/libdwfl/image-header.c:64:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/image-header.c:68:10: branch_true: ...to here
elfutils-0.194/libdwfl/image-header.c:68:10: branch_true: following ‘true’ branch (when ‘mapped’ is NULL)...
elfutils-0.194/libdwfl/image-header.c:71:36: branch_true: ...to here
elfutils-0.194/libdwfl/image-header.c:70:23: call_function: calling ‘pread_retry’ from ‘__libdw_image_header’
#  222|     do
#  223|       {
#  224|->       ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
#  225|   					       off + recvd));
#  226|         if (ret <= 0)

Error: CPPCHECK_WARNING (CWE-758): [#def36]
elfutils-0.194/libasm/asm_addsleb128.c:59: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   57|         char *dest = tmpbuf;
#   58|         uint32_t byte;
#   59|->       int32_t endval = num >> 31;
#   60|   
#   61|         if (num == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
elfutils-0.194/libasm/asm_newabssym.c:83:20: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newabssym.c:60:6: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
elfutils-0.194/libasm/asm_newabssym.c:66:6: branch_false: ...to here
elfutils-0.194/libasm/asm_newabssym.c:66:6: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
elfutils-0.194/libasm/asm_newabssym.c:74:12: branch_false: ...to here
elfutils-0.194/libasm/asm_newabssym.c:74:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newabssym.c:75:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newabssym.c:78:3: branch_false: ...to here
elfutils-0.194/libasm/asm_newabssym.c:83:20: throw: if ‘dwelf_strtab_add’ throws an exception...
elfutils-0.194/libasm/asm_newabssym.c:83:20: danger: ‘result’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   81|     result->binding = binding;
#   82|     result->symidx = 0;
#   83|->   result->strent = dwelf_strtab_add (ctx->symbol_strtab, name);
#   84|   
#   85|     /* The value of an ABS symbol must not be modified.  Since there are

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
elfutils-0.194/libasm/asm_newabssym.c:115:11: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newabssym.c:60:6: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
elfutils-0.194/libasm/asm_newabssym.c:66:6: branch_false: ...to here
elfutils-0.194/libasm/asm_newabssym.c:66:6: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
elfutils-0.194/libasm/asm_newabssym.c:74:12: branch_false: ...to here
elfutils-0.194/libasm/asm_newabssym.c:74:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newabssym.c:75:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newabssym.c:78:3: branch_false: ...to here
elfutils-0.194/libasm/asm_newabssym.c:91:6: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newabssym.c:115:11: branch_false: ...to here
elfutils-0.194/libasm/asm_newabssym.c:115:11: throw: if ‘asm_symbol_tab_insert’ throws an exception...
elfutils-0.194/libasm/asm_newabssym.c:115:11: danger: ‘result’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  113|       {
#  114|         /* Put the symbol in the hash table so that we can later find it.  */
#  115|->       if (asm_symbol_tab_insert (&ctx->symbol_tab, elf_hash (name), result)
#  116|   	  != 0)
#  117|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
elfutils-0.194/libasm/asm_newcomsym.c:85:20: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newcomsym.c:60:6: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
elfutils-0.194/libasm/asm_newcomsym.c:66:6: branch_false: ...to here
elfutils-0.194/libasm/asm_newcomsym.c:66:6: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
elfutils-0.194/libasm/asm_newcomsym.c:74:12: branch_false: ...to here
elfutils-0.194/libasm/asm_newcomsym.c:74:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newcomsym.c:75:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newcomsym.c:78:3: branch_false: ...to here
elfutils-0.194/libasm/asm_newcomsym.c:85:20: throw: if ‘dwelf_strtab_add’ throws an exception...
elfutils-0.194/libasm/asm_newcomsym.c:85:20: danger: ‘result’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   83|     result->binding = STB_GLOBAL;
#   84|     result->symidx = 0;
#   85|->   result->strent = dwelf_strtab_add (ctx->symbol_strtab, name);
#   86|   
#   87|     /* The value of a COM symbol is the alignment.  Since there are no

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
elfutils-0.194/libasm/asm_newcomsym.c:98:11: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newcomsym.c:60:6: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
elfutils-0.194/libasm/asm_newcomsym.c:66:6: branch_false: ...to here
elfutils-0.194/libasm/asm_newcomsym.c:66:6: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
elfutils-0.194/libasm/asm_newcomsym.c:74:12: branch_false: ...to here
elfutils-0.194/libasm/asm_newcomsym.c:74:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newcomsym.c:75:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newcomsym.c:78:3: branch_false: ...to here
elfutils-0.194/libasm/asm_newcomsym.c:92:6: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newcomsym.c:98:11: branch_false: ...to here
elfutils-0.194/libasm/asm_newcomsym.c:98:11: throw: if ‘asm_symbol_tab_insert’ throws an exception...
elfutils-0.194/libasm/asm_newcomsym.c:98:11: danger: ‘result’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   96|       {
#   97|         /* Put the symbol in the hash table so that we can later find it.  */
#   98|->       if (asm_symbol_tab_insert (&ctx->symbol_tab, elf_hash (name), result)
#   99|   	  != 0)
#  100|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
elfutils-0.194/libasm/asm_newscn.c:136:30: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newscn.c:165:1: enter_function: entry to ‘asm_newscn’
elfutils-0.194/libasm/asm_newscn.c:172:6: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
elfutils-0.194/libasm/asm_newscn.c:176:7: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:176:6: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newscn.c:176:7: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:189:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newscn.c:190:6: branch_true: following ‘true’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newscn.c:193:15: branch_true: ...to here
elfutils-0.194/libasm/asm_newscn.c:199:16: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newscn.c:201:19: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:201:19: call_function: calling ‘binary_newscn’ from ‘asm_newscn’
#  134|   
#  135|     /* Add the name to the section header string table.  */
#  136|->   result->data.main.strent = dwelf_strtab_add_len (result->ctx->section_strtab,
#  137|   						   result->name, scnname_len);
#  138|     assert (result->data.main.strent != NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
elfutils-0.194/libasm/asm_newscn.c:141:33: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newscn.c:165:1: enter_function: entry to ‘asm_newscn’
elfutils-0.194/libasm/asm_newscn.c:172:6: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
elfutils-0.194/libasm/asm_newscn.c:176:7: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:176:6: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newscn.c:176:7: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:189:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newscn.c:190:6: branch_true: following ‘true’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newscn.c:193:15: branch_true: ...to here
elfutils-0.194/libasm/asm_newscn.c:199:16: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newscn.c:201:19: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:201:19: call_function: calling ‘binary_newscn’ from ‘asm_newscn’
#  139|   
#  140|     /* Create the new ELF section.  */
#  141|->   result->data.main.scn = scn = elf_newscn (result->ctx->out.elf);
#  142|     if (scn == NULL)
#  143|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
elfutils-0.194/libasm/asm_newscn.c:153:10: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newscn.c:165:1: enter_function: entry to ‘asm_newscn’
elfutils-0.194/libasm/asm_newscn.c:172:6: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
elfutils-0.194/libasm/asm_newscn.c:176:7: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:176:6: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newscn.c:176:7: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:189:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newscn.c:190:6: branch_true: following ‘true’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newscn.c:193:15: branch_true: ...to here
elfutils-0.194/libasm/asm_newscn.c:199:16: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newscn.c:201:19: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:201:19: call_function: calling ‘binary_newscn’ from ‘asm_newscn’
#  151|   
#  152|     /* Remember the flags.  */
#  153|->   shdr = gelf_getshdr (scn, &shdr_mem);
#  154|   
#  155|     shdr->sh_flags = flags;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
elfutils-0.194/libasm/asm_newscn.c:158:10: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newscn.c:165:1: enter_function: entry to ‘asm_newscn’
elfutils-0.194/libasm/asm_newscn.c:172:6: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
elfutils-0.194/libasm/asm_newscn.c:176:7: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:176:6: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newscn.c:176:7: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:189:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newscn.c:190:6: branch_true: following ‘true’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newscn.c:193:15: branch_true: ...to here
elfutils-0.194/libasm/asm_newscn.c:199:16: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newscn.c:201:19: branch_false: ...to here
elfutils-0.194/libasm/asm_newscn.c:201:19: call_function: calling ‘binary_newscn’ from ‘asm_newscn’
#  156|     result->type = shdr->sh_type = type;
#  157|   
#  158|->   (void) gelf_update_shdr (scn, shdr);
#  159|   
#  160|     return result;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
elfutils-0.194/libasm/asm_newscngrp.c:70:20: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newscngrp.c:50:6: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
elfutils-0.194/libasm/asm_newscngrp.c:53:6: branch_false: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:53:6: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
elfutils-0.194/libasm/asm_newscngrp.c:60:20: branch_false: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:60:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newscngrp.c:61:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newscngrp.c:64:3: branch_false: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:70:20: throw: if ‘dwelf_strtab_add_len’ throws an exception...
elfutils-0.194/libasm/asm_newscngrp.c:70:20: danger: ‘result’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   68|   
#   69|     memcpy (result->name, grpname, grpname_len);
#   70|->   result->strent = dwelf_strtab_add_len (ctx->section_strtab, result->name,
#   71|   					 grpname_len);
#   72|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
elfutils-0.194/libasm/asm_newscngrp.c:78:21: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newscngrp.c:50:6: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
elfutils-0.194/libasm/asm_newscngrp.c:53:6: branch_false: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:53:6: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
elfutils-0.194/libasm/asm_newscngrp.c:60:20: branch_false: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:60:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newscngrp.c:61:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newscngrp.c:64:3: branch_false: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:73:6: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newscngrp.c:78:21: branch_false: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:78:21: throw: if ‘elf_newscn’ throws an exception...
elfutils-0.194/libasm/asm_newscngrp.c:78:21: danger: ‘result’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   76|     else
#   77|       {
#   78|->       result->scn = elf_newscn (ctx->out.elf);
#   79|         if (result->scn == NULL)
#   80|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
elfutils-0.194/libasm/asm_newscngrp.c:82:11: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newscngrp.c:50:6: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
elfutils-0.194/libasm/asm_newscngrp.c:53:6: branch_false: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:53:6: branch_false: following ‘false’ branch (when ‘flags <= 1’)...
elfutils-0.194/libasm/asm_newscngrp.c:60:20: branch_false: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:60:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newscngrp.c:61:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newscngrp.c:64:3: branch_false: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:73:6: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newscngrp.c:78:21: branch_false: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:79:10: branch_true: following ‘true’ branch...
elfutils-0.194/libasm/asm_newscngrp.c:82:11: branch_true: ...to here
elfutils-0.194/libasm/asm_newscngrp.c:82:11: throw: if ‘__libasm_seterrno’ throws an exception...
elfutils-0.194/libasm/asm_newscngrp.c:82:11: danger: ‘result’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#   80|   	{
#   81|   	  /* Couldn't allocate a new section.  */
#   82|-> 	  __libasm_seterrno (ASM_E_LIBELF);
#   83|   	  free (result);
#   84|   	  return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
elfutils-0.194/libasm/asm_newsym.c:88:20: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newsym.c:53:6: branch_false: following ‘false’ branch (when ‘asmscn’ is non-NULL)...
elfutils-0.194/libasm/asm_newsym.c:58:6: branch_false: ...to here
elfutils-0.194/libasm/asm_newsym.c:76:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newsym.c:77:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newsym.c:82:3: branch_false: ...to here
elfutils-0.194/libasm/asm_newsym.c:88:20: throw: if ‘dwelf_strtab_add’ throws an exception...
elfutils-0.194/libasm/asm_newsym.c:88:20: danger: ‘result’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   86|     result->binding = binding;
#   87|     result->symidx = 0;
#   88|->   result->strent = dwelf_strtab_add (asmscn->ctx->symbol_strtab,
#   89|   				     memcpy (result + 1, name, name_len));
#   90|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
elfutils-0.194/libasm/asm_newsym.c:114:11: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libasm/asm_newsym.c:53:6: branch_false: following ‘false’ branch (when ‘asmscn’ is non-NULL)...
elfutils-0.194/libasm/asm_newsym.c:58:6: branch_false: ...to here
elfutils-0.194/libasm/asm_newsym.c:76:12: acquire_memory: allocated here
elfutils-0.194/libasm/asm_newsym.c:77:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libasm/asm_newsym.c:82:3: branch_false: ...to here
elfutils-0.194/libasm/asm_newsym.c:91:6: branch_false: following ‘false’ branch...
elfutils-0.194/libasm/asm_newsym.c:114:11: branch_false: ...to here
elfutils-0.194/libasm/asm_newsym.c:114:11: throw: if ‘asm_symbol_tab_insert’ throws an exception...
elfutils-0.194/libasm/asm_newsym.c:114:11: danger: ‘result’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  112|       {
#  113|         /* Put the symbol in the hash table so that we can later find it.  */
#  114|->       if (asm_symbol_tab_insert (&asmscn->ctx->symbol_tab, elf_hash (name),
#  115|   				 result) != 0)
#  116|   	{

Error: CPPCHECK_WARNING (CWE-457): [#def50]
elfutils-0.194/libcpu/i386_data.h:250: error[uninitvar]: Uninitialized variable: &p
#  248|   	      int p;
#  249|   	      n = snprintf (tmpbuf, sizeof (tmpbuf), "%s0x%" PRIx32 "(%%%n%s)",
#  250|-> 			    disp < 0 ? "-" : "", disp < 0 ? -disp : disp, &p,
#  251|   #ifdef X86_64
#  252|   			    (prefixes & has_rex_b) ? hiregs[modrm & 7] :

Error: GCC_ANALYZER_WARNING (CWE-127): [#def51]
elfutils-0.194/libcpu/riscv_disasm.c:1442:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
elfutils-0.194/libcpu/riscv_disasm.c:130:7: branch_true: following ‘true’ branch (when ‘data <= end’)...
elfutils-0.194/libcpu/riscv_disasm.c:131:11: branch_true: ...to here
elfutils-0.194/libcpu/riscv_disasm.c:131:10: branch_false: following ‘false’ branch...
elfutils-0.194/libcpu/riscv_disasm.c:137:16: branch_false: ...to here
elfutils-0.194/libcpu/riscv_disasm.c:160:10: branch_false: following ‘false’ branch...
elfutils-0.194/libcpu/riscv_disasm.c:171:19: branch_false: ...to here
elfutils-0.194/libcpu/riscv_disasm.c:541:15: branch_true: following ‘true’ branch (when ‘length == 4’)...
elfutils-0.194/libcpu/riscv_disasm.c:543:20: branch_true: ...to here
elfutils-0.194/libcpu/riscv_disasm.c:1317:10: branch_true: following ‘true’ branch (when ‘strp’ is NULL)...
elfutils-0.194/libcpu/riscv_disasm.c:1317:10: branch_true: ...to here
elfutils-0.194/libcpu/riscv_disasm.c:1347:18: branch_true: following ‘true’ branch...
elfutils-0.194/libcpu/riscv_disasm.c:1349:18: branch_true: ...to here
elfutils-0.194/libcpu/riscv_disasm.c:1415:18: branch_false: following ‘false’ branch...
elfutils-0.194/libcpu/riscv_disasm.c:1421:24: branch_false: ...to here
elfutils-0.194/libcpu/riscv_disasm.c:1442:23: danger: out-of-bounds read from byte -8 till byte -1 but ‘op’ starts at byte 0
# 1440|   
# 1441|   		case 'o':
# 1442|-> 		  if (op[prec - 1] != NULL)
# 1443|   		    {
# 1444|   		      if (deferred_start != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def52]
elfutils-0.194/libdw/cfi.c:78: error[memleak]: Memory leak: bigger
#   76|            {
#   77|              *result = DWARF_E_NOMEM;
#   78|->            return false;
#   79|            }
#   80|          else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
elfutils-0.194/libdw/cfi.c:173:20: warning[-Wanalyzer-malloc-leak]: leak of ‘cie_fs’
elfutils-0.194/libdw/cfi.c:523:1: enter_function: entry to ‘__libdw_frame_at_address’
elfutils-0.194/libdw/cfi.c:526:16: call_function: calling ‘cie_cache_initial_state’ from ‘__libdw_frame_at_address’
#  171|   					   &program, &loc)))
#  172|   	    break;
#  173|-> 	  result = INTUSE(dwarf_errno) ();
#  174|   	  goto out;
#  175|   

Error: CPPCHECK_WARNING (CWE-401): [#def54]
elfutils-0.194/libdw/cfi.c:483: error[memleak]: Memory leak: cie_fs
#  481|     Dwarf_Frame *cie_fs = calloc (1, sizeof (Dwarf_Frame));
#  482|     if (unlikely (cie_fs == NULL))
#  483|->     return DWARF_E_NOMEM;
#  484|   
#  485|     /* If the default state of any register is not "undefined"

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
elfutils-0.194/libdw/cie.c:56:27: warning[-Wanalyzer-malloc-leak]: leak of ‘cie’
elfutils-0.194/libdw/cie.c:190:1: enter_function: entry to ‘__libdw_intern_cie’
elfutils-0.194/libdw/cie.c:195:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/cie.c:197:12: branch_true: ...to here
elfutils-0.194/libdw/cie.c:197:12: call_function: calling ‘intern_new_cie’ from ‘__libdw_intern_cie’
#   54|   intern_new_cie (Dwarf_CFI *cache, Dwarf_Off offset, const Dwarf_CIE *info)
#   55|   {
#   56|->   struct dwarf_cie *cie = malloc (sizeof (struct dwarf_cie));
#   57|     if (cie == NULL)
#   58|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
elfutils-0.194/libdw/cie.c:147:7: warning[-Wanalyzer-malloc-leak]: leak of ‘cie’
elfutils-0.194/libdw/cie.c:190:1: enter_function: entry to ‘__libdw_intern_cie’
elfutils-0.194/libdw/cie.c:195:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/cie.c:197:12: branch_true: ...to here
elfutils-0.194/libdw/cie.c:197:12: call_function: calling ‘intern_new_cie’ from ‘__libdw_intern_cie’
#  145|   
#  146|     /* Add the new entry to the search tree.  */
#  147|->   if (eu_tsearch (cie, &cache->cie_tree, &compare_cie) == NULL)
#  148|       {
#  149|         free (cie);

Error: CPPCHECK_WARNING (CWE-415): [#def57]
elfutils-0.194/libdw/dwarf_begin_elf.c:414: error[doubleFree]: Memory pointed to by 'fake_loc_cu' is freed twice.
#  412|   	  Dwarf_Sig8_Hash_free (&result->sig8_hash);
#  413|   	  __libdw_seterrno (DWARF_E_NOMEM);
#  414|-> 	  free (result->fake_loc_cu);
#  415|   	  free (result->fake_loclists_cu);
#  416|   	  free (result);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
elfutils-0.194/libdw/dwarf_begin_elf.c:571:10: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libdw/dwarf_begin_elf.c:553:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_begin_elf.c:565:29: branch_false: ...to here
elfutils-0.194/libdw/dwarf_begin_elf.c:566:3: branch_true: following ‘true’ branch (when ‘mem_default_size > 648’)...
elfutils-0.194/libdw/dwarf_begin_elf.c:569:19: branch_true: ...to here
elfutils-0.194/libdw/dwarf_begin_elf.c:569:19: acquire_memory: allocated here
elfutils-0.194/libdw/dwarf_begin_elf.c:570:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_begin_elf.c:571:10: branch_false: ...to here
elfutils-0.194/libdw/dwarf_begin_elf.c:571:10: throw: if ‘Dwarf_Sig8_Hash_init’ throws an exception...
elfutils-0.194/libdw/dwarf_begin_elf.c:571:10: danger: ‘result’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  569|     Dwarf *result = calloc (1, sizeof (Dwarf));
#  570|     if (unlikely (result == NULL)
#  571|->       || unlikely (Dwarf_Sig8_Hash_init (&result->sig8_hash, 11) < 0))
#  572|       {
#  573|         free (result);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
elfutils-0.194/libdw/dwarf_getalt.c:55:7: warning[-Wanalyzer-malloc-leak]: leak of ‘__libdw_filepath(*dbg.debugdir, 0,  altname)’
elfutils-0.194/libdw/dwarf_getalt.c:99:1: enter_function: entry to ‘find_debug_altlink’
elfutils-0.194/libdw/dwarf_getalt.c:108:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:111:18: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:142:23: call_function: calling ‘__libdw_filepath’ from ‘find_debug_altlink’
elfutils-0.194/libdw/dwarf_getalt.c:142:23: return_function: returning to ‘find_debug_altlink’ from ‘__libdw_filepath’
elfutils-0.194/libdw/dwarf_getalt.c:143:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:143:10: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:145:16: throw: if ‘open’ throws an exception...
elfutils-0.194/libdw/dwarf_getalt.c:55:7: danger: ‘__libdw_filepath(*dbg.debugdir, 0,  altname)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9)
#   53|       return NULL;
#   54|   
#   55|->   if (file[0] == '/')
#   56|       return strdup (file);
#   57|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
elfutils-0.194/libdw/dwarf_getalt.c:145:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
elfutils-0.194/libdw/dwarf_getalt.c:99:1: enter_function: entry to ‘find_debug_altlink’
elfutils-0.194/libdw/dwarf_getalt.c:108:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:111:18: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:122:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:127:7: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:136:12: acquire_resource: opened here
elfutils-0.194/libdw/dwarf_getalt.c:140:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:142:23: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:142:23: call_function: calling ‘__libdw_filepath’ from ‘find_debug_altlink’
elfutils-0.194/libdw/dwarf_getalt.c:142:23: return_function: returning to ‘find_debug_altlink’ from ‘__libdw_filepath’
elfutils-0.194/libdw/dwarf_getalt.c:143:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:143:10: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:145:16: throw: if ‘open’ throws an exception...
elfutils-0.194/libdw/dwarf_getalt.c:145:16: danger: ‘fd’ leaks here; was opened at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  143|         if (altpath != NULL)
#  144|   	{
#  145|-> 	  fd = TEMP_FAILURE_RETRY (open (altpath, O_RDONLY));
#  146|   	  free (altpath);
#  147|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def61]
elfutils-0.194/libdw/dwarf_getalt.c:152:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
elfutils-0.194/libdw/dwarf_getalt.c:108:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:111:18: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:122:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:127:7: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:136:12: acquire_resource: opened here
elfutils-0.194/libdw/dwarf_getalt.c:140:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:152:20: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:152:20: throw: if ‘dwarf_begin’ throws an exception...
elfutils-0.194/libdw/dwarf_getalt.c:152:20: danger: ‘fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  150|     if (fd >= 0)
#  151|       {
#  152|->       Dwarf *alt = dwarf_begin (fd, O_RDONLY);
#  153|         if (alt != NULL)
#  154|   	{

Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
elfutils-0.194/libdw/dwarf_getalt.c:159:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
elfutils-0.194/libdw/dwarf_getalt.c:99:1: enter_function: entry to ‘find_debug_altlink’
elfutils-0.194/libdw/dwarf_getalt.c:108:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:111:18: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:122:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:127:7: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:136:12: acquire_resource: opened here
elfutils-0.194/libdw/dwarf_getalt.c:140:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:142:23: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:142:23: call_function: calling ‘__libdw_filepath’ from ‘find_debug_altlink’
elfutils-0.194/libdw/dwarf_getalt.c:142:23: return_function: returning to ‘find_debug_altlink’ from ‘__libdw_filepath’
elfutils-0.194/libdw/dwarf_getalt.c:143:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:143:10: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:150:6: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
elfutils-0.194/libdw/dwarf_getalt.c:152:20: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:153:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:159:9: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:159:9: throw: if ‘close’ throws an exception...
elfutils-0.194/libdw/dwarf_getalt.c:159:9: danger: ‘fd’ leaks here; was opened at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
#  157|   	}
#  158|         else
#  159|-> 	close (fd);
#  160|       }
#  161|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def63]
elfutils-0.194/libdw/dwarf_getalt.c:161:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
elfutils-0.194/libdw/dwarf_getalt.c:108:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:111:18: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:122:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:127:7: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:136:12: acquire_resource: opened here
elfutils-0.194/libdw/dwarf_getalt.c:140:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:142:23: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:143:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getalt.c:150:6: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:150:6: branch_false: following ‘false’ branch (when ‘fd < 0’)...
elfutils-0.194/libdw/dwarf_getalt.c:161:1: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getalt.c:161:1: danger: ‘fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  159|   	close (fd);
#  160|       }
#  161|-> }
#  162|   
#  163|   /* find_debug_altlink() modifies "dbg->alt_dwarf".

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
elfutils-0.194/libdw/dwarf_getaranges.c:62:15: warning[-Wanalyzer-malloc-leak]: leak of ‘arangelist’
elfutils-0.194/libdw/dwarf_getaranges.c:114:1: enter_function: entry to ‘__libdw_getdieranges’
elfutils-0.194/libdw/dwarf_getaranges.c:116:6: branch_false: following ‘false’ branch (when ‘dbg’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getaranges.c:119:7: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:119:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:130:13: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:137:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: acquire_memory: allocated here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:163:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:147:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:195:1: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:173:6: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:173:6: branch_false: following ‘false’ branch (when ‘narangelist != 0’)...
elfutils-0.194/libdw/dwarf_getaranges.c:181:8: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:181:8: call_function: calling ‘finalize_aranges’ from ‘__libdw_getdieranges’
#   60|   {
#   61|     /* Allocate the array for the result.  */
#   62|->   void *buf = libdw_alloc (dbg, Dwarf_Aranges,
#   63|   			   sizeof (Dwarf_Aranges)
#   64|   			   + narangelist * sizeof (Dwarf_Arange), 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: warning[-Wanalyzer-malloc-leak]: leak of ‘arangelist’
elfutils-0.194/libdw/dwarf_getaranges.c:116:6: branch_false: following ‘false’ branch (when ‘dbg’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getaranges.c:119:7: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:119:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:130:13: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:137:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: acquire_memory: allocated here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:163:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:147:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:195:1: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: throw: if ‘dwarf_get_units’ throws an exception...
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: danger: ‘arangelist’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  129|   
#  130|     Dwarf_CU *cu = NULL;
#  131|->   while (INTUSE(dwarf_get_units) (dbg, cu, &cu, NULL, NULL, NULL, NULL) == 0)
#  132|       {
#  133|         Dwarf_Addr base;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
elfutils-0.194/libdw/dwarf_getaranges.c:140:12: warning[-Wanalyzer-malloc-leak]: leak of ‘arangelist’
elfutils-0.194/libdw/dwarf_getaranges.c:116:6: branch_false: following ‘false’ branch (when ‘dbg’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getaranges.c:119:7: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:119:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:130:13: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:137:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: acquire_memory: allocated here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:163:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:147:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:195:1: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:137:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:140:12: throw: if ‘dwarf_hasattr’ throws an exception...
elfutils-0.194/libdw/dwarf_getaranges.c:140:12: danger: ‘arangelist’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  138|   
#  139|         /* Skip CUs that only contain type information.  */
#  140|->       if (!INTUSE(dwarf_hasattr) (&cudie, DW_AT_low_pc)
#  141|   	  && !INTUSE(dwarf_hasattr) (&cudie, DW_AT_ranges))
#  142|   	continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
elfutils-0.194/libdw/dwarf_getaranges.c:141:15: warning[-Wanalyzer-malloc-leak]: leak of ‘arangelist’
elfutils-0.194/libdw/dwarf_getaranges.c:116:6: branch_false: following ‘false’ branch (when ‘dbg’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getaranges.c:119:7: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:119:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:130:13: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:137:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: acquire_memory: allocated here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:163:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:147:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:195:1: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:137:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:140:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:141:15: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:141:15: throw: if ‘dwarf_hasattr’ throws an exception...
elfutils-0.194/libdw/dwarf_getaranges.c:141:15: danger: ‘arangelist’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  139|         /* Skip CUs that only contain type information.  */
#  140|         if (!INTUSE(dwarf_hasattr) (&cudie, DW_AT_low_pc)
#  141|-> 	  && !INTUSE(dwarf_hasattr) (&cudie, DW_AT_ranges))
#  142|   	continue;
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
elfutils-0.194/libdw/dwarf_getaranges.c:147:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
elfutils-0.194/libdw/dwarf_getaranges.c:116:6: branch_false: following ‘false’ branch (when ‘dbg’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getaranges.c:119:7: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:119:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:130:13: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:137:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: acquire_memory: allocated here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:163:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:147:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:163:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:147:24: throw: if ‘dwarf_ranges’ throws an exception...
elfutils-0.194/libdw/dwarf_getaranges.c:147:24: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  145|   
#  146|         /* Add arange for each range list entry or high_pc and low_pc.  */
#  147|->       while ((offset = INTUSE(dwarf_ranges) (&cudie, offset,
#  148|   					     &base, &low, &high)) > 0)
#  149|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
elfutils-0.194/libdw/dwarf_getaranges.c:147:24: warning[-Wanalyzer-malloc-leak]: leak of ‘arangelist’
elfutils-0.194/libdw/dwarf_getaranges.c:116:6: branch_false: following ‘false’ branch (when ‘dbg’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getaranges.c:119:7: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:119:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:130:13: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:137:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: acquire_memory: allocated here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:163:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:147:24: throw: if ‘dwarf_ranges’ throws an exception...
elfutils-0.194/libdw/dwarf_getaranges.c:147:24: danger: ‘arangelist’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  145|   
#  146|         /* Add arange for each range list entry or high_pc and low_pc.  */
#  147|->       while ((offset = INTUSE(dwarf_ranges) (&cudie, offset,
#  148|   					     &base, &low, &high)) > 0)
#  149|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
elfutils-0.194/libdw/dwarf_getaranges.c:159:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
elfutils-0.194/libdw/dwarf_getaranges.c:116:6: branch_false: following ‘false’ branch (when ‘dbg’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getaranges.c:119:7: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:119:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:130:13: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:137:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: acquire_memory: allocated here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:163:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:147:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:163:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:147:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:159:15: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:159:15: throw: if ‘__libdw_seterrno’ throws an exception...
elfutils-0.194/libdw/dwarf_getaranges.c:159:15: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  157|   	  if (unlikely (new_arange == NULL))
#  158|   	    {
#  159|-> 	      __libdw_seterrno (DWARF_E_NOMEM);
#  160|   	      goto fail;
#  161|   	    }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
elfutils-0.194/libdw/dwarf_getaranges.c:159:15: warning[-Wanalyzer-malloc-leak]: leak of ‘arangelist’
elfutils-0.194/libdw/dwarf_getaranges.c:116:6: branch_false: following ‘false’ branch (when ‘dbg’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getaranges.c:119:7: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:119:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:130:13: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:131:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:137:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: acquire_memory: allocated here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:163:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:147:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:156:43: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:157:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getaranges.c:159:15: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getaranges.c:159:15: throw: if ‘__libdw_seterrno’ throws an exception...
elfutils-0.194/libdw/dwarf_getaranges.c:159:15: danger: ‘arangelist’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  157|   	  if (unlikely (new_arange == NULL))
#  158|   	    {
#  159|-> 	      __libdw_seterrno (DWARF_E_NOMEM);
#  160|   	      goto fail;
#  161|   	    }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
elfutils-0.194/libdw/dwarf_getcfi_elf.c:53:36: warning[-Wanalyzer-malloc-leak]: leak of ‘cfi’
elfutils-0.194/libdw/dwarf_getcfi_elf.c:217:1: enter_function: entry to ‘getcfi_scn_eh_frame’
elfutils-0.194/libdw/dwarf_getcfi_elf.c:222:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getcfi_elf.c:227:20: call_function: calling ‘allocate_cfi’ from ‘getcfi_scn_eh_frame’
#   51|       }
#   52|   
#   53|->   cfi->e_ident = (unsigned char *) elf_getident (elf, NULL);
#   54|     if (cfi->e_ident == NULL)
#   55|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
elfutils-0.194/libdw/dwarf_getcfi_elf.c:61:20: warning[-Wanalyzer-malloc-leak]: leak of ‘allocate_cfi(elf,  ehdr, *shdr.sh_addr)’
elfutils-0.194/libdw/dwarf_getcfi_elf.c:217:1: enter_function: entry to ‘getcfi_scn_eh_frame’
elfutils-0.194/libdw/dwarf_getcfi_elf.c:222:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getcfi_elf.c:227:20: call_function: calling ‘allocate_cfi’ from ‘getcfi_scn_eh_frame’
elfutils-0.194/libdw/dwarf_getcfi_elf.c:227:20: return_function: returning to ‘getcfi_scn_eh_frame’ from ‘allocate_cfi’
elfutils-0.194/libdw/dwarf_getcfi_elf.c:228:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getcfi_elf.c:230:7: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getcfi_elf.c:231:10: branch_true: following ‘true’ branch (when ‘hdr_scn’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getcfi_elf.c:233:32: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getcfi_elf.c:233:32: throw: if ‘elf_rawdata’ throws an exception...
elfutils-0.194/libdw/dwarf_getcfi_elf.c:61:20: danger: ‘allocate_cfi(elf,  ehdr, *shdr.sh_addr)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#   59|       }
#   60|   
#   61|->   cfi->e_machine = ehdr->e_machine;
#   62|   
#   63|     if ((BYTE_ORDER == LITTLE_ENDIAN && cfi->e_ident[EI_DATA] == ELFDATA2MSB)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
elfutils-0.194/libdw/dwarf_getpubnames.c:83:11: warning[-Wanalyzer-malloc-leak]: leak of ‘mem’
elfutils-0.194/libdw/dwarf_getpubnames.c:142:1: enter_function: entry to ‘dwarf_getpubnames’
elfutils-0.194/libdw/dwarf_getpubnames.c:146:6: branch_false: following ‘false’ branch (when ‘dbg’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getpubnames.c:149:7: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:149:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:156:7: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:156:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:163:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:163:35: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:163:35: call_function: calling ‘get_offsets’ from ‘dwarf_getpubnames’
#   81|   			 && len <= DWARF3_LENGTH_MAX_ESCAPE_CODE))
#   82|   	{
#   83|-> 	  __libdw_seterrno (DWARF_E_INVALID_DWARF);
#   84|   	  goto err_return;
#   85|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
elfutils-0.194/libdw/encoded-value.h:97:11: warning[-Wanalyzer-malloc-leak]: leak of ‘cie_fs’
elfutils-0.194/libdw/cfi.c:523:1: enter_function: entry to ‘__libdw_frame_at_address’
elfutils-0.194/libdw/cfi.c:526:16: call_function: calling ‘cie_cache_initial_state’ from ‘__libdw_frame_at_address’
#   95|   	{
#   96|   	invalid_data:
#   97|-> 	  __libdw_seterrno (DWARF_E_INVALID_CFI);
#   98|   	  return -1;
#   99|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
elfutils-0.194/libdw/encoded-value.h:97:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fde’
elfutils-0.194/libdw/fde.c:148:1: enter_function: entry to ‘__libdw_fde_by_offset’
elfutils-0.194/libdw/fde.c:155:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/fde.c:163:7: branch_false: ...to here
elfutils-0.194/libdw/fde.c:163:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/fde.c:167:27: branch_false: ...to here
elfutils-0.194/libdw/fde.c:167:27: call_function: calling ‘intern_fde’ from ‘__libdw_fde_by_offset’
#   95|   	{
#   96|   	invalid_data:
#   97|-> 	  __libdw_seterrno (DWARF_E_INVALID_CFI);
#   98|   	  return -1;
#   99|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
elfutils-0.194/libdw/encoded-value.h:152:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fde’
elfutils-0.194/libdw/fde.c:148:1: enter_function: entry to ‘__libdw_fde_by_offset’
elfutils-0.194/libdw/fde.c:155:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/fde.c:163:7: branch_false: ...to here
elfutils-0.194/libdw/fde.c:163:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/fde.c:167:27: branch_false: ...to here
elfutils-0.194/libdw/fde.c:167:27: call_function: calling ‘intern_fde’ from ‘__libdw_fde_by_offset’
#  150|   
#  151|       default:
#  152|->       __libdw_seterrno (DWARF_E_INVALID_CFI);
#  153|         return true;
#  154|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
elfutils-0.194/libdw/libdwP.h:1021:7: warning[-Wanalyzer-malloc-leak]: leak of ‘cie_fs’
elfutils-0.194/libdw/cfi.c:523:1: enter_function: entry to ‘__libdw_frame_at_address’
elfutils-0.194/libdw/cfi.c:526:16: call_function: calling ‘cie_cache_initial_state’ from ‘__libdw_frame_at_address’
# 1019|         || unlikely (data->d_buf == NULL))
# 1020|       {
# 1021|->       __libdw_seterrno (DWARF_E_INVALID_DWARF);
# 1022|         return NULL;
# 1023|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
elfutils-0.194/libdw/libdwP.h:1021:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fde’
elfutils-0.194/libdw/fde.c:148:1: enter_function: entry to ‘__libdw_fde_by_offset’
elfutils-0.194/libdw/fde.c:155:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/fde.c:163:7: branch_false: ...to here
elfutils-0.194/libdw/fde.c:163:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/fde.c:167:27: branch_false: ...to here
elfutils-0.194/libdw/fde.c:167:27: call_function: calling ‘intern_fde’ from ‘__libdw_fde_by_offset’
# 1019|         || unlikely (data->d_buf == NULL))
# 1020|       {
# 1021|->       __libdw_seterrno (DWARF_E_INVALID_DWARF);
# 1022|         return NULL;
# 1023|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
elfutils-0.194/libdw/libdwP.h:1021:7: warning[-Wanalyzer-malloc-leak]: leak of ‘mem’
elfutils-0.194/libdw/dwarf_getpubnames.c:44:1: enter_function: entry to ‘get_offsets’
elfutils-0.194/libdw/dwarf_getpubnames.c:54:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:57:10: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:57:10: branch_true: following ‘true’ branch (when ‘allocated <= cnt’)...
elfutils-0.194/libdw/dwarf_getpubnames.c:59:23: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:61:14: branch_false: following ‘false’ branch (when ‘newmem’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getpubnames.c:74:23: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:75:10: branch_true: following ‘true’ branch (when ‘len == 4294967295’)...
elfutils-0.194/libdw/dwarf_getpubnames.c:77:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:77:17: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:77:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:91:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:92:14: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:91:11: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:98:16: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:98:16: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:98:26: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:99:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:106:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:106:11: call_function: calling ‘__libdw_read_offset’ from ‘get_offsets’
# 1019|         || unlikely (data->d_buf == NULL))
# 1020|       {
# 1021|->       __libdw_seterrno (DWARF_E_INVALID_DWARF);
# 1022|         return NULL;
# 1023|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
elfutils-0.194/libdw/libdwP.h:1038:7: warning[-Wanalyzer-malloc-leak]: leak of ‘mem’
elfutils-0.194/libdw/dwarf_getpubnames.c:44:1: enter_function: entry to ‘get_offsets’
elfutils-0.194/libdw/dwarf_getpubnames.c:54:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:57:10: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:57:10: branch_true: following ‘true’ branch (when ‘allocated <= cnt’)...
elfutils-0.194/libdw/dwarf_getpubnames.c:59:23: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:61:14: branch_false: following ‘false’ branch (when ‘newmem’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getpubnames.c:74:23: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:75:10: branch_true: following ‘true’ branch (when ‘len == 4294967295’)...
elfutils-0.194/libdw/dwarf_getpubnames.c:77:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:77:17: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:77:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:91:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:92:14: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:91:11: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:98:16: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:98:16: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:98:26: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:99:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:106:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:106:11: call_function: calling ‘__libdw_read_offset’ from ‘get_offsets’
# 1036|         || unlikely (offset > data->d_size - size))
# 1037|       {
# 1038|->       __libdw_seterrno (DWARF_E_INVALID_OFFSET);
# 1039|         return -1;
# 1040|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
elfutils-0.194/libdw/libdwP.h:1056:7: warning[-Wanalyzer-malloc-leak]: leak of ‘cie_fs’
elfutils-0.194/libdw/cfi.c:523:1: enter_function: entry to ‘__libdw_frame_at_address’
elfutils-0.194/libdw/cfi.c:526:16: call_function: calling ‘cie_cache_initial_state’ from ‘__libdw_frame_at_address’
# 1054|         || unlikely ((size_t)(addr - data->d_buf) > data->d_size - size))
# 1055|       {
# 1056|->       __libdw_seterrno (DWARF_E_INVALID_OFFSET);
# 1057|         return false;
# 1058|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
elfutils-0.194/libdw/libdwP.h:1056:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fde’
elfutils-0.194/libdw/fde.c:148:1: enter_function: entry to ‘__libdw_fde_by_offset’
elfutils-0.194/libdw/fde.c:155:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/fde.c:163:7: branch_false: ...to here
elfutils-0.194/libdw/fde.c:163:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/fde.c:167:27: branch_false: ...to here
elfutils-0.194/libdw/fde.c:167:27: call_function: calling ‘intern_fde’ from ‘__libdw_fde_by_offset’
# 1054|         || unlikely ((size_t)(addr - data->d_buf) > data->d_size - size))
# 1055|       {
# 1056|->       __libdw_seterrno (DWARF_E_INVALID_OFFSET);
# 1057|         return false;
# 1058|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
elfutils-0.194/libdw/libdwP.h:1056:7: warning[-Wanalyzer-malloc-leak]: leak of ‘mem’
elfutils-0.194/libdw/dwarf_getpubnames.c:44:1: enter_function: entry to ‘get_offsets’
elfutils-0.194/libdw/dwarf_getpubnames.c:54:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:57:10: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:57:10: branch_true: following ‘true’ branch (when ‘allocated <= cnt’)...
elfutils-0.194/libdw/dwarf_getpubnames.c:59:23: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:61:14: branch_false: following ‘false’ branch (when ‘newmem’ is non-NULL)...
elfutils-0.194/libdw/dwarf_getpubnames.c:74:23: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:75:10: branch_true: following ‘true’ branch (when ‘len == 4294967295’)...
elfutils-0.194/libdw/dwarf_getpubnames.c:77:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:77:17: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:77:17: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:91:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:92:14: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:91:11: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:98:16: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:98:16: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:98:26: branch_true: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:99:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getpubnames.c:106:11: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getpubnames.c:106:11: call_function: calling ‘__libdw_read_offset’ from ‘get_offsets’
# 1054|         || unlikely ((size_t)(addr - data->d_buf) > data->d_size - size))
# 1055|       {
# 1056|->       __libdw_seterrno (DWARF_E_INVALID_OFFSET);
# 1057|         return false;
# 1058|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
elfutils-0.194/libdw/libdw_alloc.c:137:10: warning[-Wanalyzer-malloc-leak]: leak of ‘newp’
elfutils-0.194/libdw/libdw_alloc.c:123:33: acquire_memory: allocated here
elfutils-0.194/libdw/libdw_alloc.c:124:6: branch_false: following ‘false’ branch (when ‘newp’ is non-NULL)...
elfutils-0.194/libdw/libdw_alloc.c:127:35: branch_false: ...to here
elfutils-0.194/libdw/libdw_alloc.c:137:10: danger: ‘newp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  135|     pthread_rwlock_unlock (&dbg->mem_rwl);
#  136|   
#  137|->   return (void *) result;
#  138|   }
#  139|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
elfutils-0.194/libdw/libdw_find_split_unit.c:50:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dwo_path, 0)’
elfutils-0.194/libdw/libdw_find_split_unit.c:47:18: acquire_resource: opened here
elfutils-0.194/libdw/libdw_find_split_unit.c:48:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/libdw_find_split_unit.c:50:28: branch_true: ...to here
elfutils-0.194/libdw/libdw_find_split_unit.c:50:28: throw: if ‘dwarf_begin’ throws an exception...
elfutils-0.194/libdw/libdw_find_split_unit.c:50:28: danger: ‘open(dwo_path, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   48|     if (split_fd != -1)
#   49|       {
#   50|->       Dwarf *split_dwarf = dwarf_begin (split_fd, DWARF_C_READ);
#   51|         if (split_dwarf != NULL)
#   52|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
elfutils-0.194/libdw/libdw_find_split_unit.c:107:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dwp_path’
elfutils-0.194/libdw/libdw_find_split_unit.c:91:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/libdw_find_split_unit.c:93:11: branch_true: ...to here
elfutils-0.194/libdw/libdw_find_split_unit.c:93:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/libdw_find_split_unit.c:98:32: branch_true: ...to here
elfutils-0.194/libdw/libdw_find_split_unit.c:99:28: acquire_memory: allocated here
elfutils-0.194/libdw/libdw_find_split_unit.c:100:14: branch_false: following ‘false’ branch (when ‘dwp_path’ is non-NULL)...
elfutils-0.194/libdw/libdw_find_split_unit.c:105:11: branch_false: ...to here
elfutils-0.194/libdw/libdw_find_split_unit.c:107:24: throw: if ‘open’ throws an exception...
elfutils-0.194/libdw/libdw_find_split_unit.c:107:24: danger: ‘dwp_path’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  105|   	  memcpy (dwp_path, cu->dbg->elfpath, elfpath_len);
#  106|   	  strcpy (dwp_path + elfpath_len, ".dwp");
#  107|-> 	  int dwp_fd = open (dwp_path, O_RDONLY);
#  108|   	  free (dwp_path);
#  109|   	  if (dwp_fd != -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def88]
elfutils-0.194/libdw/libdw_find_split_unit.c:111:34: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dwp_path, 0)’
elfutils-0.194/libdw/libdw_find_split_unit.c:91:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/libdw_find_split_unit.c:93:11: branch_true: ...to here
elfutils-0.194/libdw/libdw_find_split_unit.c:93:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/libdw_find_split_unit.c:98:32: branch_true: ...to here
elfutils-0.194/libdw/libdw_find_split_unit.c:100:14: branch_false: following ‘false’ branch (when ‘dwp_path’ is non-NULL)...
elfutils-0.194/libdw/libdw_find_split_unit.c:105:11: branch_false: ...to here
elfutils-0.194/libdw/libdw_find_split_unit.c:107:24: acquire_resource: opened here
elfutils-0.194/libdw/libdw_find_split_unit.c:109:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdw/libdw_find_split_unit.c:111:34: branch_true: ...to here
elfutils-0.194/libdw/libdw_find_split_unit.c:111:34: throw: if ‘dwarf_begin’ throws an exception...
elfutils-0.194/libdw/libdw_find_split_unit.c:111:34: danger: ‘open(dwp_path, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  109|   	  if (dwp_fd != -1)
#  110|   	    {
#  111|-> 	      Dwarf *dwp_dwarf = dwarf_begin (dwp_fd, DWARF_C_READ);
#  112|   	      /* There's no way to know whether we got the correct file until
#  113|   		 we look up the unit, but it should at least be a dwp file.  */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def89]
elfutils-0.194/libdwfl/argp-std.c:199:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(arg, "r")’
elfutils-0.194/libdwfl/argp-std.c:189:12: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/argp-std.c:191:23: branch_true: ...to here
elfutils-0.194/libdwfl/argp-std.c:191:23: acquire_resource: opened here
elfutils-0.194/libdwfl/argp-std.c:192:16: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/argp-std.c:199:26: branch_false: ...to here
elfutils-0.194/libdwfl/argp-std.c:199:26: throw: if ‘dwfl_begin’ throws an exception...
elfutils-0.194/libdwfl/argp-std.c:199:26: danger: ‘fopen(arg, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  197|   		return code;
#  198|   	      }
#  199|-> 	    Dwfl *dwfl = INTUSE(dwfl_begin) (&proc_callbacks);
#  200|   	    int result = INTUSE(dwfl_linux_proc_maps_report) (dwfl, f);
#  201|   	    fclose (f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
elfutils-0.194/libdwfl/argp-std.c:199:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(arg, "r")’
elfutils-0.194/libdwfl/argp-std.c:189:12: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/argp-std.c:191:23: branch_true: ...to here
elfutils-0.194/libdwfl/argp-std.c:191:23: acquire_memory: allocated here
elfutils-0.194/libdwfl/argp-std.c:192:16: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/argp-std.c:199:26: branch_false: ...to here
elfutils-0.194/libdwfl/argp-std.c:199:26: throw: if ‘dwfl_begin’ throws an exception...
elfutils-0.194/libdwfl/argp-std.c:199:26: danger: ‘fopen(arg, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  197|   		return code;
#  198|   	      }
#  199|-> 	    Dwfl *dwfl = INTUSE(dwfl_begin) (&proc_callbacks);
#  200|   	    int result = INTUSE(dwfl_linux_proc_maps_report) (dwfl, f);
#  201|   	    fclose (f);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def91]
elfutils-0.194/libdwfl/argp-std.c:200:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(arg, "r")’
elfutils-0.194/libdwfl/argp-std.c:189:12: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/argp-std.c:191:23: branch_true: ...to here
elfutils-0.194/libdwfl/argp-std.c:191:23: acquire_resource: opened here
elfutils-0.194/libdwfl/argp-std.c:192:16: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/argp-std.c:199:26: branch_false: ...to here
elfutils-0.194/libdwfl/argp-std.c:200:26: throw: if ‘dwfl_linux_proc_maps_report’ throws an exception...
elfutils-0.194/libdwfl/argp-std.c:200:26: danger: ‘fopen(arg, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  198|   	      }
#  199|   	    Dwfl *dwfl = INTUSE(dwfl_begin) (&proc_callbacks);
#  200|-> 	    int result = INTUSE(dwfl_linux_proc_maps_report) (dwfl, f);
#  201|   	    fclose (f);
#  202|   	    if (result != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
elfutils-0.194/libdwfl/argp-std.c:200:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(arg, "r")’
elfutils-0.194/libdwfl/argp-std.c:189:12: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/argp-std.c:191:23: branch_true: ...to here
elfutils-0.194/libdwfl/argp-std.c:191:23: acquire_memory: allocated here
elfutils-0.194/libdwfl/argp-std.c:192:16: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/argp-std.c:199:26: branch_false: ...to here
elfutils-0.194/libdwfl/argp-std.c:200:26: throw: if ‘dwfl_linux_proc_maps_report’ throws an exception...
elfutils-0.194/libdwfl/argp-std.c:200:26: danger: ‘fopen(arg, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  198|   	      }
#  199|   	    Dwfl *dwfl = INTUSE(dwfl_begin) (&proc_callbacks);
#  200|-> 	    int result = INTUSE(dwfl_linux_proc_maps_report) (dwfl, f);
#  201|   	    fclose (f);
#  202|   	    if (result != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def93]
elfutils-0.194/libdwfl/argp-std.c:291:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
elfutils-0.194/libdwfl/argp-std.c:279:12: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/argp-std.c:281:22: branch_true: ...to here
elfutils-0.194/libdwfl/argp-std.c:281:22: acquire_resource: opened here
elfutils-0.194/libdwfl/argp-std.c:282:16: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/argp-std.c:291:32: branch_false: ...to here
elfutils-0.194/libdwfl/argp-std.c:291:32: throw: if ‘__libdw_open_file’ throws an exception...
elfutils-0.194/libdwfl/argp-std.c:291:32: danger: ‘fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  289|   
#  290|   	    Elf *core;
#  291|-> 	    Dwfl_Error error = __libdw_open_file (&fd, &core, true, false);
#  292|   	    if (error != DWFL_E_NOERROR)
#  293|   	      {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
elfutils-0.194/libdwfl/core-file.c:479:10: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(executable)’
elfutils-0.194/libdwfl/core-file.c:451:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/core-file.c:458:7: branch_false: ...to here
elfutils-0.194/libdwfl/core-file.c:458:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/core-file.c:459:11: branch_true: ...to here
elfutils-0.194/libdwfl/core-file.c:460:6: branch_false: following ‘false’ branch (when ‘executable’ is non-NULL)...
elfutils-0.194/libdwfl/core-file.c:467:11: branch_false: ...to here
elfutils-0.194/libdwfl/core-file.c:467:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/core-file.c:478:7: branch_false: ...to here
elfutils-0.194/libdwfl/core-file.c:478:46: acquire_memory: allocated here
elfutils-0.194/libdwfl/core-file.c:479:10: danger: ‘strdup(executable)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  477|   	}
#  478|         dwfl->user_core->executable_for_core = strdup (executable);
#  479|->       if (dwfl->user_core->executable_for_core == NULL)
#  480|   	{
#  481|   	  if (cleanup_user_core)

Error: CPPCHECK_WARNING (CWE-401): [#def95]
elfutils-0.194/libdwfl/cu.c:63: error[memleak]: Memory leak: aranges
#   61|   	  aranges = malloc (naranges * sizeof *aranges);
#   62|   	  if (unlikely (aranges == NULL))
#   63|-> 	    return DWFL_E_NOMEM;
#   64|   
#   65|   	  /* libdw has sorted its list by address, which is how we want it.

Error: CPPCHECK_WARNING (CWE-401): [#def96]
elfutils-0.194/libdwfl/cu.c:213: error[memleak]: Memory leak: cu
#  211|         struct dwfl_cu *cu = malloc (sizeof *cu);
#  212|         if (unlikely (cu == NULL))
#  213|-> 	return DWFL_E_NOMEM;
#  214|   
#  215|         cu->mod = mod;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
elfutils-0.194/libdwfl/derelocate.c:92:7: warning[-Wanalyzer-malloc-leak]: leak of ‘newref’
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:119:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:122:42: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:123:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:126:35: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:126:35: acquire_memory: allocated here
elfutils-0.194/libdwfl/derelocate.c:127:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:135:11: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:92:7: throw: if ‘__libdwfl_seterrno’ throws an exception...
elfutils-0.194/libdwfl/derelocate.c:92:7: danger: ‘newref’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#   90|       {
#   91|       elf_error:
#   92|->       __libdwfl_seterrno (DWFL_E_LIBELF);
#   93|         nrefs = -1;
#   94|         goto free_refs;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
elfutils-0.194/libdwfl/derelocate.c:99:17: warning[-Wanalyzer-malloc-leak]: leak of ‘newref’
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:119:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:122:42: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:123:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:126:35: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:126:35: acquire_memory: allocated here
elfutils-0.194/libdwfl/derelocate.c:127:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:135:11: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:17: throw: if ‘elf_nextscn’ throws an exception...
elfutils-0.194/libdwfl/derelocate.c:99:17: danger: ‘newref’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#   97|     bool check_reloc_sections = false;
#   98|     Elf_Scn *scn = NULL;
#   99|->   while ((scn = elf_nextscn (mod->main.elf, scn)) != NULL)
#  100|       {
#  101|         GElf_Shdr shdr_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
elfutils-0.194/libdwfl/derelocate.c:102:25: warning[-Wanalyzer-malloc-leak]: leak of ‘newref’
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:119:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:122:42: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:123:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:126:35: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:126:35: acquire_memory: allocated here
elfutils-0.194/libdwfl/derelocate.c:127:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:135:11: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:102:25: throw: if ‘gelf_getshdr’ throws an exception...
elfutils-0.194/libdwfl/derelocate.c:102:25: danger: ‘newref’ leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  100|       {
#  101|         GElf_Shdr shdr_mem;
#  102|->       GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
#  103|         if (shdr == NULL)
#  104|   	goto elf_error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
elfutils-0.194/libdwfl/derelocate.c:110:15: warning[-Wanalyzer-malloc-leak]: leak of ‘newref’
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:119:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:122:42: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:123:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:126:35: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:126:35: acquire_memory: allocated here
elfutils-0.194/libdwfl/derelocate.c:127:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:135:11: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:106:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:11: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:112:41: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:110:15: throw: if ‘__libdwfl_relocate_value’ throws an exception...
elfutils-0.194/libdwfl/derelocate.c:110:15: danger: ‘newref’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#  108|   	{
#  109|   	  /* This section might not yet have been looked at.  */
#  110|-> 	  if (__libdwfl_relocate_value (mod, mod->main.elf, &shstrndx,
#  111|   					elf_ndxscn (scn),
#  112|   					&shdr->sh_addr) != DWFL_E_NOERROR)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
elfutils-0.194/libdwfl/derelocate.c:111:41: warning[-Wanalyzer-malloc-leak]: leak of ‘newref’
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:119:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:122:42: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:123:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:126:35: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:126:35: acquire_memory: allocated here
elfutils-0.194/libdwfl/derelocate.c:127:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:135:11: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:106:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:11: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:112:41: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:111:41: throw: if ‘elf_ndxscn’ throws an exception...
elfutils-0.194/libdwfl/derelocate.c:111:41: danger: ‘newref’ leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  109|   	  /* This section might not yet have been looked at.  */
#  110|   	  if (__libdwfl_relocate_value (mod, mod->main.elf, &shstrndx,
#  111|-> 					elf_ndxscn (scn),
#  112|   					&shdr->sh_addr) != DWFL_E_NOERROR)
#  113|   	    continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
elfutils-0.194/libdwfl/derelocate.c:114:18: warning[-Wanalyzer-malloc-leak]: leak of ‘newref’
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:119:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:122:42: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:123:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:126:35: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:126:35: acquire_memory: allocated here
elfutils-0.194/libdwfl/derelocate.c:127:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:135:11: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:106:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:11: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:112:41: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:110:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:114:18: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:114:18: throw: if ‘gelf_getshdr’ throws an exception...
elfutils-0.194/libdwfl/derelocate.c:114:18: danger: ‘newref’ leaks here; was allocated at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#  112|   					&shdr->sh_addr) != DWFL_E_NOERROR)
#  113|   	    continue;
#  114|-> 	  shdr = gelf_getshdr (scn, &shdr_mem);
#  115|   	  if (unlikely (shdr == NULL))
#  116|   	    goto elf_error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
elfutils-0.194/libdwfl/derelocate.c:121:30: warning[-Wanalyzer-malloc-leak]: leak of ‘newref’
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:119:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:122:42: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:123:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:126:35: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:126:35: acquire_memory: allocated here
elfutils-0.194/libdwfl/derelocate.c:127:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:135:11: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:119:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:122:42: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:121:30: throw: if ‘elf_strptr’ throws an exception...
elfutils-0.194/libdwfl/derelocate.c:121:30: danger: ‘newref’ leaks here; was allocated at [(11)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/10)
#  119|         if (shdr->sh_flags & SHF_ALLOC)
#  120|   	{
#  121|-> 	  const char *name = elf_strptr (mod->main.elf, shstrndx,
#  122|   					 shdr->sh_name);
#  123|   	  if (unlikely (name == NULL))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
elfutils-0.194/libdwfl/derelocate.c:150:31: warning[-Wanalyzer-malloc-leak]: leak of ‘newref’
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:119:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:122:42: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:123:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:126:35: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:126:35: acquire_memory: allocated here
elfutils-0.194/libdwfl/derelocate.c:127:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:135:11: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:145:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:146:14: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:145:11: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:147:15: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:145:11: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:148:14: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:145:11: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:150:15: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:150:31: throw: if ‘elf_ndxscn’ throws an exception...
elfutils-0.194/libdwfl/derelocate.c:150:31: danger: ‘newref’ leaks here; was allocated at [(11)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/10)
#  148|   	  && mod->dwfl->callbacks->section_address != NULL)
#  149|   	{
#  150|-> 	  if (shdr->sh_info < elf_ndxscn (scn))
#  151|   	    {
#  152|   	      /* We've already looked at the section these relocs apply to.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
elfutils-0.194/libdwfl/derelocate.c:153:31: warning[-Wanalyzer-malloc-leak]: leak of ‘newref’
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:119:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:122:42: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:123:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:126:35: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:126:35: acquire_memory: allocated here
elfutils-0.194/libdwfl/derelocate.c:127:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:135:11: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:145:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:146:14: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:145:11: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:147:15: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:145:11: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:148:14: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:145:11: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:150:15: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:150:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:153:58: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:153:31: throw: if ‘elf_getscn’ throws an exception...
elfutils-0.194/libdwfl/derelocate.c:153:31: danger: ‘newref’ leaks here; was allocated at [(11)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/10)
#  151|   	    {
#  152|   	      /* We've already looked at the section these relocs apply to.  */
#  153|-> 	      Elf_Scn *tscn = elf_getscn (mod->main.elf, shdr->sh_info);
#  154|   	      if (likely (tscn != NULL))
#  155|   		for (struct secref *sec = refs; sec != NULL; sec = sec->next)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
elfutils-0.194/libdwfl/derelocate.c:180:3: warning[-Wanalyzer-malloc-leak]: leak of ‘newref’
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:102:25: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:103:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:106:12: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:119:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/derelocate.c:122:42: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:123:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:126:35: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:126:35: acquire_memory: allocated here
elfutils-0.194/libdwfl/derelocate.c:127:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:135:11: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:99:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:168:21: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:169:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:172:38: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:173:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:173:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:176:26: branch_true: following ‘true’ branch (when ‘i != 0’)...
elfutils-0.194/libdwfl/derelocate.c:177:13: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:176:26: branch_false: following ‘false’ branch (when ‘i == 0’)...
elfutils-0.194/libdwfl/derelocate.c:178:3: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:178:3: branch_true: following ‘true’ branch (when ‘refs’ is NULL)...
elfutils-0.194/libdwfl/derelocate.c:180:3: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:180:3: throw: if ‘qsort’ throws an exception...
elfutils-0.194/libdwfl/derelocate.c:180:3: danger: ‘newref’ leaks here; was allocated at [(11)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/10)
#  178|     assert (refs == NULL);
#  179|   
#  180|->   qsort (sortrefs, nrefs, sizeof sortrefs[0], &compare_secrefs);
#  181|   
#  182|     mod->reloc_info->count = nrefs;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
elfutils-0.194/libdwfl/derelocate.c:180:3: warning[-Wanalyzer-malloc-leak]: leak of ‘sortrefs’
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:89:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:169:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:172:38: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:172:30: acquire_memory: allocated here
elfutils-0.194/libdwfl/derelocate.c:173:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/derelocate.c:173:6: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:176:26: branch_false: following ‘false’ branch (when ‘i == 0’)...
elfutils-0.194/libdwfl/derelocate.c:178:3: branch_false: ...to here
elfutils-0.194/libdwfl/derelocate.c:178:3: branch_true: following ‘true’ branch (when ‘refs’ is NULL)...
elfutils-0.194/libdwfl/derelocate.c:180:3: branch_true: ...to here
elfutils-0.194/libdwfl/derelocate.c:180:3: throw: if ‘qsort’ throws an exception...
elfutils-0.194/libdwfl/derelocate.c:180:3: danger: ‘sortrefs’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  178|     assert (refs == NULL);
#  179|   
#  180|->   qsort (sortrefs, nrefs, sizeof sortrefs[0], &compare_secrefs);
#  181|   
#  182|     mod->reloc_info->count = nrefs;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def108]
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:86:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(name, 0)’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:128:1: enter_function: entry to ‘__libdwfl_open_mod_by_build_id’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:133:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:136:16: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:139:10: call_function: calling ‘__libdwfl_open_by_build_id’ from ‘__libdwfl_open_mod_by_build_id’
#   84|     while (fd < 0 && (dir = strsep (&paths, ":")) != NULL)
#   85|       {
#   86|->       if (dir[0] == '+' || dir[0] == '-')
#   87|   	++dir;
#   88|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def109]
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:166:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*_2->user_core.executable_for_core, 0)’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:150:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:151:10: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:150:7: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:152:10: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:150:7: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:159:16: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:159:16: acquire_resource: opened here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:160:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:162:24: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:163:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:166:13: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:166:13: danger: ‘open(*_2->user_core.executable_for_core, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  164|   	    return fd;
#  165|   	  else
#  166|-> 	    close (fd);
#  167|   	}
#  168|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def110]
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:172:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:143:1: enter_function: entry to ‘dwfl_build_id_find_elf’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:169:12: call_function: calling ‘__libdwfl_open_mod_by_build_id’ from ‘dwfl_build_id_find_elf’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:169:12: return_function: returning to ‘dwfl_build_id_find_elf’ from ‘__libdwfl_open_mod_by_build_id’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:170:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:172:26: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:172:26: throw: if ‘__libdw_open_file’ throws an exception...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:172:26: danger: ‘fd’ leaks here; was opened at [(20)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/19)
#  170|     if (fd >= 0)
#  171|       {
#  172|->       Dwfl_Error error = __libdw_open_file (&fd, elfp, true, false);
#  173|         if (error != DWFL_E_NOERROR)
#  174|   	__libdwfl_seterrno (error);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def111]
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:198:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:143:1: enter_function: entry to ‘dwfl_build_id_find_elf’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:169:12: call_function: calling ‘__libdwfl_open_mod_by_build_id’ from ‘dwfl_build_id_find_elf’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:169:12: return_function: returning to ‘dwfl_build_id_find_elf’ from ‘__libdwfl_open_mod_by_build_id’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:170:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:197:21: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:197:11: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:198:14: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:198:9: danger: ‘fd’ leaks here; was opened at [(20)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/19)
#  196|   	 debuginfo-server if enabled.  */
#  197|         if (fd < 0 && mod->build_id_len > 0)
#  198|-> 	fd = __libdwfl_debuginfod_find_executable (mod->dwfl,
#  199|   						   mod->build_id_bits,
#  200|   						   mod->build_id_len);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def112]
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:198:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:143:1: enter_function: entry to ‘dwfl_build_id_find_elf’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:169:12: call_function: calling ‘__libdwfl_open_mod_by_build_id’ from ‘dwfl_build_id_find_elf’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:169:12: return_function: returning to ‘dwfl_build_id_find_elf’ from ‘__libdwfl_open_mod_by_build_id’
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:170:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:197:21: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:197:11: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:198:14: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:198:14: throw: if ‘__libdwfl_debuginfod_find_executable’ throws an exception...
elfutils-0.194/libdwfl/dwfl_build_id_find_elf.c:198:14: danger: ‘fd’ leaks here; was opened at [(20)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/19)
#  196|   	 debuginfo-server if enabled.  */
#  197|         if (fd < 0 && mod->build_id_len > 0)
#  198|-> 	fd = __libdwfl_debuginfod_find_executable (mod->dwfl,
#  199|   						   mod->build_id_bits,
#  200|   						   mod->build_id_len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
elfutils-0.194/libdwfl/dwfl_frame.c:447:9: warning[-Wanalyzer-malloc-leak]: leak of ‘thread.unwound’
elfutils-0.194/libdwfl/dwfl_frame.c:421:1: enter_function: entry to ‘dwfl_getthread_frames’
elfutils-0.194/libdwfl/dwfl_frame.c:426:10: call_function: calling ‘getthread’ from ‘dwfl_getthread_frames’
#  445|       }
#  446|     Dwfl_Process *process = thread->process;
#  447|->   if (! process->callbacks->set_initial_registers (thread,
#  448|   						   thread->callbacks_arg))
#  449|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
elfutils-0.194/libdwfl/dwfl_module.c:202:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
elfutils-0.194/libdwfl/dwfl_module.c:187:6: branch_false: following ‘false’ branch (when ‘mod’ is non-NULL)...
elfutils-0.194/libdwfl/dwfl_module.c:190:15: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module.c:190:15: acquire_memory: allocated here
elfutils-0.194/libdwfl/dwfl_module.c:191:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module.c:199:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module.c:202:3: throw: if ‘eu_search_tree_init’ throws an exception...
elfutils-0.194/libdwfl/dwfl_module.c:202:3: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  200|     mod->high_addr = end;
#  201|     mod->dwfl = dwfl;
#  202|->   eu_search_tree_init (&mod->lazy_cu_tree);
#  203|   
#  204|     return use (mod, tailp, dwfl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
elfutils-0.194/libdwfl/dwfl_module.c:202:3: warning[-Wanalyzer-malloc-leak]: leak of ‘mod’
elfutils-0.194/libdwfl/dwfl_module.c:186:22: acquire_memory: allocated here
elfutils-0.194/libdwfl/dwfl_module.c:187:6: branch_false: following ‘false’ branch (when ‘mod’ is non-NULL)...
elfutils-0.194/libdwfl/dwfl_module.c:190:15: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module.c:191:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module.c:199:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module.c:202:3: throw: if ‘eu_search_tree_init’ throws an exception...
elfutils-0.194/libdwfl/dwfl_module.c:202:3: danger: ‘mod’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  200|     mod->high_addr = end;
#  201|     mod->dwfl = dwfl;
#  202|->   eu_search_tree_init (&mod->lazy_cu_tree);
#  203|   
#  204|     return use (mod, tailp, dwfl);

Error: CPPCHECK_WARNING (CWE-401): [#def116]
elfutils-0.194/libdwfl/dwfl_module_build_id.c:50: error[memleak]: Memory leak: copy
#   48|       {
#   49|         __libdwfl_seterrno (DWFL_E_NOMEM);
#   50|->       return -1;
#   51|       }
#   52|   

Error: CPPCHECK_WARNING (CWE-401): [#def117]
elfutils-0.194/libdwfl/dwfl_module_build_id.c:56: error[memleak]: Memory leak: copy
#   54|     mod->build_id_vaddr = vaddr;
#   55|     mod->build_id_len = len;
#   56|->   return len;
#   57|   }
#   58|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:414:9: warning[-Wanalyzer-malloc-leak]: leak of ‘phdrs’
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:286:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:286:6: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:290:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:293:25: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:294:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:296:11: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:302:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:304:16: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:309:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:313:24: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:314:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:325:12: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:335:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:340:22: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:347:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:348:14: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:347:11: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:350:15: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:364:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:364:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:383:9: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:383:8: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:383:8: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:406:8: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:408:18: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:409:19: acquire_memory: allocated here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:410:8: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:412:5: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:414:9: throw: if ‘gelf_xlatetom’ throws an exception...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:414:9: danger: ‘phdrs’ leaks here; was allocated at [(27)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/26)
#  412|       dst.d_buf = phdrs;
#  413|       dst.d_size = phdrs_bytes;
#  414|->     if (unlikely (gelf_xlatetom (mod->main.elf, &dst, &src,
#  415|   				 ehdr.e32.e_ident[EI_DATA]) == NULL))
#  416|         {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:459:7: warning[-Wanalyzer-malloc-leak]: leak of ‘shdrs’
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:286:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:286:6: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:290:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:293:25: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:294:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:296:11: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:302:14: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:304:16: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:309:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:313:24: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:314:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:325:12: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:335:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:340:22: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:347:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:348:14: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:347:11: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:350:15: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:364:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:364:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:383:9: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:383:8: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:383:8: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:406:8: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:408:18: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:409:19: acquire_memory: allocated here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:410:8: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:412:5: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:414:8: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:420:8: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:443:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:446:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:451:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:453:16: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:454:17: acquire_memory: allocated here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:455:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:457:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:459:7: throw: if ‘gelf_xlatetom’ throws an exception...
elfutils-0.194/libdwfl/dwfl_module_getdwarf.c:459:7: danger: ‘shdrs’ leaks here; was allocated at [(37)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/36)
#  457|     dst.d_buf = shdrs;
#  458|     dst.d_size = shdrs_bytes;
#  459|->   if (unlikely (gelf_xlatetom (mod->main.elf, &dst, &src,
#  460|   			       ehdr.e32.e_ident[EI_DATA]) == NULL))
#  461|       {

Error: CPPCHECK_WARNING (CWE-401): [#def120]
elfutils-0.194/libdwfl/dwfl_module_report_build_id.c:71: error[memleak]: Memory leak: copy
#   69|   	{
#   70|   	  __libdwfl_seterrno (DWFL_E_NOMEM);
#   71|-> 	  return -1;
#   72|   	}
#   73|         memcpy (copy, bits, len);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def121]
elfutils-0.194/libdwfl/dwfl_report_elf.c:307:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
elfutils-0.194/libdwfl/dwfl_report_elf.c:295:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_report_elf.c:298:12: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_report_elf.c:298:12: acquire_resource: opened here
elfutils-0.194/libdwfl/dwfl_report_elf.c:299:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_report_elf.c:307:22: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_report_elf.c:307:22: throw: if ‘__libdw_open_file’ throws an exception...
elfutils-0.194/libdwfl/dwfl_report_elf.c:307:22: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  305|   
#  306|     Elf *elf;
#  307|->   Dwfl_Error error = __libdw_open_file (&fd, &elf, closefd, false);
#  308|     if (error != DWFL_E_NOERROR)
#  309|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:259:5: warning[-Wanalyzer-malloc-leak]: leak of ‘build_id.memory’
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:296:1: enter_function: entry to ‘dwfl_segment_report_module’
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:346:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:348:10: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:346:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:365:12: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:417:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:419:7: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:423:10: branch_false: following ‘false’ branch (when ‘phentsize == 56’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:426:19: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:437:6: branch_false: following ‘false’ branch (when ‘phnum != 0’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:440:22: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:445:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:450:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:453:22: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:453:22: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:454:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:456:16: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:458:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:461:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:470:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:6: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:6: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:7: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:7: branch_true: following ‘true’ branch (when ‘ei_class == 2’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:500:14: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:499:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:507:7: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:507:33: branch_true: following ‘true’ branch (when ‘phnum > i’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:510:28: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:510:28: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:510:54: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:511:29: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:511:56: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:512:30: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:512:57: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:513:29: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:513:57: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:514:31: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:514:59: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:515:30: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:515:57: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:525:18: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:525:19: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:586:22: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:588:19: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:592:22: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:600:22: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:620:41: acquire_memory: allocated here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:621:26: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:622:25: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:631:15: call_function: calling ‘finish_portion’ from ‘dwfl_segment_report_module’
#  257|   {
#  258|     if (*data_size != 0 && *data != NULL)
#  259|->     (*read_state->memory_callback) (read_state->dwfl, -1, data, data_size,
#  260|   				    0, 0, read_state->memory_callback_arg);
#  261|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:498:11: warning[-Wanalyzer-malloc-leak]: leak of ‘phdrsp’
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:296:1: enter_function: entry to ‘dwfl_segment_report_module’
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:346:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:348:10: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:346:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:365:12: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:399:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:401:7: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:405:10: branch_false: following ‘false’ branch (when ‘phentsize == 32’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:412:19: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:437:6: branch_false: following ‘false’ branch (when ‘phnum != 0’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:440:22: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:445:7: call_function: calling ‘read_portion’ from ‘dwfl_segment_report_module’
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:445:7: return_function: returning to ‘dwfl_segment_report_module’ from ‘read_portion’
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:445:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:450:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:453:22: branch_true: following ‘true’ branch (when ‘ei_class == 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:454:7: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:454:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:456:16: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:457:12: acquire_memory: allocated here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:458:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:461:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:470:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:6: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:6: branch_true: following ‘true’ branch (when ‘ei_class == 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:498:11: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:498:11: throw: if ‘elf32_xlatetom’ throws an exception...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:498:11: danger: ‘phdrsp’ leaks here; was allocated at [(27)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/26)
#  496|     Elf64_Phdr *p64 = phdrsp;
#  497|     if ((ei_class == ELFCLASS32
#  498|->        && elf32_xlatetom (&xlateto, &xlatefrom, ei_data) == NULL)
#  499|         || (ei_class == ELFCLASS64
#  500|             && elf64_xlatetom (&xlateto, &xlatefrom, ei_data) == NULL))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:500:14: warning[-Wanalyzer-malloc-leak]: leak of ‘phdrsp’
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:346:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:348:10: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:346:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:365:12: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:417:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:419:7: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:423:10: branch_false: following ‘false’ branch (when ‘phentsize == 56’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:426:19: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:437:6: branch_false: following ‘false’ branch (when ‘phnum != 0’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:440:22: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:445:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:450:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:453:22: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:453:22: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:454:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:456:16: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:457:12: acquire_memory: allocated here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:458:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:461:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:470:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:6: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:6: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:7: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:7: branch_true: following ‘true’ branch (when ‘ei_class == 2’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:500:14: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:500:14: throw: if ‘elf64_xlatetom’ throws an exception...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:500:14: danger: ‘phdrsp’ leaks here; was allocated at [(19)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/18)
#  498|          && elf32_xlatetom (&xlateto, &xlatefrom, ei_data) == NULL)
#  499|         || (ei_class == ELFCLASS64
#  500|->           && elf64_xlatetom (&xlateto, &xlatefrom, ei_data) == NULL))
#  501|       {
#  502|         found_bias = false; /* Trigger error check */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:576:23: warning[-Wanalyzer-malloc-leak]: leak of ‘notes’
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:296:1: enter_function: entry to ‘dwfl_segment_report_module’
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:346:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:348:10: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:346:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:365:12: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:417:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:419:7: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:423:10: branch_false: following ‘false’ branch (when ‘phentsize == 56’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:426:19: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:437:6: branch_false: following ‘false’ branch (when ‘phnum != 0’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:440:22: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:445:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:450:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:453:22: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:453:22: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:454:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:456:16: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:458:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:461:3: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:470:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:6: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:6: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:7: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:497:7: branch_true: following ‘true’ branch (when ‘ei_class == 2’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:500:14: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:499:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:507:7: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:507:33: branch_true: following ‘true’ branch (when ‘phnum > i’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:510:28: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:510:28: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:510:54: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:511:29: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:511:56: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:512:30: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:512:57: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:513:29: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:513:57: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:514:31: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:514:59: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:515:30: branch_false: following ‘false’ branch (when ‘ei_class != 1’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:515:57: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:522:19: branch_true: following ‘true’ branch (when ‘type == 4’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:525:19: branch_true: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:525:18: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:533:19: call_function: calling ‘read_portion’ from ‘dwfl_segment_report_module’
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:533:19: return_function: returning to ‘dwfl_segment_report_module’ from ‘read_portion’
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:533:18: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:537:18: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:537:18: branch_false: following ‘false’ branch (when ‘filesz <= 1537228672809129301’)...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:543:18: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:554:27: acquire_memory: allocated here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:555:22: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:557:55: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:568:22: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:576:23: branch_false: ...to here
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:576:23: throw: if ‘elf32_xlatetom’ throws an exception...
elfutils-0.194/libdwfl/dwfl_segment_report_module.c:576:23: danger: ‘notes’ leaks here; was allocated at [(59)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/58)
#  574|   		    }
#  575|   
#  576|->                   if (elf32_xlatetom (&xlateto, &xlatefrom, xencoding) == NULL)
#  577|                       {
#  578|                         free (notes);

Error: CPPCHECK_WARNING (CWE-401): [#def126]
elfutils-0.194/libdwfl/elf-from-memory.c:77: error[memleak]: Memory leak: buffer
#   75|       no_memory:
#   76|         __libdwfl_seterrno (DWFL_E_NOMEM);
#   77|->       return NULL;
#   78|       }
#   79|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
elfutils-0.194/libdwfl/elf-from-memory.c:80:19: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
elfutils-0.194/libdwfl/elf-from-memory.c:72:27: acquire_memory: allocated here
elfutils-0.194/libdwfl/elf-from-memory.c:73:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:80:19: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:80:19: throw: if the called function throws an exception...
elfutils-0.194/libdwfl/elf-from-memory.c:80:19: danger: ‘buffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   78|       }
#   79|   
#   80|->   ssize_t nread = (*read_memory) (arg, buffer, ehdr_vma,
#   81|   				  sizeof (Elf32_Ehdr), initial_bufsize);
#   82|     if (nread <= 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
elfutils-0.194/libdwfl/elf-from-memory.c:191:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
elfutils-0.194/libdwfl/elf-from-memory.c:73:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:80:19: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:82:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:91:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:91:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:107:12: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:151:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:153:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:156:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:159:19: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:173:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:180:10: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:180:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:182:35: branch_true: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:183:14: branch_false: following ‘false’ branch (when ‘newbuf’ is non-NULL)...
elfutils-0.194/libdwfl/elf-from-memory.c:191:44: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:191:15: throw: if the called function throws an exception...
elfutils-0.194/libdwfl/elf-from-memory.c:191:15: danger: ‘buffer’ leaks here; was allocated at [(17)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/16)
#  189|   	  buffer = newbuf;
#  190|   	}
#  191|->       nread = (*read_memory) (arg, buffer, ehdr_vma + phoff,
#  192|   			      phnum * phentsize, phnum * phentsize);
#  193|         if (nread <= 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
elfutils-0.194/libdwfl/elf-from-memory.c:228:13: warning[-Wanalyzer-malloc-leak]: leak of ‘phdrsp’
elfutils-0.194/libdwfl/elf-from-memory.c:73:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:80:19: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:82:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:91:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:91:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:107:12: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:151:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:153:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:156:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:159:19: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:173:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:175:23: branch_true: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:201:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:206:16: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:207:12: acquire_memory: allocated here
elfutils-0.194/libdwfl/elf-from-memory.c:208:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:214:3: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:226:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:228:51: branch_true: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:228:13: throw: if ‘elf32_xlatetom’ throws an exception...
elfutils-0.194/libdwfl/elf-from-memory.c:228:13: danger: ‘phdrsp’ leaks here; was allocated at [(17)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/16)
#  226|     if (class32)
#  227|       {
#  228|->       if (! elf32_xlatetom (&xlateto, &xlatefrom, ehdr.e32.e_ident[EI_DATA]))
#  229|           goto libelf_error;
#  230|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
elfutils-0.194/libdwfl/elf-from-memory.c:233:13: warning[-Wanalyzer-malloc-leak]: leak of ‘phdrsp’
elfutils-0.194/libdwfl/elf-from-memory.c:73:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:80:19: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:82:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:91:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:91:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:107:12: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:151:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:153:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:156:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:159:19: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:173:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:175:23: branch_true: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:201:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:206:16: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:207:12: acquire_memory: allocated here
elfutils-0.194/libdwfl/elf-from-memory.c:208:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:214:3: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:226:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:233:51: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:233:13: throw: if ‘elf64_xlatetom’ throws an exception...
elfutils-0.194/libdwfl/elf-from-memory.c:233:13: danger: ‘phdrsp’ leaks here; was allocated at [(17)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/16)
#  231|     else
#  232|       {
#  233|->       if (! elf64_xlatetom (&xlateto, &xlatefrom, ehdr.e64.e_ident[EI_DATA]))
#  234|           goto libelf_error;
#  235|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
elfutils-0.194/libdwfl/elf-from-memory.c:342:11: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
elfutils-0.194/libdwfl/elf-from-memory.c:73:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:80:19: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:82:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:91:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:91:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:107:12: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:151:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:153:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:156:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:159:19: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:173:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:175:23: branch_true: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:201:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:206:16: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:208:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:214:3: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:226:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:228:51: branch_true: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:228:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:237:3: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:237:29: branch_false: following ‘false’ branch (when ‘phnum <= i’)...
elfutils-0.194/libdwfl/elf-from-memory.c:273:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:273:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:284:3: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:287:12: acquire_memory: allocated here
elfutils-0.194/libdwfl/elf-from-memory.c:288:6: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
elfutils-0.194/libdwfl/elf-from-memory.c:288:6: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:294:29: branch_false: following ‘false’ branch (when ‘phnum <= i’)...
elfutils-0.194/libdwfl/elf-from-memory.c:318:6: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:318:6: branch_false: following ‘false’ branch (when ‘shdrs_end <= contents_size’)...
elfutils-0.194/libdwfl/elf-from-memory.c:336:22: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:338:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:340:26: branch_true: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:342:11: throw: if ‘elf32_xlatetof’ throws an exception...
elfutils-0.194/libdwfl/elf-from-memory.c:342:11: danger: ‘buffer’ leaks here; was allocated at [(25)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/24)
#  340|         xlatefrom.d_size = xlateto.d_size = sizeof ehdr.e32;
#  341|         xlatefrom.d_buf = &ehdr.e32;
#  342|->       if (elf32_xlatetof (&xlateto, &xlatefrom,
#  343|                             ehdr.e32.e_ident[EI_DATA]) == NULL)
#  344|           goto libelf_error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
elfutils-0.194/libdwfl/elf-from-memory.c:350:11: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
elfutils-0.194/libdwfl/elf-from-memory.c:73:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:80:19: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:82:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:91:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:91:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:107:12: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:151:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:153:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:156:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:159:19: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:173:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:175:23: branch_true: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:201:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:206:16: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:208:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:214:3: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:226:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:233:51: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:233:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:237:3: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:237:29: branch_false: following ‘false’ branch (when ‘phnum <= i’)...
elfutils-0.194/libdwfl/elf-from-memory.c:273:7: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:273:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:284:3: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:287:12: acquire_memory: allocated here
elfutils-0.194/libdwfl/elf-from-memory.c:288:6: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
elfutils-0.194/libdwfl/elf-from-memory.c:288:6: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:294:29: branch_false: following ‘false’ branch (when ‘phnum <= i’)...
elfutils-0.194/libdwfl/elf-from-memory.c:318:6: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:318:6: branch_false: following ‘false’ branch (when ‘shdrs_end <= contents_size’)...
elfutils-0.194/libdwfl/elf-from-memory.c:336:22: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:338:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/elf-from-memory.c:348:26: branch_false: ...to here
elfutils-0.194/libdwfl/elf-from-memory.c:350:11: throw: if ‘elf64_xlatetof’ throws an exception...
elfutils-0.194/libdwfl/elf-from-memory.c:350:11: danger: ‘buffer’ leaks here; was allocated at [(25)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/24)
#  348|         xlatefrom.d_size = xlateto.d_size = sizeof ehdr.e64;
#  349|         xlatefrom.d_buf = &ehdr.e64;
#  350|->       if (elf64_xlatetof (&xlateto, &xlatefrom,
#  351|                             ehdr.e64.e_ident[EI_DATA]) == NULL)
#  352|           goto libelf_error;

Error: CPPCHECK_WARNING (CWE-401): [#def133]
elfutils-0.194/libdwfl/find-debuginfo.c:52: error[memleak]: Memory leak: fname
#   50|         fname = strdup (debuglink);
#   51|         if (unlikely (fname == NULL))
#   52|-> 	return -1;
#   53|       }
#   54|     else if ((subdir == NULL ? asprintf (&fname, "%s/%s", dir, debuglink)

Error: CPPCHECK_WARNING (CWE-401): [#def134]
elfutils-0.194/libdwfl/find-debuginfo.c:186: error[memleak]: Memory leak: localname
#  184|         localname = malloc (len + sizeof ".debug");
#  185|         if (unlikely (localname == NULL))
#  186|-> 	return -1;
#  187|         memcpy (localname, file_basename, len);
#  188|         memcpy (&localname[len], ".debug", sizeof ".debug");

Error: CPPCHECK_WARNING (CWE-401): [#def135]
elfutils-0.194/libdwfl/find-debuginfo.c:202: error[memleak]: Memory leak: localpath
#  200|       {
#  201|         free (localname);
#  202|->       return -1;
#  203|       }
#  204|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def136]
elfutils-0.194/libdwfl/find-debuginfo.c:324:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
elfutils-0.194/libdwfl/find-debuginfo.c:348:1: enter_function: entry to ‘dwfl_standard_find_debuginfo’
elfutils-0.194/libdwfl/find-debuginfo.c:357:6: branch_false: following ‘false’ branch (when ‘mod’ is non-NULL)...
elfutils-0.194/libdwfl/find-debuginfo.c:362:24: branch_false: ...to here
elfutils-0.194/libdwfl/find-debuginfo.c:386:12: call_function: calling ‘find_debuginfo_in_path’ from ‘dwfl_standard_find_debuginfo’
#  322|   	    continue;
#  323|   	  default:
#  324|-> 	    goto fail_free;
#  325|   	  }
#  326|         if (validate (mod, fd, check, debuglink_crc))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
elfutils-0.194/libdwfl/find-debuginfo.c:345:1: warning[-Wanalyzer-malloc-leak]: leak of ‘localpath’
elfutils-0.194/libdwfl/find-debuginfo.c:348:1: enter_function: entry to ‘dwfl_standard_find_debuginfo’
elfutils-0.194/libdwfl/find-debuginfo.c:357:6: branch_false: following ‘false’ branch (when ‘mod’ is non-NULL)...
elfutils-0.194/libdwfl/find-debuginfo.c:362:24: branch_false: ...to here
elfutils-0.194/libdwfl/find-debuginfo.c:386:12: call_function: calling ‘find_debuginfo_in_path’ from ‘dwfl_standard_find_debuginfo’
#  343|     free (file_dirname);
#  344|     return -1;
#  345|-> }
#  346|   
#  347|   int

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
elfutils-0.194/libdwfl/frame_unwind.c:111:11: warning[-Wanalyzer-malloc-leak]: leak of ‘new_addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  109|         if (new_addrs == NULL)
#  110|           {
#  111|->           __libdwfl_seterrno (DWFL_E_NOMEM);
#  112|             return false;
#  113|           }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def139]
elfutils-0.194/libdwfl/frame_unwind.c:246:15: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  244|   	  if (! pop (&val1) || ! push (val1) || ! push (val1))
#  245|   	    {
#  246|-> 	      free (stack.addrs);
#  247|   	      return false;
#  248|   	    }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def140]
elfutils-0.194/libdwfl/frame_unwind.c:274:15: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  272|   	      || ! push (val2) || ! push (val1) || ! push (val2))
#  273|   	    {
#  274|-> 	      free (stack.addrs);
#  275|   	      return false;
#  276|   	    }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def141]
elfutils-0.194/libdwfl/frame_unwind.c:281:15: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  279|   	  if (! pop (&val1) || ! pop (&val2) || ! push (val1) || ! push (val2))
#  280|   	    {
#  281|-> 	      free (stack.addrs);
#  282|   	      return false;
#  283|   	    }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def142]
elfutils-0.194/libdwfl/frame_unwind.c:291:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  289|   		|| ! push (val1) || ! push (val3) || ! push (val2))
#  290|   	      {
#  291|-> 		free (stack.addrs);
#  292|   		return false;
#  293|   	      }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def143]
elfutils-0.194/libdwfl/frame_unwind.c:345:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  343|   	    }								\
#  344|   	  break;
#  345|-> 	UNOP (DW_OP_abs, llabs ((int64_t) val1))
#  346|   	UNOP (DW_OP_neg, -(int64_t) val1)
#  347|   	UNOP (DW_OP_not, ~val1)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def144]
elfutils-0.194/libdwfl/frame_unwind.c:346:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  344|   	  break;
#  345|   	UNOP (DW_OP_abs, llabs ((int64_t) val1))
#  346|-> 	UNOP (DW_OP_neg, -(int64_t) val1)
#  347|   	UNOP (DW_OP_not, ~val1)
#  348|   #undef UNOP

Error: GCC_ANALYZER_WARNING (CWE-415): [#def145]
elfutils-0.194/libdwfl/frame_unwind.c:347:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  345|   	UNOP (DW_OP_abs, llabs ((int64_t) val1))
#  346|   	UNOP (DW_OP_neg, -(int64_t) val1)
#  347|-> 	UNOP (DW_OP_not, ~val1)
#  348|   #undef UNOP
#  349|   	case DW_OP_plus_uconst:

Error: GCC_ANALYZER_WARNING (CWE-415): [#def146]
elfutils-0.194/libdwfl/frame_unwind.c:352:15: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  350|   	  if (! pop (&val1) || ! push (val1 + op->number))
#  351|   	    {
#  352|-> 	      free (stack.addrs);
#  353|   	      return false;
#  354|   	    }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def147]
elfutils-0.194/libdwfl/frame_unwind.c:373:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  371|   	    }								\
#  372|   	  break;
#  373|-> 	BINOP (DW_OP_and, &)
#  374|   	case DW_OP_div:
#  375|   	  if (! pop (&val2) || ! pop (&val1))

Error: GCC_ANALYZER_WARNING (CWE-415): [#def148]
elfutils-0.194/libdwfl/frame_unwind.c:388:15: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  386|   	  if (! push ((int64_t) val1 / (int64_t) val2))
#  387|   	    {
#  388|-> 	      free (stack.addrs);
#  389|   	      return false;
#  390|   	    }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def149]
elfutils-0.194/libdwfl/frame_unwind.c:392:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  390|   	    }
#  391|   	  break;
#  392|-> 	BINOP (DW_OP_minus, -)
#  393|   	case DW_OP_mod:
#  394|   	  if (! pop (&val2) || ! pop (&val1))

Error: GCC_ANALYZER_WARNING (CWE-415): [#def150]
elfutils-0.194/libdwfl/frame_unwind.c:407:15: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  405|   	  if (! push (val1 % val2))
#  406|   	    {
#  407|-> 	      free (stack.addrs);
#  408|   	      return false;
#  409|   	    }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def151]
elfutils-0.194/libdwfl/frame_unwind.c:411:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  409|   	    }
#  410|   	  break;
#  411|-> 	BINOP (DW_OP_mul, *)
#  412|   	BINOP (DW_OP_or, |)
#  413|   	BINOP (DW_OP_plus, +)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def152]
elfutils-0.194/libdwfl/frame_unwind.c:412:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  410|   	  break;
#  411|   	BINOP (DW_OP_mul, *)
#  412|-> 	BINOP (DW_OP_or, |)
#  413|   	BINOP (DW_OP_plus, +)
#  414|   	BINOP (DW_OP_shl, <<)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def153]
elfutils-0.194/libdwfl/frame_unwind.c:413:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  411|   	BINOP (DW_OP_mul, *)
#  412|   	BINOP (DW_OP_or, |)
#  413|-> 	BINOP (DW_OP_plus, +)
#  414|   	BINOP (DW_OP_shl, <<)
#  415|   	BINOP (DW_OP_shr, >>)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def154]
elfutils-0.194/libdwfl/frame_unwind.c:414:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  412|   	BINOP (DW_OP_or, |)
#  413|   	BINOP (DW_OP_plus, +)
#  414|-> 	BINOP (DW_OP_shl, <<)
#  415|   	BINOP (DW_OP_shr, >>)
#  416|   	BINOP_SIGNED (DW_OP_shra, >>)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def155]
elfutils-0.194/libdwfl/frame_unwind.c:415:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  413|   	BINOP (DW_OP_plus, +)
#  414|   	BINOP (DW_OP_shl, <<)
#  415|-> 	BINOP (DW_OP_shr, >>)
#  416|   	BINOP_SIGNED (DW_OP_shra, >>)
#  417|   	BINOP (DW_OP_xor, ^)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def156]
elfutils-0.194/libdwfl/frame_unwind.c:416:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  414|   	BINOP (DW_OP_shl, <<)
#  415|   	BINOP (DW_OP_shr, >>)
#  416|-> 	BINOP_SIGNED (DW_OP_shra, >>)
#  417|   	BINOP (DW_OP_xor, ^)
#  418|   	BINOP_SIGNED (DW_OP_le, <=)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def157]
elfutils-0.194/libdwfl/frame_unwind.c:417:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  415|   	BINOP (DW_OP_shr, >>)
#  416|   	BINOP_SIGNED (DW_OP_shra, >>)
#  417|-> 	BINOP (DW_OP_xor, ^)
#  418|   	BINOP_SIGNED (DW_OP_le, <=)
#  419|   	BINOP_SIGNED (DW_OP_ge, >=)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def158]
elfutils-0.194/libdwfl/frame_unwind.c:418:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  416|   	BINOP_SIGNED (DW_OP_shra, >>)
#  417|   	BINOP (DW_OP_xor, ^)
#  418|-> 	BINOP_SIGNED (DW_OP_le, <=)
#  419|   	BINOP_SIGNED (DW_OP_ge, >=)
#  420|   	BINOP_SIGNED (DW_OP_eq, ==)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def159]
elfutils-0.194/libdwfl/frame_unwind.c:419:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  417|   	BINOP (DW_OP_xor, ^)
#  418|   	BINOP_SIGNED (DW_OP_le, <=)
#  419|-> 	BINOP_SIGNED (DW_OP_ge, >=)
#  420|   	BINOP_SIGNED (DW_OP_eq, ==)
#  421|   	BINOP_SIGNED (DW_OP_lt, <)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def160]
elfutils-0.194/libdwfl/frame_unwind.c:420:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  418|   	BINOP_SIGNED (DW_OP_le, <=)
#  419|   	BINOP_SIGNED (DW_OP_ge, >=)
#  420|-> 	BINOP_SIGNED (DW_OP_eq, ==)
#  421|   	BINOP_SIGNED (DW_OP_lt, <)
#  422|   	BINOP_SIGNED (DW_OP_gt, >)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def161]
elfutils-0.194/libdwfl/frame_unwind.c:421:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  419|   	BINOP_SIGNED (DW_OP_ge, >=)
#  420|   	BINOP_SIGNED (DW_OP_eq, ==)
#  421|-> 	BINOP_SIGNED (DW_OP_lt, <)
#  422|   	BINOP_SIGNED (DW_OP_gt, >)
#  423|   	BINOP_SIGNED (DW_OP_ne, !=)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def162]
elfutils-0.194/libdwfl/frame_unwind.c:422:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  420|   	BINOP_SIGNED (DW_OP_eq, ==)
#  421|   	BINOP_SIGNED (DW_OP_lt, <)
#  422|-> 	BINOP_SIGNED (DW_OP_gt, >)
#  423|   	BINOP_SIGNED (DW_OP_ne, !=)
#  424|   #undef BINOP

Error: GCC_ANALYZER_WARNING (CWE-415): [#def163]
elfutils-0.194/libdwfl/frame_unwind.c:423:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘stack.addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  421|   	BINOP_SIGNED (DW_OP_lt, <)
#  422|   	BINOP_SIGNED (DW_OP_gt, >)
#  423|-> 	BINOP_SIGNED (DW_OP_ne, !=)
#  424|   #undef BINOP
#  425|   #undef BINOP_SIGNED

Error: CPPCHECK_WARNING (CWE-401): [#def164]
elfutils-0.194/libdwfl/frame_unwind.c:511: error[memleak]: Memory leak: unwound
#  509|     unwound = malloc (sizeof (*unwound) + sizeof (*unwound->regs) * nregs);
#  510|     if (unlikely (unwound == NULL))
#  511|->     return NULL;
#  512|     state->unwound = unwound;
#  513|     unwound->thread = thread;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
elfutils-0.194/libdwfl/frame_unwind.c:565:10: warning[-Wanalyzer-malloc-leak]: leak of ‘new_addrs’
elfutils-0.194/libdwfl/frame_unwind.c:721:1: enter_function: entry to ‘__libdwfl_frame_unwind’
elfutils-0.194/libdwfl/frame_unwind.c:723:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:728:13: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:729:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:733:9: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:741:27: branch_false: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:742:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/frame_unwind.c:744:11: branch_true: ...to here
elfutils-0.194/libdwfl/frame_unwind.c:744:11: call_function: calling ‘handle_cfi’ from ‘__libdwfl_frame_unwind’
#  563|         Dwarf_Op reg_ops_mem[3], *reg_ops;
#  564|         size_t reg_nops;
#  565|->       if (dwarf_frame_register (frame, regno, reg_ops_mem, &reg_ops,
#  566|   				&reg_nops) != 0)
#  567|   	{

Error: GCC_ANALYZER_WARNING (CWE-775): [#def166]
elfutils-0.194/libdwfl/gzip.c:158:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d’
elfutils-0.194/libdwfl/gzip.c:146:13: acquire_resource: opened here
elfutils-0.194/libdwfl/gzip.c:147:8: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/gzip.c:149:8: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:149:8: branch_false: following ‘false’ branch (when ‘start_offset == 0’)...
elfutils-0.194/libdwfl/gzip.c:158:17: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:158:17: throw: if ‘gzdopen’ throws an exception...
elfutils-0.194/libdwfl/gzip.c:158:17: danger: ‘d’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  156|   	  }
#  157|         }
#  158|->     state->zf = gzdopen (d, "r");
#  159|       if (unlikely (state->zf == NULL))
#  160|         {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
elfutils-0.194/libdwfl/gzip.c:277:16: warning[-Wanalyzer-malloc-leak]: leak of ‘next_out’
elfutils-0.194/libdwfl/gzip.c:179:1: enter_function: entry to ‘__libdw_unzstd’
elfutils-0.194/libdwfl/gzip.c:196:6: branch_false: following ‘false’ branch (when ‘mapped’ is non-NULL)...
elfutils-0.194/libdwfl/gzip.c:225:7: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:225:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/gzip.c:245:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/gzip.c:245:6: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:263:10: branch_true: following ‘true’ branch (when ‘avail_out == 0’)...
elfutils-0.194/libdwfl/gzip.c:265:47: branch_true: ...to here
elfutils-0.194/libdwfl/gzip.c:266:16: call_function: calling ‘bigger_buffer’ from ‘__libdw_unzstd’
elfutils-0.194/libdwfl/gzip.c:266:16: return_function: returning to ‘__libdw_unzstd’ from ‘bigger_buffer’
elfutils-0.194/libdwfl/gzip.c:266:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/gzip.c:271:22: branch_true: ...to here
elfutils-0.194/libdwfl/gzip.c:277:16: throw: if ‘ZSTD_decompressStream’ throws an exception...
elfutils-0.194/libdwfl/gzip.c:277:16: danger: ‘next_out’ leaks here; was allocated at [(14)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/13)
#  275|         ZSTD_inBuffer input = { next_in, avail_in, 0 };
#  276|         ZSTD_outBuffer output = { next_out, avail_out, 0 };
#  277|->       result = ZSTD_decompressStream (dctx, &output, &input);
#  278|   
#  279|         if (! ZSTD_isError (result))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
elfutils-0.194/libdwfl/gzip.c:341:20: warning[-Wanalyzer-malloc-leak]: leak of ‘state.buffer’
elfutils-0.194/libdwfl/gzip.c:179:1: enter_function: entry to ‘__libdw_bunzip2’
elfutils-0.194/libdwfl/gzip.c:196:6: branch_false: following ‘false’ branch (when ‘mapped’ is non-NULL)...
elfutils-0.194/libdwfl/gzip.c:225:7: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:225:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/gzip.c:308:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/gzip.c:308:6: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:329:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/gzip.c:331:36: branch_true: ...to here
elfutils-0.194/libdwfl/gzip.c:332:16: call_function: calling ‘bigger_buffer’ from ‘__libdw_bunzip2’
elfutils-0.194/libdwfl/gzip.c:332:16: return_function: returning to ‘__libdw_bunzip2’ from ‘bigger_buffer’
elfutils-0.194/libdwfl/gzip.c:332:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/gzip.c:337:24: branch_true: ...to here
elfutils-0.194/libdwfl/gzip.c:341:20: throw: if ‘BZ2_bzDecompress’ throws an exception...
elfutils-0.194/libdwfl/gzip.c:341:20: danger: ‘state.buffer’ leaks here; was allocated at [(14)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/13)
#  339|   	}
#  340|       }
#  341|->   while ((result = do_inflate (&z)) == Z (OK));
#  342|   
#  343|   #ifdef BZLIB

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
elfutils-0.194/libdwfl/gzip.c:351:3: warning[-Wanalyzer-malloc-leak]: leak of ‘state.buffer’
elfutils-0.194/libdwfl/gzip.c:179:1: enter_function: entry to ‘__libdw_bunzip2’
elfutils-0.194/libdwfl/gzip.c:196:6: branch_false: following ‘false’ branch (when ‘mapped’ is non-NULL)...
elfutils-0.194/libdwfl/gzip.c:225:7: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:225:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/gzip.c:308:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/gzip.c:308:6: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:341:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/gzip.c:344:37: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:346:3: call_function: calling ‘smaller_buffer’ from ‘__libdw_bunzip2’
elfutils-0.194/libdwfl/gzip.c:346:3: return_function: returning to ‘__libdw_bunzip2’ from ‘smaller_buffer’
elfutils-0.194/libdwfl/gzip.c:351:3: throw: if ‘BZ2_bzDecompressEnd’ throws an exception...
elfutils-0.194/libdwfl/gzip.c:351:3: danger: ‘state.buffer’ leaks here; was allocated at [(12)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/11)
#  349|   #endif
#  350|   
#  351|->   inflateEnd (&z);
#  352|   
#  353|     if (result != Z (STREAM_END))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
elfutils-0.194/libdwfl/gzip.c:380:15: warning[-Wanalyzer-malloc-leak]: leak of ‘state.buffer’
elfutils-0.194/libdwfl/gzip.c:179:1: enter_function: entry to ‘__libdw_gunzip’
elfutils-0.194/libdwfl/gzip.c:196:6: branch_false: following ‘false’ branch (when ‘mapped’ is non-NULL)...
elfutils-0.194/libdwfl/gzip.c:225:7: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:225:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/gzip.c:360:23: call_function: calling ‘open_stream’ from ‘__libdw_gunzip’
elfutils-0.194/libdwfl/gzip.c:360:23: return_function: returning to ‘__libdw_gunzip’ from ‘open_stream’
elfutils-0.194/libdwfl/gzip.c:362:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/gzip.c:362:35: branch_true: ...to here
elfutils-0.194/libdwfl/gzip.c:362:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/gzip.c:362:7: branch_false: ...to here
elfutils-0.194/libdwfl/gzip.c:375:12: call_function: calling ‘bigger_buffer’ from ‘__libdw_gunzip’
elfutils-0.194/libdwfl/gzip.c:375:12: return_function: returning to ‘__libdw_gunzip’ from ‘bigger_buffer’
elfutils-0.194/libdwfl/gzip.c:375:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/gzip.c:380:53: branch_true: ...to here
elfutils-0.194/libdwfl/gzip.c:380:15: throw: if ‘gzread’ throws an exception...
elfutils-0.194/libdwfl/gzip.c:380:15: danger: ‘state.buffer’ leaks here; was allocated at [(19)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/18)
#  378|   	  return zlib_fail (&state, Z (MEM_ERROR));
#  379|   	}
#  380|->       int n = gzread (state.zf, state.buffer + pos, state.size - pos);
#  381|         if (n < 0)
#  382|   	{

Error: GCC_ANALYZER_WARNING (CWE-775): [#def171]
elfutils-0.194/libdwfl/linux-kernel-modules.c:94:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘try_kernel_name(dwfl, & archive, 0)’
elfutils-0.194/libdwfl/linux-kernel-modules.c:376:1: enter_function: entry to ‘dwfl_linux_kernel_report_offline’
elfutils-0.194/libdwfl/linux-kernel-modules.c:380:16: call_function: calling ‘report_kernel_archive’ from ‘dwfl_linux_kernel_report_offline’
#   92|   try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug)
#   93|   {
#   94|->   if (*fname == NULL)
#   95|       return -1;
#   96|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def172]
elfutils-0.194/libdwfl/linux-kernel-modules.c:104:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘<unknown>’
elfutils-0.194/libdwfl/linux-kernel-modules.c:776:1: enter_function: entry to ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:794:6: branch_true: following ‘true’ branch (when the strings are equal)...
elfutils-0.194/libdwfl/linux-kernel-modules.c:795:12: branch_true: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:795:12: call_function: calling ‘find_kernel_elf’ from ‘dwfl_linux_kernel_find_elf’
#  102|   	    : TEMP_FAILURE_RETRY (open (*fname, O_RDONLY)));
#  103|   
#  104|->   if (fd < 0)
#  105|       {
#  106|         Dwfl_Module fakemod = { .dwfl = dwfl };

Error: GCC_ANALYZER_WARNING (CWE-775): [#def173]
elfutils-0.194/libdwfl/linux-kernel-modules.c:139:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(zname, 0)’
elfutils-0.194/libdwfl/linux-kernel-modules.c:776:1: enter_function: entry to ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:794:6: branch_true: following ‘true’ branch (when the strings are equal)...
elfutils-0.194/libdwfl/linux-kernel-modules.c:795:12: branch_true: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:795:12: call_function: calling ‘find_kernel_elf’ from ‘dwfl_linux_kernel_find_elf’
#  137|   	    fd = TEMP_FAILURE_RETRY (open (zname, O_RDONLY));
#  138|   	    if (fd < 0)
#  139|-> 	      free (zname);
#  140|   	    else
#  141|   	      {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def174]
elfutils-0.194/libdwfl/linux-kernel-modules.c:589:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(notesfile, 0)’
elfutils-0.194/libdwfl/linux-kernel-modules.c:576:12: acquire_resource: opened here
elfutils-0.194/libdwfl/linux-kernel-modules.c:577:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:588:15: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:589:3: danger: ‘open(notesfile, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  587|   
#  588|     ssize_t n = read (fd, buf.data, sizeof buf);
#  589|->   close (fd);
#  590|   
#  591|     if (n <= 0)

Error: CPPCHECK_WARNING (CWE-401): [#def175]
elfutils-0.194/libdwfl/linux-kernel-modules.c:827: error[memleak]: Memory leak: alternate_name
#  825|       {
#  826|         free (modulesdir[0]);
#  827|->       return ENOMEM;
#  828|       }
#  829|     if (!subst_name ('-', '_', module_name, alternate_name, namelen) &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
elfutils-0.194/libdwfl/linux-kernel-modules.c:835:15: warning[-Wanalyzer-malloc-leak]: leak of ‘alternate_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:776:1: enter_function: entry to ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:794:6: branch_false: following ‘false’ branch (when the strings are non-equal)...
elfutils-0.194/libdwfl/linux-kernel-modules.c:799:9: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:800:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:803:14: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:804:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:810:20: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:823:26: acquire_memory: allocated here
elfutils-0.194/libdwfl/linux-kernel-modules.c:824:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: call_function: calling ‘subst_name’ from ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: return_function: returning to ‘dwfl_linux_kernel_find_elf’ from ‘subst_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: call_function: calling ‘subst_name’ from ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: return_function: returning to ‘dwfl_linux_kernel_find_elf’ from ‘subst_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:831:5: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:835:15: throw: if ‘fts_read’ throws an exception...
elfutils-0.194/libdwfl/linux-kernel-modules.c:835:15: danger: ‘alternate_name’ leaks here; was allocated at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
#  833|     FTSENT *f;
#  834|     int error = ENOENT;
#  835|->   while ((f = fts_read (fts)) != NULL)
#  836|       {
#  837|         /* Skip a "source" subtree, which tends to be large.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
elfutils-0.194/libdwfl/linux-kernel-modules.c:857:24: warning[-Wanalyzer-malloc-leak]: leak of ‘alternate_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:776:1: enter_function: entry to ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:794:6: branch_false: following ‘false’ branch (when the strings are non-equal)...
elfutils-0.194/libdwfl/linux-kernel-modules.c:799:9: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:800:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:803:14: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:804:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:810:20: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:823:26: acquire_memory: allocated here
elfutils-0.194/libdwfl/linux-kernel-modules.c:824:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: call_function: calling ‘subst_name’ from ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: return_function: returning to ‘dwfl_linux_kernel_find_elf’ from ‘subst_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: call_function: calling ‘subst_name’ from ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: return_function: returning to ‘dwfl_linux_kernel_find_elf’ from ‘subst_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:831:5: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:835:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:839:11: branch_true: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:853:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:854:28: branch_true: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:857:24: throw: if ‘open’ throws an exception...
elfutils-0.194/libdwfl/linux-kernel-modules.c:857:24: danger: ‘alternate_name’ leaks here; was allocated at [(8)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/7)
#  855|   		  || !memcmp (f->fts_name, alternate_name, namelen)))
#  856|   	    {
#  857|-> 	      int fd = open (f->fts_accpath, O_RDONLY);
#  858|   	      *file_name = strdup (f->fts_path);
#  859|   	      fts_close (fts);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
elfutils-0.194/libdwfl/linux-kernel-modules.c:858:36: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*<unknown>.fts_accpath, 0)’
elfutils-0.194/libdwfl/linux-kernel-modules.c:776:1: enter_function: entry to ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:794:6: branch_false: following ‘false’ branch (when the strings are non-equal)...
elfutils-0.194/libdwfl/linux-kernel-modules.c:799:9: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:800:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:803:14: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:804:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:810:20: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:824:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: call_function: calling ‘subst_name’ from ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: return_function: returning to ‘dwfl_linux_kernel_find_elf’ from ‘subst_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: call_function: calling ‘subst_name’ from ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: return_function: returning to ‘dwfl_linux_kernel_find_elf’ from ‘subst_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:831:5: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:835:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:839:11: branch_true: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:853:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:854:28: branch_true: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:857:24: acquire_resource: opened here
elfutils-0.194/libdwfl/linux-kernel-modules.c:859:15: throw: if ‘fts_close’ throws an exception...
elfutils-0.194/libdwfl/linux-kernel-modules.c:858:36: danger: ‘open(*<unknown>.fts_accpath, 0)’ leaks here; was opened at [(30)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/29)
#  856|   	    {
#  857|   	      int fd = open (f->fts_accpath, O_RDONLY);
#  858|-> 	      *file_name = strdup (f->fts_path);
#  859|   	      fts_close (fts);
#  860|   	      free (modulesdir[0]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
elfutils-0.194/libdwfl/linux-kernel-modules.c:859:15: warning[-Wanalyzer-malloc-leak]: leak of ‘alternate_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:776:1: enter_function: entry to ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:794:6: branch_false: following ‘false’ branch (when the strings are non-equal)...
elfutils-0.194/libdwfl/linux-kernel-modules.c:799:9: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:800:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:803:14: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:804:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:810:20: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:823:26: acquire_memory: allocated here
elfutils-0.194/libdwfl/linux-kernel-modules.c:824:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: call_function: calling ‘subst_name’ from ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: return_function: returning to ‘dwfl_linux_kernel_find_elf’ from ‘subst_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: call_function: calling ‘subst_name’ from ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: return_function: returning to ‘dwfl_linux_kernel_find_elf’ from ‘subst_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:831:5: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:835:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:839:11: branch_true: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:853:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:854:28: branch_true: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:859:15: throw: if ‘fts_close’ throws an exception...
elfutils-0.194/libdwfl/linux-kernel-modules.c:859:15: danger: ‘alternate_name’ leaks here; was allocated at [(8)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/7)
#  857|   	      int fd = open (f->fts_accpath, O_RDONLY);
#  858|   	      *file_name = strdup (f->fts_path);
#  859|-> 	      fts_close (fts);
#  860|   	      free (modulesdir[0]);
#  861|   	      free (alternate_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
elfutils-0.194/libdwfl/linux-kernel-modules.c:885:3: warning[-Wanalyzer-malloc-leak]: leak of ‘alternate_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:776:1: enter_function: entry to ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:794:6: branch_false: following ‘false’ branch (when the strings are non-equal)...
elfutils-0.194/libdwfl/linux-kernel-modules.c:799:9: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:800:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:803:14: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:804:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:810:20: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:823:26: acquire_memory: allocated here
elfutils-0.194/libdwfl/linux-kernel-modules.c:824:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: call_function: calling ‘subst_name’ from ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:8: return_function: returning to ‘dwfl_linux_kernel_find_elf’ from ‘subst_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: call_function: calling ‘subst_name’ from ‘dwfl_linux_kernel_find_elf’
elfutils-0.194/libdwfl/linux-kernel-modules.c:830:8: return_function: returning to ‘dwfl_linux_kernel_find_elf’ from ‘subst_name’
elfutils-0.194/libdwfl/linux-kernel-modules.c:829:7: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-kernel-modules.c:831:5: branch_false: ...to here
elfutils-0.194/libdwfl/linux-kernel-modules.c:885:3: throw: if ‘fts_close’ throws an exception...
elfutils-0.194/libdwfl/linux-kernel-modules.c:885:3: danger: ‘alternate_name’ leaks here; was allocated at [(8)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/7)
#  883|       }
#  884|   
#  885|->   fts_close (fts);
#  886|     free (modulesdir[0]);
#  887|     free (alternate_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
elfutils-0.194/libdwfl/linux-pid-attach.c:455:3: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&name)’
elfutils-0.194/libdwfl/linux-pid-attach.c:403:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:415:9: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:433:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
elfutils-0.194/libdwfl/linux-pid-attach.c:440:11: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:441:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:446:14: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:446:14: acquire_memory: allocated here
elfutils-0.194/libdwfl/linux-pid-attach.c:447:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:454:7: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:455:3: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:456:16: branch_true: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:456:16: throw: if ‘open’ throws an exception...
elfutils-0.194/libdwfl/linux-pid-attach.c:455:3: danger: ‘opendir(&name)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  453|     Elf *elf;
#  454|     i = snprintf (name, sizeof (name), "/proc/%ld/exe", (long) pid);
#  455|->   assert (i > 0 && i < (ssize_t) sizeof (name) - 1);
#  456|     int elf_fd = open (name, O_RDONLY);
#  457|     if (elf_fd >= 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def182]
elfutils-0.194/libdwfl/linux-pid-attach.c:459:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&name, 0)’
elfutils-0.194/libdwfl/linux-pid-attach.c:403:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:415:9: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:433:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
elfutils-0.194/libdwfl/linux-pid-attach.c:440:11: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:441:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:446:14: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:447:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:454:7: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:455:3: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:456:16: branch_true: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:456:16: acquire_resource: opened here
elfutils-0.194/libdwfl/linux-pid-attach.c:457:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:459:13: branch_true: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:459:13: throw: if ‘elf_begin’ throws an exception...
elfutils-0.194/libdwfl/linux-pid-attach.c:459:13: danger: ‘open(&name, 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/10)
#  457|     if (elf_fd >= 0)
#  458|       {
#  459|->       elf = elf_begin (elf_fd, ELF_C_READ_MMAP, NULL);
#  460|         if (elf == NULL)
#  461|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
elfutils-0.194/libdwfl/linux-pid-attach.c:486:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pid_arg’
elfutils-0.194/libdwfl/linux-pid-attach.c:403:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:415:9: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:433:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
elfutils-0.194/libdwfl/linux-pid-attach.c:440:11: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:441:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:446:14: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:447:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:454:7: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:455:3: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:456:16: branch_true: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:457:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:459:13: branch_true: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:460:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-pid-attach.c:471:39: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:471:39: acquire_memory: allocated here
elfutils-0.194/libdwfl/linux-pid-attach.c:472:6: branch_false: following ‘false’ branch (when ‘pid_arg’ is non-NULL)...
elfutils-0.194/libdwfl/linux-pid-attach.c:480:3: branch_false: ...to here
elfutils-0.194/libdwfl/linux-pid-attach.c:486:9: throw: if ‘dwfl_attach_state’ throws an exception...
elfutils-0.194/libdwfl/linux-pid-attach.c:486:9: danger: ‘pid_arg’ leaks here; was allocated at [(15)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/14)
#  484|     pid_arg->tid_attached = 0;
#  485|     pid_arg->assume_ptrace_stopped = assume_ptrace_stopped;
#  486|->   if (! INTUSE(dwfl_attach_state) (dwfl, elf, pid, &pid_thread_callbacks,
#  487|   				   pid_arg))
#  488|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def184]
elfutils-0.194/libdwfl/linux-proc-maps.c:67:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 0)’
elfutils-0.194/libdwfl/linux-proc-maps.c:60:1: enter_function: entry to ‘get_pid_class’
elfutils-0.194/libdwfl/linux-proc-maps.c:63:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-proc-maps.c:66:12: branch_false: ...to here
elfutils-0.194/libdwfl/linux-proc-maps.c:66:12: acquire_resource: opened here
elfutils-0.194/libdwfl/linux-proc-maps.c:68:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-proc-maps.c:72:19: branch_false: ...to here
elfutils-0.194/libdwfl/linux-proc-maps.c:72:19: call_function: calling ‘pread_retry’ from ‘get_pid_class’
#   65|   
#   66|     int fd = open (fname, O_RDONLY);
#   67|->   free (fname);
#   68|     if (fd < 0)
#   69|       return ELFCLASSNONE;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def185]
elfutils-0.194/libdwfl/linux-proc-maps.c:103:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 0)’
elfutils-0.194/libdwfl/linux-proc-maps.c:96:1: enter_function: entry to ‘grovel_auxv’
elfutils-0.194/libdwfl/linux-proc-maps.c:99:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-proc-maps.c:102:12: branch_false: ...to here
elfutils-0.194/libdwfl/linux-proc-maps.c:102:12: acquire_resource: opened here
elfutils-0.194/libdwfl/linux-proc-maps.c:104:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-proc-maps.c:109:13: branch_false: ...to here
elfutils-0.194/libdwfl/linux-proc-maps.c:121:15: call_function: calling ‘pread_retry’ from ‘grovel_auxv’
#  101|   
#  102|     int fd = open (fname, O_RDONLY);
#  103|->   free (fname);
#  104|     if (fd < 0)
#  105|       return errno == ENOENT ? 0 : errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def186]
elfutils-0.194/libdwfl/linux-proc-maps.c:389:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(module_name, 0)’
elfutils-0.194/libdwfl/linux-proc-maps.c:365:6: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-proc-maps.c:373:11: branch_true: ...to here
elfutils-0.194/libdwfl/linux-proc-maps.c:381:10: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-proc-maps.c:383:20: branch_true: ...to here
elfutils-0.194/libdwfl/linux-proc-maps.c:383:20: acquire_resource: opened here
elfutils-0.194/libdwfl/linux-proc-maps.c:384:14: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-proc-maps.c:386:28: branch_true: ...to here
elfutils-0.194/libdwfl/linux-proc-maps.c:387:18: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-proc-maps.c:389:19: branch_true: ...to here
elfutils-0.194/libdwfl/linux-proc-maps.c:389:19: danger: ‘open(module_name, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  387|   	      if (*file_name == NULL)
#  388|   		{
#  389|-> 		  close (fd);
#  390|   		  return ENOMEM;
#  391|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def187]
elfutils-0.194/libdwfl/linux-proc-maps.c:425:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
elfutils-0.194/libdwfl/linux-proc-maps.c:397:7: branch_true: following ‘true’ branch...
elfutils-0.194/libdwfl/linux-proc-maps.c:402:12: branch_true: ...to here
elfutils-0.194/libdwfl/linux-proc-maps.c:417:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-proc-maps.c:420:16: branch_false: ...to here
elfutils-0.194/libdwfl/linux-proc-maps.c:420:16: acquire_resource: opened here
elfutils-0.194/libdwfl/linux-proc-maps.c:422:10: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl/linux-proc-maps.c:425:45: branch_false: ...to here
elfutils-0.194/libdwfl/linux-proc-maps.c:425:15: throw: if ‘elf_from_remote_memory’ throws an exception...
elfutils-0.194/libdwfl/linux-proc-maps.c:425:15: danger: ‘fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  423|   	goto detach;
#  424|   
#  425|->       *elfp = elf_from_remote_memory (base, sysconf (_SC_PAGESIZE), NULL,
#  426|   				      &read_proc_memory, &fd);
#  427|   

Error: CPPCHECK_WARNING (CWE-401): [#def188]
elfutils-0.194/libdwfl/segment.c:68: error[memleak]: Memory leak: naddr
#   66|         GElf_Addr *naddr = realloc (dwfl->lookup_addr, sizeof naddr[0] * n);
#   67|         if (unlikely (naddr == NULL))
#   68|-> 	return true;
#   69|         int *nsegndx = realloc (dwfl->lookup_segndx, sizeof nsegndx[0] * n);
#   70|         if (unlikely (nsegndx == NULL))

Error: CPPCHECK_WARNING (CWE-401): [#def189]
elfutils-0.194/libdwfl/segment.c:74: error[memleak]: Memory leak: nsegndx
#   72|   	  if (naddr != dwfl->lookup_addr)
#   73|   	    free (naddr);
#   74|-> 	  return true;
#   75|   	}
#   76|         dwfl->lookup_alloc = n;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:46:3: warning[-Wanalyzer-malloc-leak]: leak of ‘tracker’
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:39:37: acquire_memory: allocated here
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:40:6: branch_false: following ‘false’ branch (when ‘tracker’ is non-NULL)...
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:46:3: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:46:3: throw: if ‘dwflst_tracker_elftab_init’ throws an exception...
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:46:3: danger: ‘tracker’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   44|       }
#   45|   
#   46|->   dwflst_tracker_elftab_init (&tracker->elftab, HTAB_DEFAULT_SIZE);
#   47|     rwlock_init (tracker->elftab_lock);
#   48|     dwflst_tracker_dwfltab_init (&tracker->dwfltab, HTAB_DEFAULT_SIZE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:131:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ent’
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:101:3: branch_true: following ‘true’ branch (when ‘tracker’ is non-NULL)...
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:105:28: branch_true: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:109:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:122:9: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:122:9: acquire_memory: allocated here
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:123:6: branch_false: following ‘false’ branch (when ‘ent’ is non-NULL)...
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:129:3: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:131:7: throw: if ‘dwflst_tracker_dwfltab_insert’ throws an exception...
elfutils-0.194/libdwfl_stacktrace/dwflst_process_tracker.c:131:7: danger: ‘ent’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  129|     ent->dwfl = dwfl;
#  130|     ent->invalid = false;
#  131|->   if (dwflst_tracker_dwfltab_insert(&tracker->dwfltab, hval, ent) != 0)
#  132|       {
#  133|         free(ent);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
elfutils-0.194/libdwfl_stacktrace/dwflst_sample_frame.c:239:12: warning[-Wanalyzer-malloc-leak]: leak of ‘sample_arg’
elfutils-0.194/libdwfl_stacktrace/dwflst_sample_frame.c:214:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl_stacktrace/dwflst_sample_frame.c:221:20: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_sample_frame.c:221:20: acquire_memory: allocated here
elfutils-0.194/libdwfl_stacktrace/dwflst_sample_frame.c:222:10: branch_false: following ‘false’ branch (when ‘sample_arg’ is non-NULL)...
elfutils-0.194/libdwfl_stacktrace/dwflst_sample_frame.c:229:3: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_sample_frame.c:238:6: branch_false: following ‘false’ branch (when ‘attached == 0’)...
elfutils-0.194/libdwfl_stacktrace/dwflst_sample_frame.c:239:12: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_sample_frame.c:239:12: throw: if ‘dwfl_attach_state’ throws an exception...
elfutils-0.194/libdwfl_stacktrace/dwflst_sample_frame.c:239:12: danger: ‘sample_arg’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  237|   
#  238|     if (! attached
#  239|->       && ! INTUSE(dwfl_attach_state) (dwfl, elf, pid,
#  240|   				      &sample_thread_callbacks, sample_arg))
#  241|       return -1;

Error: CPPCHECK_WARNING (CWE-457): [#def193]
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:94: warning[uninitvar]: Uninitialized variable: sb
#   92|       rc = fstat(ent->fd, &sb);
#   93|     if (rc < 0 || strcmp (module_name, ent->module_name) != 0
#   94|->       || ent->dev != sb.st_dev || ent->ino != sb.st_ino)
#   95|       return -1;
#   96|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:149:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:120:6: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:121:10: branch_true: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:122:6: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:125:66: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:132:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:140:13: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:141:10: branch_false: following ‘false’ branch (when ‘ent’ is non-NULL)...
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:147:26: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:147:26: acquire_memory: allocated here
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:149:11: throw: if ‘dwflst_tracker_elftab_insert’ throws an exception...
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:149:11: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  147|         ent->module_name = strdup(module_name);
#  148|   
#  149|->       if (dwflst_tracker_elftab_insert(&tracker->elftab, hval, ent) != 0)
#  150|   	{
#  151|   	  free(ent->module_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:149:11: warning[-Wanalyzer-malloc-leak]: leak of ‘ent’
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:120:6: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:121:10: branch_true: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:122:6: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:125:66: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:132:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:140:13: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:140:13: acquire_memory: allocated here
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:141:10: branch_false: following ‘false’ branch (when ‘ent’ is non-NULL)...
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:147:26: branch_false: ...to here
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:149:11: throw: if ‘dwflst_tracker_elftab_insert’ throws an exception...
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:149:11: danger: ‘ent’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  147|         ent->module_name = strdup(module_name);
#  148|   
#  149|->       if (dwflst_tracker_elftab_insert(&tracker->elftab, hval, ent) != 0)
#  150|   	{
#  151|   	  free(ent->module_name);

Error: CPPCHECK_WARNING (CWE-416): [#def196]
elfutils-0.194/libdwfl_stacktrace/dwflst_tracker_find_elf.c:172: error[deallocuse]: Dereferencing 'ent' after it is deallocated / released
#  170|   	elf_end(ent->elf);
#  171|       }
#  172|->   if (elf != NULL && ent->elf != elf)
#  173|       elf->ref_count++;
#  174|     ent->elf = elf;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
elfutils-0.194/libebl/eblobjnote.c:621:19: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
elfutils-0.194/libebl/eblobjnote.c:50:6: branch_false: following ‘false’ branch...
elfutils-0.194/libebl/eblobjnote.c:54:11: branch_false: ...to here
elfutils-0.194/libebl/eblobjnote.c:54:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
elfutils-0.194/libebl/eblobjnote.c:141:11: branch_false: ...to here
elfutils-0.194/libebl/eblobjnote.c:288:10: branch_false: following ‘false’ branch...
elfutils-0.194/libebl/eblobjnote.c:291:11: branch_false: ...to here
elfutils-0.194/libebl/eblobjnote.c:301:10: branch_false: following ‘false’ branch (when the strings are equal)...
elfutils-0.194/libebl/eblobjnote.c:304:7: branch_false: ...to here
elfutils-0.194/libebl/eblobjnote.c:591:14: branch_true: following ‘true’ branch...
elfutils-0.194/libebl/eblobjnote.c:605:18: branch_true: following ‘true’ branch...
elfutils-0.194/libebl/eblobjnote.c:607:25: branch_true: ...to here
elfutils-0.194/libebl/eblobjnote.c:607:25: acquire_memory: allocated here
elfutils-0.194/libebl/eblobjnote.c:608:22: branch_false: following ‘false’ branch...
elfutils-0.194/libebl/eblobjnote.c:613:24: branch_false: ...to here
elfutils-0.194/libebl/eblobjnote.c:621:19: throw: if ‘elf32_xlatetom’ throws an exception...
elfutils-0.194/libebl/eblobjnote.c:621:19: danger: ‘buf’ leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  619|   		};
#  620|   
#  621|-> 	      if (elf32_xlatetom (&out, &in, ebl->data) != NULL)
#  622|   		{
#  623|   		  const char *os;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
elfutils-0.194/libebl/eblopenbackend.c:336:13: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
elfutils-0.194/libebl/eblopenbackend.c:284:12: acquire_memory: allocated here
elfutils-0.194/libebl/eblopenbackend.c:285:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
elfutils-0.194/libebl/eblopenbackend.c:294:3: branch_false: ...to here
elfutils-0.194/libebl/eblopenbackend.c:305:17: branch_true: following ‘true’ branch (when ‘cnt != 81’)...
elfutils-0.194/libebl/eblopenbackend.c:306:8: branch_true: ...to here
elfutils-0.194/libebl/eblopenbackend.c:322:12: branch_false: following ‘false’ branch (when ‘elf’ is non-NULL)...
elfutils-0.194/libebl/eblopenbackend.c:330:31: branch_false: ...to here
elfutils-0.194/libebl/eblopenbackend.c:335:12: branch_true: following ‘true’ branch...
elfutils-0.194/libebl/eblopenbackend.c:336:13: branch_true: ...to here
elfutils-0.194/libebl/eblopenbackend.c:336:13: throw: if the called function throws an exception...
elfutils-0.194/libebl/eblopenbackend.c:336:13: danger: ‘result’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  334|   
#  335|           if (machines[cnt].init &&
#  336|->             machines[cnt].init (elf, machine, result))
#  337|             {
#  338|               result->elf = elf;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
elfutils-0.194/libelf/elf32_updatefile.c:96:3: warning[-Wanalyzer-malloc-leak]: leak of ‘scns’
elfutils-0.194/libelf/elf32_updatefile.c:125:1: enter_function: entry to ‘__elf32_updatemmap’
elfutils-0.194/libelf/elf32_updatefile.c:162:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:166:7: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:166:6: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:167:12: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:166:7: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:172:7: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:172:7: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:177:11: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:181:10: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:188:13: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:212:6: branch_true: following ‘true’ branch (when ‘shnum != 0’)...
elfutils-0.194/libelf/elf32_updatefile.c:214:11: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:214:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:217:20: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:218:24: acquire_memory: allocated here
elfutils-0.194/libelf/elf32_updatefile.c:219:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:225:35: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:233:7: call_function: calling ‘sort_sections’ from ‘__elf32_updatemmap’
#   94|     while ((list = list->next) != NULL);
#   95|   
#   96|->   qsort (scns, scnp - scns, sizeof (*scns), compare_sections);
#   97|   }
#   98|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
elfutils-0.194/libelf/elf32_updatefile.c:97:1: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
elfutils-0.194/libelf/elf32_updatefile.c:162:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:166:7: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:212:6: branch_true: following ‘true’ branch (when ‘shnum != 0’)...
elfutils-0.194/libelf/elf32_updatefile.c:214:11: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:214:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:217:20: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:219:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:225:35: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:237:28: branch_true: following ‘true’ branch (when ‘cnt < shnum’)...
elfutils-0.194/libelf/elf32_updatefile.c:239:30: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:241:14: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:242:19: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:241:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:243:18: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:241:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:245:15: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:245:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:247:15: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:247:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:251:25: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:251:25: acquire_memory: allocated here
elfutils-0.194/libelf/elf32_updatefile.c:252:18: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:259:19: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:269:14: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:273:24: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:269:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:275:22: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:269:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:278:25: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:279:18: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:281:19: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:97:1: danger: ‘p’ leaks here; was allocated at [(21)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/20)
#   95|   
#   96|     qsort (scns, scnp - scns, sizeof (*scns), compare_sections);
#   97|-> }
#   98|   
#   99|   

Error: CPPCHECK_WARNING (CWE-401): [#def201]
elfutils-0.194/libelf/elf32_updatefile.c:222: error[memleak]: Memory leak: scns
#  220|   	{
#  221|   	  __libelf_seterrno (ELF_E_NOMEM);
#  222|-> 	  return -1;
#  223|   	}
#  224|         char *const shdr_start = ((char *) elf->map_address + elf->start_offset

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
elfutils-0.194/libelf/elf32_updatefile.c:383:29: warning[-Wanalyzer-malloc-leak]: leak of ‘converted’
elfutils-0.194/libelf/elf32_updatefile.c:162:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:166:7: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:212:6: branch_true: following ‘true’ branch (when ‘shnum != 0’)...
elfutils-0.194/libelf/elf32_updatefile.c:214:11: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:214:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:217:20: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:219:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:225:35: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:237:28: branch_true: following ‘true’ branch (when ‘cnt < shnum’)...
elfutils-0.194/libelf/elf32_updatefile.c:239:30: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:241:14: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:242:19: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:241:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:243:18: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:241:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:245:15: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:245:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:247:15: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:247:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:251:25: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:252:18: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:259:19: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:269:14: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:273:24: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:269:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:275:22: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:269:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:278:25: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:279:18: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:286:19: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:237:28: branch_false: following ‘false’ branch (when ‘cnt >= shnum’)...
elfutils-0.194/libelf/elf32_updatefile.c:237:28: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:293:28: branch_true: following ‘true’ branch (when ‘cnt < shnum’)...
elfutils-0.194/libelf/elf32_updatefile.c:295:30: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:305:14: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:308:39: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:313:14: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:313:14: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:316:17: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:317:17: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:317:17: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:318:17: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:318:17: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:322:21: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:333:20: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:340:25: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:340:24: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:350:28: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:366:32: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:366:32: branch_true: following ‘true’ branch (when ‘align <= 7’)...
elfutils-0.194/libelf/elf32_updatefile.c:367:43: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:367:43: acquire_memory: allocated here
elfutils-0.194/libelf/elf32_updatefile.c:376:32: branch_false: following ‘false’ branch (when ‘converted’ is non-NULL)...
elfutils-0.194/libelf/elf32_updatefile.c:383:31: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:383:29: throw: if the called function throws an exception...
elfutils-0.194/libelf/elf32_updatefile.c:383:29: danger: ‘converted’ leaks here; was allocated at [(53)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/52)
#  381|   			      }
#  382|   
#  383|-> 			    (*fctp) (converted, dl->data.d.d_buf, size, 1);
#  384|   
#  385|   			    /* And then write it to the mmapped file.  */

Error: CPPCHECK_WARNING (CWE-401): [#def203]
elfutils-0.194/libelf/elf32_updatefile.c:618: error[memleak]: Memory leak: tmp_phdr
#  616|   	    {
#  617|   	      __libelf_seterrno (ELF_E_NOMEM);
#  618|-> 	      return 1;
#  619|   	    }
#  620|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
elfutils-0.194/libelf/elf32_updatefile.c:622:11: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp_phdr’
elfutils-0.194/libelf/elf32_updatefile.c:583:3: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:587:7: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:587:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:591:7: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:591:6: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:592:12: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:591:7: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:600:11: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:606:10: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:614:13: branch_true: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:614:13: acquire_memory: allocated here
elfutils-0.194/libelf/elf32_updatefile.c:615:14: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf32_updatefile.c:622:13: branch_false: ...to here
elfutils-0.194/libelf/elf32_updatefile.c:622:11: throw: if the called function throws an exception...
elfutils-0.194/libelf/elf32_updatefile.c:622:11: danger: ‘tmp_phdr’ leaks here; was allocated at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#  620|   
#  621|   	  /* Write the converted ELF header in a temporary buffer.  */
#  622|-> 	  (*fctp) (tmp_phdr, elf->state.ELFW(elf,LIBELFBITS).phdr,
#  623|   		   sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum, 1);
#  624|   

Error: CPPCHECK_WARNING (CWE-401): [#def205]
elfutils-0.194/libelf/elf32_updatefile.c:678: error[memleak]: Memory leak: shdr_data_mem
#  676|   	    {
#  677|   	      __libelf_seterrno (ELF_E_NOMEM);
#  678|-> 	      return -1;
#  679|   	    }
#  680|   	  shdr_data = shdr_data_mem;

Error: CPPCHECK_WARNING (CWE-401): [#def206]
elfutils-0.194/libelf/elf32_updatefile.c:693: error[memleak]: Memory leak: scns
#  691|   	  free (shdr_data_mem);
#  692|   	  __libelf_seterrno (ELF_E_NOMEM);
#  693|-> 	  return -1;
#  694|   	}
#  695|         sort_sections (scns, list);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
elfutils-0.194/libelf/elf_compress.c:52:3: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: following ‘false’ branch (when ‘use_zstd == 0’)...
elfutils-0.194/libelf/elf_compress.c:348:12: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:348:12: call_function: calling ‘__libelf_compress_zlib’ from ‘__libelf_compress’
#   50|                       Elf_Data *cdatap)
#   51|   {
#   52|->   deflateEnd (z);
#   53|     free (out_buf);
#   54|     if (cdatap != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
elfutils-0.194/libelf/elf_compress.c:80:7: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: following ‘false’ branch (when ‘use_zstd == 0’)...
elfutils-0.194/libelf/elf_compress.c:348:12: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:348:12: call_function: calling ‘__libelf_compress_zlib’ from ‘__libelf_compress’
#   78|     if (zrc != Z_OK)
#   79|       {
#   80|->       __libelf_seterrno (ELF_E_COMPRESS_ERROR);
#   81|         return deflate_cleanup(NULL, NULL);
#   82|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
elfutils-0.194/libelf/elf_compress.c:101:15: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: following ‘false’ branch (when ‘use_zstd == 0’)...
elfutils-0.194/libelf/elf_compress.c:348:12: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:348:12: call_function: calling ‘__libelf_compress_zlib’ from ‘__libelf_compress’
#   99|   	  if (cdata.d_buf == NULL)
#  100|   	    {
#  101|-> 	      __libelf_seterrno (ELF_E_NOMEM);
#  102|   	      return deflate_cleanup (NULL, NULL);
#  103|   	    }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
elfutils-0.194/libelf/elf_compress.c:104:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cdata.d_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: following ‘false’ branch (when ‘use_zstd == 0’)...
elfutils-0.194/libelf/elf_compress.c:348:12: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:348:12: call_function: calling ‘__libelf_compress_zlib’ from ‘__libelf_compress’
#  102|   	      return deflate_cleanup (NULL, NULL);
#  103|   	    }
#  104|-> 	  if (gelf_xlatetof (scn->elf, &cdata, data, ei_data) == NULL)
#  105|   	    return deflate_cleanup (NULL, &cdata);
#  106|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
elfutils-0.194/libelf/elf_compress.c:104:15: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: following ‘false’ branch (when ‘use_zstd == 0’)...
elfutils-0.194/libelf/elf_compress.c:348:12: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:348:12: call_function: calling ‘__libelf_compress_zlib’ from ‘__libelf_compress’
#  102|   	      return deflate_cleanup (NULL, NULL);
#  103|   	    }
#  104|-> 	  if (gelf_xlatetof (scn->elf, &cdata, data, ei_data) == NULL)
#  105|   	    return deflate_cleanup (NULL, &cdata);
#  106|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
elfutils-0.194/libelf/elf_compress.c:117:23: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: following ‘false’ branch (when ‘use_zstd == 0’)...
elfutils-0.194/libelf/elf_compress.c:348:12: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:348:12: call_function: calling ‘__libelf_compress_zlib’ from ‘__libelf_compress’
#  115|   	  *orig_addralign = MAX (*orig_addralign, data->d_align);
#  116|   	  *orig_size += data->d_size;
#  117|-> 	  next_data = elf_getdata (scn, data);
#  118|   	}
#  119|         else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
elfutils-0.194/libelf/elf_compress.c:127:17: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: following ‘false’ branch (when ‘use_zstd == 0’)...
elfutils-0.194/libelf/elf_compress.c:348:12: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:348:12: call_function: calling ‘__libelf_compress_zlib’ from ‘__libelf_compress’
#  125|   	  z.avail_out = out_size - used;
#  126|   	  z.next_out = out_buf + used;
#  127|-> 	  zrc = deflate (&z, flush);
#  128|   	  if (zrc == Z_STREAM_ERROR)
#  129|   	    {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
elfutils-0.194/libelf/elf_compress.c:180:3: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_true: following ‘true’ branch (when ‘use_zstd != 0’)...
elfutils-0.194/libelf/elf_compress.c:338:14: branch_true: ...to here
elfutils-0.194/libelf/elf_compress.c:338:14: call_function: calling ‘__libelf_compress_zstd’ from ‘__libelf_compress’
#  178|   		 Elf_Data *cdatap)
#  179|   {
#  180|->   ZSTD_freeCCtx (cctx);
#  181|     free (out_buf);
#  182|     if (cdatap != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
elfutils-0.194/libelf/elf_compress.c:201:27: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_true: following ‘true’ branch (when ‘use_zstd != 0’)...
elfutils-0.194/libelf/elf_compress.c:338:14: branch_true: ...to here
elfutils-0.194/libelf/elf_compress.c:338:14: call_function: calling ‘__libelf_compress_zstd’ from ‘__libelf_compress’
#  199|     size_t used = hsize;
#  200|   
#  201|->   ZSTD_CCtx* const cctx = ZSTD_createCCtx();
#  202|     Elf_Data cdata;
#  203|     cdata.d_buf = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
elfutils-0.194/libelf/elf_compress.c:220:15: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_true: following ‘true’ branch (when ‘use_zstd != 0’)...
elfutils-0.194/libelf/elf_compress.c:338:14: branch_true: ...to here
elfutils-0.194/libelf/elf_compress.c:338:14: call_function: calling ‘__libelf_compress_zstd’ from ‘__libelf_compress’
#  218|   	  if (cdata.d_buf == NULL)
#  219|   	    {
#  220|-> 	      __libelf_seterrno (ELF_E_NOMEM);
#  221|   	      return zstd_cleanup (NULL, NULL);
#  222|   	    }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
elfutils-0.194/libelf/elf_compress.c:223:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cdata.d_buf’
elfutils-0.194/libelf/elf_compress.c:212:22: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_compress.c:217:25: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:218:14: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:223:15: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:223:15: throw: if ‘gelf_xlatetof’ throws an exception...
elfutils-0.194/libelf/elf_compress.c:223:15: danger: ‘cdata.d_buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  221|   	      return zstd_cleanup (NULL, NULL);
#  222|   	    }
#  223|-> 	  if (gelf_xlatetof (scn->elf, &cdata, data, ei_data) == NULL)
#  224|   	    return zstd_cleanup (NULL, &cdata);
#  225|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
elfutils-0.194/libelf/elf_compress.c:223:15: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_true: following ‘true’ branch (when ‘use_zstd != 0’)...
elfutils-0.194/libelf/elf_compress.c:338:14: branch_true: ...to here
elfutils-0.194/libelf/elf_compress.c:338:14: call_function: calling ‘__libelf_compress_zstd’ from ‘__libelf_compress’
#  221|   	      return zstd_cleanup (NULL, NULL);
#  222|   	    }
#  223|-> 	  if (gelf_xlatetof (scn->elf, &cdata, data, ei_data) == NULL)
#  224|   	    return zstd_cleanup (NULL, &cdata);
#  225|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
elfutils-0.194/libelf/elf_compress.c:235:23: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_true: following ‘true’ branch (when ‘use_zstd != 0’)...
elfutils-0.194/libelf/elf_compress.c:338:14: branch_true: ...to here
elfutils-0.194/libelf/elf_compress.c:338:14: call_function: calling ‘__libelf_compress_zstd’ from ‘__libelf_compress’
#  233|   	  *orig_addralign = MAX (*orig_addralign, data->d_align);
#  234|   	  *orig_size += data->d_size;
#  235|-> 	  next_data = elf_getdata (scn, data);
#  236|   	}
#  237|         else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
elfutils-0.194/libelf/elf_compress.c:244:24: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
elfutils-0.194/libelf/elf_compress.c:296:1: enter_function: entry to ‘__libelf_compress’
elfutils-0.194/libelf/elf_compress.c:307:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:315:25: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:328:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:329:6: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
elfutils-0.194/libelf/elf_compress.c:335:6: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:335:6: branch_true: following ‘true’ branch (when ‘use_zstd != 0’)...
elfutils-0.194/libelf/elf_compress.c:338:14: branch_true: ...to here
elfutils-0.194/libelf/elf_compress.c:338:14: call_function: calling ‘__libelf_compress_zstd’ from ‘__libelf_compress’
#  242|   	{
#  243|   	  ZSTD_outBuffer ob = { out_buf + used, out_size - used, 0 };
#  244|-> 	  size_t ret = ZSTD_compressStream2 (cctx, &ob, &ib, mode);
#  245|   	  if (ZSTD_isError (ret))
#  246|   	    {

Error: CPPCHECK_WARNING (CWE-401): [#def221]
elfutils-0.194/libelf/elf_compress.c:375: error[memleak]: Memory leak: buf_out
#  373|       {
#  374|         __libelf_seterrno (ELF_E_NOMEM);
#  375|->       return NULL;
#  376|       }
#  377|   

Error: CPPCHECK_WARNING (CWE-401): [#def222]
elfutils-0.194/libelf/elf_compress.c:421: error[memleak]: Memory leak: buf_out
#  419|       {
#  420|         __libelf_seterrno (ELF_E_NOMEM);
#  421|->       return NULL;
#  422|       }
#  423|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
elfutils-0.194/libelf/elf_compress.c:424:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buf_out’
elfutils-0.194/libelf/elf_compress.c:417:19: acquire_memory: allocated here
elfutils-0.194/libelf/elf_compress.c:418:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_compress.c:424:16: branch_false: ...to here
elfutils-0.194/libelf/elf_compress.c:424:16: throw: if ‘ZSTD_decompress’ throws an exception...
elfutils-0.194/libelf/elf_compress.c:424:16: danger: ‘buf_out’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  422|       }
#  423|   
#  424|->   size_t ret = ZSTD_decompress (buf_out, size_out, buf_in, size_in);
#  425|     if (unlikely (ZSTD_isError (ret)) || unlikely (ret != size_out))
#  426|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
elfutils-0.194/libelf/elf_getarsym.c:220:19: warning[-Wanalyzer-malloc-leak]: leak of ‘temp_data’
elfutils-0.194/libelf/elf_getarsym.c:73:1: enter_function: entry to ‘elf_getarsym’
elfutils-0.194/libelf/elf_getarsym.c:75:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:82:6: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:87:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:95:6: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:95:6: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getarsym.c:101:7: branch_true: ...to here
elfutils-0.194/libelf/elf_getarsym.c:107:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:125:49: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:125:14: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:133:44: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:137:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:150:19: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:152:15: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getarsym.c:166:16: branch_true: ...to here
elfutils-0.194/libelf/elf_getarsym.c:168:11: call_function: calling ‘read_number_entries’ from ‘elf_getarsym’
elfutils-0.194/libelf/elf_getarsym.c:168:11: return_function: returning to ‘elf_getarsym’ from ‘read_number_entries’
elfutils-0.194/libelf/elf_getarsym.c:168:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:178:23: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:182:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:183:14: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:182:11: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:187:18: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:182:11: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:196:27: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:198:10: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getarsym.c:202:18: branch_true: ...to here
elfutils-0.194/libelf/elf_getarsym.c:204:14: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getarsym.c:206:27: branch_true: ...to here
elfutils-0.194/libelf/elf_getarsym.c:206:27: acquire_memory: allocated here
elfutils-0.194/libelf/elf_getarsym.c:207:18: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getarsym.c:214:29: branch_false: ...to here
elfutils-0.194/libelf/elf_getarsym.c:216:18: branch_true: following ‘true’ branch (when ‘newp’ is NULL)...
elfutils-0.194/libelf/elf_getarsym.c:218:19: branch_true: ...to here
elfutils-0.194/libelf/elf_getarsym.c:220:19: throw: if ‘__libelf_seterrno’ throws an exception...
elfutils-0.194/libelf/elf_getarsym.c:220:19: danger: ‘temp_data’ leaks here; was allocated at [(33)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/32)
#  218|   		  free (elf->state.ar.ar_sym);
#  219|   		  elf->state.ar.ar_sym = NULL;
#  220|-> 		  __libelf_seterrno (ELF_E_NOMEM);
#  221|   		  goto out;
#  222|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
elfutils-0.194/libelf/elf_getdata.c:194:7: warning[-Wanalyzer-malloc-leak]: leak of ‘rawdata_source’
elfutils-0.194/libelf/elf_getdata.c:438:1: enter_function: entry to ‘__libelf_set_data_list_rdlock’
elfutils-0.194/libelf/elf_getdata.c:440:6: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getdata.c:455:7: call_function: calling ‘convert_data’ from ‘__libelf_set_data_list_rdlock’
#  192|         fp = __elf_xfctstom[eclass - 1][type];
#  193|   
#  194|->       fp (scn->data_base, rawdata_source, size, 0);
#  195|   
#  196|         if (rawdata_source != scn->rawdata_base)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
elfutils-0.194/libelf/elf_getdata_rawchunk.c:197:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
elfutils-0.194/libelf/elf_getdata_rawchunk.c:60:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:63:7: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:63:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:70:7: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:70:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:79:6: branch_false: following ‘false’ branch (when ‘type <= 27’)...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:94:3: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:100:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:104:7: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:120:10: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:163:7: branch_true: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:163:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:186:10: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:186:10: branch_false: following ‘false’ branch (when ‘flags == 0’)...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:190:20: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:190:20: acquire_memory: allocated here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:191:14: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:197:24: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:197:7: throw: if the called function throws an exception...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:197:7: danger: ‘buffer’ leaks here; was allocated at [(17)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/16)
#  195|   
#  196|         /* Call the conversion function.  */
#  197|->       (*__elf_xfctstom[elf->class - 1][type])(buffer, rawchunk, size, 0);
#  198|   
#  199|         if (!flags)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
elfutils-0.194/libelf/elf_getdata_rawchunk.c:197:7: warning[-Wanalyzer-malloc-leak]: leak of ‘rawchunk’
elfutils-0.194/libelf/elf_getdata_rawchunk.c:60:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:63:7: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:63:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:70:7: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:70:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:79:6: branch_false: following ‘false’ branch (when ‘type <= 27’)...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:94:3: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:100:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:104:7: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:116:6: branch_true: following ‘true’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:119:42: branch_true: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:120:10: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:125:22: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:125:22: acquire_memory: allocated here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:126:14: branch_false: following ‘false’ branch (when ‘rawchunk’ is non-NULL)...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:128:11: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:163:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:186:10: branch_false: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:186:10: branch_true: following ‘true’ branch (when ‘flags != 0’)...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:197:24: branch_true: ...to here
elfutils-0.194/libelf/elf_getdata_rawchunk.c:197:7: throw: if the called function throws an exception...
elfutils-0.194/libelf/elf_getdata_rawchunk.c:197:7: danger: ‘rawchunk’ leaks here; was allocated at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
#  195|   
#  196|         /* Call the conversion function.  */
#  197|->       (*__elf_xfctstom[elf->class - 1][type])(buffer, rawchunk, size, 0);
#  198|   
#  199|         if (!flags)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def228]
elfutils-0.194/libelf/nlist.c:83:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
elfutils-0.194/libelf/nlist.c:73:8: acquire_resource: opened here
elfutils-0.194/libelf/nlist.c:74:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/nlist.c:83:3: branch_false: ...to here
elfutils-0.194/libelf/nlist.c:83:3: throw: if ‘elf_version’ throws an exception...
elfutils-0.194/libelf/nlist.c:83:3: danger: ‘open(filename, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   81|        we don't expect the caller to set the ELF version.  Do this here
#   82|        as if it hasn't happened yet.  */
#   83|->   INTUSE(elf_version) (EV_CURRENT);
#   84|   
#   85|     /* Now get an ELF descriptor.  */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def229]
elfutils-0.194/libelf/nlist.c:86:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
elfutils-0.194/libelf/nlist.c:73:8: acquire_resource: opened here
elfutils-0.194/libelf/nlist.c:74:6: branch_false: following ‘false’ branch...
elfutils-0.194/libelf/nlist.c:83:3: branch_false: ...to here
elfutils-0.194/libelf/nlist.c:86:9: throw: if ‘elf_begin’ throws an exception...
elfutils-0.194/libelf/nlist.c:86:9: danger: ‘open(filename, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   84|   
#   85|     /* Now get an ELF descriptor.  */
#   86|->   elf = INTUSE(elf_begin) (fd, ELF_C_READ_MMAP, NULL);
#   87|     if (elf == NULL)
#   88|       goto fail_fd;

Error: COMPILER_WARNING: [#def230]
elfutils-0.194/src/ar.c: scope_hint: In function ‘do_oper_extract’
elfutils-0.194/src/ar.c:459:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  459 | do_oper_extract (int oper, const char *arfname, char **argv, int argc,
#      | ^
#  457|   
#  458|   static int
#  459|-> do_oper_extract (int oper, const char *arfname, char **argv, int argc,
#  460|   		 long int instance)
#  461|   {

Error: COMPILER_WARNING: [#def231]
elfutils-0.194/src/ar.c: scope_hint: In function ‘do_oper_delete’
elfutils-0.194/src/ar.c:916:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  916 | do_oper_delete (const char *arfname, char **argv, int argc,
#      | ^
#  914|   
#  915|   static int
#  916|-> do_oper_delete (const char *arfname, char **argv, int argc,
#  917|   		long int instance)
#  918|   {

Error: COMPILER_WARNING: [#def232]
elfutils-0.194/src/ar.c: scope_hint: In function ‘no0print’
elfutils-0.194/src/ar.c:1091:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 1091 | no0print (bool ofmt, char *buf, int bufsize, long int val)
#      | ^
# 1089|      Returns false if the given value doesn't fit in the given buffer.  */
# 1090|   static bool
# 1091|-> no0print (bool ofmt, char *buf, int bufsize, long int val)
# 1092|   {
# 1093|     char tmpbuf[bufsize + 1];

Error: COMPILER_WARNING: [#def233]
elfutils-0.194/src/ar.c: scope_hint: In function ‘do_oper_insert’
elfutils-0.194/src/ar.c:1104:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 1104 | do_oper_insert (int oper, const char *arfname, char **argv, int argc,
#      | ^
# 1102|   
# 1103|   static int
# 1104|-> do_oper_insert (int oper, const char *arfname, char **argv, int argc,
# 1105|   		const char *member)
# 1106|   {

Error: CPPCHECK_WARNING (CWE-457): [#def234]
elfutils-0.194/src/arlib.c:174: error[legacyUninitvar]: Uninitialized variable: tmpbuf
#  172|   
#  173|     /* See comment for ar_date above.  */
#  174|->   memcpy (&((struct ar_hdr *) symtab.symsoff)->ar_size, tmpbuf,
#  175|   	  snprintf (tmpbuf, sizeof (tmpbuf), "%-*" PRIu32 "",
#  176|   		    (int) sizeof (((struct ar_hdr *) NULL)->ar_size),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
elfutils-0.194/src/elfclassify.c:74:5: warning[-Wanalyzer-malloc-leak]: leak of ‘full_path’
elfutils-0.194/src/elfclassify.c:827:1: enter_function: entry to ‘check_ar_members’
elfutils-0.194/src/elfclassify.c:836:21: acquire_memory: allocated here
elfutils-0.194/src/elfclassify.c:837:6: branch_false: following ‘false’ branch (when ‘full_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:837:6: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:846:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:848:26: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:849:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfclassify.c:857:23: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:857:23: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:858:23: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:858:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:860:11: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:862:14: branch_false: following ‘false’ branch (when ‘new_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:872:11: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:872:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfclassify.c:882:7: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:883:11: call_function: calling ‘run_classify’ from ‘check_ar_members’
#   72|   {
#   73|     if (verbose >= 0)
#   74|->     error (0, 0, "%s: %s: '%s'", msg, elf_errmsg (-1), current_path);
#   75|     issue_found = true;
#   76|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
elfutils-0.194/src/elfclassify.c:243:21: warning[-Wanalyzer-malloc-leak]: leak of ‘full_path’
elfutils-0.194/src/elfclassify.c:827:1: enter_function: entry to ‘check_ar_members’
elfutils-0.194/src/elfclassify.c:836:21: acquire_memory: allocated here
elfutils-0.194/src/elfclassify.c:837:6: branch_false: following ‘false’ branch (when ‘full_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:837:6: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:846:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:848:26: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:849:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfclassify.c:857:23: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:857:23: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:858:23: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:858:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:860:11: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:862:14: branch_false: following ‘false’ branch (when ‘new_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:872:11: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:872:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfclassify.c:882:7: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:883:11: call_function: calling ‘run_classify’ from ‘check_ar_members’
#  241|   
#  242|     GElf_Ehdr ehdr_storage;
#  243|->   GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_storage);
#  244|     if (ehdr == NULL)
#  245|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def237]
elfutils-0.194/src/elfclassify.c:255:9: warning[-Wanalyzer-malloc-leak]: leak of ‘full_path’
elfutils-0.194/src/elfclassify.c:827:1: enter_function: entry to ‘check_ar_members’
elfutils-0.194/src/elfclassify.c:836:21: acquire_memory: allocated here
elfutils-0.194/src/elfclassify.c:837:6: branch_false: following ‘false’ branch (when ‘full_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:837:6: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:846:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:848:26: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:849:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfclassify.c:857:23: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:857:23: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:858:23: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:858:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:860:11: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:862:14: branch_false: following ‘false’ branch (when ‘new_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:872:11: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:872:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfclassify.c:882:7: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:883:11: call_function: calling ‘run_classify’ from ‘check_ar_members’
#  253|     {
#  254|       size_t nphdrs;
#  255|->     if (elf_getphdrnum (elf, &nphdrs) != 0)
#  256|         {
#  257|   	elf_issue (N_("program headers"));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
elfutils-0.194/src/elfclassify.c:263:27: warning[-Wanalyzer-malloc-leak]: leak of ‘full_path’
elfutils-0.194/src/elfclassify.c:827:1: enter_function: entry to ‘check_ar_members’
elfutils-0.194/src/elfclassify.c:836:21: acquire_memory: allocated here
elfutils-0.194/src/elfclassify.c:837:6: branch_false: following ‘false’ branch (when ‘full_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:837:6: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:846:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:848:26: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:849:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfclassify.c:857:23: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:857:23: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:858:23: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:858:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:860:11: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:862:14: branch_false: following ‘false’ branch (when ‘new_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:872:11: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:872:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfclassify.c:882:7: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:883:11: call_function: calling ‘run_classify’ from ‘check_ar_members’
#  261|         {
#  262|   	GElf_Phdr phdr_storage;
#  263|-> 	GElf_Phdr *phdr = gelf_getphdr (elf, phdr_idx, &phdr_storage);
#  264|   	if (phdr == NULL)
#  265|   	  {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def239]
elfutils-0.194/src/elfclassify.c:284:9: warning[-Wanalyzer-malloc-leak]: leak of ‘full_path’
elfutils-0.194/src/elfclassify.c:827:1: enter_function: entry to ‘check_ar_members’
elfutils-0.194/src/elfclassify.c:836:21: acquire_memory: allocated here
elfutils-0.194/src/elfclassify.c:837:6: branch_false: following ‘false’ branch (when ‘full_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:837:6: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:846:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:848:26: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:849:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfclassify.c:857:23: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:857:23: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:858:23: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:858:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:860:11: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:862:14: branch_false: following ‘false’ branch (when ‘new_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:872:11: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:872:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfclassify.c:882:7: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:883:11: call_function: calling ‘run_classify’ from ‘check_ar_members’
#  282|     {
#  283|       size_t nshdrs;
#  284|->     if (elf_getshdrnum (elf, &nshdrs) != 0)
#  285|         {
#  286|   	elf_issue (N_("section headers"));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def240]
elfutils-0.194/src/elfclassify.c:846:17: warning[-Wanalyzer-malloc-leak]: leak of ‘full_path’
elfutils-0.194/src/elfclassify.c:836:21: acquire_memory: allocated here
elfutils-0.194/src/elfclassify.c:837:6: branch_false: following ‘false’ branch (when ‘full_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:837:6: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:846:17: throw: if ‘elf_begin’ throws an exception...
elfutils-0.194/src/elfclassify.c:846:17: danger: ‘full_path’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  844|     int cmd = ELF_C_READ;
#  845|     bool bad_ar = false;
#  846|->   while ((elf = elf_begin (file_fd, cmd, ar_elf)) != NULL)
#  847|       {
#  848|         Elf_Arhdr *arhdr = elf_getarhdr (elf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
elfutils-0.194/src/elfclassify.c:848:26: warning[-Wanalyzer-malloc-leak]: leak of ‘full_path’
elfutils-0.194/src/elfclassify.c:836:21: acquire_memory: allocated here
elfutils-0.194/src/elfclassify.c:837:6: branch_false: following ‘false’ branch (when ‘full_path’ is non-NULL)...
elfutils-0.194/src/elfclassify.c:837:6: branch_false: ...to here
elfutils-0.194/src/elfclassify.c:846:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfclassify.c:848:26: branch_true: ...to here
elfutils-0.194/src/elfclassify.c:848:26: throw: if ‘elf_getarhdr’ throws an exception...
elfutils-0.194/src/elfclassify.c:848:26: danger: ‘full_path’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  846|     while ((elf = elf_begin (file_fd, cmd, ar_elf)) != NULL)
#  847|       {
#  848|->       Elf_Arhdr *arhdr = elf_getarhdr (elf);
#  849|         if (arhdr == NULL)
#  850|   	{

Error: COMPILER_WARNING: [#def242]
elfutils-0.194/src/elfcmp.c: scope_hint: In function ‘main’
elfutils-0.194/src/elfcmp.c:122:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  122 | main (int argc, char *argv[])
#      | ^
#  120|   
#  121|   int
#  122|-> main (int argc, char *argv[])
#  123|   {
#  124|     /* Set locale.  */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def243]
elfutils-0.194/src/elfcmp.c:732:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 0)’
elfutils-0.194/src/elfcmp.c:731:12: acquire_resource: opened here
elfutils-0.194/src/elfcmp.c:732:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcmp.c:734:14: branch_false: ...to here
elfutils-0.194/src/elfcmp.c:734:14: throw: if ‘elf_begin’ throws an exception...
elfutils-0.194/src/elfcmp.c:732:7: danger: ‘open(fname, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  730|   {
#  731|     int fd = open (fname, O_RDONLY);
#  732|->   if (unlikely (fd == -1))
#  733|       error (2, errno, _("cannot open '%s'"), fname);
#  734|     Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def244]
elfutils-0.194/src/elfcompress.c:371:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 0)’
elfutils-0.194/src/elfcompress.c:364:8: acquire_resource: opened here
elfutils-0.194/src/elfcompress.c:365:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:371:9: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:371:9: throw: if ‘elf_begin’ throws an exception...
elfutils-0.194/src/elfcompress.c:371:9: danger: ‘open(fname, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  369|       }
#  370|   
#  371|->   elf = elf_begin (fd, ELF_C_READ, NULL);
#  372|     if (elf == NULL)
#  373|       {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def245]
elfutils-0.194/src/elfcompress.c:769:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘snamebuf’
elfutils-0.194/src/elfcompress.c:331:1: enter_function: entry to ‘process_file’
elfutils-0.194/src/elfcompress.c:365:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:371:9: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:372:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:380:19: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:381:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:391:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:391:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:398:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:398:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:406:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:406:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:414:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:414:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:421:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:421:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:427:23: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:430:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:443:3: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:595:6: branch_false: following ‘false’ branch (when ‘adjust_names == 0’)...
elfutils-0.194/src/elfcompress.c:609:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:622:6: branch_false: following ‘false’ branch (when ‘fdnew >= 0’)...
elfutils-0.194/src/elfcompress.c:631:12: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:632:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:640:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:640:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:647:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:647:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:653:30: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:660:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:667:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:694:6: branch_false: following ‘false’ branch (when ‘maxnamelen == 0’)...
elfutils-0.194/src/elfcompress.c:717:9: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:717:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:719:20: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:720:7: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:725:11: call_function: inlined call to ‘get_section’ from ‘process_file’
elfutils-0.194/src/elfcompress.c:725:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:728:29: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:729:14: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:735:20: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:737:14: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:745:19: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:751:14: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:758:40: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:765:18: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:767:22: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:767:22: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:769:23: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:769:23: danger: dereference of NULL ‘snamebuf’
#  767|   		  if (schtype == ZLIB_GNU)
#  768|   		    {
#  769|-> 		      snamebuf[0] = '.';
#  770|   		      strcpy (&snamebuf[1], &sname[2]);
#  771|   		      newname = snamebuf;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def246]
elfutils-0.194/src/elfcompress.c:793:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘snamebuf’
elfutils-0.194/src/elfcompress.c:331:1: enter_function: entry to ‘process_file’
elfutils-0.194/src/elfcompress.c:365:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:371:9: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:372:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:380:19: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:381:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:391:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:391:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:398:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:398:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:406:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:406:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:414:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:414:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:421:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:421:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:427:23: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:430:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:443:3: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:595:6: branch_false: following ‘false’ branch (when ‘adjust_names == 0’)...
elfutils-0.194/src/elfcompress.c:609:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:622:6: branch_false: following ‘false’ branch (when ‘fdnew >= 0’)...
elfutils-0.194/src/elfcompress.c:631:12: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:632:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:640:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:640:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:647:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:647:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:653:30: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:660:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:667:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:694:6: branch_false: following ‘false’ branch (when ‘maxnamelen == 0’)...
elfutils-0.194/src/elfcompress.c:717:9: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:717:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:719:20: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:720:7: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:725:11: call_function: inlined call to ‘get_section’ from ‘process_file’
elfutils-0.194/src/elfcompress.c:725:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:728:29: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:729:14: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:735:20: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:737:14: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:745:19: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:751:14: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:758:40: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:782:18: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:784:23: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:784:22: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:793:19: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:793:19: danger: dereference of NULL ‘snamebuf’
#  791|   		    }
#  792|   
#  793|-> 		  snamebuf[0] = '.';
#  794|   		  snamebuf[1] = 'z';
#  795|   		  strcpy (&snamebuf[2], &sname[1]);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def247]
elfutils-0.194/src/elfcompress.c:860:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘snamebuf’
elfutils-0.194/src/elfcompress.c:331:1: enter_function: entry to ‘process_file’
elfutils-0.194/src/elfcompress.c:365:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:371:9: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:372:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:380:19: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:381:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:391:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:391:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:398:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:398:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:406:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:406:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:414:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:414:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:421:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:421:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:427:23: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:430:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:443:3: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:595:6: branch_false: following ‘false’ branch (when ‘adjust_names == 0’)...
elfutils-0.194/src/elfcompress.c:609:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:622:6: branch_false: following ‘false’ branch (when ‘fdnew >= 0’)...
elfutils-0.194/src/elfcompress.c:631:12: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:632:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:640:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:640:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:647:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:647:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:653:30: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:660:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:667:7: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:694:6: branch_false: following ‘false’ branch (when ‘maxnamelen == 0’)...
elfutils-0.194/src/elfcompress.c:717:9: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:717:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:719:20: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:720:7: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:725:11: call_function: inlined call to ‘get_section’ from ‘process_file’
elfutils-0.194/src/elfcompress.c:725:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:728:29: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:729:14: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:735:20: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:737:14: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:745:19: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:751:14: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:758:40: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:849:18: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:851:22: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:851:22: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:854:27: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:854:27: call_function: calling ‘compress_section’ from ‘process_file’
elfutils-0.194/src/elfcompress.c:854:27: return_function: returning to ‘process_file’ from ‘compress_section’
elfutils-0.194/src/elfcompress.c:854:26: branch_false: following ‘false’ branch...
elfutils-0.194/src/elfcompress.c:858:26: branch_false: ...to here
elfutils-0.194/src/elfcompress.c:858:26: branch_true: following ‘true’ branch...
elfutils-0.194/src/elfcompress.c:860:27: branch_true: ...to here
elfutils-0.194/src/elfcompress.c:860:27: danger: dereference of NULL ‘snamebuf’
#  858|   		      if (schtype == ZLIB_GNU)
#  859|   			{
#  860|-> 			  snamebuf[0] = '.';
#  861|   			  strcpy (&snamebuf[1], &sname[2]);
#  862|   			  newname = snamebuf;

Error: COMPILER_WARNING: [#def248]
elfutils-0.194/src/elflint.c: scope_hint: In function ‘process_file’
elfutils-0.194/src/elflint.c:232:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  232 | process_file (int fd, Elf *elf, const char *prefix, const char *suffix,
#      | ^
#  230|   /* Process one file.  */
#  231|   static void
#  232|-> process_file (int fd, Elf *elf, const char *prefix, const char *suffix,
#  233|   	      const char *fname, size_t size, bool only_one)
#  234|   {

Error: COMPILER_WARNING: [#def249]
elfutils-0.194/src/elflint.c: scope_hint: In function ‘compare_hash_gnu_hash’
elfutils-0.194/src/elflint.c:2420:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 2420 | compare_hash_gnu_hash (Ebl *ebl, GElf_Ehdr *ehdr, size_t hash_idx,
#      | ^
# 2418|   /* Compare content of both hash tables, it must be identical.  */
# 2419|   static void
# 2420|-> compare_hash_gnu_hash (Ebl *ebl, GElf_Ehdr *ehdr, size_t hash_idx,
# 2421|   		       size_t gnu_hash_idx)
# 2422|   {

Error: COMPILER_WARNING: [#def250]
elfutils-0.194/src/elflint.c: scope_hint: In function ‘check_verdef’
elfutils-0.194/src/elflint.c:3278:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 3278 | check_verdef (Ebl *ebl, GElf_Shdr *shdr, int idx)
#      | ^
# 3276|   
# 3277|   static void
# 3278|-> check_verdef (Ebl *ebl, GElf_Shdr *shdr, int idx)
# 3279|   {
# 3280|     if (++nverdef == 2)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def251]
elfutils-0.194/src/findtextrel.c:189:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_rootdir_file(fname)’
elfutils-0.194/src/findtextrel.c:202:1: enter_function: entry to ‘process_file’
elfutils-0.194/src/findtextrel.c:206:12: call_function: calling ‘open_rootdir_file’ from ‘process_file’
elfutils-0.194/src/findtextrel.c:206:12: return_function: returning to ‘process_file’ from ‘open_rootdir_file’
elfutils-0.194/src/findtextrel.c:207:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/findtextrel.c:210:14: branch_false: ...to here
elfutils-0.194/src/findtextrel.c:210:14: throw: if ‘elf_begin’ throws an exception...
elfutils-0.194/src/findtextrel.c:189:7: danger: ‘open_rootdir_file(fname)’ leaks here; was opened at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  187|     const char *real_fname = fname;
#  188|   
#  189|->   if (fname[0] == '/' && (rootdir[0] != '/' || rootdir[1] != '\0'))
#  190|       real_fname = new_fname = xasprintf ("%s/%s", rootdir, fname);
#  191|   

Error: COMPILER_WARNING: [#def252]
elfutils-0.194/src/nm.c: scope_hint: In function ‘handle_ar’
elfutils-0.194/src/nm.c:409:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  409 | handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
#      | ^
#  407|   
#  408|   static int
#  409|-> handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
#  410|   	   const char *suffix)
#  411|   {

Error: COMPILER_WARNING: [#def253]
elfutils-0.194/src/nm.c: scope_hint: In function ‘show_symbols_sysv’
elfutils-0.194/src/nm.c:725:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  725 | show_symbols_sysv (Ebl *ebl, GElf_Word strndx, const char *fullname,
#      | ^
#  723|   /* Show symbols in SysV format.  */
#  724|   static void
#  725|-> show_symbols_sysv (Ebl *ebl, GElf_Word strndx, const char *fullname,
#  726|   		   GElf_SymX *syms, size_t nsyms, int longest_name,
#  727|   		   int longest_where)

Error: COMPILER_WARNING: [#def254]
elfutils-0.194/src/nm.c: scope_hint: In function ‘show_symbols’
elfutils-0.194/src/nm.c:1226:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 1226 | show_symbols (int fd, Ebl *ebl, GElf_Ehdr *ehdr,
#      | ^
# 1224|   
# 1225|   static void
# 1226|-> show_symbols (int fd, Ebl *ebl, GElf_Ehdr *ehdr,
# 1227|   	      Elf_Scn *scn, Elf_Scn *xndxscn,
# 1228|   	      GElf_Shdr *shdr, const char *prefix, const char *fname,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def255]
elfutils-0.194/src/nm.c:1286:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dwfl_fd’
elfutils-0.194/src/nm.c:1233:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/nm.c:1237:10: branch_false: ...to here
elfutils-0.194/src/nm.c:1267:6: branch_true: following ‘true’ branch...
elfutils-0.194/src/nm.c:1269:11: branch_true: ...to here
elfutils-0.194/src/nm.c:1269:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/nm.c:1278:25: branch_false: ...to here
elfutils-0.194/src/nm.c:1278:25: acquire_resource: opened here
elfutils-0.194/src/nm.c:1279:14: branch_true: following ‘true’ branch...
elfutils-0.194/src/nm.c:1286:22: branch_true: ...to here
elfutils-0.194/src/nm.c:1286:22: throw: if ‘dwfl_begin’ throws an exception...
elfutils-0.194/src/nm.c:1286:22: danger: ‘dwfl_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
# 1284|   		  .find_debuginfo = find_no_debuginfo
# 1285|   		};
# 1286|-> 	      dwfl = dwfl_begin (&callbacks);
# 1287|   	      if (likely (dwfl != NULL))
# 1288|   		{

Error: GCC_ANALYZER_WARNING (CWE-775): [#def256]
elfutils-0.194/src/nm.c:1292:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dwfl_fd’
elfutils-0.194/src/nm.c:1233:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/nm.c:1237:10: branch_false: ...to here
elfutils-0.194/src/nm.c:1267:6: branch_true: following ‘true’ branch...
elfutils-0.194/src/nm.c:1269:11: branch_true: ...to here
elfutils-0.194/src/nm.c:1269:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/nm.c:1278:25: branch_false: ...to here
elfutils-0.194/src/nm.c:1278:25: acquire_resource: opened here
elfutils-0.194/src/nm.c:1279:14: branch_true: following ‘true’ branch...
elfutils-0.194/src/nm.c:1286:22: branch_true: ...to here
elfutils-0.194/src/nm.c:1287:18: branch_true: following ‘true’ branch...
elfutils-0.194/src/nm.c:1291:19: branch_true: ...to here
elfutils-0.194/src/nm.c:1292:23: throw: if ‘dwfl_report_offline’ throws an exception...
elfutils-0.194/src/nm.c:1292:23: danger: ‘dwfl_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 1290|   		     first in archive).  */
# 1291|   		  dwfl->offline_next_address = 0;
# 1292|-> 		  if (dwfl_report_offline (dwfl, fname, fname, dwfl_fd)
# 1293|   		      == NULL)
# 1294|   		    {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def257]
elfutils-0.194/src/nm.c:1307:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dwfl_fd’
elfutils-0.194/src/nm.c:1233:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/nm.c:1237:10: branch_false: ...to here
elfutils-0.194/src/nm.c:1267:6: branch_true: following ‘true’ branch...
elfutils-0.194/src/nm.c:1269:11: branch_true: ...to here
elfutils-0.194/src/nm.c:1269:10: branch_false: following ‘false’ branch...
elfutils-0.194/src/nm.c:1278:25: branch_false: ...to here
elfutils-0.194/src/nm.c:1278:25: acquire_resource: opened here
elfutils-0.194/src/nm.c:1279:14: branch_true: following ‘true’ branch...
elfutils-0.194/src/nm.c:1286:22: branch_true: ...to here
elfutils-0.194/src/nm.c:1287:18: branch_false: following ‘false’ branch...
elfutils-0.194/src/nm.c:1307:17: branch_false: ...to here
elfutils-0.194/src/nm.c:1307:17: throw: if ‘close’ throws an exception...
elfutils-0.194/src/nm.c:1307:17: danger: ‘dwfl_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
# 1305|   		}
# 1306|   	      else
# 1307|-> 		close (dwfl_fd);
# 1308|   	    }
# 1309|   	}

Error: COMPILER_WARNING: [#def258]
elfutils-0.194/src/nm.c: scope_hint: In function ‘handle_elf’
elfutils-0.194/src/nm.c:1528:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 1528 | handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
#      | ^
# 1526|   
# 1527|   static int
# 1528|-> handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
# 1529|   	    const char *suffix)
# 1530|   {

Error: COMPILER_WARNING: [#def259]
elfutils-0.194/src/objdump.c: scope_hint: In function ‘handle_ar’
elfutils-0.194/src/objdump.c:286:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  286 | handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
#      | ^
#  284|   
#  285|   static int
#  286|-> handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
#  287|   	   const char *suffix)
#  288|   {

Error: GCC_ANALYZER_WARNING (CWE-590): [#def260]
elfutils-0.194/src/objdump.c:740:13: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘fmt’ which points to memory not on the heap
elfutils-0.194/src/objdump.c:286:1: enter_function: entry to ‘handle_ar’
elfutils-0.194/src/objdump.c:305:6: branch_false: following ‘false’ branch (when ‘suffix’ is NULL)...
elfutils-0.194/src/objdump.c:307:3: branch_false: ...to here
elfutils-0.194/src/objdump.c:310:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/objdump.c:313:26: branch_true: ...to here
elfutils-0.194/src/objdump.c:316:10: branch_true: following ‘true’ branch...
elfutils-0.194/src/objdump.c:317:22: branch_true: ...to here
elfutils-0.194/src/objdump.c:316:11: branch_true: following ‘true’ branch (when the strings are non-equal)...
elfutils-0.194/src/objdump.c:318:14: branch_true: ...to here
elfutils-0.194/src/objdump.c:316:11: branch_true: following ‘true’ branch (when the strings are non-equal)...
elfutils-0.194/src/objdump.c:320:15: branch_true: ...to here
elfutils-0.194/src/objdump.c:320:14: branch_true: following ‘true’ branch...
elfutils-0.194/src/objdump.c:321:23: branch_true: ...to here
elfutils-0.194/src/objdump.c:321:23: call_function: calling ‘handle_elf’ from ‘handle_ar’
#  738|   
#  739|   	  if (color_mode)
#  740|-> 	    free (fmt);
#  741|   	}
#  742|       }

Error: COMPILER_WARNING: [#def261]
elfutils-0.194/src/objdump.c: scope_hint: In function ‘handle_elf.isra’
elfutils-0.194/src/objdump.c:751:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  751 | handle_elf (Elf *elf, const char *prefix, const char *fname,
#      | ^
#  749|   
#  750|   static int
#  751|-> handle_elf (Elf *elf, const char *prefix, const char *fname,
#  752|   	    const char *suffix)
#  753|   {

Error: COMPILER_WARNING: [#def262]
elfutils-0.194/src/ranlib.c: scope_hint: In function ‘handle_file’
elfutils-0.194/src/ranlib.c:135:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  135 | handle_file (const char *fname)
#      | ^
#  133|   /* Handle a file given on the command line.  */
#  134|   static int
#  135|-> handle_file (const char *fname)
#  136|   {
#  137|     int fd = open (fname, O_RDONLY);

Error: COMPILER_WARNING: [#def263]
elfutils-0.194/src/readelf.c: scope_hint: In function ‘open_input_section’
elfutils-0.194/src/readelf.c:857:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  857 | open_input_section (int fd)
#      | ^
#  855|      elf_input_section given a file descriptor to an ELF file.  */
#  856|   static int
#  857|-> open_input_section (int fd)
#  858|   {
#  859|     size_t shnums;

Error: COMPILER_WARNING: [#def264]
elfutils-0.194/src/readelf.c: scope_hint: In function ‘process_file’
elfutils-0.194/src/readelf.c:1110:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 1110 | process_file (int fd, const char *fname, bool only_one)
#      | ^
# 1108|   /* Process one input file.  */
# 1109|   static void
# 1110|-> process_file (int fd, const char *fname, bool only_one)
# 1111|   {
# 1112|     if (print_archive_index)

Error: COMPILER_WARNING: [#def265]
elfutils-0.194/src/readelf.c: scope_hint: In function ‘handle_versym’
elfutils-0.194/src/readelf.c:3550:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 3550 | handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
#      | ^
# 3548|   
# 3549|   static void
# 3550|-> handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
# 3551|   {
# 3552|     int class = gelf_getclass (ebl->elf);

Error: COMPILER_WARNING: [#def266]
elfutils-0.194/src/readelf.c: scope_hint: In function ‘print_debug_frame_section’
elfutils-0.194/src/readelf.c:7458:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 7458 | print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
#      | ^
# 7456|   
# 7457|   static void
# 7458|-> print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
# 7459|   			   Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg,
# 7460|   			   FILE *out)

Error: COMPILER_WARNING: [#def267]
elfutils-0.194/src/readelf.c: scope_hint: In function ‘print_debug_macinfo_section’
elfutils-0.194/src/readelf.c:10749:1: warning[-Wstack-usage=]: stack usage might be unbounded
#10749 | print_debug_macinfo_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
#      | ^
#10747|   
#10748|   static void
#10749|-> print_debug_macinfo_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
#10750|   			     Ebl *ebl,
#10751|   			     GElf_Ehdr *ehdr __attribute__ ((unused)),

Error: COMPILER_WARNING: [#def268]
elfutils-0.194/src/readelf.c: scope_hint: In function ‘print_debug_macro_section’
elfutils-0.194/src/readelf.c:10912:1: warning[-Wstack-usage=]: stack usage might be unbounded
#10912 | print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
#      | ^
#10910|   
#10911|   static void
#10912|-> print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
#10913|   			   Ebl *ebl,
#10914|   			   GElf_Ehdr *ehdr __attribute__ ((unused)),

Error: COMPILER_WARNING: [#def269]
elfutils-0.194/src/readelf.c: scope_hint: In function ‘handle_core_item’
elfutils-0.194/src/readelf.c:12686:1: warning[-Wstack-usage=]: stack usage might be unbounded
#12686 | handle_core_item (Elf *core, const GElf_Ehdr *ehdr,
#      | ^
#12684|   
#12685|   static unsigned int
#12686|-> handle_core_item (Elf *core, const GElf_Ehdr *ehdr,
#12687|   		  const Ebl_Core_Item *item, const void *desc,
#12688|   		  unsigned int colno, size_t *repeated_size)

Error: COMPILER_WARNING: [#def270]
elfutils-0.194/src/readelf.c: scope_hint: In function ‘handle_core_note’
elfutils-0.194/src/readelf.c:13510:1: warning[-Wstack-usage=]: stack usage might be unbounded
#13510 | handle_core_note (Ebl *ebl, const GElf_Ehdr *ehdr,  const GElf_Nhdr *nhdr,
#      | ^
#13508|   
#13509|   static void
#13510|-> handle_core_note (Ebl *ebl, const GElf_Ehdr *ehdr,  const GElf_Nhdr *nhdr,
#13511|   		  const char *name, const void *desc)
#13512|   {

Error: COMPILER_WARNING: [#def271]
elfutils-0.194/src/size.c: scope_hint: In function ‘handle_ar’
elfutils-0.194/src/size.c:340:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  340 | handle_ar (int fd, Elf *elf, const char *prefix, const char *fname)
#      | ^
#  338|   
#  339|   static int
#  340|-> handle_ar (int fd, Elf *elf, const char *prefix, const char *fname)
#  341|   {
#  342|     size_t prefix_len = prefix == NULL ? 0 : strlen (prefix);

Error: COMPILER_WARNING: [#def272]
elfutils-0.194/src/size.c: scope_hint: In function ‘handle_elf’
elfutils-0.194/src/size.c:634:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  634 | handle_elf (Elf *elf, const char *prefix, const char *fname)
#      | ^
#  632|   
#  633|   static void
#  634|-> handle_elf (Elf *elf, const char *prefix, const char *fname)
#  635|   {
#  636|     size_t prefix_len = prefix == NULL ? 0 : strlen (prefix);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
elfutils-0.194/src/stack.c:757:46: warning[-Wanalyzer-malloc-leak]: leak of ‘frames.frame’
elfutils-0.194/src/stack.c:722:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:733:22: branch_false: ...to here
elfutils-0.194/src/stack.c:733:22: branch_true: following ‘true’ branch...
elfutils-0.194/src/stack.c:733:22: branch_true: ...to here
elfutils-0.194/src/stack.c:735:18: acquire_memory: allocated here
elfutils-0.194/src/stack.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:739:7: branch_false: ...to here
elfutils-0.194/src/stack.c:739:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:758:15: branch_false: ...to here
elfutils-0.194/src/stack.c:757:7: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:757:7: branch_false: ...to here
elfutils-0.194/src/stack.c:757:46: throw: if ‘dwfl_pid’ throws an exception...
elfutils-0.194/src/stack.c:757:46: danger: ‘frames.frame’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  755|     else
#  756|       {
#  757|->       printf ("PID %lld - %s\n", (long long) dwfl_pid (dwfl),
#  758|   	      pid != 0 ? "process" : "core");
#  759|         switch (dwfl_getthreads (dwfl, thread_callback, &frames))

Error: GCC_ANALYZER_WARNING (CWE-688): [#def274]
elfutils-0.194/src/stack.c:757:46: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
elfutils-0.194/src/stack.c:722:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:733:22: branch_false: ...to here
elfutils-0.194/src/stack.c:733:22: branch_true: following ‘true’ branch...
elfutils-0.194/src/stack.c:733:22: branch_true: ...to here
elfutils-0.194/src/stack.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:739:7: branch_false: ...to here
elfutils-0.194/src/stack.c:739:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:758:15: branch_false: ...to here
elfutils-0.194/src/stack.c:757:7: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:757:7: branch_false: ...to here
elfutils-0.194/src/stack.c:757:46: release_memory: using NULL here
elfutils-0.194/src/stack.c:757:46: danger: argument 1 (‘dwfl’) NULL where non-null expected
#  755|     else
#  756|       {
#  757|->       printf ("PID %lld - %s\n", (long long) dwfl_pid (dwfl),
#  758|   	      pid != 0 ? "process" : "core");
#  759|         switch (dwfl_getthreads (dwfl, thread_callback, &frames))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
elfutils-0.194/src/stack.c:759:15: warning[-Wanalyzer-malloc-leak]: leak of ‘frames.frame’
elfutils-0.194/src/stack.c:722:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:733:22: branch_false: ...to here
elfutils-0.194/src/stack.c:733:22: branch_true: following ‘true’ branch...
elfutils-0.194/src/stack.c:733:22: branch_true: ...to here
elfutils-0.194/src/stack.c:735:18: acquire_memory: allocated here
elfutils-0.194/src/stack.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:739:7: branch_false: ...to here
elfutils-0.194/src/stack.c:739:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:758:15: branch_false: ...to here
elfutils-0.194/src/stack.c:757:7: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:757:7: branch_false: ...to here
elfutils-0.194/src/stack.c:759:15: throw: if ‘dwfl_getthreads’ throws an exception...
elfutils-0.194/src/stack.c:759:15: danger: ‘frames.frame’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  757|         printf ("PID %lld - %s\n", (long long) dwfl_pid (dwfl),
#  758|   	      pid != 0 ? "process" : "core");
#  759|->       switch (dwfl_getthreads (dwfl, thread_callback, &frames))
#  760|   	{
#  761|   	case DWARF_CB_OK:

Error: GCC_ANALYZER_WARNING (CWE-688): [#def276]
elfutils-0.194/src/stack.c:759:15: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
elfutils-0.194/src/stack.c:722:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:733:22: branch_false: ...to here
elfutils-0.194/src/stack.c:733:22: branch_true: following ‘true’ branch...
elfutils-0.194/src/stack.c:733:22: branch_true: ...to here
elfutils-0.194/src/stack.c:736:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:739:7: branch_false: ...to here
elfutils-0.194/src/stack.c:739:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:758:15: branch_false: ...to here
elfutils-0.194/src/stack.c:757:7: branch_false: following ‘false’ branch...
elfutils-0.194/src/stack.c:757:7: branch_false: ...to here
elfutils-0.194/src/stack.c:757:46: release_memory: using NULL here
elfutils-0.194/src/stack.c:759:15: release_memory: using NULL here
elfutils-0.194/src/stack.c:759:15: danger: argument 1 (‘dwfl’) NULL where non-null expected
#  757|         printf ("PID %lld - %s\n", (long long) dwfl_pid (dwfl),
#  758|   	      pid != 0 ? "process" : "core");
#  759|->       switch (dwfl_getthreads (dwfl, thread_callback, &frames))
#  760|   	{
#  761|   	case DWARF_CB_OK:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
elfutils-0.194/src/stacktrace.c:805:5: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&name)’
elfutils-0.194/src/stacktrace.c:1002:1: enter_function: entry to ‘sysprof_unwind_cb’
elfutils-0.194/src/stacktrace.c:1009:6: branch_true: following ‘true’ branch...
elfutils-0.194/src/stacktrace.c:1010:28: branch_true: ...to here
elfutils-0.194/src/stacktrace.c:1010:14: call_function: calling ‘pid_find_comm’ from ‘sysprof_unwind_cb’
elfutils-0.194/src/stacktrace.c:1010:14: return_function: returning to ‘sysprof_unwind_cb’ from ‘pid_find_comm’
elfutils-0.194/src/stacktrace.c:1036:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stacktrace.c:1048:49: branch_false: ...to here
elfutils-0.194/src/stacktrace.c:1053:16: call_function: calling ‘sysprof_find_dwfl’ from ‘sysprof_unwind_cb’
#  803|       }
#  804|     else
#  805|->     closedir(dir);
#  806|   
#  807|     i = snprintf (name, sizeof (name), "/proc/%ld/exe", (long) *pid);

Error: GCC_ANALYZER_WARNING (CWE-479): [#def278]
elfutils-0.194/src/stacktrace.c:1142:7: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
elfutils-0.194/src/stacktrace.c:1227:1: enter_function: entry to ‘main’
elfutils-0.194/src/stacktrace.c:1303:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stacktrace.c:1305:7: branch_false: ...to here
elfutils-0.194/src/stacktrace.c:1309:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stacktrace.c:1313:7: branch_false: ...to here
elfutils-0.194/src/stacktrace.c:1138:13: enter_function: entry to ‘sigint_handler’
elfutils-0.194/src/stacktrace.c:1140:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
 call_function: calling ‘sigint_handler’ from ‘sigint_handler’
# 1140|     if (signal_count >= 2)
# 1141|       {
# 1142|->       exit(1);
# 1143|       }
# 1144|   

Error: GCC_ANALYZER_WARNING (CWE-479): [#def279]
elfutils-0.194/src/stacktrace.c:1147:7: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘fprintf’ from within signal handler
elfutils-0.194/src/stacktrace.c:1227:1: enter_function: entry to ‘main’
elfutils-0.194/src/stacktrace.c:1303:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stacktrace.c:1305:7: branch_false: ...to here
elfutils-0.194/src/stacktrace.c:1309:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stacktrace.c:1313:7: branch_false: ...to here
elfutils-0.194/src/stacktrace.c:1138:13: enter_function: entry to ‘sigint_handler’
elfutils-0.194/src/stacktrace.c:1140:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stacktrace.c:1145:6: branch_false: ...to here
elfutils-0.194/src/stacktrace.c:1145:6: branch_true: following ‘true’ branch...
elfutils-0.194/src/stacktrace.c:1147:7: branch_true: ...to here
elfutils-0.194/src/stacktrace.c:1147:7: danger: call to ‘fprintf’ from within signal handler
# 1145|     if (signal_count == 0)
# 1146|       {
# 1147|->       fprintf (stderr, "%s\n", N_("Waiting for input to finish. Press twice more ^C to force exit."));
# 1148|       }
# 1149|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def280]
elfutils-0.194/src/stacktrace.c:1299:7: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
elfutils-0.194/src/stacktrace.c:1299:7: release_memory: using NULL here
elfutils-0.194/src/stacktrace.c:1299:7: danger: argument 1 (‘input_path’) NULL where non-null expected
# 1297|   
# 1298|     /* TODO: Also handle common expansions e.g. ~/foo instead of /home/user/foo. */
# 1299|->   if (strcmp (input_path, "-") == 0)
# 1300|       input_fd = STDIN_FILENO;
# 1301|     else

Error: GCC_ANALYZER_WARNING (CWE-688): [#def281]
elfutils-0.194/src/stacktrace.c:1305:7: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
elfutils-0.194/src/stacktrace.c:1299:7: release_memory: using NULL here
elfutils-0.194/src/stacktrace.c:1299:6: branch_true: following ‘true’ branch (when the strings are equal)...
elfutils-0.194/src/stacktrace.c:1300:5: branch_true: ...to here
elfutils-0.194/src/stacktrace.c:1303:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/stacktrace.c:1305:7: branch_false: ...to here
elfutils-0.194/src/stacktrace.c:1305:7: release_memory: using NULL here
elfutils-0.194/src/stacktrace.c:1305:7: danger: argument 1 (‘output_path’) NULL where non-null expected
# 1303|     if (input_fd < 0)
# 1304|       error (EXIT_BAD, errno, N_("Cannot open input file or FIFO '%s'"), input_path);
# 1305|->   if (strcmp (output_path, "-") == 0)
# 1306|       output_fd = STDOUT_FILENO;
# 1307|     else

Error: COMPILER_WARNING: [#def282]
elfutils-0.194/src/strip.c: scope_hint: In function ‘handle_elf.constprop’
elfutils-0.194/src/strip.c:989:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  989 | handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
#      | ^
#  987|   
#  988|   static int
#  989|-> handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
#  990|   	    mode_t mode, struct timespec tvp[2])
#  991|   {

Error: COMPILER_WARNING: [#def283]
elfutils-0.194/src/unstrip.c: scope_hint: In function ‘add_new_section_symbols.isra’
elfutils-0.194/src/unstrip.c:633:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  633 | add_new_section_symbols (Elf_Scn *old_symscn, size_t old_shnum,
#      | ^
#  631|      possible, add in section symbols for the added sections.  */
#  632|   static Elf_Data *
#  633|-> add_new_section_symbols (Elf_Scn *old_symscn, size_t old_shnum,
#  634|   			 Elf *elf, bool rel, Elf_Scn *symscn, size_t shnum)
#  635|   {

Error: COMPILER_WARNING: [#def284]
elfutils-0.194/src/unstrip.c: scope_hint: In function ‘copy_elided_sections’
elfutils-0.194/src/unstrip.c:1427:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 1427 | copy_elided_sections (Elf *unstripped, Elf *stripped,
#      | ^
# 1425|      copying their contents and sh_type from STRIPPED.  */
# 1426|   static void
# 1427|-> copy_elided_sections (Elf *unstripped, Elf *stripped,
# 1428|   		      const GElf_Ehdr *stripped_ehdr, GElf_Addr bias)
# 1429|   {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def285]
elfutils-0.194/src/unstrip.c:2303:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_file(stripped_file, 0)’
elfutils-0.194/src/unstrip.c:2350:1: enter_function: entry to ‘handle_dwfl_module’
elfutils-0.194/src/unstrip.c:2355:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/unstrip.c:2373:16: branch_false: ...to here
elfutils-0.194/src/unstrip.c:2374:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/unstrip.c:2392:6: branch_false: ...to here
elfutils-0.194/src/unstrip.c:2407:3: branch_false: following ‘false’ branch...
elfutils-0.194/src/unstrip.c:2410:7: branch_false: ...to here
elfutils-0.194/src/unstrip.c:2410:6: branch_true: following ‘true’ branch...
elfutils-0.194/src/unstrip.c:2412:10: branch_true: ...to here
elfutils-0.194/src/unstrip.c:2412:10: branch_false: following ‘false’ branch (when ‘relocate == 0’)...
elfutils-0.194/src/unstrip.c:2417:23: branch_false: ...to here
elfutils-0.194/src/unstrip.c:2422:11: call_function: calling ‘handle_explicit_files’ from ‘handle_dwfl_module’
# 2301|   {
# 2302|     int stripped_fd = open_file (stripped_file, false);
# 2303|->   Elf *stripped = elf_begin (stripped_fd, ELF_C_READ, NULL);
# 2304|     GElf_Ehdr stripped_ehdr;
# 2305|     ELF_CHECK (gelf_getehdr (stripped, &stripped_ehdr),

Error: GCC_ANALYZER_WARNING (CWE-775): [#def286]
elfutils-0.194/src/unstrip.c:2313:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_file(unstripped_file,  output_file == 0)’
elfutils-0.194/src/unstrip.c:2350:1: enter_function: entry to ‘handle_dwfl_module’
elfutils-0.194/src/unstrip.c:2355:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/unstrip.c:2373:16: branch_false: ...to here
elfutils-0.194/src/unstrip.c:2374:6: branch_false: following ‘false’ branch...
elfutils-0.194/src/unstrip.c:2392:6: branch_false: ...to here
elfutils-0.194/src/unstrip.c:2407:3: branch_false: following ‘false’ branch...
elfutils-0.194/src/unstrip.c:2410:7: branch_false: ...to here
elfutils-0.194/src/unstrip.c:2410:6: branch_true: following ‘true’ branch...
elfutils-0.194/src/unstrip.c:2412:10: branch_true: ...to here
elfutils-0.194/src/unstrip.c:2412:10: branch_false: following ‘false’ branch (when ‘relocate == 0’)...
elfutils-0.194/src/unstrip.c:2417:23: branch_false: ...to here
elfutils-0.194/src/unstrip.c:2422:11: call_function: calling ‘handle_explicit_files’ from ‘handle_dwfl_module’
# 2311|       {
# 2312|         unstripped_fd = open_file (unstripped_file, output_file == NULL);
# 2313|->       unstripped = elf_begin (unstripped_fd,
# 2314|   			      (output_file == NULL ? ELF_C_RDWR : ELF_C_READ),
# 2315|   			      NULL);

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-98.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameelfutils-0.194-2.fc44
store-results-to/tmp/tmpuuwbx_ns/elfutils-0.194-2.fc44.tar.xz
time-created2026-01-08 16:00:37
time-finished2026-01-08 16:04:56
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpuuwbx_ns/elfutils-0.194-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpuuwbx_ns/elfutils-0.194-2.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9