binutils-2.46-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
binutils-with-gold-2.46/bfd/archive.c:2388:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘syms’
binutils-with-gold-2.46/bfd/archive.c:2309:1: enter_function: entry to ‘_bfd_compute_and_write_armap’
binutils-with-gold-2.46/bfd/archive.c:2330:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/archive.c:2335:25: branch_false: ...to here
binutils-with-gold-2.46/bfd/archive.c:2336:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/archive.c:2336:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/archive.c:2340:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/archive.c:2341:13: call_function: inlined call to ‘bfd_get_filename’ from ‘_bfd_compute_and_write_armap’
binutils-with-gold-2.46/bfd/archive.c:2346:8: branch_true: following ‘true’ branch (when ‘current’ is non-NULL)...
binutils-with-gold-2.46/bfd/archive.c:2349:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/archive.c:2349:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/archive.c:2350:15: call_function: inlined call to ‘bfd_get_file_flags’ from ‘_bfd_compute_and_write_armap’
binutils-with-gold-2.46/bfd/archive.c:2349:11: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/archive.c:2356:15: call_function: inlined call to ‘bfd_get_lto_type’ from ‘_bfd_compute_and_write_armap’
binutils-with-gold-2.46/bfd/archive.c:2367:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/archive.c:2370:14: branch_false: ...to here
binutils-with-gold-2.46/bfd/archive.c:2370:14: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/archive.c:2372:18: branch_true: ...to here
binutils-with-gold-2.46/bfd/archive.c:2372:18: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/archive.c:2380:26: branch_false: ...to here
binutils-with-gold-2.46/bfd/archive.c:2381:18: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/archive.c:2381:18: branch_false: ...to here
binutils-with-gold-2.46/bfd/archive.c:2386:35: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/archive.c:2388:41: branch_true: ...to here
binutils-with-gold-2.46/bfd/archive.c:2388:36: danger: dereference of NULL ‘syms + (long unsigned int)src_count * 8’
# 2386|   	      for (src_count = 0; src_count < symcount; src_count++)
# 2387|   		{
# 2388|-> 		  flagword flags = (syms[src_count])->flags;
# 2389|   		  asection *sec = syms[src_count]->section;
# 2390|   

Error: CPPCHECK_WARNING (CWE-457): [#def2]
binutils-with-gold-2.46/bfd/coffcode.h:3373: warning[uninitvar]: Uninitialized variable: *pelength
# 3371|       *value = (unsigned int) (b[0] + (b[1] << 8));
# 3372|   
# 3373|->   *pelength += status;
# 3374|   
# 3375|     return true;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def3]
binutils-with-gold-2.46/bfd/coffcode.h:3373:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*pelength’
binutils-with-gold-2.46/bfd/coffcode.h:3460:1: enter_function: entry to ‘coff_apply_checksum’
binutils-with-gold-2.46/bfd/coffcode.h:3467:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/coffcode.h:3470:8: branch_false: ...to here
binutils-with-gold-2.46/bfd/coffcode.h:3470:8: call_function: calling ‘coff_read_word’ from ‘coff_apply_checksum’
# 3371|       *value = (unsigned int) (b[0] + (b[1] << 8));
# 3372|   
# 3373|->   *pelength += status;
# 3374|   
# 3375|     return true;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
binutils-with-gold-2.46/bfd/coffgen.c:2972:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
binutils-with-gold-2.46/bfd/coffgen.c:3249:1: enter_function: entry to ‘_bfd_coff_gc_sections’
binutils-with-gold-2.46/bfd/coffgen.c:3268:32: branch_true: following ‘true’ branch (when ‘sub’ is non-NULL)...
binutils-with-gold-2.46/bfd/coffgen.c:3272:11: call_function: inlined call to ‘bfd_get_flavour’ from ‘_bfd_coff_gc_sections’
binutils-with-gold-2.46/bfd/coffgen.c:3283:20: call_function: calling ‘_bfd_coff_gc_mark’ from ‘_bfd_coff_gc_sections’
# 2970|       }
# 2971|   
# 2972|->   return coff_section_from_bfd_index (sec->owner, sym->n_scnum);
# 2973|   }
# 2974|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
binutils-with-gold-2.46/bfd/cofflink.c:3036:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
binutils-with-gold-2.46/bfd/cofflink.c:2956:10: branch_true: following ‘true’ branch (when ‘rel < relend’)...
binutils-with-gold-2.46/bfd/cofflink.c:2967:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:2974:15: branch_false: following ‘false’ branch (when ‘symndx >= 0’)...
binutils-with-gold-2.46/bfd/cofflink.c:2975:45: branch_false: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:2974:16: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/cofflink.c:2984:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:2999:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/cofflink.c:3006:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:3016:10: branch_true: following ‘true’ branch (when ‘h’ is NULL)...
binutils-with-gold-2.46/bfd/cofflink.c:3018:14: branch_true: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:3018:14: branch_false: following ‘false’ branch (when ‘symndx != -1’)...
binutils-with-gold-2.46/bfd/cofflink.c:3025:29: branch_false: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:3031:18: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/cofflink.c:3036:24: danger: dereference of NULL ‘sym’
# 3034|   	      val = (sec->output_section->vma
# 3035|   		     + sec->output_offset
# 3036|-> 		     + sym->n_value);
# 3037|   	      if (! obj_pe (input_bfd))
# 3038|   		val -= sec->vma;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
binutils-with-gold-2.46/bfd/cofflink.c:3164:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
binutils-with-gold-2.46/bfd/cofflink.c:2942:1: enter_function: entry to ‘_bfd_coff_generic_relocate_section’
binutils-with-gold-2.46/bfd/cofflink.c:2956:10: branch_true: following ‘true’ branch (when ‘rel < relend’)...
binutils-with-gold-2.46/bfd/cofflink.c:2967:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:2999:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/cofflink.c:3006:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:3016:10: branch_true: following ‘true’ branch (when ‘h’ is NULL)...
binutils-with-gold-2.46/bfd/cofflink.c:3018:14: branch_true: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:3018:14: branch_true: following ‘true’ branch (when ‘symndx == -1’)...
binutils-with-gold-2.46/bfd/cofflink.c:3103:26: branch_true: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:3103:26: call_function: calling ‘discarded_section’ from ‘_bfd_coff_generic_relocate_section’
binutils-with-gold-2.46/bfd/cofflink.c:3103:26: return_function: returning to ‘_bfd_coff_generic_relocate_section’ from ‘discarded_section’
binutils-with-gold-2.46/bfd/cofflink.c:3103:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/cofflink.c:3110:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:3161:16: branch_true: following ‘true’ branch (when ‘val == 0’)...
binutils-with-gold-2.46/bfd/cofflink.c:3163:20: branch_true: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:3161:17: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/cofflink.c:3164:20: branch_true: ...to here
binutils-with-gold-2.46/bfd/cofflink.c:3164:20: danger: dereference of NULL ‘sym’
# 3162|   		/* Reverse the hack where 4 is subtracted from the addend.  */
# 3163|   		&& (addend + 4) == 0
# 3164|-> 		&& sym->n_sclass == C_NT_WEAK
# 3165|   		&& bfd_coff_classify_symbol (output_bfd, sym)
# 3166|   		     == COFF_SYMBOL_UNDEFINED)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
binutils-with-gold-2.46/bfd/doc/chew.c:1296:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
binutils-with-gold-2.46/bfd/doc/chew.c:1516:1: enter_function: entry to ‘main’
binutils-with-gold-2.46/bfd/doc/chew.c:1522:3: call_function: inlined call to ‘init_string’ from ‘main’
binutils-with-gold-2.46/bfd/doc/chew.c:1522:3: call_function: inlined call to ‘init_string’ from ‘main’
binutils-with-gold-2.46/bfd/doc/chew.c:1523:3: call_function: inlined call to ‘init_string’ from ‘main’
binutils-with-gold-2.46/bfd/doc/chew.c:1523:3: call_function: inlined call to ‘init_string’ from ‘main’
binutils-with-gold-2.46/bfd/doc/chew.c:1524:3: call_function: inlined call to ‘init_string’ from ‘main’
binutils-with-gold-2.46/bfd/doc/chew.c:1524:3: call_function: inlined call to ‘init_string’ from ‘main’
binutils-with-gold-2.46/bfd/doc/chew.c:1528:3: call_function: calling ‘add_intrinsic’ from ‘main’
binutils-with-gold-2.46/bfd/doc/chew.c:1528:3: return_function: returning to ‘main’ from ‘add_intrinsic’
binutils-with-gold-2.46/bfd/doc/chew.c:1529:3: call_function: calling ‘add_intrinsic’ from ‘main’
binutils-with-gold-2.46/bfd/doc/chew.c:1529:3: return_function: returning to ‘main’ from ‘add_intrinsic’
binutils-with-gold-2.46/bfd/doc/chew.c:1530:3: call_function: calling ‘add_intrinsic’ from ‘main’
binutils-with-gold-2.46/bfd/doc/chew.c:1530:3: return_function: returning to ‘main’ from ‘add_intrinsic’
binutils-with-gold-2.46/bfd/doc/chew.c:1531:3: call_function: calling ‘add_intrinsic’ from ‘main’
binutils-with-gold-2.46/bfd/doc/chew.c:1531:3: return_function: returning to ‘main’ from ‘add_intrinsic’
binutils-with-gold-2.46/bfd/doc/chew.c:1532:3: call_function: calling ‘add_intrinsic’ from ‘main’
# 1294|       {
# 1295|         entry->code_length += 2;
# 1296|->       entry->code = xrealloc (entry->code,
# 1297|   			      entry->code_length * sizeof (*entry->code));
# 1298|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
binutils-with-gold-2.46/bfd/elf-eh-frame.c:748:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cie’
binutils-with-gold-2.46/bfd/elf-eh-frame.c:579:1: enter_function: entry to ‘_bfd_elf_parse_eh_frame’
binutils-with-gold-2.46/bfd/elf-eh-frame.c:605:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:606:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:605:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:607:10: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:605:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:615:27: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:615:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:624:3: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:624:3: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:628:3: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:628:3: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:630:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:632:3: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:636:3: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:664:3: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:667:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:667:6: branch_false: following ‘false’ branch (when ‘num_cies == 0’)...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:697:3: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:700:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:707:18: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:711:7: call_function: inlined call to ‘skip_bytes’ from ‘_bfd_elf_parse_eh_frame’
binutils-with-gold-2.46/bfd/elf-eh-frame.c:715:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:716:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:722:10: branch_false: following ‘false’ branch (when ‘hdr_length != 0’)...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:734:7: call_function: inlined call to ‘skip_bytes’ from ‘_bfd_elf_parse_eh_frame’
binutils-with-gold-2.46/bfd/elf-eh-frame.c:737:10: branch_true: following ‘true’ branch (when ‘hdr_id == 0’)...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:743:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:748:11: danger: dereference of NULL ‘cie’
#  746|   	  cie = local_cies + cie_count++;
#  747|   
#  748|-> 	  cie->cie_inf = this_inf;
#  749|   	  cie->length = hdr_length;
#  750|   	  start = buf;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1369:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ent’
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1351:6: branch_false: following ‘false’ branch (when ‘hi != 0’)...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1351:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1354:10: branch_false: following ‘false’ branch (when ‘lo >= hi’)...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1368:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1368:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1369:23: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1369:23: danger: dereference of NULL ‘ent’
# 1367|   
# 1368|     if (!ent->removed)
# 1369|->     delta = (bfd_vma) ent->new_offset - (bfd_vma) ent->offset;
# 1370|     else if (ent->cie && ent->u.cie.merged)
# 1371|       {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1374:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ent’
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1351:6: branch_false: following ‘false’ branch (when ‘hi != 0’)...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1351:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1354:10: branch_false: following ‘false’ branch (when ‘lo >= hi’)...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1368:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1368:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1370:12: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1370:11: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1374:28: danger: dereference of NULL ‘ent’
# 1372|         struct eh_cie_fde *cie = ent->u.cie.u.merged_with;
# 1373|         delta = ((bfd_vma) cie->new_offset + cie->u.cie.u.sec->output_offset
# 1374|-> 	       - (bfd_vma) ent->offset - sec->output_offset);
# 1375|       }
# 1376|     else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1382:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ent’
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1351:6: branch_false: following ‘false’ branch (when ‘hi != 0’)...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1351:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1354:10: branch_false: following ‘false’ branch (when ‘lo >= hi’)...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1368:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1368:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1370:12: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:1382:28: danger: dereference of NULL ‘ent’
# 1380|         struct eh_cie_fde *last = sec_info->entry + sec_info->count;
# 1381|         delta = ((bfd_vma) next_cie_fde_offset (ent, last, sec)
# 1382|-> 	       - (bfd_vma) ent->offset);
# 1383|         return delta;
# 1384|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
binutils-with-gold-2.46/bfd/elf-eh-frame.c:2388:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sec’
binutils-with-gold-2.46/bfd/elf-eh-frame.c:2364:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:2365:10: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:2364:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:2366:10: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:2364:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:2371:10: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:2372:15: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf-eh-frame.c:2388:12: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf-eh-frame.c:2388:12: danger: dereference of NULL ‘sec’
# 2386|   
# 2387|     /* Fix the link_order to match.  */
# 2388|->   for (p = sec->output_section->map_head.link_order; p != NULL; p = p->next)
# 2389|       {
# 2390|         if (p->type != bfd_indirect_link_order)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:46: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:46: danger: dereference of NULL ‘htab’
# 3648|   
# 3649|     /* Use the second PLT section only if there is .plt section.  */
# 3650|->   use_plt_second = htab->elf.splt != NULL && htab->plt_second != NULL;
# 3651|   
# 3652|     eh = (struct elf_x86_link_hash_entry *) h;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
binutils-with-gold-2.46/bfd/elf32-i386.c:3760:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3653:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3659:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3661:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3671:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3671:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3679:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3684:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3697:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3705:24: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3714:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3730:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3733:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3735:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3742:14: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3750:21: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3760:22: danger: dereference of NULL ‘htab’
# 3758|   		 the other PLT slots. */
# 3759|   	      reloc_index = k + s * PLT_NON_JUMP_SLOT_RELOCS;
# 3760|-> 	      loc = (htab->srelplt2->contents + reloc_index
# 3761|   		     * sizeof (Elf32_External_Rel));
# 3762|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
binutils-with-gold-2.46/bfd/elf32-i386.c:3792:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3653:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3659:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3661:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3671:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3671:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3679:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3684:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3697:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3705:24: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3714:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3730:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3789:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3791:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3791:14: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3792:13: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3792:13: danger: dereference of NULL ‘htab’
# 3790|   	{
# 3791|   	  if (htab->plt.has_plt0)
# 3792|-> 	    bfd_put_32 (output_bfd,
# 3793|   			(plt->output_section->vma
# 3794|   			 + plt->output_offset

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
binutils-with-gold-2.46/bfd/elf32-i386.c:3819:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3653:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3659:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3661:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3671:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3671:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3679:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3684:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3697:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3705:24: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3714:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3730:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3789:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3791:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3791:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3800:27: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3819:19: danger: dereference of NULL ‘htab’
# 3817|   	      rel.r_info = ELF32_R_INFO (0, R_386_IRELATIVE);
# 3818|   
# 3819|-> 	      if (htab->params->report_relative_reloc)
# 3820|   		_bfd_x86_elf_link_report_relative_reloc
# 3821|   		  (info, relplt, h, sym, "R_386_IRELATIVE", &rel);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
binutils-with-gold-2.46/bfd/elf32-i386.c:3829:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3653:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3659:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3661:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3671:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3671:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3679:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3684:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3697:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3705:24: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3714:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3730:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3789:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3791:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3791:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3800:27: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3803:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3803:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3829:27: danger: dereference of NULL ‘htab’
# 3827|   	    {
# 3828|   	      rel.r_info = ELF32_R_INFO (h->dynindx, R_386_JUMP_SLOT);
# 3829|-> 	      plt_index = htab->next_jump_slot_index++;
# 3830|   	    }
# 3831|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
binutils-with-gold-2.46/bfd/elf32-i386.c:3858:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3653:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3659:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3661:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3851:12: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3851:11: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3858:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3858:7: danger: dereference of NULL ‘htab’
# 3856|   
# 3857|         /* Set the entry in the GOT procedure linkage table.  */
# 3858|->       plt = htab->plt_got;
# 3859|         got = htab->elf.sgot;
# 3860|         gotplt = htab->elf.sgotplt;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
binutils-with-gold-2.46/bfd/elf32-i386.c:3984:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3653:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3659:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3851:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3892:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3914:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3915:12: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3914:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3914:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3914:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3914:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3920:17: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3927:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3939:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3940:14: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3939:11: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3942:15: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3942:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3968:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3968:19: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3978:19: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3978:18: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3984:19: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3984:19: danger: dereference of NULL ‘htab’
# 3982|   		 contains the real function addres if we need pointer
# 3983|   		 equality.  We load the GOT entry with the PLT entry.  */
# 3984|-> 	      if (htab->plt_second != NULL)
# 3985|   		{
# 3986|   		  plt = htab->plt_second;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
binutils-with-gold-2.46/bfd/elf32-i386.c:4025:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3650:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3653:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3659:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3851:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3892:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3914:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3915:12: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3914:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3914:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3914:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3914:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:3920:17: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:3927:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:4001:15: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:4002:19: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:4001:16: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:4004:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:4005:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf32-i386.c:4009:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:4024:14: branch_true: following ‘true’ branch (when ‘relative_reloc_name’ is non-NULL)...
binutils-with-gold-2.46/bfd/elf32-i386.c:4025:18: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf32-i386.c:4025:18: danger: dereference of NULL ‘htab’
# 4023|   	{
# 4024|   	  if (relative_reloc_name != NULL
# 4025|-> 	      && htab->params->report_relative_reloc)
# 4026|   	    _bfd_x86_elf_link_report_relative_reloc
# 4027|   	      (info, relgot, h, sym, relative_reloc_name, &rel);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:1335:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3165:1: enter_function: entry to ‘elf_x86_64_relocate_section’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3189:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3189:10: call_function: inlined call to ‘elf_hash_table_id’ from ‘elf_x86_64_relocate_section’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3189:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3193:8: call_function: inlined call to ‘bfd_get_flavour’ from ‘elf_x86_64_relocate_section’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3193:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3210:10: branch_true: following ‘true’ branch (when ‘relend > rel’)...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3232:16: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3249:15: call_function: calling ‘elf_x86_64_rtype_to_howto’ from ‘elf_x86_64_relocate_section’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3249:15: return_function: returning to ‘elf_x86_64_relocate_section’ from ‘elf_x86_64_rtype_to_howto’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3250:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3255:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3257:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3259:28: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3267:14: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3268:18: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3267:15: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3270:19: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3272:18: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3276:37: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3314:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3321:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3343:10: branch_true: following ‘true’ branch (when ‘h’ is non-NULL)...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3344:14: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3586:26: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3591:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:4885:17: call_function: calling ‘elf_x86_64_tls_transition’ from ‘elf_x86_64_relocate_section’
# 1333|   	}
# 1334|   
# 1335|->       r_symndx = htab->r_sym (rel[1].r_info);
# 1336|         if (r_symndx < symtab_hdr->sh_info)
# 1337|   	return elf_x86_tls_error_yes;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3690:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3165:1: enter_function: entry to ‘elf_x86_64_relocate_section’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3189:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3189:10: call_function: inlined call to ‘elf_hash_table_id’ from ‘elf_x86_64_relocate_section’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3189:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3193:8: call_function: inlined call to ‘bfd_get_flavour’ from ‘elf_x86_64_relocate_section’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3193:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3210:10: branch_true: following ‘true’ branch (when ‘relend > rel’)...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3232:16: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3249:15: call_function: calling ‘elf_x86_64_rtype_to_howto’ from ‘elf_x86_64_relocate_section’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3249:15: return_function: returning to ‘elf_x86_64_relocate_section’ from ‘elf_x86_64_rtype_to_howto’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3250:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3255:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3316:14: branch_false: following ‘false’ branch (when ‘rel == wrel’)...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3314:10: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3210:10: branch_true: following ‘true’ branch (when ‘relend > rel’)...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3232:16: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3250:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3255:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3257:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3285:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3285:11: branch_false: following ‘false’ branch (when ‘sym_hashes’ is non-NULL)...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3285:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3292:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3314:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3314:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3321:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3609:14: branch_false: following ‘false’ branch (when ‘base_got’ is non-NULL)...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3613:14: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3613:14: branch_false: following ‘false’ branch (when ‘h’ is NULL)...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3667:18: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3667:18: branch_false: following ‘false’ branch (when ‘local_got_offsets’ is non-NULL)...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3670:38: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3675:18: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3679:19: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3688:22: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3689:26: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3688:23: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3690:28: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:3690:28: danger: dereference of NULL ‘sym’
# 3688|   		  if (!info->enable_dt_relr
# 3689|   		      && bfd_link_pic (info)
# 3690|-> 		      && !(sym->st_shndx == SHN_ABS
# 3691|   			   && (r_type == R_X86_64_GOTPCREL
# 3692|   			       || r_type == R_X86_64_GOTPCRELX

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:46: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:46: danger: dereference of NULL ‘htab’
# 5153|   
# 5154|     /* Use the second PLT section only if there is .plt section.  */
# 5155|->   use_plt_second = htab->elf.splt != NULL && htab->plt_second != NULL;
# 5156|   
# 5157|     eh = (struct elf_x86_link_hash_entry *) h;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5263:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5158:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5164:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5166:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5178:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5178:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5186:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5191:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5204:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5212:40: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5219:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5231:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5247:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5252:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5260:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5262:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5262:14: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5263:13: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5263:13: danger: dereference of NULL ‘htab’
# 5261|   	{
# 5262|   	  if (htab->plt.has_plt0)
# 5263|-> 	    bfd_put_64 (output_bfd, (plt->output_section->vma
# 5264|   				     + plt->output_offset
# 5265|   				     + h->plt.offset

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5284:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5158:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5164:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5166:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5178:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5178:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5186:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5191:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5204:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5212:40: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5219:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5231:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5247:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5252:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5260:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5262:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5262:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5270:28: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5275:18: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5278:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5284:29: danger: dereference of NULL ‘htab’
# 5282|   	      /* If an STT_GNU_IFUNC symbol is locally defined, generate
# 5283|   		 R_X86_64_IRELATIVE instead of R_X86_64_JUMP_SLOT.  */
# 5284|-> 	      rela.r_info = htab->r_info (0, R_X86_64_IRELATIVE);
# 5285|   	      rela.r_addend = (h->root.u.def.value
# 5286|   			       + h->root.u.def.section->output_section->vma

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5298:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5158:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5164:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5166:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5178:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5178:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5186:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5191:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5204:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5212:40: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5219:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5231:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5247:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5252:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5260:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5262:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5262:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5270:28: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5273:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5273:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5298:29: danger: dereference of NULL ‘htab’
# 5296|   	  else
# 5297|   	    {
# 5298|-> 	      rela.r_info = htab->r_info (h->dynindx, R_X86_64_JUMP_SLOT);
# 5299|   	      if (htab->params->mark_plt)
# 5300|   		rela.r_addend = (resolved_plt->output_section->vma

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5345:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5158:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5164:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5166:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5337:12: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5337:11: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5345:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5345:7: danger: dereference of NULL ‘htab’
# 5343|   
# 5344|         /* Set the entry in the GOT procedure linkage table.  */
# 5345|->       plt = htab->plt_got;
# 5346|         got = htab->elf.sgot;
# 5347|         got_offset = h->got.offset;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5453:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5158:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5164:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5337:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5386:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5409:12: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5414:17: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5420:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5432:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5433:14: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5432:11: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5435:15: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5435:14: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5438:19: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5438:18: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5442:19: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5444:18: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5446:23: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5446:22: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5449:19: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5453:33: danger: dereference of NULL ‘htab’
# 5451|   					  h->root.u.def.section->owner);
# 5452|   
# 5453|-> 		  rela.r_info = htab->r_info (0,
# 5454|   					      R_X86_64_IRELATIVE);
# 5455|   		  rela.r_addend = (h->root.u.def.value

Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5479:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5158:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5164:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5337:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5386:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5409:12: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5414:17: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5420:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5432:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5433:14: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5432:11: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5435:15: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5435:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5463:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5463:19: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5473:19: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5473:18: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5479:19: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5479:19: danger: dereference of NULL ‘htab’
# 5477|   		 contains the real function addres if we need pointer
# 5478|   		 equality.  We load the GOT entry with the PLT entry.  */
# 5479|-> 	      if (htab->plt_second != NULL)
# 5480|   		{
# 5481|   		  plt = htab->plt_second;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def30]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5506:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5158:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5164:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5337:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5386:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5409:12: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5414:17: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5420:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5496:15: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5497:19: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5496:16: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5499:16: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5502:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5506:29: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5506:29: danger: dereference of NULL ‘htab’
# 5504|   	  else
# 5505|   	    {
# 5506|-> 	      rela.r_info = htab->r_info (0, R_X86_64_RELATIVE);
# 5507|   	      rela.r_addend = (h->root.u.def.value
# 5508|   			       + h->root.u.def.section->output_section->vma

Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5519:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5158:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5164:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5337:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5386:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5409:12: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5408:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5414:17: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5420:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5463:19: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5466:15: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5519:25: danger: dereference of NULL ‘htab’
# 5517|   	  bfd_put_64 (output_bfd, (bfd_vma) 0,
# 5518|   		      htab->elf.sgot->contents + h->got.offset);
# 5519|-> 	  rela.r_info = htab->r_info (h->dynindx, R_X86_64_GLOB_DAT);
# 5520|   	  rela.r_addend = 0;
# 5521|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5554:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5155:20: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5158:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5164:21: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5337:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5386:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5543:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5549:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5549:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5554:21: danger: dereference of NULL ‘htab’
# 5552|   		       + h->root.u.def.section->output_section->vma
# 5553|   		       + h->root.u.def.section->output_offset);
# 5554|->       rela.r_info = htab->r_info (h->dynindx, R_X86_64_COPY);
# 5555|         rela.r_addend = 0;
# 5556|         if (h->root.u.def.section == htab->elf.sdynrelro)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5618:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5613:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5614:10: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5613:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5618:32: branch_true: ...to here
binutils-with-gold-2.46/bfd/elf64-x86-64.c:5618:32: danger: dereference of NULL ‘htab’
# 5616|         /* Check relocation against STT_GNU_IFUNC symbol if there are
# 5617|   	 dynamic symbols.  */
# 5618|->       unsigned long r_symndx = htab->r_sym (rela->r_info);
# 5619|         if (r_symndx != STN_UNDEF)
# 5620|   	{

Error: GCC_ANALYZER_WARNING (CWE-457): [#def34]
binutils-with-gold-2.46/bfd/elfcore.h:189:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘i_shdr.sh_info’
binutils-with-gold-2.46/bfd/elfcore.h:87:1: enter_function: entry to ‘bfd_elf64_core_file_p’
binutils-with-gold-2.46/bfd/elfcore.h:97:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elfcore.h:106:9: branch_false: ...to here
binutils-with-gold-2.46/bfd/elfcore.h:106:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elfcore.h:112:7: branch_true: ...to here
binutils-with-gold-2.46/bfd/elfcore.h:112:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elfcore.h:116:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elfcore.h:123:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elfcore.h:131:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elfcore.h:131:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elfcore.h:135:13: branch_true: ...to here
binutils-with-gold-2.46/bfd/elfcore.h:136:3: call_function: calling ‘elf_swap_ehdr_in’ from ‘bfd_elf64_core_file_p’
binutils-with-gold-2.46/bfd/elfcore.h:136:3: return_function: returning to ‘bfd_elf64_core_file_p’ from ‘elf_swap_ehdr_in’
binutils-with-gold-2.46/bfd/elfcore.h:160:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elfcore.h:165:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elfcore.h:170:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elfcore.h:170:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elfcore.h:176:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elfcore.h:180:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elfcore.h:180:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elfcore.h:185:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/elfcore.h:185:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elfcore.h:187:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/elfcore.h:187:7: call_function: calling ‘elf_swap_shdr_in’ from ‘bfd_elf64_core_file_p’
binutils-with-gold-2.46/bfd/elfcore.h:187:7: return_function: returning to ‘bfd_elf64_core_file_p’ from ‘elf_swap_shdr_in’
binutils-with-gold-2.46/bfd/elfcore.h:189:11: danger: use of uninitialized value ‘i_shdr.sh_info’ here
#  187|         elf_swap_shdr_in (abfd, &x_shdr, &i_shdr);
#  188|   
#  189|->       if (i_shdr.sh_info != 0)
#  190|   	{
#  191|   	  i_ehdrp->e_phnum = i_shdr.sh_info;

Error: CPPCHECK_WARNING (CWE-476): [#def35]
binutils-with-gold-2.46/bfd/elflink.c:1066: warning[nullPointer]: Possible null pointer dereference: section_sym_count
# 1064|       }
# 1065|     if (do_sec)
# 1066|->     *section_sym_count = dynsymcount;
# 1067|   
# 1068|     if (elf_hash_table (info)->has_local_dynsyms)

Error: CPPCHECK_WARNING (CWE-476): [#def36]
binutils-with-gold-2.46/bfd/elflink.c:12368: warning[nullPointer]: Possible null pointer dereference: reldata
#12366|   
#12367|     /* Figure out the symbol index.  */
#12368|->   rel_hash_ptr = reldata->hashes + reldata->count;
#12369|     if (link_order->type == bfd_section_reloc_link_order)
#12370|       {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
binutils-with-gold-2.46/bfd/elfxx-x86.c:1855:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elfxx-x86.c:1855:15: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/elfxx-x86.c:1855:36: branch_true: ...to here
binutils-with-gold-2.46/bfd/elfxx-x86.c:1855:36: danger: dereference of NULL ‘htab’
# 1853|   
# 1854|   	  plt0_entry_size
# 1855|-> 	    = htab->plt.has_plt0 ? htab->sframe_plt->plt0_entry_size : 0;
# 1856|   	  plt_entry_size = htab->sframe_plt->pltn_entry_size;
# 1857|   	  pltn_fres = htab->sframe_plt->pltn_fres;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
binutils-with-gold-2.46/bfd/elfxx-x86.c:1856:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-with-gold-2.46/bfd/elfxx-x86.c:1855:15: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/elfxx-x86.c:1856:28: branch_false: ...to here
binutils-with-gold-2.46/bfd/elfxx-x86.c:1856:28: danger: dereference of NULL ‘htab’
# 1854|   	  plt0_entry_size
# 1855|   	    = htab->plt.has_plt0 ? htab->sframe_plt->plt0_entry_size : 0;
# 1856|-> 	  plt_entry_size = htab->sframe_plt->pltn_entry_size;
# 1857|   	  pltn_fres = htab->sframe_plt->pltn_fres;
# 1858|   	  num_pltn_fres = htab->sframe_plt->pltn_num_fres;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def39]
binutils-with-gold-2.46/bfd/elfxx-x86.c:1867:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1865|   	{
# 1866|   	  ectx = &htab->plt_second_cfe_ctx;
# 1867|-> 	  dpltsec = htab->plt_second;
# 1868|   
# 1869|   	  plt0_entry_size = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def40]
binutils-with-gold-2.46/bfd/elfxx-x86.c:1881:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1879|   	{
# 1880|   	  ectx = &htab->plt_got_cfe_ctx;
# 1881|-> 	  dpltsec = htab->plt_got;
# 1882|   
# 1883|   	  plt0_entry_size = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
binutils-with-gold-2.46/bfd/elfxx-x86.c:1992:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1990|       {
# 1991|       case SFRAME_PLT:
# 1992|->       ectx = htab->plt_cfe_ctx;
# 1993|         sec = htab->plt_sframe;
# 1994|         break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def42]
binutils-with-gold-2.46/bfd/elfxx-x86.c:1996:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1994|         break;
# 1995|       case SFRAME_PLT_SEC:
# 1996|->       ectx = htab->plt_second_cfe_ctx;
# 1997|         sec = htab->plt_second_sframe;
# 1998|         break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def43]
binutils-with-gold-2.46/bfd/elfxx-x86.c:2000:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1998|         break;
# 1999|       case SFRAME_PLT_GOT:
# 2000|->       ectx = htab->plt_got_cfe_ctx;
# 2001|         sec = htab->plt_got_sframe;
# 2002|         break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def44]
binutils-with-gold-2.46/bfd/elfxx-x86.c:3349:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 3347|   
# 3348|       case elf_x86_tls_error_indirect_call:
# 3349|->       info->callbacks->einfo
# 3350|   	/* xgettext:c-format */
# 3351|   	(_("%pB(%pA+0x%v): relocation %s against `%s' must be used "

Error: GCC_ANALYZER_WARNING (CWE-476): [#def45]
binutils-with-gold-2.46/bfd/ihex.c:597:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
binutils-with-gold-2.46/bfd/ihex.c:542:1: enter_function: entry to ‘ihex_read_section’
binutils-with-gold-2.46/bfd/ihex.c:550:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/ihex.c:550:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/ihex.c:556:15: call_function: calling ‘ihex_get_byte’ from ‘ihex_read_section’
binutils-with-gold-2.46/bfd/ihex.c:556:15: return_function: returning to ‘ihex_read_section’ from ‘ihex_get_byte’
binutils-with-gold-2.46/bfd/ihex.c:556:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/ihex.c:563:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/ihex.c:570:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/ihex.c:573:13: branch_false: ...to here
binutils-with-gold-2.46/bfd/ihex.c:577:10: branch_false: following ‘false’ branch (when ‘type == 0’)...
binutils-with-gold-2.46/bfd/ihex.c:585:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/ihex.c:585:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/ihex.c:593:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/ihex.c:593:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/ihex.c:593:10: branch_false: ...to here
binutils-with-gold-2.46/bfd/ihex.c:597:16: danger: dereference of NULL ‘buf + (sizetype)(i * 2)’
#  595|   
#  596|         for (i = 0; i < len; i++)
#  597|-> 	*p++ = HEX2 (buf + 2 * i);
#  598|         if ((bfd_size_type) (p - contents) >= section->size)
#  599|   	{

Error: CPPCHECK_WARNING (CWE-457): [#def46]
binutils-with-gold-2.46/bfd/peXXigen.c:2685: warning[uninitvar]: Uninitialized variable: signature
# 2683|   	  fprintf (file, _("(format %c%c%c%c signature %s age %ld pdb %s)\n"),
# 2684|   		   buffer[0], buffer[1], buffer[2], buffer[3],
# 2685|-> 		   signature, cvinfo->Age, pdb[0] ? pdb : "(none)");
# 2686|   
# 2687|   	  free (pdb);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
binutils-with-gold-2.46/bfd/srec.c:767:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
binutils-with-gold-2.46/bfd/srec.c:711:1: enter_function: entry to ‘srec_read_section’
binutils-with-gold-2.46/bfd/srec.c:719:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:719:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:722:15: call_function: calling ‘srec_get_byte’ from ‘srec_read_section’
binutils-with-gold-2.46/bfd/srec.c:722:15: return_function: returning to ‘srec_read_section’ from ‘srec_get_byte’
binutils-with-gold-2.46/bfd/srec.c:722:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/srec.c:729:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/srec.c:734:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:737:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:737:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:740:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:744:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:753:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:753:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:758:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:767:21: danger: dereference of NULL ‘buf’
#  765|   
#  766|   	case '3':
#  767|-> 	  address = HEX (data);
#  768|   	  data += 2;
#  769|   	  --bytes;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def48]
binutils-with-gold-2.46/bfd/srec.c:772:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘data’
binutils-with-gold-2.46/bfd/srec.c:711:1: enter_function: entry to ‘srec_read_section’
binutils-with-gold-2.46/bfd/srec.c:719:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:719:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:722:15: call_function: calling ‘srec_get_byte’ from ‘srec_read_section’
binutils-with-gold-2.46/bfd/srec.c:722:15: return_function: returning to ‘srec_read_section’ from ‘srec_get_byte’
binutils-with-gold-2.46/bfd/srec.c:722:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/srec.c:729:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/srec.c:734:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:737:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:737:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:740:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:744:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:753:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:753:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:758:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:772:38: danger: dereference of NULL ‘data’
#  770|   	  /* Fall through.  */
#  771|   	case '2':
#  772|-> 	  address = (address << 8) | HEX (data);
#  773|   	  data += 2;
#  774|   	  --bytes;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def49]
binutils-with-gold-2.46/bfd/srec.c:777:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘data’
binutils-with-gold-2.46/bfd/srec.c:711:1: enter_function: entry to ‘srec_read_section’
binutils-with-gold-2.46/bfd/srec.c:719:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:719:6: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:722:15: call_function: calling ‘srec_get_byte’ from ‘srec_read_section’
binutils-with-gold-2.46/bfd/srec.c:722:15: return_function: returning to ‘srec_read_section’ from ‘srec_get_byte’
binutils-with-gold-2.46/bfd/srec.c:722:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/srec.c:729:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/srec.c:734:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:737:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:737:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:740:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:744:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:753:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:753:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/srec.c:758:15: branch_false: ...to here
binutils-with-gold-2.46/bfd/srec.c:777:38: danger: dereference of NULL ‘data’
#  775|   	  /* Fall through.  */
#  776|   	case '1':
#  777|-> 	  address = (address << 8) | HEX (data);
#  778|   	  data += 2;
#  779|   	  address = (address << 8) | HEX (data);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def50]
binutils-with-gold-2.46/bfd/stabs.c:401:20: warning[-Wanalyzer-null-argument]: use of NULL ‘symb’ where non-null expected
binutils-with-gold-2.46/bfd/stabs.c:190:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:191:10: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:190:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:192:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:190:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:193:11: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:190:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:197:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:197:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:202:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:202:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:207:27: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:207:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:208:30: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:207:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:215:7: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:245:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:248:3: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:256:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/stabs.c:257:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/stabs.c:256:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/stabs.c:267:17: branch_true: ...to here
binutils-with-gold-2.46/bfd/stabs.c:272:8: branch_true: following ‘true’ branch (when ‘sym < symend’)...
binutils-with-gold-2.46/bfd/stabs.c:279:11: branch_true: ...to here
binutils-with-gold-2.46/bfd/stabs.c:304:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:313:16: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:389:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:394:13: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:395:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/bfd/stabs.c:398:16: branch_false: ...to here
binutils-with-gold-2.46/bfd/stabs.c:398:40: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
binutils-with-gold-2.46/bfd/stabs.c:399:17: branch_true: ...to here
binutils-with-gold-2.46/bfd/stabs.c:399:16: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/stabs.c:400:20: branch_true: ...to here
binutils-with-gold-2.46/bfd/stabs.c:399:17: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/bfd/stabs.c:401:28: branch_true: ...to here
binutils-with-gold-2.46/bfd/stabs.c:401:20: danger: argument 2 (‘symb’) NULL where non-null expected
#  399|   	    if (t->sum_chars == sum_chars
#  400|   		&& t->num_chars == num_chars
#  401|-> 		&& memcmp (t->symb, symb, num_chars) == 0)
#  402|   	      break;
#  403|   

Error: COMPILER_WARNING (CWE-704): [#def51]
binutils-with-gold-2.46/binutils/addr2line.c: scope_hint: In function ‘translate_addresses’
binutils-with-gold-2.46/binutils/addr2line.c:390:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  390 |                   h = strrchr (filename, '/');
#      |                     ^
#  388|                     char *h;
#  389|   
#  390|->                   h = strrchr (filename, '/');
#  391|                     if (h != NULL)
#  392|                       filename = h + 1;

Error: COMPILER_WARNING (CWE-704): [#def52]
binutils-with-gold-2.46/binutils/addr2line.c:390:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  388|                     char *h;
#  389|   
#  390|->                   h = strrchr (filename, '/');
#  391|                     if (h != NULL)
#  392|                       filename = h + 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def53]
binutils-with-gold-2.46/binutils/ar.c:189:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arch’
binutils-with-gold-2.46/binutils/ar.c:698:1: enter_function: entry to ‘main’
binutils-with-gold-2.46/binutils/ar.c:738:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:740:3: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:753:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:756:10: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:758:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:761:7: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:766:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:778:15: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:778:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:787:11: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:794:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:797:11: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:828:10: branch_false: following ‘false’ branch (when ‘inarch_filename’ is non-NULL)...
binutils-with-gold-2.46/binutils/ar.c:828:10: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:834:15: branch_false: following ‘false’ branch (when ‘file_count == 0’)...
binutils-with-gold-2.46/binutils/ar.c:836:14: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:836:14: call_function: calling ‘open_inarch’ from ‘main’
binutils-with-gold-2.46/binutils/ar.c:836:14: return_function: returning to ‘main’ from ‘open_inarch’
binutils-with-gold-2.46/binutils/ar.c:839:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:842:11: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:842:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:890:7: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:893:11: call_function: calling ‘map_over_members’ from ‘main’
#  187|     if (count == 0)
#  188|       {
#  189|->       for (head = arch->archive_next; head; head = head->archive_next)
#  190|   	function (head);
#  191|         return;

Error: CPPCHECK_WARNING (CWE-562): [#def54]
binutils-with-gold-2.46/binutils/debug.c:3073: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3071|     top.t2 = t2;
# 3072|     top.next = info->compare_list;
# 3073|->   info->compare_list = &top;
# 3074|   
# 3075|     switch (t1->kind)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
binutils-with-gold-2.46/binutils/elfcomm.c:512:9: warning[-Wanalyzer-malloc-leak]: leak of ‘*arch.file_name’
binutils-with-gold-2.46/binutils/elfcomm.c:642:1: enter_function: entry to ‘get_archive_member_name’
binutils-with-gold-2.46/binutils/elfcomm.c:655:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:669:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:669:10: branch_false: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:684:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:688:10: branch_false: following ‘false’ branch (when ‘j < j’)...
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: branch_false: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: call_function: calling ‘adjust_relative_path’ from ‘get_archive_member_name’
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: return_function: returning to ‘get_archive_member_name’ from ‘adjust_relative_path’
binutils-with-gold-2.46/binutils/elfcomm.c:698:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:699:14: branch_true: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:699:14: call_function: calling ‘setup_nested_archive’ from ‘get_archive_member_name’
#  510|         return 1;
#  511|       }
#  512|->   got = fread (&arch->arhdr, 1, sizeof arch->arhdr, file);
#  513|     if (got != sizeof arch->arhdr)
#  514|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
binutils-with-gold-2.46/binutils/elfcomm.c:613:6: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(member_file_name, "rb")’
binutils-with-gold-2.46/binutils/elfcomm.c:642:1: enter_function: entry to ‘get_archive_member_name’
binutils-with-gold-2.46/binutils/elfcomm.c:655:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:669:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:669:10: branch_false: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:684:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:688:10: branch_false: following ‘false’ branch (when ‘j < j’)...
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: branch_false: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: call_function: calling ‘adjust_relative_path’ from ‘get_archive_member_name’
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: return_function: returning to ‘get_archive_member_name’ from ‘adjust_relative_path’
binutils-with-gold-2.46/binutils/elfcomm.c:698:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:699:14: branch_true: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:699:14: call_function: calling ‘setup_nested_archive’ from ‘get_archive_member_name’
#  611|     if (member_file == NULL)
#  612|       return 1;
#  613|->   if (fstat (fileno (member_file), &statbuf) < 0)
#  614|       return 1;
#  615|     return setup_archive (nested_arch, member_file_name, member_file,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
binutils-with-gold-2.46/binutils/elfcomm.c:613:6: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(member_file_name, "rb")’
binutils-with-gold-2.46/binutils/elfcomm.c:642:1: enter_function: entry to ‘get_archive_member_name’
binutils-with-gold-2.46/binutils/elfcomm.c:655:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:669:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:669:10: branch_false: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:684:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:688:10: branch_false: following ‘false’ branch (when ‘j < j’)...
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: branch_false: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: call_function: calling ‘adjust_relative_path’ from ‘get_archive_member_name’
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: return_function: returning to ‘get_archive_member_name’ from ‘adjust_relative_path’
binutils-with-gold-2.46/binutils/elfcomm.c:698:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:699:14: branch_true: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:699:14: call_function: calling ‘setup_nested_archive’ from ‘get_archive_member_name’
#  611|     if (member_file == NULL)
#  612|       return 1;
#  613|->   if (fstat (fileno (member_file), &statbuf) < 0)
#  614|       return 1;
#  615|     return setup_archive (nested_arch, member_file_name, member_file,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
binutils-with-gold-2.46/binutils/elfcomm.c:616:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(member_file_name, "rb")’
binutils-with-gold-2.46/binutils/elfcomm.c:642:1: enter_function: entry to ‘get_archive_member_name’
binutils-with-gold-2.46/binutils/elfcomm.c:655:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:669:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:669:10: branch_false: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:684:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:688:10: branch_false: following ‘false’ branch (when ‘j < j’)...
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: branch_false: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: call_function: calling ‘adjust_relative_path’ from ‘get_archive_member_name’
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: return_function: returning to ‘get_archive_member_name’ from ‘adjust_relative_path’
binutils-with-gold-2.46/binutils/elfcomm.c:698:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:699:14: branch_true: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:699:14: call_function: calling ‘setup_nested_archive’ from ‘get_archive_member_name’
#  614|       return 1;
#  615|     return setup_archive (nested_arch, member_file_name, member_file,
#  616|-> 			statbuf.st_size, 0, 0);
#  617|   }
#  618|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
binutils-with-gold-2.46/binutils/elfcomm.c:616:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(member_file_name, "rb")’
binutils-with-gold-2.46/binutils/elfcomm.c:642:1: enter_function: entry to ‘get_archive_member_name’
binutils-with-gold-2.46/binutils/elfcomm.c:655:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:669:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:669:10: branch_false: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:684:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:688:10: branch_false: following ‘false’ branch (when ‘j < j’)...
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: branch_false: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: call_function: calling ‘adjust_relative_path’ from ‘get_archive_member_name’
binutils-with-gold-2.46/binutils/elfcomm.c:696:26: return_function: returning to ‘get_archive_member_name’ from ‘adjust_relative_path’
binutils-with-gold-2.46/binutils/elfcomm.c:698:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/elfcomm.c:699:14: branch_true: ...to here
binutils-with-gold-2.46/binutils/elfcomm.c:699:14: call_function: calling ‘setup_nested_archive’ from ‘get_archive_member_name’
#  614|       return 1;
#  615|     return setup_archive (nested_arch, member_file_name, member_file,
#  616|-> 			statbuf.st_size, 0, 0);
#  617|   }
#  618|   

Error: CPPCHECK_WARNING (CWE-119): [#def60]
binutils-with-gold-2.46/binutils/elfedit.c:482: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: ehdr32.e_type
#  480|   
#  481|       case ELFCLASS32:
#  482|->       if (fread (ehdr32.e_type, sizeof (ehdr32) - EI_NIDENT,
#  483|   		 1, file) != 1)
#  484|   	return 0;

Error: CPPCHECK_WARNING (CWE-119): [#def61]
binutils-with-gold-2.46/binutils/elfedit.c:515: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: ehdr64.e_type
#  513|   	}
#  514|   
#  515|->       if (fread (ehdr64.e_type, sizeof (ehdr64) - EI_NIDENT,
#  516|   		 1, file) != 1)
#  517|   	return 0;

Error: CPPCHECK_WARNING (CWE-476): [#def62]
binutils-with-gold-2.46/binutils/nm.c:684: warning[nullPointer]: Possible null pointer dereference: info
#  682|   
#  683|     if (name == NULL)
#  684|->     name = info->sinfo->name;
#  685|   
#  686|     if (!with_symbol_versions

Error: COMPILER_WARNING (CWE-704): [#def63]
binutils-with-gold-2.46/binutils/nm.c: scope_hint: In function ‘print_symname’
binutils-with-gold-2.46/binutils/nm.c:689:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  689 |       char *atver = strchr (name, '@');
#      |                     ^~~~~~
#  687|         && bfd_get_flavour (abfd) == bfd_target_elf_flavour)
#  688|       {
#  689|->       char *atver = strchr (name, '@');
#  690|   
#  691|         if (atver)

Error: COMPILER_WARNING (CWE-704): [#def64]
binutils-with-gold-2.46/binutils/nm.c:689:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  687|         && bfd_get_flavour (abfd) == bfd_target_elf_flavour)
#  688|       {
#  689|->       char *atver = strchr (name, '@');
#  690|   
#  691|         if (atver)

Error: CPPCHECK_WARNING (CWE-476): [#def65]
binutils-with-gold-2.46/binutils/objcopy.c:1148: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
# 1146|       fatal (_("cannot open '%s': %s"), filename, strerror (errno));
# 1147|   
# 1148|->   if (fread (buffer, 1, size, f) == 0 || ferror (f))
# 1149|       fatal (_("%s: fread failed"), filename);
# 1150|   

Error: CPPCHECK_WARNING (CWE-476): [#def66]
binutils-with-gold-2.46/binutils/objcopy.c:1847: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: file
# 1845|   
# 1846|     lineno = 1;
# 1847|->   c = getc (file);
# 1848|     len = 0;
# 1849|     outsym_off = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def67]
binutils-with-gold-2.46/binutils/objcopy.c:5329: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
# 5327|     alloc = 4096;
# 5328|     pa->contents = (bfd_byte *) xmalloc (alloc);
# 5329|->   while (!feof (f))
# 5330|       {
# 5331|         off_t got;

Error: CPPCHECK_WARNING (CWE-682): [#def68]
binutils-with-gold-2.46/binutils/objdump.c:3856: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 3854|   	}
# 3855|       }
# 3856|->   rel_ppend = PTR_ADD (rel_pp, rel_count);
# 3857|   
# 3858|     if (!bfd_malloc_and_get_section (abfd, section, &data))

Error: GCC_ANALYZER_WARNING (CWE-688): [#def69]
binutils-with-gold-2.46/binutils/prdbg.c:414:49: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘s’ where non-null expected
binutils-with-gold-2.46/binutils/prdbg.c:2263:1: enter_function: entry to ‘tg_class_method_variant’
binutils-with-gold-2.46/binutils/prdbg.c:2274:3: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/prdbg.c:2275:3: branch_true: ...to here
binutils-with-gold-2.46/binutils/prdbg.c:2275:3: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/prdbg.c:2278:6: branch_true: ...to here
binutils-with-gold-2.46/binutils/prdbg.c:2289:17: acquire_memory: this call could return NULL
binutils-with-gold-2.46/binutils/prdbg.c:2293:9: call_function: calling ‘substitute_type’ from ‘tg_class_method_variant’
#  412|         char *n;
#  413|   
#  414|->       n = xmalloc (strlen (info->stack->type) + strlen (s));
#  415|   
#  416|         memcpy (n, info->stack->type, u - info->stack->type);

Error: CPPCHECK_WARNING (CWE-476): [#def70]
binutils-with-gold-2.46/binutils/prdbg.c:426: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  424|       }
#  425|   
#  426|->   if (strchr (s, '|') != NULL
#  427|         && (strchr (info->stack->type, '{') != NULL
#  428|   	  || strchr (info->stack->type, '(') != NULL))

Error: COMPILER_WARNING (CWE-704): [#def71]
binutils-with-gold-2.46/binutils/prdbg.c: scope_hint: In function ‘tg_start_function’
binutils-with-gold-2.46/binutils/prdbg.c:2658:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2658 |       sep = strchr (name, '(');
#      |           ^
# 2656|   	  name = dname;
# 2657|   	}
# 2658|->       sep = strchr (name, '(');
# 2659|         if (sep)
# 2660|   	*sep = 0;

Error: COMPILER_WARNING (CWE-704): [#def72]
binutils-with-gold-2.46/binutils/prdbg.c:2658:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2656|   	  name = dname;
# 2657|   	}
# 2658|->       sep = strchr (name, '(');
# 2659|         if (sep)
# 2660|   	*sep = 0;

Error: CPPCHECK_WARNING (CWE-457): [#def73]
binutils-with-gold-2.46/binutils/readelf.c:2935: error[legacyUninitvar]: Uninitialized variable: rels
# 2933|       }
# 2934|   
# 2935|->   free (rels);
# 2936|   
# 2937|     return res;

Error: CPPCHECK_WARNING (CWE-476): [#def74]
binutils-with-gold-2.46/binutils/readelf.c:6775: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_request
# 6773|       error (_("Out of memory allocating dump request table.\n"));
# 6774|   
# 6775|->   new_request->name = strdup (section);
# 6776|     if (!new_request->name)
# 6777|       error (_("Out of memory allocating dump request table.\n"));

Error: CPPCHECK_WARNING (CWE-476): [#def75]
binutils-with-gold-2.46/binutils/readelf.c:6775: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: section
# 6773|       error (_("Out of memory allocating dump request table.\n"));
# 6774|   
# 6775|->   new_request->name = strdup (section);
# 6776|     if (!new_request->name)
# 6777|       error (_("Out of memory allocating dump request table.\n"));

Error: CPPCHECK_WARNING (CWE-476): [#def76]
binutils-with-gold-2.46/binutils/readelf.c:6776: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_request
# 6774|   
# 6775|     new_request->name = strdup (section);
# 6776|->   if (!new_request->name)
# 6777|       error (_("Out of memory allocating dump request table.\n"));
# 6778|   

Error: CPPCHECK_WARNING (CWE-476): [#def77]
binutils-with-gold-2.46/binutils/readelf.c:6779: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_request
# 6777|       error (_("Out of memory allocating dump request table.\n"));
# 6778|   
# 6779|->   new_request->type = type;
# 6780|   
# 6781|     new_request->next = dump_sects_byname;

Error: CPPCHECK_WARNING (CWE-476): [#def78]
binutils-with-gold-2.46/binutils/readelf.c:6781: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_request
# 6779|     new_request->type = type;
# 6780|   
# 6781|->   new_request->next = dump_sects_byname;
# 6782|     dump_sects_byname = new_request;
# 6783|   }

Error: CPPCHECK_WARNING (CWE-682): [#def79]
binutils-with-gold-2.46/binutils/readelf.c:9544: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 9542|   		}
# 9543|   	      group_name = sym->st_name < strtab_size
# 9544|-> 		? strtab + sym->st_name : _("<corrupt>");
# 9545|   	    }
# 9546|   

Error: CPPCHECK_WARNING (CWE-119): [#def80]
binutils-with-gold-2.46/binutils/readelf.c:24681: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: ehdr32.e_type
#24679|         Elf32_External_Ehdr ehdr32;
#24680|   
#24681|->       if (fread (ehdr32.e_type, sizeof (ehdr32) - EI_NIDENT, 1, filedata->handle) != 1)
#24682|   	return false;
#24683|   

Error: CPPCHECK_WARNING (CWE-119): [#def81]
binutils-with-gold-2.46/binutils/readelf.c:24702: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: ehdr64.e_type
#24700|         Elf64_External_Ehdr ehdr64;
#24701|   
#24702|->       if (fread (ehdr64.e_type, sizeof (ehdr64) - EI_NIDENT, 1, filedata->handle) != 1)
#24703|   	return false;
#24704|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def82]
binutils-with-gold-2.46/binutils/strings.c:755:49: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buffer[2]’
binutils-with-gold-2.46/binutils/strings.c:1256:1: enter_function: entry to ‘print_strings’
binutils-with-gold-2.46/binutils/strings.c:1259:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/strings.c:1261:11: branch_true: ...to here
binutils-with-gold-2.46/binutils/strings.c:1265:10: branch_true: following ‘true’ branch (when ‘stream’ is non-NULL)...
binutils-with-gold-2.46/binutils/strings.c:1266:9: branch_true: ...to here
binutils-with-gold-2.46/binutils/strings.c:1266:9: call_function: calling ‘print_unicode_stream’ from ‘print_strings’
#  753|   	  printf ("\\u%02x%02x",
#  754|   		  ((buffer[0] & 0x0f) << 4) | ((buffer[1] & 0x3c) >> 2),
#  755|-> 		  ((buffer[1] & 0x03) << 6) | ((buffer[2] & 0x3f)));
#  756|   	  break;
#  757|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def83]
binutils-with-gold-2.46/binutils/strings.c:762:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buffer[2]’
binutils-with-gold-2.46/binutils/strings.c:1256:1: enter_function: entry to ‘print_strings’
binutils-with-gold-2.46/binutils/strings.c:1259:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/strings.c:1261:11: branch_true: ...to here
binutils-with-gold-2.46/binutils/strings.c:1265:10: branch_true: following ‘true’ branch (when ‘stream’ is non-NULL)...
binutils-with-gold-2.46/binutils/strings.c:1266:9: branch_true: ...to here
binutils-with-gold-2.46/binutils/strings.c:1266:9: call_function: calling ‘print_unicode_stream’ from ‘print_strings’
#  760|   		  ((buffer[0] & 0x07) << 2) | ((buffer[1] & 0x30) >> 4),
#  761|   		  ((buffer[1] & 0x0f) << 4) | ((buffer[2] & 0x3c) >> 2),
#  762|-> 		  ((buffer[2] & 0x03) << 6) | ((buffer[3] & 0x3f)));
#  763|   	  break;
#  764|   	default:

Error: GCC_ANALYZER_WARNING (CWE-457): [#def84]
binutils-with-gold-2.46/binutils/strings.c:762:49: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buffer[3]’
binutils-with-gold-2.46/binutils/strings.c:1256:1: enter_function: entry to ‘print_strings’
binutils-with-gold-2.46/binutils/strings.c:1259:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/strings.c:1261:11: branch_true: ...to here
binutils-with-gold-2.46/binutils/strings.c:1265:10: branch_true: following ‘true’ branch (when ‘stream’ is non-NULL)...
binutils-with-gold-2.46/binutils/strings.c:1266:9: branch_true: ...to here
binutils-with-gold-2.46/binutils/strings.c:1266:9: call_function: calling ‘print_unicode_stream’ from ‘print_strings’
#  760|   		  ((buffer[0] & 0x07) << 2) | ((buffer[1] & 0x30) >> 4),
#  761|   		  ((buffer[1] & 0x0f) << 4) | ((buffer[2] & 0x3c) >> 2),
#  762|-> 		  ((buffer[2] & 0x03) << 6) | ((buffer[3] & 0x3f)));
#  763|   	  break;
#  764|   	default:

Error: GCC_ANALYZER_WARNING (CWE-688): [#def85]
binutils-with-gold-2.46/binutils/wrstabs.c:923:26: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
binutils-with-gold-2.46/binutils/wrstabs.c:862:1: enter_function: entry to ‘stab_modify_type’
binutils-with-gold-2.46/binutils/wrstabs.c:869:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/wrstabs.c:871:3: branch_false: ...to here
binutils-with-gold-2.46/binutils/wrstabs.c:873:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/wrstabs.c:890:33: branch_false: ...to here
binutils-with-gold-2.46/binutils/wrstabs.c:922:15: call_function: calling ‘stab_pop_type’ from ‘stab_modify_type’
binutils-with-gold-2.46/binutils/wrstabs.c:922:15: return_function: returning to ‘stab_modify_type’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:923:26: danger: argument 1 (‘stab_pop_type(info)’) NULL where non-null expected
#  921|   
#  922|   	  s = stab_pop_type (info);
#  923|-> 	  buf = xmalloc (strlen (s) + 23);
#  924|   	  sprintf (buf, "%ld=%c%s", tindex, mod, s);
#  925|   	  free (s);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def86]
binutils-with-gold-2.46/binutils/wrstabs.c:968:26: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
binutils-with-gold-2.46/binutils/wrstabs.c:949:1: enter_function: entry to ‘stab_function_type’
binutils-with-gold-2.46/binutils/wrstabs.c:966:15: call_function: calling ‘stab_pop_type’ from ‘stab_function_type’
binutils-with-gold-2.46/binutils/wrstabs.c:966:15: return_function: returning to ‘stab_function_type’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:968:26: danger: argument 1 (‘stab_pop_type(p)’) NULL where non-null expected
#  966|   	  s = stab_pop_type (info);
#  967|   
#  968|-> 	  buf = xmalloc (strlen (s) + 3);
#  969|   	  sprintf (buf, ":t%s", s);
#  970|   	  free (s);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def87]
binutils-with-gold-2.46/binutils/wrstabs.c:1107:36: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
binutils-with-gold-2.46/binutils/wrstabs.c:1095:1: enter_function: entry to ‘stab_offset_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1102:12: call_function: calling ‘stab_pop_type’ from ‘stab_offset_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1102:12: return_function: returning to ‘stab_offset_type’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1105:10: call_function: calling ‘stab_pop_type’ from ‘stab_offset_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1105:10: return_function: returning to ‘stab_offset_type’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1107:36: danger: argument 1 (‘stab_pop_type(p)’) NULL where non-null expected
# 1105|     base = stab_pop_type (info);
# 1106|   
# 1107|->   buf = xmalloc (strlen (target) + strlen (base) + 3);
# 1108|     sprintf (buf, "@%s,%s", base, target);
# 1109|     free (base);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def88]
binutils-with-gold-2.46/binutils/wrstabs.c:1194:27: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
binutils-with-gold-2.46/binutils/wrstabs.c:1118:1: enter_function: entry to ‘stab_method_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1141:12: call_function: calling ‘stab_pop_type’ from ‘stab_method_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1141:12: return_function: returning to ‘stab_method_type’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1192:17: call_function: calling ‘stab_pop_type’ from ‘stab_method_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1192:17: return_function: returning to ‘stab_method_type’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1194:27: danger: argument 1 (‘stab_pop_type(p)’) NULL where non-null expected
# 1192|     return_type = stab_pop_type (info);
# 1193|   
# 1194|->   len = strlen (domain) + strlen (return_type) + 4 + argcount;
# 1195|     for (i = 0; i < argcount; i++)
# 1196|       len += strlen (args[i]);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def89]
binutils-with-gold-2.46/binutils/wrstabs.c:1930:33: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
binutils-with-gold-2.46/binutils/wrstabs.c:1923:1: enter_function: entry to ‘stab_tag’
binutils-with-gold-2.46/binutils/wrstabs.c:1928:7: call_function: calling ‘stab_pop_type’ from ‘stab_tag’
binutils-with-gold-2.46/binutils/wrstabs.c:1928:7: return_function: returning to ‘stab_tag’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1930:33: danger: argument 1 (‘stab_pop_type(p)’) NULL where non-null expected
# 1928|     s = stab_pop_type (info);
# 1929|   
# 1930|->   buf = xmalloc (strlen (tag) + strlen (s) + 3);
# 1931|   
# 1932|     sprintf (buf, "%s:T%s", tag, s);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def90]
binutils-with-gold-2.46/binutils/wrstabs.c:1976:34: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
binutils-with-gold-2.46/binutils/wrstabs.c:1969:1: enter_function: entry to ‘stab_typed_constant’
binutils-with-gold-2.46/binutils/wrstabs.c:1974:7: call_function: calling ‘stab_pop_type’ from ‘stab_typed_constant’
binutils-with-gold-2.46/binutils/wrstabs.c:1974:7: return_function: returning to ‘stab_typed_constant’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:1976:34: danger: argument 1 (‘stab_pop_type(p)’) NULL where non-null expected
# 1974|     s = stab_pop_type (info);
# 1975|   
# 1976|->   buf = xmalloc (strlen (name) + strlen (s) + 20);
# 1977|     sprintf (buf, "%s:c=e%s,%ld", name, s, (long) val);
# 1978|     free (s);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def91]
binutils-with-gold-2.46/binutils/wrstabs.c:2021:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
binutils-with-gold-2.46/binutils/wrstabs.c:1986:1: enter_function: entry to ‘stab_variable’
binutils-with-gold-2.46/binutils/wrstabs.c:1994:7: call_function: calling ‘stab_pop_type’ from ‘stab_variable’
binutils-with-gold-2.46/binutils/wrstabs.c:1994:7: return_function: returning to ‘stab_variable’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:2021:13: danger: dereference of NULL ‘stab_pop_type(p)’
# 2019|   
# 2020|         /* Make sure that this is a type reference or definition.  */
# 2021|->       if (! ISDIGIT (*s))
# 2022|   	{
# 2023|   	  char *n;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def92]
binutils-with-gold-2.46/binutils/wrstabs.c:2041:34: warning[-Wanalyzer-null-argument]: use of NULL ‘s’ where non-null expected
binutils-with-gold-2.46/binutils/wrstabs.c:1986:1: enter_function: entry to ‘stab_variable’
binutils-with-gold-2.46/binutils/wrstabs.c:1994:7: call_function: calling ‘stab_pop_type’ from ‘stab_variable’
binutils-with-gold-2.46/binutils/wrstabs.c:1994:7: return_function: returning to ‘stab_variable’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:2041:34: danger: argument 1 (‘s’) NULL where non-null expected
# 2039|       }
# 2040|   
# 2041|->   buf = xmalloc (strlen (name) + strlen (s) + 3);
# 2042|     sprintf (buf, "%s:%s%s", name, kindstr, s);
# 2043|     free (s);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def93]
binutils-with-gold-2.46/binutils/wrstabs.c:2061:34: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
binutils-with-gold-2.46/binutils/wrstabs.c:2051:1: enter_function: entry to ‘stab_start_function’
binutils-with-gold-2.46/binutils/wrstabs.c:2059:13: call_function: calling ‘stab_pop_type’ from ‘stab_start_function’
binutils-with-gold-2.46/binutils/wrstabs.c:2059:13: return_function: returning to ‘stab_start_function’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:2061:34: danger: argument 1 (‘stab_pop_type(p)’) NULL where non-null expected
# 2059|     rettype = stab_pop_type (info);
# 2060|   
# 2061|->   buf = xmalloc (strlen (name) + strlen (rettype) + 3);
# 2062|     sprintf (buf, "%s:%c%s", name,
# 2063|   	   globalp ? 'F' : 'f',

Error: GCC_ANALYZER_WARNING (CWE-688): [#def94]
binutils-with-gold-2.46/binutils/wrstabs.c:2111:34: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
binutils-with-gold-2.46/binutils/wrstabs.c:2076:1: enter_function: entry to ‘stab_function_parameter’
binutils-with-gold-2.46/binutils/wrstabs.c:2083:7: call_function: calling ‘stab_pop_type’ from ‘stab_function_parameter’
binutils-with-gold-2.46/binutils/wrstabs.c:2083:7: return_function: returning to ‘stab_function_parameter’ from ‘stab_pop_type’
binutils-with-gold-2.46/binutils/wrstabs.c:2083:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/wrstabs.c:2083:7: branch_true: ...to here
binutils-with-gold-2.46/binutils/wrstabs.c:2111:34: danger: argument 1 (‘stab_pop_type(p)’) NULL where non-null expected
# 2109|       }
# 2110|   
# 2111|->   buf = xmalloc (strlen (name) + strlen (s) + 3);
# 2112|     sprintf (buf, "%s:%c%s", name, kindc, s);
# 2113|     free (s);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def95]
binutils-with-gold-2.46/build-x86_64-redhat-linux/bfd/bfd.h:2288:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘abfd’
binutils-with-gold-2.46/ld/pe-dll.c:3695:1: enter_function: entry to ‘pep_dll_build_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3697:3: call_function: calling ‘pep_dll_id_target’ from ‘pep_dll_build_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3697:3: return_function: returning to ‘pep_dll_build_sections’ from ‘pep_dll_id_target’
binutils-with-gold-2.46/ld/pe-dll.c:3699:3: call_function: calling ‘process_def_file_and_drectve’ from ‘pep_dll_build_sections’
# 2286|   bfd_get_filename (const bfd *abfd)
# 2287|   {
# 2288|->   return abfd->filename;
# 2289|   }
# 2290|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def96]
binutils-with-gold-2.46/build-x86_64-redhat-linux/bfd/bfd.h:2364:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
binutils-with-gold-2.46/binutils/ar.c:698:1: enter_function: entry to ‘main’
binutils-with-gold-2.46/binutils/ar.c:738:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:740:3: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:753:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:756:10: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:758:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:761:7: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:766:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:778:15: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:778:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:787:11: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:794:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/binutils/ar.c:797:11: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:828:10: branch_false: following ‘false’ branch (when ‘inarch_filename’ is non-NULL)...
binutils-with-gold-2.46/binutils/ar.c:828:10: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:834:15: branch_false: following ‘false’ branch (when ‘file_count == 0’)...
binutils-with-gold-2.46/binutils/ar.c:836:14: branch_false: ...to here
binutils-with-gold-2.46/binutils/ar.c:836:14: call_function: calling ‘open_inarch’ from ‘main’
binutils-with-gold-2.46/binutils/ar.c:836:14: return_function: returning to ‘main’ from ‘open_inarch’
binutils-with-gold-2.46/binutils/ar.c:839:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/binutils/ar.c:839:35: call_function: inlined call to ‘bfd_is_thin_archive’ from ‘main’
# 2362|   bfd_is_thin_archive (const bfd *abfd)
# 2363|   {
# 2364|->   return abfd->is_thin_archive;
# 2365|   }
# 2366|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1563:47: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1550:21: enter_function: entry to ‘yy_create_buffer’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1554:24: call_function: inlined call to ‘yyalloc’ from ‘yy_create_buffer’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1555:5: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1558:2: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1563:47: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1818:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1802:17: enter_function: entry to ‘yy_scan_bytes’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1811:17: call_function: inlined call to ‘yyalloc’ from ‘yy_scan_bytes’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1812:5: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1812:5: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arlex.c:1820:6: call_function: calling ‘yy_scan_buffer’ from ‘yy_scan_bytes’

Error: GCC_ANALYZER_WARNING (CWE-457): [#def99]
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1125:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1083:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1089:28: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1112:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1114:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1123:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1125:9: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1125:9: danger: use of uninitialized value ‘yyss’ here

Error: GCC_ANALYZER_WARNING (CWE-457): [#def100]
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1252:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.name’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1083:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1147:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1147:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1150:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1162:6: branch_true: following ‘true’ branch (when ‘yyn == -14’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1163:5: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1232:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1234:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/arparse.c:1252:3: danger: use of uninitialized value ‘*<unknown>.name’ here

Error: GCC_ANALYZER_WARNING (CWE-457): [#def101]
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1054:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1012:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1018:28: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1041:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1043:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1052:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1054:9: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1054:9: danger: use of uninitialized value ‘yyss’ here

Error: GCC_ANALYZER_WARNING (CWE-457): [#def102]
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1181:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1012:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1076:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1076:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1079:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1091:6: branch_true: following ‘true’ branch (when ‘yyn == -14’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1092:5: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1161:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1163:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/sysinfo.c:1181:3: danger: use of uninitialized value ‘*<unknown>’ here

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1430:47: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1417:21: enter_function: entry to ‘yy_create_buffer’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1421:24: call_function: inlined call to ‘yyalloc’ from ‘yy_create_buffer’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1422:5: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1425:2: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1430:47: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1685:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1669:17: enter_function: entry to ‘yy_scan_bytes’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1678:17: call_function: inlined call to ‘yyalloc’ from ‘yy_scan_bytes’
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1679:5: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1679:5: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/binutils/syslex.c:1687:6: call_function: calling ‘yy_scan_buffer’ from ‘yy_scan_bytes’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2274:9: warning[-Wanalyzer-malloc-leak]: leak of ‘yyptr’
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2232:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2296:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2296:6: branch_false: following ‘false’ branch (when ‘yystate != 26’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2299:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2311:6: branch_false: following ‘false’ branch (when ‘yyn != -423’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2317:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2317:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2320:16: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2329:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2341:17: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2348:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2351:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2361:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2361:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2368:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2232:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2296:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2296:6: branch_false: following ‘false’ branch (when ‘yystate != 26’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2299:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2311:6: branch_false: following ‘false’ branch (when ‘yyn != -423’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2317:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2317:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2320:16: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2348:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2351:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2361:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2361:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2368:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2261:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2263:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2270:11: acquire_memory: allocated here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2272:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2272:12: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2277:12: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2282:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2290:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2296:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2296:6: branch_false: following ‘false’ branch (when ‘yystate != 26’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2299:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2311:6: branch_false: following ‘false’ branch (when ‘yyn != -423’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2317:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2317:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2320:16: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2348:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2351:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2361:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2361:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2368:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2232:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2238:34: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2261:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2263:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2274:9: danger: ‘yyptr’ leaks here; was allocated at [(33)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/32)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def106]
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2274:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2232:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2238:34: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2261:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2263:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2272:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2272:12: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2274:9: danger: use of uninitialized value ‘yyss’ here

Error: GCC_ANALYZER_WARNING (CWE-457): [#def107]
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2275:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvs’
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2232:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2296:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2296:6: branch_false: following ‘false’ branch (when ‘yystate != 26’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2299:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2311:6: branch_false: following ‘false’ branch (when ‘yyn != -423’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2317:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2317:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2320:16: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2329:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2341:17: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2348:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2351:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2361:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2361:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2368:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2232:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2238:34: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2261:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2263:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2272:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2272:12: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2275:9: danger: use of uninitialized value ‘yyvs’ here

Error: GCC_ANALYZER_WARNING (CWE-457): [#def108]
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2401:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2232:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2296:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2296:6: branch_false: following ‘false’ branch (when ‘yystate != 26’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2299:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2311:6: branch_false: following ‘false’ branch (when ‘yyn != -423’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2317:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2317:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2320:16: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2329:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2341:17: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2348:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2351:6: branch_true: following ‘true’ branch (when ‘yyn <= 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2355:7: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/gold/yyscript.c:2401:3: danger: use of uninitialized value ‘*<unknown>’ here

Error: GCC_ANALYZER_WARNING (CWE-457): [#def109]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.c:1325:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1049:1: enter_function: entry to ‘def_file_add_directive’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1058:10: branch_true: following ‘true’ branch (when ‘param < pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1058:10: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1060:14: branch_true: following ‘true’ branch (when ‘param < pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1061:11: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1060:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1064:10: branch_false: following ‘false’ branch (when ‘param != pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1072:12: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_true: following ‘true’ branch (when ‘tend < pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1074:11: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1075:9: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1079:19: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1081:10: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1083:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1084:11: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1083:8: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1085:17: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1083:8: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1087:8: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1091:12: call_function: calling ‘def_parse’ from ‘def_file_add_directive’

Error: GCC_ANALYZER_WARNING (CWE-457): [#def110]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.c:1326:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvs’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1049:1: enter_function: entry to ‘def_file_add_directive’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1058:10: branch_true: following ‘true’ branch (when ‘param < pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1058:10: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1060:14: branch_true: following ‘true’ branch (when ‘param < pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1061:11: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1060:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1064:10: branch_false: following ‘false’ branch (when ‘param != pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1072:12: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_true: following ‘true’ branch (when ‘tend < pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1074:11: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1075:9: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1079:19: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1081:10: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1083:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1084:11: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1083:8: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1085:17: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1083:8: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1087:8: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1091:12: call_function: calling ‘def_parse’ from ‘def_file_add_directive’

Error: GCC_ANALYZER_WARNING (CWE-457): [#def111]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.c:1452:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1049:1: enter_function: entry to ‘def_file_add_directive’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1058:10: branch_true: following ‘true’ branch (when ‘param < pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1058:10: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1060:14: branch_true: following ‘true’ branch (when ‘param < pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1061:11: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1060:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1064:10: branch_false: following ‘false’ branch (when ‘param != pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1072:12: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_true: following ‘true’ branch (when ‘tend < pend’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1074:11: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1075:9: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1073:5: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1079:19: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1081:10: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1083:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1084:11: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1083:8: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1085:17: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1083:8: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1087:8: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/deffilep.y:1091:12: call_function: calling ‘def_parse’ from ‘def_file_add_directive’

Error: COMPILER_WARNING (CWE-704): [#def112]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c: scope_hint: In function ‘pe_fixup_stdcalls’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1075:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1075 |           at = strchr (name + 1, '@');
#      |              ^
# 1073|   
# 1074|   	if (lead_at)
# 1075|-> 	  at = strchr (name + 1, '@');
# 1076|   	else
# 1077|   	  at = strchr (name, '@');

Error: COMPILER_WARNING (CWE-704): [#def113]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1075:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1073|   
# 1074|   	if (lead_at)
# 1075|-> 	  at = strchr (name + 1, '@');
# 1076|   	else
# 1077|   	  at = strchr (name, '@');

Error: COMPILER_WARNING (CWE-704): [#def114]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1077:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1077 |           at = strchr (name, '@');
#      |              ^
# 1075|   	  at = strchr (name + 1, '@');
# 1076|   	else
# 1077|-> 	  at = strchr (name, '@');
# 1078|   
# 1079|   	if (at || lead_at)

Error: COMPILER_WARNING (CWE-704): [#def115]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1077:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1075|   	  at = strchr (name + 1, '@');
# 1076|   	else
# 1077|-> 	  at = strchr (name, '@');
# 1078|   
# 1079|   	if (at || lead_at)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def116]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1088:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1067:40: branch_true: following ‘true’ branch (when ‘undef’ is non-NULL)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1068:9: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1068:8: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1070:22: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1079:12: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1083:27: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1088:15: danger: dereference of NULL ‘strchr(xstrdup(name), 64)’
# 1086|   	      *cname = '_';
# 1087|   	    if (at)
# 1088|-> 	      * strchr (cname, '@') = 0;
# 1089|   	    sym = bfd_link_hash_lookup (link_info.hash, cname, false, false, true);
# 1090|   

Error: COMPILER_WARNING (CWE-704): [#def117]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c: scope_hint: In function ‘gldi386pe_after_open’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1692:17: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1692 |             pnt = strrchr (bfd_get_filename (is->the_bfd), '.');
#      |                 ^
# 1690|   	       that already have unique names, it shouldn't make any difference
# 1691|   	       as we only append a suffix on the names.  */
# 1692|-> 	    pnt = strrchr (bfd_get_filename (is->the_bfd), '.');
# 1693|   
# 1694|   	    if (pnt != NULL && (fileext_cmp (pnt + 1, "o") != 0 &&

Error: COMPILER_WARNING (CWE-704): [#def118]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:1692:17: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1690|   	       that already have unique names, it shouldn't make any difference
# 1691|   	       as we only append a suffix on the names.  */
# 1692|-> 	    pnt = strrchr (bfd_get_filename (is->the_bfd), '.');
# 1693|   
# 1694|   	    if (pnt != NULL && (fileext_cmp (pnt + 1, "o") != 0 &&

Error: COMPILER_WARNING (CWE-704): [#def119]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c: scope_hint: In function ‘gldi386pe_place_orphan’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:2074:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2074 |       && (dollar = strchr (secname, '$')) != NULL)
#      |                  ^
# 2072|     /* Look through the script to see where to place this section.  */
# 2073|     if (!bfd_link_relocatable (&link_info)
# 2074|->       && (dollar = strchr (secname, '$')) != NULL)
# 2075|       {
# 2076|         size_t len = dollar - secname;

Error: COMPILER_WARNING (CWE-704): [#def120]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pe.c:2074:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2072|     /* Look through the script to see where to place this section.  */
# 2073|     if (!bfd_link_relocatable (&link_info)
# 2074|->       && (dollar = strchr (secname, '$')) != NULL)
# 2075|       {
# 2076|         size_t len = dollar - secname;

Error: COMPILER_WARNING (CWE-704): [#def121]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pep.c: scope_hint: In function ‘pep_fixup_stdcalls’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pep.c:1019:20: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 1019 |         char* at = strchr (undef->root.string, '@');
#      |                    ^~~~~~
# 1017|       if (undef->type == bfd_link_hash_undefined)
# 1018|         {
# 1019|-> 	char* at = strchr (undef->root.string, '@');
# 1020|   	int lead_at = (*undef->root.string == '@');
# 1021|   	if (lead_at)

Error: COMPILER_WARNING (CWE-704): [#def122]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pep.c:1019:20: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 1017|       if (undef->type == bfd_link_hash_undefined)
# 1018|         {
# 1019|-> 	char* at = strchr (undef->root.string, '@');
# 1020|   	int lead_at = (*undef->root.string == '@');
# 1021|   	if (lead_at)

Error: COMPILER_WARNING (CWE-704): [#def123]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pep.c:1022:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1022 |           at = strchr (undef->root.string + 1, '@');
#      |              ^
# 1020|   	int lead_at = (*undef->root.string == '@');
# 1021|   	if (lead_at)
# 1022|-> 	  at = strchr (undef->root.string + 1, '@');
# 1023|   	if (at || lead_at)
# 1024|   	  {

Error: COMPILER_WARNING (CWE-704): [#def124]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pep.c:1022:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1020|   	int lead_at = (*undef->root.string == '@');
# 1021|   	if (lead_at)
# 1022|-> 	  at = strchr (undef->root.string + 1, '@');
# 1023|   	if (at || lead_at)
# 1024|   	  {

Error: COMPILER_WARNING (CWE-704): [#def125]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pep.c: scope_hint: In function ‘gldi386pep_after_open’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pep.c:1689:17: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1689 |             pnt = strrchr (bfd_get_filename (is->the_bfd), '.');
#      |                 ^
# 1687|   	       that already have unique names, it shouldn't make any difference
# 1688|   	       as we only append a suffix on the names.  */
# 1689|-> 	    pnt = strrchr (bfd_get_filename (is->the_bfd), '.');
# 1690|   
# 1691|   	    if (pnt != NULL && (fileext_cmp (pnt + 1, "o") != 0 &&

Error: COMPILER_WARNING (CWE-704): [#def126]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pep.c:1689:17: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1687|   	       that already have unique names, it shouldn't make any difference
# 1688|   	       as we only append a suffix on the names.  */
# 1689|-> 	    pnt = strrchr (bfd_get_filename (is->the_bfd), '.');
# 1690|   
# 1691|   	    if (pnt != NULL && (fileext_cmp (pnt + 1, "o") != 0 &&

Error: COMPILER_WARNING (CWE-704): [#def127]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pep.c: scope_hint: In function ‘gldi386pep_place_orphan’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pep.c:1924:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1924 |       && (dollar = strchr (secname, '$')) != NULL)
#      |                  ^
# 1922|     /* Look through the script to see where to place this section.  */
# 1923|     if (!bfd_link_relocatable (&link_info)
# 1924|->       && (dollar = strchr (secname, '$')) != NULL)
# 1925|       {
# 1926|         size_t len = dollar - secname;

Error: COMPILER_WARNING (CWE-704): [#def128]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ei386pep.c:1924:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1922|     /* Look through the script to see where to place this section.  */
# 1923|     if (!bfd_link_relocatable (&link_info)
# 1924|->       && (dollar = strchr (secname, '$')) != NULL)
# 1925|       {
# 1926|         size_t len = dollar - secname;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2474:9: warning[-Wanalyzer-malloc-leak]: leak of ‘yyptr’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2432:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2496:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2496:6: branch_false: following ‘false’ branch (when ‘yystate != 20’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2499:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2511:6: branch_false: following ‘false’ branch (when ‘yyn != -782’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2517:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2517:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2519:7: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2529:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2541:17: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2548:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2551:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2561:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2561:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2565:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2432:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2496:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2496:6: branch_false: following ‘false’ branch (when ‘yystate != 20’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2499:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2511:6: branch_false: following ‘false’ branch (when ‘yyn != -782’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2517:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2517:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2519:7: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2548:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2551:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2561:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2561:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2565:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2461:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2463:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2470:11: acquire_memory: allocated here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2472:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2472:12: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2477:12: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2482:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2490:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2496:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2496:6: branch_false: following ‘false’ branch (when ‘yystate != 20’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2499:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2511:6: branch_false: following ‘false’ branch (when ‘yyn != -782’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2517:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2548:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2551:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2561:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2561:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2565:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2430:3: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2432:12: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2432:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2438:34: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2461:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2463:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2474:9: danger: ‘yyptr’ leaks here; was allocated at [(33)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/32)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def130]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2474:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2432:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2438:34: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2461:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2463:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2472:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2472:12: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2474:9: danger: use of uninitialized value ‘yyss’ here

Error: GCC_ANALYZER_WARNING (CWE-457): [#def131]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2475:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvs’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2432:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2496:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2496:6: branch_false: following ‘false’ branch (when ‘yystate != 20’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2499:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2511:6: branch_false: following ‘false’ branch (when ‘yyn != -782’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2517:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2517:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2519:7: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2529:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2541:17: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2548:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2551:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2561:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2561:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2565:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2432:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2438:34: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2461:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2463:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2472:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2472:12: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2475:9: danger: use of uninitialized value ‘yyvs’ here

Error: GCC_ANALYZER_WARNING (CWE-457): [#def132]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2601:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2432:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2496:6: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2496:6: branch_false: following ‘false’ branch (when ‘yystate != 20’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2499:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2511:6: branch_false: following ‘false’ branch (when ‘yyn != -782’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2517:7: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2517:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2519:7: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2529:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2541:17: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2548:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2551:6: branch_true: following ‘true’ branch (when ‘yyn <= 0’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2555:7: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldgram.c:2601:3: danger: use of uninitialized value ‘*<unknown>’ here

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.c:3127:5: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:686:1: enter_function: entry to ‘comment’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:693:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:700:10: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:700:10: branch_true: following ‘true’ branch (when ‘c == 42’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:702:8: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:702:8: call_function: calling ‘input’ from ‘comment’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.c:3134:5: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:686:1: enter_function: entry to ‘comment’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:693:14: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:700:10: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:700:10: branch_true: following ‘true’ branch (when ‘c == 42’)...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:702:8: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:702:8: call_function: calling ‘input’ from ‘comment’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.c:3411:47: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:508:1: enter_function: entry to ‘lex_push_file’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:510:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:512:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:515:38: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:515:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:521:3: call_function: calling ‘yy_create_buffer’ from ‘lex_push_file’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.c:3411:47: warning[-Wanalyzer-malloc-leak]: leak of ‘yy_create_buffer(file, 16384)’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:508:1: enter_function: entry to ‘lex_push_file’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:510:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:512:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:515:38: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:515:38: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:521:3: call_function: calling ‘yy_create_buffer’ from ‘lex_push_file’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:521:3: return_function: returning to ‘lex_push_file’ from ‘yy_create_buffer’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:521:3: call_function: calling ‘yy_switch_to_buffer’ from ‘lex_push_file’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.c:3419:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:508:1: enter_function: entry to ‘lex_push_file’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:510:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:512:3: branch_false: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:515:38: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:515:38: branch_true: ...to here
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:521:3: call_function: calling ‘yy_create_buffer’ from ‘lex_push_file’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:521:3: return_function: returning to ‘lex_push_file’ from ‘yy_create_buffer’
binutils-with-gold-2.46/build-x86_64-redhat-linux/ld/ldlex.l:521:3: call_function: calling ‘yy_switch_to_buffer’ from ‘lex_push_file’

Error: GCC_ANALYZER_WARNING (CWE-476): [#def138]
binutils-with-gold-2.46/gas/config/obj-elf.c:2835:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
binutils-with-gold-2.46/gas/config/obj-elf.c:2819:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gas/config/obj-elf.c:2819:6: branch_true: ...to here
binutils-with-gold-2.46/gas/config/obj-elf.c:2823:33: branch_true: following ‘true’ branch (when ‘symp’ is non-NULL)...
binutils-with-gold-2.46/gas/config/obj-elf.c:2825:39: branch_true: ...to here
binutils-with-gold-2.46/gas/config/obj-elf.c:2828:14: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gas/config/obj-elf.c:2830:25: branch_true: ...to here
binutils-with-gold-2.46/gas/config/obj-elf.c:2834:18: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gas/config/obj-elf.c:2835:22: branch_true: ...to here
binutils-with-gold-2.46/gas/config/obj-elf.c:2835:22: danger: dereference of NULL ‘p’
# 2833|   	      /* NB: Malformed versioned symbols may not have @@@.  */
# 2834|   	      if (sy_obj->rename
# 2835|-> 		  && p[1] == ELF_VER_CHR
# 2836|   		  && p[2] == ELF_VER_CHR)
# 2837|   		{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def139]
binutils-with-gold-2.46/gas/config/obj-elf.c:2850:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
binutils-with-gold-2.46/gas/config/obj-elf.c:2819:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gas/config/obj-elf.c:2819:6: branch_true: ...to here
binutils-with-gold-2.46/gas/config/obj-elf.c:2823:33: branch_true: following ‘true’ branch (when ‘symp’ is non-NULL)...
binutils-with-gold-2.46/gas/config/obj-elf.c:2825:39: branch_true: ...to here
binutils-with-gold-2.46/gas/config/obj-elf.c:2828:14: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gas/config/obj-elf.c:2830:25: branch_true: ...to here
binutils-with-gold-2.46/gas/config/obj-elf.c:2834:18: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gas/config/obj-elf.c:2845:18: branch_false: ...to here
binutils-with-gold-2.46/gas/config/obj-elf.c:2845:18: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gas/config/obj-elf.c:2850:23: branch_true: ...to here
binutils-with-gold-2.46/gas/config/obj-elf.c:2850:22: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gas/config/obj-elf.c:2850:42: branch_true: ...to here
binutils-with-gold-2.46/gas/config/obj-elf.c:2850:42: danger: dereference of NULL ‘p’
# 2848|   		     is reserved for definitions of the default version
# 2849|   		     to link against.  */
# 2850|-> 		  if (!sy_obj->rename && p[1] == ELF_VER_CHR)
# 2851|   		    {
# 2852|   		      as_bad (_("invalid attempt to declare external "

Error: CPPCHECK_WARNING (CWE-457): [#def140]
binutils-with-gold-2.46/gas/dwarf2dbg.c:1107: error[uninitvar]: Uninitialized variable: *lss->pmove_tail
# 1105|   
# 1106|     now = frag_now_fix ();
# 1107|->   while ((e = *lss->pmove_tail))
# 1108|       {
# 1109|         if (S_GET_VALUE (e->label) == now)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def141]
binutils-with-gold-2.46/gas/gen-sframe.c:195:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cur_fre’
binutils-with-gold-2.46/gas/gen-sframe.c:2509:1: enter_function: entry to ‘output_sframe’
binutils-with-gold-2.46/gas/gen-sframe.c:2514:3: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gas/gen-sframe.c:2516:3: call_function: inlined call to ‘sframe_set_version’ from ‘output_sframe’
binutils-with-gold-2.46/gas/gen-sframe.c:2519:3: call_function: calling ‘create_sframe_all’ from ‘output_sframe’
#  193|   {
#  194|     fre->ra_loc = SFRAME_FRE_ELEM_LOC_STACK;
#  195|->   fre->ra_offset = ra_offset;
#  196|     fre->ra_undefined_p = false;
#  197|     fre->merge_candidate = false;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def142]
binutils-with-gold-2.46/gas/gen-sframe.c:204:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cur_fre’
binutils-with-gold-2.46/gas/gen-sframe.c:2509:1: enter_function: entry to ‘output_sframe’
binutils-with-gold-2.46/gas/gen-sframe.c:2514:3: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gas/gen-sframe.c:2516:3: call_function: inlined call to ‘sframe_set_version’ from ‘output_sframe’
binutils-with-gold-2.46/gas/gen-sframe.c:2519:3: call_function: calling ‘create_sframe_all’ from ‘output_sframe’
#  202|   {
#  203|     fre->fp_loc = SFRAME_FRE_ELEM_LOC_STACK;
#  204|->   fre->fp_offset = fp_offset;
#  205|     fre->merge_candidate = false;
#  206|   }

Error: CPPCHECK_WARNING (CWE-587): [#def143]
binutils-with-gold-2.46/gas/gen-sframe.c:1817: error[assignBoolToPointer]: Boolean value assigned to pointer.
# 1815|         cur_fre->merge_candidate = false;
# 1816|         /* Done handling here.  */
# 1817|->       caller_warn_p = false;
# 1818|   
# 1819|         return err;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def144]
binutils-with-gold-2.46/gas/gen-sframe.c:2248:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cur_fre’
binutils-with-gold-2.46/gas/gen-sframe.c:2509:1: enter_function: entry to ‘output_sframe’
binutils-with-gold-2.46/gas/gen-sframe.c:2514:3: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gas/gen-sframe.c:2516:3: call_function: inlined call to ‘sframe_set_version’ from ‘output_sframe’
binutils-with-gold-2.46/gas/gen-sframe.c:2519:3: call_function: calling ‘create_sframe_all’ from ‘output_sframe’
# 2246|     else if (cfi_insn->u.r == SFRAME_CFA_FP_REG)
# 2247|       {
# 2248|->       cur_fre->fp_loc = SFRAME_FRE_ELEM_LOC_NONE;
# 2249|         cur_fre->fp_offset = 0;
# 2250|         cur_fre->merge_candidate = false;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def145]
binutils-with-gold-2.46/gas/listing.c:547:7: warning[-Wanalyzer-null-argument]: use of NULL ‘last_open_file’ where non-null expected
binutils-with-gold-2.46/gas/listing.c:1427:1: enter_function: entry to ‘listing_print’
binutils-with-gold-2.46/gas/listing.c:1458:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gas/listing.c:1459:5: branch_true: ...to here
binutils-with-gold-2.46/gas/listing.c:1459:5: call_function: calling ‘listing_listing’ from ‘listing_print’
#  545|       }
#  546|   
#  547|->   c = fgetc (last_open_file);
#  548|   
#  549|     while (c != EOF && c != '\n' && c != '\r')

Error: GCC_ANALYZER_WARNING (CWE-688): [#def146]
binutils-with-gold-2.46/gas/macro.c:95:16: warning[-Wanalyzer-null-argument]: use of NULL ‘from’ where non-null expected
binutils-with-gold-2.46/gas/macro.c:1284:1: enter_function: entry to ‘expand_irp’
binutils-with-gold-2.46/gas/macro.c:1294:9: call_function: calling ‘buffer_and_nest’ from ‘expand_irp’
#   93|       }
#   94|     else
#   95|->     from_len = strlen (from);
#   96|   
#   97|     /* Record the present source position, such that diagnostics and debug info

Error: GCC_ANALYZER_WARNING (CWE-835): [#def147]
binutils-with-gold-2.46/gas/read.c:1507:9: warning[-Wanalyzer-infinite-loop]: infinite loop
# 1505|   #else
# 1506|     for (s = input_line_pointer;
# 1507|->        !is_end_of_stmt (*s);
# 1508|          s++)
# 1509|       ;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def148]
binutils-with-gold-2.46/gas/read.c:1525:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘stop’
binutils-with-gold-2.46/gas/read.c:4410:1: enter_function: entry to ‘s_reloc’
binutils-with-gold-2.46/gas/read.c:4430:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gas/read.c:4433:3: branch_false: ...to here
binutils-with-gold-2.46/gas/read.c:4507:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gas/read.c:4508:9: branch_true: ...to here
binutils-with-gold-2.46/gas/read.c:4508:9: call_function: calling ‘mri_comment_end’ from ‘s_reloc’
# 1523|   
# 1524|     input_line_pointer = stop;
# 1525|->   *stop = stopc;
# 1526|     while (!is_end_of_stmt (*input_line_pointer))
# 1527|       ++input_line_pointer;

Error: CPPCHECK_WARNING (CWE-682): [#def149]
binutils-with-gold-2.46/gas/read.c:5346: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 5344|   	  if (orig)
# 5345|   	    *p = byte;
# 5346|-> 	  p++;
# 5347|   	}
# 5348|         while ((byte & 0x80) != 0 && loaded >= 7);

Error: CPPCHECK_WARNING (CWE-682): [#def150]
binutils-with-gold-2.46/gas/read.c:5398: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 5396|         if (orig)
# 5397|   	*p = byte;
# 5398|->       p++;
# 5399|       }
# 5400|     while (byte & 0x80);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def151]
binutils-with-gold-2.46/gprof/basic_blocks.c:444:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&tmpbuf’
binutils-with-gold-2.46/gprof/basic_blocks.c:335:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gprof/basic_blocks.c:336:17: branch_true: ...to here
binutils-with-gold-2.46/gprof/basic_blocks.c:338:6: branch_false: following ‘false’ branch (when ‘b’ is non-NULL)...
binutils-with-gold-2.46/gprof/basic_blocks.c:352:7: branch_false: ...to here
binutils-with-gold-2.46/gprof/basic_blocks.c:387:19: branch_true: following ‘true’ branch (when ‘i != 10’)...
binutils-with-gold-2.46/gprof/basic_blocks.c:387:31: branch_true: ...to here
binutils-with-gold-2.46/gprof/basic_blocks.c:420:10: branch_false: following ‘false’ branch (when ‘ncalls_set != 0’)...
binutils-with-gold-2.46/gprof/basic_blocks.c:430:7: branch_false: ...to here
binutils-with-gold-2.46/gprof/basic_blocks.c:432:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gprof/basic_blocks.c:434:11: branch_true: ...to here
binutils-with-gold-2.46/gprof/basic_blocks.c:442:10: branch_true: following ‘true’ branch (when ‘len >= width’)...
binutils-with-gold-2.46/gprof/basic_blocks.c:444:11: branch_true: ...to here
binutils-with-gold-2.46/gprof/basic_blocks.c:444:11: danger: use of uninitialized value ‘&tmpbuf’ here
#  442|         if (len >= width)
#  443|   	{
#  444|-> 	  strncpy (buf, tmpbuf, width);
#  445|   	  buf[width] = '\0';
#  446|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def152]
binutils-with-gold-2.46/gprof/corefile.c:506: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#  504|     unsigned int num = 0;
#  505|   
#  506|->   while (!feof (f) && fgets (buf, BUFSIZE - 1, f))
#  507|       {
#  508|         if (sscanf (buf, "%" STR_BUFSIZE "s %c %" STR_BUFSIZE "s", address, &type, name) == 3)

Error: CPPCHECK_WARNING (CWE-476): [#def153]
binutils-with-gold-2.46/gprof/corefile.c:558: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#  556|     symtab->limit = symtab->base;
#  557|   
#  558|->   if (fseek (f, 0, SEEK_SET) != 0)
#  559|       {
#  560|         perror (sym_table_file);

Error: CPPCHECK_WARNING (CWE-476): [#def154]
binutils-with-gold-2.46/gprof/gmon_io.c:300: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: ifp
#  298|       }
#  299|   
#  300|->   if (fread (&ghdr, sizeof (struct gmon_hdr), 1, ifp) != 1)
#  301|       {
#  302|         fprintf (stderr, _("%s: file too short to be a gmon file\n"),

Error: GCC_ANALYZER_WARNING (CWE-617): [#def155]
binutils-with-gold-2.46/gprof/gmon_io.c:359:15: warning[-Wanalyzer-tainted-assertion]: use of attacked-controlled value in condition for assertion
binutils-with-gold-2.46/gprof/gmon_io.c:284:6: branch_true: following ‘true’ branch (when the strings are equal)...
binutils-with-gold-2.46/gprof/gmon_io.c:286:7: branch_true: ...to here
binutils-with-gold-2.46/gprof/gmon_io.c:300:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprof/gmon_io.c:307:7: branch_false: ...to here
binutils-with-gold-2.46/gprof/gmon_io.c:310:11: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprof/gmon_io.c:318:27: branch_false: ...to here
binutils-with-gold-2.46/gprof/gmon_io.c:320:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprof/gmon_io.c:320:10: branch_false: ...to here
binutils-with-gold-2.46/gprof/gmon_io.c:329:14: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gprof/gmon_io.c:331:11: branch_true: ...to here
binutils-with-gold-2.46/gprof/gmon_io.c:359:15: danger: treating ‘done’ as an assertion failure handler due to ‘__attribute__((__noreturn__))’
#  357|   		       _("%s: %s: found bad tag %d (file corrupted?)\n"),
#  358|   		       whoami, filename, tag);
#  359|-> 	      done (1);
#  360|   	    }
#  361|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def156]
binutils-with-gold-2.46/gprof/gmon_io.c:598:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "w")’
binutils-with-gold-2.46/gprof/gmon_io.c:589:9: acquire_resource: opened here
binutils-with-gold-2.46/gprof/gmon_io.c:590:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprof/gmon_io.c:596:12: branch_false: ...to here
binutils-with-gold-2.46/gprof/gmon_io.c:598:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprof/gmon_io.c:623:12: branch_false: ...to here
binutils-with-gold-2.46/gprof/gmon_io.c:598:7: danger: ‘fopen(filename, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  596|     symtab = get_symtab ();
#  597|   
#  598|->   if (file_format == FF_AUTO || file_format == FF_MAGIC)
#  599|       {
#  600|         /* Write gmon header.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
binutils-with-gold-2.46/gprof/gmon_io.c:598:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "w")’
binutils-with-gold-2.46/gprof/gmon_io.c:589:9: acquire_memory: allocated here
binutils-with-gold-2.46/gprof/gmon_io.c:590:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprof/gmon_io.c:596:12: branch_false: ...to here
binutils-with-gold-2.46/gprof/gmon_io.c:598:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprof/gmon_io.c:623:12: branch_false: ...to here
binutils-with-gold-2.46/gprof/gmon_io.c:598:7: danger: ‘fopen(filename, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  596|     symtab = get_symtab ();
#  597|   
#  598|->   if (file_format == FF_AUTO || file_format == FF_MAGIC)
#  599|       {
#  600|         /* Write gmon header.  */

Error: CPPCHECK_WARNING (CWE-823): [#def158]
binutils-with-gold-2.46/gprof/hist.c:652: error[arrayIndexOutOfBounds]: Array 'SItab[11]' accessed at index 11, which is out of bounds.
#  650|        may also want to support other (pseudo-)dimensions (such as
#  651|        I-cache misses etc.).  */
#  652|->   print_header (SItab[log_scale].prefix);
#  653|   
#  654|     for (sym_index = 0; sym_index < symtab->len; ++sym_index)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def159]
binutils-with-gold-2.46/gprof/source.c:119:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
binutils-with-gold-2.46/gprof/source.c:118:13: acquire_resource: opened here
binutils-with-gold-2.46/gprof/source.c:119:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprof/source.c:121:10: branch_false: ...to here
binutils-with-gold-2.46/gprof/source.c:177:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gprof/source.c:183:18: branch_true: ...to here
binutils-with-gold-2.46/gprof/source.c:119:20: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  117|   
#  118|         ifp = fopen (fname, FOPEN_RB);
#  119|->       if (fname != sf->name)
#  120|   	free (fname);
#  121|         if (ifp)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
binutils-with-gold-2.46/gprof/source.c:119:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
binutils-with-gold-2.46/gprof/source.c:118:13: acquire_memory: allocated here
binutils-with-gold-2.46/gprof/source.c:119:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprof/source.c:121:10: branch_false: ...to here
binutils-with-gold-2.46/gprof/source.c:177:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gprof/source.c:183:18: branch_true: ...to here
binutils-with-gold-2.46/gprof/source.c:119:20: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  117|   
#  118|         ifp = fopen (fname, FOPEN_RB);
#  119|->       if (fname != sf->name)
#  120|   	free (fname);
#  121|         if (ifp)

Error: COMPILER_WARNING (CWE-704): [#def161]
binutils-with-gold-2.46/gprof/source.c: scope_hint: In function ‘annotate_source’
binutils-with-gold-2.46/gprof/source.c:126:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  126 |           name_only = strrchr (sf->name, '/');
#      |                     ^
#  124|         if (!sle && !name_only)
#  125|   	{
#  126|-> 	  name_only = strrchr (sf->name, '/');
#  127|   #ifdef HAVE_DOS_BASED_FILE_SYSTEM
#  128|   	  {

Error: COMPILER_WARNING (CWE-704): [#def162]
binutils-with-gold-2.46/gprof/source.c:126:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  124|         if (!sle && !name_only)
#  125|   	{
#  126|-> 	  name_only = strrchr (sf->name, '/');
#  127|   #ifdef HAVE_DOS_BASED_FILE_SYSTEM
#  128|   	  {

Error: CPPCHECK_WARNING (CWE-457): [#def163]
binutils-with-gold-2.46/gprofng/common/hwctable.c:2826: warning[uninitvar]: Uninitialized variable: buf
# 2824|     setup_cpcx ();
# 2825|     if (!buf || !buflen)
# 2826|->     return buf;
# 2827|     buf[0] = 0;
# 2828|     if (cpcx_cciname)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def164]
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3022:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘guard’
/usr/include/stdio.h:829:12: enter_function: entry to ‘fsetpos’
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3054:1: call_function: calling ‘gprofng_fsetpos’ from ‘fsetpos’
# 3020|     if (RECHCK_REENTRANCE (guard))
# 3021|       {
# 3022|->       POP_REENTRANCE (guard);
# 3023|         return ret;
# 3024|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def165]
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3071:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘guard’
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3064:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3069:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3069:7: branch_false: ...to here
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3069:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3071:7: branch_true: ...to here
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3071:7: danger: dereference of NULL ‘guard’
# 3069|     if (RECHCK_REENTRANCE (guard))
# 3070|       {
# 3071|->       POP_REENTRANCE (guard);
# 3072|         return ret;
# 3073|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def166]
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3122:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘guard’
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3115:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3120:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3120:7: branch_false: ...to here
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3120:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3122:7: branch_true: ...to here
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3122:7: danger: dereference of NULL ‘guard’
# 3120|     if (RECHCK_REENTRANCE (guard))
# 3121|       {
# 3122|->       POP_REENTRANCE (guard);
# 3123|         return ret;
# 3124|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def167]
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3157:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘guard’
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3150:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3155:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3155:7: branch_false: ...to here
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3155:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3157:7: branch_true: ...to here
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3157:7: danger: dereference of NULL ‘guard’
# 3155|     if (RECHCK_REENTRANCE (guard))
# 3156|       {
# 3157|->       POP_REENTRANCE (guard);
# 3158|         return ptr;
# 3159|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def168]
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3191:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘guard’
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3184:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3189:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3189:7: branch_false: ...to here
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3189:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3191:7: branch_true: ...to here
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3191:7: danger: dereference of NULL ‘guard’
# 3189|     if (RECHCK_REENTRANCE (guard))
# 3190|       {
# 3191|->       POP_REENTRANCE (guard);
# 3192|         return ret;
# 3193|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def169]
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3226:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘guard’
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3219:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3224:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3224:7: branch_false: ...to here
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3224:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3226:7: branch_true: ...to here
binutils-with-gold-2.46/gprofng/libcollector/iotrace.c:3226:7: danger: dereference of NULL ‘guard’
# 3224|     if (RECHCK_REENTRANCE (guard))
# 3225|       {
# 3226|->       POP_REENTRANCE (guard);
# 3227|         return ret;
# 3228|       }

Error: COMPILER_WARNING: [#def170]
binutils-with-gold-2.46/gprofng/libcollector/libcol_util.c: scope_hint: In function ‘__collector_mutex_lock’
binutils-with-gold-2.46/gprofng/libcollector/libcol_util.c:134:25: warning[-Wunused-but-set-variable=]: variable ‘i’ set but not used
#  134 |   volatile unsigned int i = 0; /* xxxx volatile may not be honored on amd64 -x04 */
#      |                         ^
#  132|   __collector_mutex_lock (collector_mutex_t *lock_var)
#  133|   {
#  134|->   volatile unsigned int i = 0; /* xxxx volatile may not be honored on amd64 -x04 */
#  135|   
#  136|     if (!(*lock_var) && !atomic_swap (lock_var, 1))

Error: CPPCHECK_WARNING (CWE-457): [#def171]
binutils-with-gold-2.46/gprofng/libcollector/libcol_util.c:921: warning[uninitvar]: Uninitialized variable: info->ebx
#  919|   __collector_cpuid (CPUIDinfo* info)
#  920|   {
#  921|->   uint32_t ebx = info->ebx, ecx = info->ecx, edx = info->edx, eax = info->eax;
#  922|     __asm__ ("cpuid" : "=b" (ebx), "=c" (ecx), "=d" (edx), "=a" (eax) : "a" (eax));
#  923|     info->eax = eax;

Error: COMPILER_WARNING (CWE-252): [#def172]
binutils-with-gold-2.46/gprofng/libcollector/linetrace.c: scope_hint: In function ‘linetrace_ext_fork_epilogue’
binutils-with-gold-2.46/gprofng/libcollector/linetrace.c:931:11: warning[-Wunused-result]: ignoring return value of ‘strerror_r’ declared with attribute ‘warn_unused_result’
#  931 |           strerror_r (errno, errmsg, sizeof (errmsg));
#      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  929|   	  /* delete stillborn experiment? */
#  930|   	  char errmsg[256];
#  931|-> 	  strerror_r (errno, errmsg, sizeof (errmsg));
#  932|   	  CALL_UTIL (snprintf)(msg, sizeof (msg), "err %s", errmsg);
#  933|   	}

Error: COMPILER_WARNING (CWE-252): [#def173]
binutils-with-gold-2.46/gprofng/libcollector/linetrace.c: scope_hint: In function ‘linetrace_ext_exec_epilogue’
binutils-with-gold-2.46/gprofng/libcollector/linetrace.c:1048:7: warning[-Wunused-result]: ignoring return value of ‘strerror_r’ declared with attribute ‘warn_unused_result’
# 1048 |       strerror_r (errno, errmsg, sizeof (errmsg));
#      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1046|       {
# 1047|         char errmsg[256];
# 1048|->       strerror_r (errno, errmsg, sizeof (errmsg));
# 1049|         CALL_UTIL (snprintf)(msg, sizeof (msg), "err %s", errmsg);
# 1050|       }

Error: CPPCHECK_WARNING (CWE-457): [#def174]
binutils-with-gold-2.46/gprofng/libcollector/mmaptrace.c:1298: warning[uninitvar]: Uninitialized variable: base2
# 1296|     if (base1)
# 1297|       __collector_check_segment (((unsigned long) vaddr)+((unsigned long) size), &base2, &end2, 0);
# 1298|->   if (base1 == 0 || base1 != base2 || end1 != end2)
# 1299|       __collector_ext_update_map_segments ();
# 1300|   

Error: CPPCHECK_WARNING (CWE-457): [#def175]
binutils-with-gold-2.46/gprofng/libcollector/mmaptrace.c:1298: warning[uninitvar]: Uninitialized variable: end2
# 1296|     if (base1)
# 1297|       __collector_check_segment (((unsigned long) vaddr)+((unsigned long) size), &base2, &end2, 0);
# 1298|->   if (base1 == 0 || base1 != base2 || end1 != end2)
# 1299|       __collector_ext_update_map_segments ();
# 1300|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def176]
binutils-with-gold-2.46/gprofng/libcollector/synctrace.c:772:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘guard’
binutils-with-gold-2.46/gprofng/libcollector/synctrace.c:764:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/synctrace.c:770:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/gprofng/libcollector/synctrace.c:770:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/gprofng/libcollector/synctrace.c:772:7: branch_true: ...to here
binutils-with-gold-2.46/gprofng/libcollector/synctrace.c:772:7: danger: dereference of NULL ‘guard’
#  770|     if (RECHCK_NREENTRANCE (guard))
#  771|       {
#  772|->       POP_REENTRANCE (guard);
#  773|         return ret;
#  774|       }

Error: COMPILER_WARNING: [#def177]
binutils-with-gold-2.46/gprofng/src/CallStack.cc: scope_hint: In member function ‘void Descendants::append(CallStackNode*)’
binutils-with-gold-2.46/gprofng/src/CallStack.cc:79:10: warning[-Wvolatile]: ‘++’ expression of ‘volatile’-qualified type is deprecated
#   79 |     data[count++] = item;
#      |          ^~~~~
#   77|   {
#   78|     if (count < limit)
#   79|->     data[count++] = item;
#   80|     else
#   81|       insert (count, item);

Error: COMPILER_WARNING: [#def178]
binutils-with-gold-2.46/gprofng/src/CallStack.cc: scope_hint: In member function ‘void Descendants::insert(int, CallStackNode*)’
binutils-with-gold-2.46/gprofng/src/CallStack.cc:109:3: warning[-Wvolatile]: ‘++’ expression of ‘volatile’-qualified type is deprecated
#  109 |   count++;
#      |   ^~~~~
#  107|         old_data[ind] = item;
#  108|       }
#  109|->   count++;
#  110|   }
#  111|   

Error: COMPILER_WARNING: [#def179]
binutils-with-gold-2.46/gprofng/src/Dbe.cc: scope_hint: In function ‘Vector<void*>* dbeGetFuncCallerInfo(int, int, Vector<int>*, int)’
binutils-with-gold-2.46/gprofng/src/Dbe.cc:4375:30: warning[-Wdeprecated-enum-enum-conversion]: bitwise operation between different enumeration types ‘MetricType’ and ‘<unnamed enum>’ is deprecated
# 4375 |       int mtype = MET_COMMON | COMPARE_BIT | ((groupId + 1) << GROUP_ID_SHIFT);
#      |                   ~~~~~~~~~~~^~~~~~~~~~~~~
# 4373|   	return data;
# 4374|         DbeView *dbev = dbeSession->getView (dbevindex);
# 4375|->       int mtype = MET_COMMON | COMPARE_BIT | ((groupId + 1) << GROUP_ID_SHIFT);
# 4376|         MetricList *mlist = dbev->get_metric_list ((MetricType) (mtype & MTYPE_MASK),
# 4377|   						 (mtype & COMPARE_BIT) != 0,

Error: COMPILER_WARNING: [#def180]
binutils-with-gold-2.46/gprofng/src/Dbe.cc: scope_hint: In function ‘Vector<void*>* dbeGetFuncCalleeInfo(int, int, Vector<int>*, int)’
binutils-with-gold-2.46/gprofng/src/Dbe.cc:4546:30: warning[-Wdeprecated-enum-enum-conversion]: bitwise operation between different enumeration types ‘MetricType’ and ‘<unnamed enum>’ is deprecated
# 4546 |       int mtype = MET_COMMON | COMPARE_BIT | ((groupId + 1) << GROUP_ID_SHIFT);
#      |                   ~~~~~~~~~~~^~~~~~~~~~~~~
# 4544|   	return data;
# 4545|         DbeView *dbev = dbeSession->getView (dbevindex);
# 4546|->       int mtype = MET_COMMON | COMPARE_BIT | ((groupId + 1) << GROUP_ID_SHIFT);
# 4547|         MetricList *mlist = dbev->get_metric_list ((MetricType) (mtype & MTYPE_MASK),
# 4548|   						 (mtype & COMPARE_BIT) != 0,

Error: COMPILER_WARNING (CWE-252): [#def181]
binutils-with-gold-2.46/gprofng/src/DbeSession.cc: scope_hint: In destructor ‘DbeSession::~DbeSession()’
binutils-with-gold-2.46/gprofng/src/DbeSession.cc:457:14: warning[-Wunused-result]: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’
#  457 |       system (cmd);
#      |       ~~~~~~~^~~~~
#  455|         sb->append (defExpName);
#  456|         char *cmd = sb->toString ();
#  457|->       system (cmd);
#  458|         free (cmd);
#  459|         delete sb;

Error: COMPILER_WARNING (CWE-252): [#def182]
binutils-with-gold-2.46/gprofng/src/DbeSession.cc: scope_hint: In member function ‘void DbeSession::unlink_tmp_files()’
binutils-with-gold-2.46/gprofng/src/DbeSession.cc:481:14: warning[-Wunused-result]: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’
#  481 |       system (cmd);
#      |       ~~~~~~~^~~~~
#  479|       {
#  480|         char *cmd = dbe_sprintf (NTXT ("/bin/rm -rf %s"), tmp_dir_name);
#  481|->       system (cmd);
#  482|         free (cmd);
#  483|         free (tmp_dir_name);

Error: COMPILER_WARNING: [#def183]
binutils-with-gold-2.46/gprofng/src/DbeThread.cc: scope_hint: In member function ‘DbeQueue* DbeThreadPool::get_queue()’
binutils-with-gold-2.46/gprofng/src/DbeThread.cc:135:7: warning[-Wvolatile]: ‘--’ expression of ‘volatile’-qualified type is deprecated
#  135 |       queues_cnt--;
#      |       ^~~~~~~~~~
#  133|       {
#  134|         queue = q->next;
#  135|->       queues_cnt--;
#  136|       }
#  137|     pthread_mutex_unlock (&p_mutex);

Error: COMPILER_WARNING: [#def184]
binutils-with-gold-2.46/gprofng/src/DbeThread.cc: scope_hint: In member function ‘void DbeThreadPool::put_queue(DbeQueue*)’
binutils-with-gold-2.46/gprofng/src/DbeThread.cc:147:17: warning[-Wvolatile]: ‘++’ expression of ‘volatile’-qualified type is deprecated
#  147 |       q->id = ++total_queues;
#      |                 ^~~~~~~~~~~~
#  145|       {
#  146|         // nothing runs in parallel
#  147|->       q->id = ++total_queues;
#  148|         Dprintf (DEBUG_THREADS, NTXT ("put_queue:%d thr=%lld max_threads=%d queue (%d) runs on the worked thread\n"),
#  149|   	       __LINE__, (unsigned long long) pthread_self (), max_threads, q->id);

Error: COMPILER_WARNING: [#def185]
binutils-with-gold-2.46/gprofng/src/DbeThread.cc:157:13: warning[-Wvolatile]: ‘++’ expression of ‘volatile’-qualified type is deprecated
#  157 |   q->id = ++total_queues;
#      |             ^~~~~~~~~~~~
#  155|     pthread_mutex_lock (&p_mutex);
#  156|     // nothing runs in parallel
#  157|->   q->id = ++total_queues;
#  158|     Dprintf (DEBUG_THREADS, "put_queue:%d thr=%lld max_threads=%d queue (%d)\n",
#  159|   	   __LINE__, (unsigned long long) pthread_self (), max_threads, q->id);

Error: COMPILER_WARNING: [#def186]
binutils-with-gold-2.46/gprofng/src/DbeThread.cc:170:3: warning[-Wvolatile]: ‘++’ expression of ‘volatile’-qualified type is deprecated
#  170 |   queues_cnt++;
#      |   ^~~~~~~~~~
#  168|         last_queue = q;
#  169|       }
#  170|->   queues_cnt++;
#  171|     Dprintf (DEBUG_THREADS,
#  172|   	   "put_queue:%d id=%d queues_cnt=%d threads_cnt=%d max_threads=%d\n",

Error: COMPILER_WARNING (CWE-252): [#def187]
binutils-with-gold-2.46/gprofng/src/Experiment.cc: scope_hint: In member function ‘char* Experiment::ExperimentFile::fgets()’
binutils-with-gold-2.46/gprofng/src/Experiment.cc:270:15: warning[-Wunused-result]: ignoring return value of ‘char* fgets(char*, int, FILE*)’ declared with attribute ‘warn_unused_result’
#  270 |       ::fgets (buffer + bufsz - 1, newsz - bufsz + 1, fh);
#      |       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  268|         buffer[newsz - 1] = (char) 1; // sentinel
#  269|         // we don't care about fgets result here
#  270|->       ::fgets (buffer + bufsz - 1, newsz - bufsz + 1, fh);
#  271|         bufsz = newsz;
#  272|       }

Error: COMPILER_WARNING (CWE-252): [#def188]
binutils-with-gold-2.46/gprofng/src/StringBuilder.cc: scope_hint: In member function ‘void StringBuilder::write(int)’
binutils-with-gold-2.46/gprofng/src/StringBuilder.cc:456:13: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  456 |     ::write (fd, value, count);
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~
#  454|   {
#  455|     if (count > 0)
#  456|->     ::write (fd, value, count);
#  457|   }
#  458|   

Error: COMPILER_WARNING (CWE-252): [#def189]
binutils-with-gold-2.46/gprofng/src/dbe_collctrl.cc:28: included_from: Included from here.
binutils-with-gold-2.46/gprofng/src/collctrl.cc: scope_hint: In member function ‘char* Coll_Ctrl::set_expt(const char*, char**, bool)’
binutils-with-gold-2.46/gprofng/src/collctrl.cc:1963:14: warning[-Wunused-result]: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’
# 1963 |       system (cmd);
#      |       ~~~~~~~^~~~~
# 1961|         struct stat statbuf;
# 1962|         char *cmd = dbe_sprintf ("/bin/rm -rf %s >/dev/null 2>&1", nm);
# 1963|->       system (cmd);
# 1964|         free (cmd);
# 1965|         if (stat (nm, &statbuf) == 0)

Error: COMPILER_WARNING (CWE-252): [#def190]
binutils-with-gold-2.46/gprofng/src/count.cc: scope_hint: In member function ‘void collect::get_count_data()’
binutils-with-gold-2.46/gprofng/src/count.cc:215:13: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  215 |       write (2, sb.toString (), sb.length ());
#      |       ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  213|   	}
#  214|         sb.append (NTXT ("\n\n"));
#  215|->       write (2, sb.toString (), sb.length ());
#  216|       }
#  217|   

Error: COMPILER_WARNING: [#def191]
binutils-with-gold-2.46/gprofng/src/gmon_io.cc: scope_hint: In function ‘int gmon_out_read(const char*, File_Format, const char*)’
binutils-with-gold-2.46/gprofng/src/gmon_io.cc:169:7: warning[-Wunused-but-set-variable=]: variable ‘nhist’ set but not used
#  169 |   int nhist = 0, narcs = 0, nbbs = 0;
#      |       ^~~~~
#  167|     struct gmon_hdr ghdr;
#  168|     unsigned char tag;
#  169|->   int nhist = 0, narcs = 0, nbbs = 0;
#  170|   
#  171|     /* Open gmon.out file.  */

Error: COMPILER_WARNING: [#def192]
binutils-with-gold-2.46/gprofng/src/gmon_io.cc:169:18: warning[-Wunused-but-set-variable=]: variable ‘narcs’ set but not used
#  169 |   int nhist = 0, narcs = 0, nbbs = 0;
#      |                  ^~~~~
#  167|     struct gmon_hdr ghdr;
#  168|     unsigned char tag;
#  169|->   int nhist = 0, narcs = 0, nbbs = 0;
#  170|   
#  171|     /* Open gmon.out file.  */

Error: COMPILER_WARNING: [#def193]
binutils-with-gold-2.46/gprofng/src/gmon_io.cc:169:29: warning[-Wunused-but-set-variable=]: variable ‘nbbs’ set but not used
#  169 |   int nhist = 0, narcs = 0, nbbs = 0;
#      |                             ^~~~
#  167|     struct gmon_hdr ghdr;
#  168|     unsigned char tag;
#  169|->   int nhist = 0, narcs = 0, nbbs = 0;
#  170|   
#  171|     /* Open gmon.out file.  */

Error: COMPILER_WARNING (CWE-252): [#def194]
binutils-with-gold-2.46/gprofng/src/gp-archive.cc: scope_hint: In member function ‘int er_archive::clean_old_archive(char*, ArchiveExp*)’
binutils-with-gold-2.46/gprofng/src/gp-archive.cc:249:14: warning[-Wunused-result]: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’
#  249 |       system (cmd);
#      |       ~~~~~~~^~~~~
#  247|       {
#  248|         char *cmd = dbe_sprintf ("/bin/rm -rf %s", arch);
#  249|->       system (cmd);
#  250|         free (cmd);
#  251|         if (dbe_stat (arch, NULL) != 0)

Error: COMPILER_WARNING (CWE-252): [#def195]
binutils-with-gold-2.46/gprofng/src/gp-collect-app.cc: scope_hint: In member function ‘void collect::writeStr(int, const char*)’
binutils-with-gold-2.46/gprofng/src/gp-collect-app.cc:1506:11: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
# 1506 |     write (f, buf, strlen (buf));
#      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
# 1504|   {
# 1505|     if (buf != NULL)
# 1506|->     write (f, buf, strlen (buf));
# 1507|   }

Error: CPPCHECK_WARNING (CWE-476): [#def196]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:454: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  452|     int gmon_interval = (hz == HZ_WRONG ? 1000 : hz * 100);
#  453|   
#  454|->   fprintf (logx, "<profile name=\"%s\" ptimer=\"%d\" numstates=\"%d\">\n",
#  455|   	   SP_JCMD_PROFILE, gmon_interval, LMS_MAGIC_ID_LINUX);
#  456|     fprintf (logx, "  <profdata fname=\"profile\"/>\n");

Error: CPPCHECK_WARNING (CWE-476): [#def197]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:456: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  454|     fprintf (logx, "<profile name=\"%s\" ptimer=\"%d\" numstates=\"%d\">\n",
#  455|   	   SP_JCMD_PROFILE, gmon_interval, LMS_MAGIC_ID_LINUX);
#  456|->   fprintf (logx, "  <profdata fname=\"profile\"/>\n");
#  457|   
#  458|     /* Record Profile packet description */

Error: CPPCHECK_WARNING (CWE-476): [#def198]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:459: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  457|   
#  458|     /* Record Profile packet description */
#  459|->   fprintf (logx, "  <profpckt kind=\"%d\" uname=\"Clock profiling data\">\n",
#  460|   	   CLOCK_TYPE);
#  461|     fprintf (logx, "    <field name=\"LWPID\" uname=\"Lightweight process id\" \

Error: CPPCHECK_WARNING (CWE-476): [#def199]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:461: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  459|     fprintf (logx, "  <profpckt kind=\"%d\" uname=\"Clock profiling data\">\n",
#  460|   	   CLOCK_TYPE);
#  461|->   fprintf (logx, "    <field name=\"LWPID\" uname=\"Lightweight process id\" \
#  462|   offset=\"%d\" type=\"%s\"/>\n",
#  463|   	   (int) offsetof (ClockPacket, lwp_id),

Error: CPPCHECK_WARNING (CWE-476): [#def200]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:465: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  463|   	   (int) offsetof (ClockPacket, lwp_id),
#  464|   	   fld_sizeof (ClockPacket, lwp_id) == 4 ? "INT32" : "INT64");
#  465|->   fprintf (logx, "    <field name=\"THRID\" uname=\"Thread number\" \
#  466|   offset=\"%d\" type=\"%s\"/>\n",
#  467|   	   (int) offsetof (ClockPacket, thr_id),

Error: CPPCHECK_WARNING (CWE-476): [#def201]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:469: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  467|   	   (int) offsetof (ClockPacket, thr_id),
#  468|   	   fld_sizeof (ClockPacket, thr_id) == 4 ? "INT32" : "INT64");
#  469|->   fprintf (logx, "    <field name=\"CPUID\" uname=\"CPU id\" offset=\"%d\" \
#  470|   type=\"%s\"/>\n",
#  471|   	   (int) offsetof (ClockPacket, cpu_id),

Error: CPPCHECK_WARNING (CWE-476): [#def202]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:473: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  471|   	   (int) offsetof (ClockPacket, cpu_id),
#  472|   	   fld_sizeof (ClockPacket, cpu_id) == 4 ? "INT32" : "INT64");
#  473|->   fprintf (logx, "    <field name=\"TSTAMP\" uname=\"High resolution \
#  474|   timestamp\" offset=\"%d\" type=\"%s\"/>\n",
#  475|   	   (int) offsetof (ClockPacket, tstamp),

Error: CPPCHECK_WARNING (CWE-476): [#def203]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:477: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  475|   	   (int) offsetof (ClockPacket, tstamp),
#  476|   	   fld_sizeof (ClockPacket, tstamp) == 4 ? "INT32" : "INT64");
#  477|->   fprintf (logx, "    <field name=\"FRINFO\" offset=\"%d\" type=\"%s\"/>\n",
#  478|   	   (int) offsetof (ClockPacket, frinfo),
#  479|   	   fld_sizeof (ClockPacket, frinfo) == 4 ? "INT32" : "INT64");

Error: CPPCHECK_WARNING (CWE-476): [#def204]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:480: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  478|   	   (int) offsetof (ClockPacket, frinfo),
#  479|   	   fld_sizeof (ClockPacket, frinfo) == 4 ? "INT32" : "INT64");
#  480|->   fprintf (logx, "    <field name=\"MSTATE\" uname=\"Thread state\" \
#  481|   offset=\"%d\" type=\"%s\"/>\n",
#  482|   	   (int) offsetof (ClockPacket, mstate),

Error: CPPCHECK_WARNING (CWE-476): [#def205]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:484: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  482|   	   (int) offsetof (ClockPacket, mstate),
#  483|   	   fld_sizeof (ClockPacket, mstate) == 4 ? "INT32" : "INT64");
#  484|->   fprintf (logx, "    <field name=\"NTICK\" uname=\"Duration\" offset=\"%d\" \
#  485|   type=\"%s\"/>\n",
#  486|   	   (int) offsetof (ClockPacket, nticks),

Error: CPPCHECK_WARNING (CWE-476): [#def206]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:488: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  486|   	   (int) offsetof (ClockPacket, nticks),
#  487|   	   fld_sizeof (ClockPacket, nticks) == 4 ? "INT32" : "INT64");
#  488|->   fprintf (logx, "  </profpckt>\n");
#  489|     fprintf (logx,"</profile>\n");
#  490|     fprintf (logx, "<event kind=\"%s\" tstamp=\"%u.%09u\" time=\"%lld\" \

Error: CPPCHECK_WARNING (CWE-476): [#def207]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:489: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  487|   	   fld_sizeof (ClockPacket, nticks) == 4 ? "INT32" : "INT64");
#  488|     fprintf (logx, "  </profpckt>\n");
#  489|->   fprintf (logx,"</profile>\n");
#  490|     fprintf (logx, "<event kind=\"%s\" tstamp=\"%u.%09u\" time=\"%lld\" \
#  491|   tm_zone=\"%lld\"/>\n",

Error: CPPCHECK_WARNING (CWE-476): [#def208]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:490: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  488|     fprintf (logx, "  </profpckt>\n");
#  489|     fprintf (logx,"</profile>\n");
#  490|->   fprintf (logx, "<event kind=\"%s\" tstamp=\"%u.%09u\" time=\"%lld\" \
#  491|   tm_zone=\"%lld\"/>\n",
#  492|   	   SP_JCMD_RUN, 0, 0, 0LL, 0LL);

Error: CPPCHECK_WARNING (CWE-476): [#def209]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:494: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: logx
#  492|   	   SP_JCMD_RUN, 0, 0, 0LL, 0LL);
#  493|   
#  494|->   fclose (logx);
#  495|   }
#  496|   

Error: COMPILER_WARNING (CWE-252): [#def210]
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc: scope_hint: In function ‘void writeStr(int, const char*)’
binutils-with-gold-2.46/gprofng/src/gp-gmon.cc:557:11: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  557 |     write (f, buf, strlen (buf));
#      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
#  555|   {
#  556|     if (buf != NULL)
#  557|->     write (f, buf, strlen (buf));
#  558|   }
#  559|   

Error: COMPILER_WARNING (CWE-252): [#def211]
binutils-with-gold-2.46/gprofng/src/ipc.cc: scope_hint: In function ‘void fatalErrorHadler(int, siginfo_t*, void*)’
binutils-with-gold-2.46/gprofng/src/ipc.cc:135:10: warning[-Wunused-result]: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’
#  135 |   system (buf);
#      |   ~~~~~~~^~~~~
#  133|     snprintf (buf, sizeof (buf), "/usr/bin/pstack %lld > %s.pstack",
#  134|   	    (long long) pid, fname);
#  135|->   system (buf);
#  136|     int fd = creat (fname, 0600);
#  137|     if (fd >= 0)

Error: COMPILER_WARNING (CWE-252): [#def212]
binutils-with-gold-2.46/gprofng/src/ipc.cc: scope_hint: In function ‘void ipc_mainLoop(int, char**)’
binutils-with-gold-2.46/gprofng/src/ipc.cc:2642:15: warning[-Wunused-result]: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’
# 2642 |       freopen (ipc_log_name, "w", stderr);
#      |       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2640|         if (ipc_log_name == NULL)
# 2641|   	ipc_log_name = "ipc_log";
# 2642|->       freopen (ipc_log_name, "w", stderr);
# 2643|         if (ipc_trace_level >= TRACE_LVL_2)
# 2644|   	{

Error: COMPILER_WARNING (CWE-252): [#def213]
binutils-with-gold-2.46/gprofng/src/ipc.cc:2659:13: warning[-Wunused-result]: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’
# 2659 |     freopen ("/dev/null", "w", stderr);
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
# 2657|     else
# 2658|       // Reopen stderr as /dev/null
# 2659|->     freopen ("/dev/null", "w", stderr);
# 2660|   
# 2661|     struct sigaction act;

Error: COMPILER_WARNING (CWE-252): [#def214]
binutils-with-gold-2.46/gprofng/src/ipcio.cc: scope_hint: In member function ‘void IPCresponse::print()’
binutils-with-gold-2.46/gprofng/src/ipcio.cc:887:9: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  887 |   write (1, buf, 22);
#      |   ~~~~~~^~~~~~~~~~~~
#  885|   		      "IPCresponse: ID=%08x type=%02x status=%02x sz:%6d\n",
#  886|   		      requestID, responseType, responseStatus, sz);
#  887|->   write (1, buf, 22);
#  888|     sb->write (1);
#  889|     pthread_mutex_unlock (&responce_lock);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def215]
binutils-with-gold-2.46/include/leb128.h:100:7: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
binutils-with-gold-2.46/gas/gen-sframe.c:1700:1: enter_function: entry to ‘sframe_xlate_escape_sleb128_to_offsetT’
binutils-with-gold-2.46/gas/gen-sframe.c:1715:21: call_function: calling ‘read_sleb128_to_int64’ from ‘sframe_xlate_escape_sleb128_to_offsetT’
#   98|   	return 0;
#   99|   
#  100|->       byte = *p++;
#  101|         result |= ((uint64_t) (byte & 0x7f)) << shift;
#  102|         shift += 7;

Error: COMPILER_WARNING (CWE-704): [#def216]
binutils-with-gold-2.46/ld/ldelf.c: scope_hint: In function ‘ldelf_search_needed’
binutils-with-gold-2.46/ld/ldelf.c:538:34: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  538 |                       if ((slash = strrchr (replacement, '/')) != NULL)
#      |                                  ^
#  536|   
#  537|   		      replacement = freeme;
#  538|-> 		      if ((slash = strrchr (replacement, '/')) != NULL)
#  539|   			* slash = 0;
#  540|   		    }

Error: COMPILER_WARNING (CWE-704): [#def217]
binutils-with-gold-2.46/ld/ldelf.c:538:34: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  536|   
#  537|   		      replacement = freeme;
#  538|-> 		      if ((slash = strrchr (replacement, '/')) != NULL)
#  539|   			* slash = 0;
#  540|   		    }

Error: COMPILER_WARNING (CWE-704): [#def218]
binutils-with-gold-2.46/ld/ldelf.c: scope_hint: In function ‘ldelf_parse_ld_so_conf_include’
binutils-with-gold-2.46/ld/ldelf.c:797:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  797 |       char *p = strrchr (filename, '/');
#      |                 ^~~~~~~
#  795|     if (pattern[0] != '/')
#  796|       {
#  797|->       char *p = strrchr (filename, '/');
#  798|         size_t patlen = strlen (pattern) + 1;
#  799|   

Error: COMPILER_WARNING (CWE-704): [#def219]
binutils-with-gold-2.46/ld/ldelf.c:797:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  795|     if (pattern[0] != '/')
#  796|       {
#  797|->       char *p = strrchr (filename, '/');
#  798|         size_t patlen = strlen (pattern) + 1;
#  799|   

Error: COMPILER_WARNING (CWE-704): [#def220]
binutils-with-gold-2.46/ld/ldlang.c: scope_hint: In function ‘archive_path’
binutils-with-gold-2.46/ld/ldlang.c:347:5: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  347 |   p = strchr (pattern, link_info.path_separator);
#      |     ^
#  345|       return p;
#  346|   
#  347|->   p = strchr (pattern, link_info.path_separator);
#  348|   #ifdef HAVE_DOS_BASED_FILE_SYSTEM
#  349|     if (p == NULL || link_info.path_separator != ':')

Error: CPPCHECK_WARNING (CWE-476): [#def221]
binutils-with-gold-2.46/ld/ldlang.c:1539: warning[nullPointer]: Possible null pointer dereference: region
# 1537|     n = stat_alloc (sizeof (lang_memory_region_name));
# 1538|     n->name = stat_strdup (alias);
# 1539|->   n->next = region->name_list.next;
# 1540|     region->name_list.next = n;
# 1541|   }

Error: CPPCHECK_WARNING (CWE-476): [#def222]
binutils-with-gold-2.46/ld/ldlang.c:1540: warning[nullPointer]: Possible null pointer dereference: region
# 1538|     n->name = stat_strdup (alias);
# 1539|     n->next = region->name_list.next;
# 1540|->   region->name_list.next = n;
# 1541|   }
# 1542|   

Error: CPPCHECK_WARNING (CWE-476): [#def223]
binutils-with-gold-2.46/ld/ldmain.c:210: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: out
#  208|       }
#  209|   
#  210|->   fprintf (out, "%s:", output_filename);
#  211|   
#  212|     for (dep = dependency_files; dep != NULL; dep = dep->next)

Error: CPPCHECK_WARNING (CWE-476): [#def224]
binutils-with-gold-2.46/ld/ldmain.c:213: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: out
#  211|   
#  212|     for (dep = dependency_files; dep != NULL; dep = dep->next)
#  213|->     fprintf (out, " \\\n  %s", dep->name);
#  214|   
#  215|     fprintf (out, "\n");

Error: CPPCHECK_WARNING (CWE-476): [#def225]
binutils-with-gold-2.46/ld/ldmain.c:215: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: out
#  213|       fprintf (out, " \\\n  %s", dep->name);
#  214|   
#  215|->   fprintf (out, "\n");
#  216|     for (dep = dependency_files; dep != NULL; dep = dep->next)
#  217|       fprintf (out, "\n%s:\n", dep->name);

Error: CPPCHECK_WARNING (CWE-476): [#def226]
binutils-with-gold-2.46/ld/ldmain.c:217: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: out
#  215|     fprintf (out, "\n");
#  216|     for (dep = dependency_files; dep != NULL; dep = dep->next)
#  217|->     fprintf (out, "\n%s:\n", dep->name);
#  218|   
#  219|     fclose (out);

Error: CPPCHECK_WARNING (CWE-476): [#def227]
binutils-with-gold-2.46/ld/ldmain.c:219: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: out
#  217|       fprintf (out, "\n%s:\n", dep->name);
#  218|   
#  219|->   fclose (out);
#  220|   }
#  221|   

Error: CPPCHECK_WARNING (CWE-476): [#def228]
binutils-with-gold-2.46/ld/ldmain.c:1065: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: src
# 1063|   		fatal (_("%P: unable to open for destination of copy `%s'\n"),
# 1064|   		       dst_name);
# 1065|-> 	      while ((l = fread (buf, 1, bsize, src)) > 0)
# 1066|   		{
# 1067|   		  int done = fwrite (buf, 1, l, dst);

Error: CPPCHECK_WARNING (CWE-476): [#def229]
binutils-with-gold-2.46/ld/ldmain.c:1067: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: dst
# 1065|   	      while ((l = fread (buf, 1, bsize, src)) > 0)
# 1066|   		{
# 1067|-> 		  int done = fwrite (buf, 1, l, dst);
# 1068|   
# 1069|   		  if (done != l)

Error: CPPCHECK_WARNING (CWE-476): [#def230]
binutils-with-gold-2.46/ld/ldmain.c:1073: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: src
# 1071|   		}
# 1072|   
# 1073|-> 	      fclose (src);
# 1074|   	      if (fclose (dst) == EOF)
# 1075|   		einfo (_("%P: error closing file `%s'\n"), dst_name);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def231]
binutils-with-gold-2.46/ld/ldmain.c:1317:6: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
binutils-with-gold-2.46/ld/ldmain.c:1307:10: acquire_resource: opened here
binutils-with-gold-2.46/ld/ldmain.c:1308:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/ld/ldmain.c:1316:7: branch_false: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1317:6: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1315|     link_info.keep_hash = (struct bfd_hash_table *)
# 1316|         xmalloc (sizeof (struct bfd_hash_table));
# 1317|->   if (!bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc,
# 1318|   			    sizeof (struct bfd_hash_entry)))
# 1319|       fatal (_("%P: bfd_hash_table_init failed: %E\n"));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
binutils-with-gold-2.46/ld/ldmain.c:1317:6: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
binutils-with-gold-2.46/ld/ldmain.c:1307:10: acquire_memory: allocated here
binutils-with-gold-2.46/ld/ldmain.c:1308:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/ld/ldmain.c:1316:7: branch_false: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1317:6: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1315|     link_info.keep_hash = (struct bfd_hash_table *)
# 1316|         xmalloc (sizeof (struct bfd_hash_table));
# 1317|->   if (!bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc,
# 1318|   			    sizeof (struct bfd_hash_entry)))
# 1319|       fatal (_("%P: bfd_hash_table_init failed: %E\n"));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def233]
binutils-with-gold-2.46/ld/ldmain.c:1327:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
binutils-with-gold-2.46/ld/ldmain.c:1307:10: acquire_resource: opened here
binutils-with-gold-2.46/ld/ldmain.c:1308:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/ld/ldmain.c:1316:7: branch_false: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1317:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/ld/ldmain.c:1322:18: branch_true: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1325:10: branch_true: following ‘true’ branch (when ‘c != -1’)...
binutils-with-gold-2.46/ld/ldmain.c:1325:10: branch_true: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1330:10: branch_true: following ‘true’ branch (when ‘c != -1’)...
binutils-with-gold-2.46/ld/ldmain.c:1330:10: branch_true: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1334:18: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/ld/ldmain.c:1338:18: branch_false: following ‘false’ branch (when ‘bufsize > len’)...
binutils-with-gold-2.46/ld/ldmain.c:1343:19: branch_false: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1334:18: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/ld/ldmain.c:1334:18: branch_true: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1334:18: branch_false: following ‘false’ branch (when ‘c == -1’)...
binutils-with-gold-2.46/ld/ldmain.c:1346:14: branch_false: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1327:14: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1325|     while (c != EOF)
# 1326|       {
# 1327|->       while (ISSPACE (c))
# 1328|   	c = getc (file);
# 1329|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
binutils-with-gold-2.46/ld/ldmain.c:1327:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
binutils-with-gold-2.46/ld/ldmain.c:1307:10: acquire_memory: allocated here
binutils-with-gold-2.46/ld/ldmain.c:1308:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/ld/ldmain.c:1316:7: branch_false: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1317:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/ld/ldmain.c:1322:18: branch_true: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1325:10: branch_true: following ‘true’ branch (when ‘c != -1’)...
binutils-with-gold-2.46/ld/ldmain.c:1325:10: branch_true: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1330:10: branch_true: following ‘true’ branch (when ‘c != -1’)...
binutils-with-gold-2.46/ld/ldmain.c:1330:10: branch_true: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1334:18: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/ld/ldmain.c:1338:18: branch_false: following ‘false’ branch (when ‘bufsize > len’)...
binutils-with-gold-2.46/ld/ldmain.c:1343:19: branch_false: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1334:18: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/ld/ldmain.c:1334:18: branch_true: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1334:18: branch_false: following ‘false’ branch (when ‘c == -1’)...
binutils-with-gold-2.46/ld/ldmain.c:1346:14: branch_false: ...to here
binutils-with-gold-2.46/ld/ldmain.c:1327:14: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1325|     while (c != EOF)
# 1326|       {
# 1327|->       while (ISSPACE (c))
# 1328|   	c = getc (file);
# 1329|   

Error: CPPCHECK_WARNING (CWE-664): [#def235]
binutils-with-gold-2.46/ld/ldmisc.c:698: error[va_start_subsequentCalls]: va_start() or va_copy() called subsequently on 'arg' without va_end() in between.
#  696|         /* If vsnprintf fails or truncates, output the warning directly.  */
#  697|         fflush (stdout);
#  698|->       va_start (arg, fmt);
#  699|         vfinfo (stderr, fmt, arg, true);
#  700|         fflush (stderr);

Error: GCC_ANALYZER_WARNING (CWE-787): [#def236]
binutils-with-gold-2.46/ld/ldwrite.c:322:17: warning[-Wanalyzer-out-of-bounds]: buffer over-read
binutils-with-gold-2.46/ld/ldwrite.c:322:10: branch_true: following ‘true’ branch (when ‘len != 0’)...
binutils-with-gold-2.46/ld/ldwrite.c:322:17: branch_true: ...to here
binutils-with-gold-2.46/ld/ldwrite.c:322:17: danger: read of 1 byte at offset ‘(sizetype)<unknown>’ exceeds ‘*<unknown>’
#  320|     memcpy (tname, name, len + 1);
#  321|     /* Remove a dotted number suffix, from a previous split link. */
#  322|->   while (len && ISDIGIT (tname[len-1]))
#  323|       len--;
#  324|     if (len > 1 && tname[len-1] == '.')

Error: CPPCHECK_WARNING (CWE-457): [#def237]
binutils-with-gold-2.46/ld/pe-dll.c:632: warning[uninitvar]: Uninitialized variables: &key.internal_name, &key.ordinal, &key.hint, &key.flag_private, &key.flag_constant, &key.flag_noname, &key.flag_data, &key.flag_forward
#  630|     /* Return false if n is in the d->exports table.  */
#  631|     if (d->num_exports != 0
#  632|->       && bsearch (&key, d->exports, d->num_exports,
#  633|   		  sizeof (pe_def_file->exports[0]), pe_export_sort))
#  634|       return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def238]
binutils-with-gold-2.46/ld/pe-dll.c:642:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘abfd’
binutils-with-gold-2.46/ld/pe-dll.c:3695:1: enter_function: entry to ‘pep_dll_build_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3697:3: call_function: calling ‘pep_dll_id_target’ from ‘pep_dll_build_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3697:3: return_function: returning to ‘pep_dll_build_sections’ from ‘pep_dll_id_target’
binutils-with-gold-2.46/ld/pe-dll.c:3699:3: call_function: calling ‘process_def_file_and_drectve’ from ‘pep_dll_build_sections’
#  640|   
#  641|         if (pe_dll_extra_pe_debug)
#  642|-> 	printf ("considering exporting: %s, abfd=%p, abfd->my_arc=%p\n",
#  643|   		n, abfd, abfd->my_archive);
#  644|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def239]
binutils-with-gold-2.46/ld/pe-dll.c:934:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
binutils-with-gold-2.46/ld/pe-dll.c:3695:1: enter_function: entry to ‘pep_dll_build_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3697:3: call_function: calling ‘pep_dll_id_target’ from ‘pep_dll_build_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3697:3: return_function: returning to ‘pep_dll_build_sections’ from ‘pep_dll_id_target’
binutils-with-gold-2.46/ld/pe-dll.c:3699:3: call_function: calling ‘process_def_file_and_drectve’ from ‘pep_dll_build_sections’
#  932|   	      char *tmp = xstrdup (pe_def_file->exports[i].name + lead_at);
#  933|   
#  934|-> 	      *(strchr (tmp, '@')) = 0;
#  935|   	      if (auto_export (NULL, pe_def_file, tmp))
#  936|   		def_file_add_export (pe_def_file, tmp,

Error: GCC_ANALYZER_WARNING (CWE-787): [#def240]
binutils-with-gold-2.46/ld/pe-dll.c:1710:19: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-with-gold-2.46/ld/pe-dll.c:3745:1: enter_function: entry to ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: call_function: calling ‘pep_dll_id_target’ from ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: return_function: returning to ‘pep_exe_fill_sections’ from ‘pep_dll_id_target’
binutils-with-gold-2.46/ld/pe-dll.c:3751:3: call_function: calling ‘generate_reloc’ from ‘pep_exe_fill_sections’
# 1708|   		    continue;
# 1709|   
# 1710|-> 		  reloc_data[total_relocs].vma = sec_vma + relocs[i]->address;
# 1711|   		  reloc_data[total_relocs].idx = total_relocs;
# 1712|   

Error: GCC_ANALYZER_WARNING (CWE-787): [#def241]
binutils-with-gold-2.46/ld/pe-dll.c:1711:19: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-with-gold-2.46/ld/pe-dll.c:3745:1: enter_function: entry to ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: call_function: calling ‘pep_dll_id_target’ from ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: return_function: returning to ‘pep_exe_fill_sections’ from ‘pep_dll_id_target’
binutils-with-gold-2.46/ld/pe-dll.c:3751:3: call_function: calling ‘generate_reloc’ from ‘pep_exe_fill_sections’
# 1709|   
# 1710|   		  reloc_data[total_relocs].vma = sec_vma + relocs[i]->address;
# 1711|-> 		  reloc_data[total_relocs].idx = total_relocs;
# 1712|   
# 1713|   		  /* Since we're only about to determine .reloc's size,

Error: GCC_ANALYZER_WARNING (CWE-787): [#def242]
binutils-with-gold-2.46/ld/pe-dll.c:1729:23: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-with-gold-2.46/ld/pe-dll.c:3745:1: enter_function: entry to ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: call_function: calling ‘pep_dll_id_target’ from ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: return_function: returning to ‘pep_exe_fill_sections’ from ‘pep_dll_id_target’
binutils-with-gold-2.46/ld/pe-dll.c:3751:3: call_function: calling ‘generate_reloc’ from ‘pep_exe_fill_sections’
# 1727|   #ifdef pe_use_plus
# 1728|   		    case BITS_AND_SHIFT (64, 0):
# 1729|-> 		      reloc_data[total_relocs].type = IMAGE_REL_BASED_DIR64;
# 1730|   		      total_relocs++;
# 1731|   		      break;

Error: GCC_ANALYZER_WARNING (CWE-787): [#def243]
binutils-with-gold-2.46/ld/pe-dll.c:1734:23: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-with-gold-2.46/ld/pe-dll.c:3745:1: enter_function: entry to ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: call_function: calling ‘pep_dll_id_target’ from ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: return_function: returning to ‘pep_exe_fill_sections’ from ‘pep_dll_id_target’
binutils-with-gold-2.46/ld/pe-dll.c:3751:3: call_function: calling ‘generate_reloc’ from ‘pep_exe_fill_sections’
# 1732|   #endif
# 1733|   		    case BITS_AND_SHIFT (32, 0):
# 1734|-> 		      reloc_data[total_relocs].type = IMAGE_REL_BASED_HIGHLOW;
# 1735|   		      total_relocs++;
# 1736|   		      break;

Error: GCC_ANALYZER_WARNING (CWE-787): [#def244]
binutils-with-gold-2.46/ld/pe-dll.c:1738:23: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-with-gold-2.46/ld/pe-dll.c:3745:1: enter_function: entry to ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: call_function: calling ‘pep_dll_id_target’ from ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: return_function: returning to ‘pep_exe_fill_sections’ from ‘pep_dll_id_target’
binutils-with-gold-2.46/ld/pe-dll.c:3751:3: call_function: calling ‘generate_reloc’ from ‘pep_exe_fill_sections’
# 1736|   		      break;
# 1737|   		    case BITS_AND_SHIFT (16, 0):
# 1738|-> 		      reloc_data[total_relocs].type = IMAGE_REL_BASED_LOW;
# 1739|   		      total_relocs++;
# 1740|   		      break;

Error: GCC_ANALYZER_WARNING (CWE-787): [#def245]
binutils-with-gold-2.46/ld/pe-dll.c:1742:23: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-with-gold-2.46/ld/pe-dll.c:3745:1: enter_function: entry to ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: call_function: calling ‘pep_dll_id_target’ from ‘pep_exe_fill_sections’
binutils-with-gold-2.46/ld/pe-dll.c:3747:3: return_function: returning to ‘pep_exe_fill_sections’ from ‘pep_dll_id_target’
binutils-with-gold-2.46/ld/pe-dll.c:3751:3: call_function: calling ‘generate_reloc’ from ‘pep_exe_fill_sections’
# 1740|   		      break;
# 1741|   		    case BITS_AND_SHIFT (26, 2):
# 1742|-> 		      reloc_data[total_relocs].type =
# 1743|                           IMAGE_REL_BASED_ARM_MOV32;
# 1744|   		      total_relocs++;

Error: CPPCHECK_WARNING (CWE-476): [#def246]
binutils-with-gold-2.46/ld/pe-dll.c:2034: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: out
# 2032|       fprintf (out, _("; no contents available\n"));
# 2033|   
# 2034|->   if (fclose (out) == EOF)
# 2035|       /* xgettext:c-format */
# 2036|       einfo (_("%P: error closing file `%s'\n"), pe_out_def_filename);

Error: CPPCHECK_WARNING (CWE-457): [#def247]
binutils-with-gold-2.46/ld/pe-dll.c:3102: warning[uninitvar]: Uninitialized variable: &key.oname
# 3100|   
# 3101|     key.key = lname;
# 3102|->   kv = bsearch (&key, udef_table, undef_count, sizeof (struct key_value),
# 3103|   		undef_sort_cmp);
# 3104|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def248]
binutils-with-gold-2.46/ld/pe-dll.c:3136:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
binutils-with-gold-2.46/ld/pe-dll.c:3105:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/ld/pe-dll.c:3112:7: branch_false: ...to here
binutils-with-gold-2.46/ld/pe-dll.c:3112:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/ld/pe-dll.c:3115:6: branch_false: ...to here
binutils-with-gold-2.46/ld/pe-dll.c:3135:10: branch_true: following ‘true’ branch (when ‘at’ is non-NULL)...
binutils-with-gold-2.46/ld/pe-dll.c:3136:10: branch_true: ...to here
binutils-with-gold-2.46/ld/pe-dll.c:3136:9: danger: dereference of NULL ‘strchr(xmalloc(strlen(name) + 3), 64)’
# 3134|   	}
# 3135|         if (at)
# 3136|-> 	*strchr (lname, '@') = 0;
# 3137|         key.key = lname;
# 3138|         kv = bsearch (&key, udef_table, undef_count,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
binutils-with-gold-2.46/ld/testplug.c:286:12: warning[-Wanalyzer-malloc-leak]: leak of ‘sym.comdat_key’
binutils-with-gold-2.46/ld/testplug.c:492:1: enter_function: entry to ‘parse_and_dump_tv_tag’
binutils-with-gold-2.46/ld/testplug.c:494:30: call_function: calling ‘parse_tv_tag’ from ‘parse_and_dump_tv_tag’
#  284|     /* Can't add symbols except as belonging to claimed files.  */
#  285|     if (!last_claimfile)
#  286|->     return LDPS_ERR;
#  287|   
#  288|     /* If string doesn't parse correctly, give an error.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
binutils-with-gold-2.46/ld/testplug.c:607:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
binutils-with-gold-2.46/ld/testplug.c:566:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/ld/testplug.c:568:22: branch_true: ...to here
binutils-with-gold-2.46/ld/testplug.c:568:22: acquire_memory: allocated here
binutils-with-gold-2.46/ld/testplug.c:570:10: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
binutils-with-gold-2.46/ld/testplug.c:572:17: branch_false: ...to here
binutils-with-gold-2.46/ld/testplug.c:572:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/ld/testplug.c:572:10: branch_true: ...to here
binutils-with-gold-2.46/ld/testplug.c:607:1: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  605|   
#  606|     return claim_file_ret;
#  607|-> }
#  608|   
#  609|   /* Standard plugin API registerable hook.  */

Error: COMPILER_WARNING: [#def251]
binutils-with-gold-2.46/ld/testplug2.c:76:25: warning[-Wunused-const-variable=]: ‘tag_names’ defined but not used
#   76 | static const tag_name_t tag_names[] =
#      |                         ^~~~~~~~~
#   74|   
#   75|   /* Array of all known tags and their names.  */
#   76|-> static const tag_name_t tag_names[] =
#   77|   {
#   78|     ADDENTRY(LDPT_NULL),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
binutils-with-gold-2.46/ld/testplug2.c:268:12: warning[-Wanalyzer-malloc-leak]: leak of ‘sym.comdat_key’
binutils-with-gold-2.46/ld/testplug2.c:442:1: enter_function: entry to ‘onload’
binutils-with-gold-2.46/ld/testplug2.c:448:6: branch_false: following ‘false’ branch (when ‘tv’ is non-NULL)...
binutils-with-gold-2.46/ld/testplug2.c:453:7: branch_false: ...to here
binutils-with-gold-2.46/ld/testplug2.c:457:15: call_function: calling ‘parse_tv_tag’ from ‘onload’
#  266|     /* Can't add symbols except as belonging to claimed files.  */
#  267|     if (!last_claimfile)
#  268|->     return LDPS_ERR;
#  269|   
#  270|     /* If string doesn't parse correctly, give an error.  */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def253]
binutils-with-gold-2.46/ld/testplug2.c:513:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected
binutils-with-gold-2.46/ld/testplug2.c:512:15: acquire_memory: this call could return NULL
binutils-with-gold-2.46/ld/testplug2.c:513:19: danger: argument 1 (‘ret’) from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#  511|     size_t len = strlen (s) + 1;
#  512|     char *ret = malloc (len + 1);
#  513|->   return (char *) memcpy (ret, s, len);
#  514|   }
#  515|   

Error: COMPILER_WARNING: [#def254]
binutils-with-gold-2.46/ld/testplug3.c:76:25: warning[-Wunused-const-variable=]: ‘tag_names’ defined but not used
#   76 | static const tag_name_t tag_names[] =
#      |                         ^~~~~~~~~
#   74|   
#   75|   /* Array of all known tags and their names.  */
#   76|-> static const tag_name_t tag_names[] =
#   77|   {
#   78|     ADDENTRY(LDPT_NULL),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
binutils-with-gold-2.46/ld/testplug3.c:267:12: warning[-Wanalyzer-malloc-leak]: leak of ‘sym.comdat_key’
binutils-with-gold-2.46/ld/testplug3.c:421:1: enter_function: entry to ‘onload’
binutils-with-gold-2.46/ld/testplug3.c:427:6: branch_false: following ‘false’ branch (when ‘tv’ is non-NULL)...
binutils-with-gold-2.46/ld/testplug3.c:432:7: branch_false: ...to here
binutils-with-gold-2.46/ld/testplug3.c:436:15: call_function: calling ‘parse_tv_tag’ from ‘onload’
#  265|     /* Can't add symbols except as belonging to claimed files.  */
#  266|     if (!last_claimfile)
#  267|->     return LDPS_ERR;
#  268|   
#  269|     /* If string doesn't parse correctly, give an error.  */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def256]
binutils-with-gold-2.46/ld/testplug3.c:492:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected
binutils-with-gold-2.46/ld/testplug3.c:491:15: acquire_memory: this call could return NULL
binutils-with-gold-2.46/ld/testplug3.c:492:19: danger: argument 1 (‘ret’) from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#  490|     size_t len = strlen (s) + 1;
#  491|     char *ret = malloc (len + 1);
#  492|->   return (char *) memcpy (ret, s, len);
#  493|   }
#  494|   

Error: COMPILER_WARNING: [#def257]
binutils-with-gold-2.46/ld/testplug4.c:76:25: warning[-Wunused-const-variable=]: ‘tag_names’ defined but not used
#   76 | static const tag_name_t tag_names[] =
#      |                         ^~~~~~~~~
#   74|   
#   75|   /* Array of all known tags and their names.  */
#   76|-> static const tag_name_t tag_names[] =
#   77|   {
#   78|     ADDENTRY(LDPT_NULL),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
binutils-with-gold-2.46/ld/testplug4.c:268:12: warning[-Wanalyzer-malloc-leak]: leak of ‘sym.comdat_key’
binutils-with-gold-2.46/ld/testplug4.c:442:1: enter_function: entry to ‘onload’
binutils-with-gold-2.46/ld/testplug4.c:448:6: branch_false: following ‘false’ branch (when ‘tv’ is non-NULL)...
binutils-with-gold-2.46/ld/testplug4.c:453:7: branch_false: ...to here
binutils-with-gold-2.46/ld/testplug4.c:457:15: call_function: calling ‘parse_tv_tag’ from ‘onload’
#  266|     /* Can't add symbols except as belonging to claimed files.  */
#  267|     if (!last_claimfile)
#  268|->     return LDPS_ERR;
#  269|   
#  270|     /* If string doesn't parse correctly, give an error.  */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def259]
binutils-with-gold-2.46/ld/testplug4.c:519:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected
binutils-with-gold-2.46/ld/testplug4.c:518:15: acquire_memory: this call could return NULL
binutils-with-gold-2.46/ld/testplug4.c:519:19: danger: argument 1 (‘ret’) from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#  517|     size_t len = strlen (s) + 1;
#  518|     char *ret = malloc (len + 1);
#  519|->   return (char *) memcpy (ret, s, len);
#  520|   }
#  521|   

Error: CPPCHECK_WARNING (CWE-190): [#def260]
binutils-with-gold-2.46/libctf/ctf-create.c:525: error[integerOverflow]: Signed integer overflow for expression '-8'.
#  523|   
#  524|     dtd->dtd_data.ctt_info = CTF_TYPE_INFO (kind, flag, 0);
#  525|->   dtd->dtd_data.ctt_size = clp2 (P2ROUNDUP (ep->cte_bits, CHAR_BIT)
#  526|   				 / CHAR_BIT);
#  527|     switch (kind)

Error: CPPCHECK_WARNING (CWE-190): [#def261]
binutils-with-gold-2.46/libctf/ctf-create.c:627: error[integerOverflow]: Signed integer overflow for expression '-8'.
#  625|   
#  626|     dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_SLICE, flag, 0);
#  627|->   dtd->dtd_data.ctt_size = clp2 (P2ROUNDUP (ep->cte_bits, CHAR_BIT)
#  628|   				 / CHAR_BIT);
#  629|     slice.cts_type = (uint32_t) ref;

Error: CPPCHECK_WARNING (CWE-476): [#def262]
binutils-with-gold-2.46/libctf/ctf-dump.c:813: warning[nullPointer]: Possible null pointer dereference: str
#  811|   	}
#  812|   
#  813|->       len = strlen (str);
#  814|   
#  815|         if (str[len-1] == '\n')

Error: CPPCHECK_WARNING (CWE-476): [#def263]
binutils-with-gold-2.46/libctf/ctf-dump.c:815: warning[nullPointer]: Possible null pointer dereference: str
#  813|         len = strlen (str);
#  814|   
#  815|->       if (str[len-1] == '\n')
#  816|   	str[len-1] = '\0';
#  817|       }

Error: GCC_ANALYZER_WARNING (CWE-122): [#def264]
binutils-with-gold-2.46/libctf/ctf-hash.c:186:7: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
binutils-with-gold-2.46/libctf/ctf-hash.c:164:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-hash.c:168:17: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-hash.c:171:6: branch_false: following ‘false’ branch (when ‘dynhash’ is non-NULL)...
binutils-with-gold-2.46/libctf/ctf-hash.c:174:7: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-hash.c:174:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libctf/ctf-hash.c:174:6: branch_true: ...to here
binutils-with-gold-2.46/libctf/ctf-hash.c:177:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-hash.c:184:6: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-hash.c:184:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libctf/ctf-hash.c:186:7: branch_true: ...to here
binutils-with-gold-2.46/libctf/ctf-hash.c:186:7: danger: out-of-bounds write from byte 8 till byte 15 but region ends at byte 8
#  184|     if (key_free || value_free)
#  185|       {
#  186|->       dynhash->key_free = key_free;
#  187|         dynhash->value_free = value_free;
#  188|       }

Error: GCC_ANALYZER_WARNING (CWE-122): [#def265]
binutils-with-gold-2.46/libctf/ctf-hash.c:187:7: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
binutils-with-gold-2.46/libctf/ctf-hash.c:164:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-hash.c:168:17: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-hash.c:171:6: branch_false: following ‘false’ branch (when ‘dynhash’ is non-NULL)...
binutils-with-gold-2.46/libctf/ctf-hash.c:174:7: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-hash.c:174:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libctf/ctf-hash.c:174:6: branch_true: ...to here
binutils-with-gold-2.46/libctf/ctf-hash.c:177:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-hash.c:184:6: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-hash.c:184:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libctf/ctf-hash.c:186:7: branch_true: ...to here
binutils-with-gold-2.46/libctf/ctf-hash.c:187:7: danger: out-of-bounds write from byte 16 till byte 23 but region ends at byte 8
#  185|       {
#  186|         dynhash->key_free = key_free;
#  187|->       dynhash->value_free = value_free;
#  188|       }
#  189|   

Error: CPPCHECK_WARNING (CWE-457): [#def266]
binutils-with-gold-2.46/libctf/ctf-link.c:220: error[uninitvar]: Uninitialized variable: err
#  218|     if (!input->clin_arc)
#  219|       {
#  220|->       if (err == ECTF_NOCTFDATA)
#  221|   	return 0;
#  222|   

Error: CPPCHECK_WARNING (CWE-457): [#def267]
binutils-with-gold-2.46/libctf/ctf-link.c:1738: error[legacyUninitvar]: Uninitialized variable: name
# 1736|     while ((err = ctf_dynhash_next (fp->ctf_dynsyms, &i, &name_, &sym_)) == 0)
# 1737|       {
# 1738|->       const char *name = (const char *) name;
# 1739|         ctf_link_sym_t *symp = (ctf_link_sym_t *) sym_;
# 1740|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
binutils-with-gold-2.46/libctf/ctf-link.c:1833:1: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
binutils-with-gold-2.46/libctf/ctf-link.c:1788:6: branch_false: following ‘false’ branch (when ‘names’ is non-NULL)...
binutils-with-gold-2.46/libctf/ctf-link.c:1795:61: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-link.c:1795:6: branch_false: following ‘false’ branch (when ‘files’ is non-NULL)...
binutils-with-gold-2.46/libctf/ctf-link.c:1807:7: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-link.c:1807:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libctf/ctf-link.c:1811:13: branch_true: ...to here
binutils-with-gold-2.46/libctf/ctf-link.c:1815:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libctf/ctf-link.c:1818:55: branch_true: ...to here
binutils-with-gold-2.46/libctf/ctf-link.c:1817:14: branch_true: following ‘true’ branch (when ‘dynames’ is NULL)...
binutils-with-gold-2.46/libctf/ctf-link.c:1820:15: branch_true: ...to here
binutils-with-gold-2.46/libctf/ctf-link.c:1833:1: danger: ‘files’ leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
# 1831|     arg->files = files;
# 1832|     arg->files[(arg->i) - 1] = fp;
# 1833|-> }
# 1834|   
# 1835|   /* Change the name of the parent CTF section, if the name transformer has got to

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
binutils-with-gold-2.46/libctf/ctf-link.c:1833:1: warning[-Wanalyzer-malloc-leak]: leak of ‘names’
binutils-with-gold-2.46/libctf/ctf-link.c:1788:6: branch_false: following ‘false’ branch (when ‘names’ is non-NULL)...
binutils-with-gold-2.46/libctf/ctf-link.c:1795:61: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-link.c:1795:6: branch_true: following ‘true’ branch (when ‘files’ is NULL)...
binutils-with-gold-2.46/libctf/ctf-link.c:1797:7: branch_true: ...to here
binutils-with-gold-2.46/libctf/ctf-link.c:1833:1: danger: ‘names’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1831|     arg->files = files;
# 1832|     arg->files[(arg->i) - 1] = fp;
# 1833|-> }
# 1834|   
# 1835|   /* Change the name of the parent CTF section, if the name transformer has got to

Error: GCC_ANALYZER_WARNING (CWE-131): [#def270]
binutils-with-gold-2.46/libctf/ctf-lookup.c:590:17: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
binutils-with-gold-2.46/libctf/ctf-lookup.c:1298:1: enter_function: entry to ‘ctf_func_args’
binutils-with-gold-2.46/libctf/ctf-lookup.c:1303:15: call_function: calling ‘ctf_lookup_by_symbol’ from ‘ctf_func_args’
#  588|     size_t i;
#  589|   
#  590|->   if ((sorted = malloc (len)) == NULL)
#  591|       {
#  592|         ctf_set_errno (fp, ENOMEM);

Error: CPPCHECK_WARNING (CWE-457): [#def271]
binutils-with-gold-2.46/libctf/ctf-open.c:1385: error[uninitvar]: Uninitialized variables: &skeleton.cts_data, &skeleton.cts_size
# 1383|     if (ctfsect)
# 1384|       {
# 1385|->       memcpy (&ctf_sect, &skeleton, sizeof (struct ctf_sect));
# 1386|         ctf_sect.cts_data = ctfsect;
# 1387|         ctf_sect.cts_size = ctfsect_size;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
binutils-with-gold-2.46/libctf/ctf-open.c:1526:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
binutils-with-gold-2.46/libctf/ctf-open.c:1444:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1445:10: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1444:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1451:31: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1467:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1471:6: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1486:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1494:7: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1494:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1497:13: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1497:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
binutils-with-gold-2.46/libctf/ctf-open.c:1500:3: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1502:25: acquire_memory: allocated here
binutils-with-gold-2.46/libctf/ctf-open.c:1502:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1508:15: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1509:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1512:6: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1512:6: branch_false: following ‘false’ branch (when ‘foreign_endian == 0’)...
binutils-with-gold-2.46/libctf/ctf-open.c:1514:23: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1526:14: danger: ‘<unknown>’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
# 1524|       {
# 1525|         ctf_err_warn (NULL, 0, ECTF_CORRUPT, _("header offset exceeds CTF size"));
# 1526|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1527|       }
# 1528|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
binutils-with-gold-2.46/libctf/ctf-open.c:1526:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
binutils-with-gold-2.46/libctf/ctf-open.c:1444:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1445:10: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1444:7: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1451:31: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1467:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1471:6: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1486:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1494:7: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1494:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1497:13: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1497:13: acquire_memory: allocated here
binutils-with-gold-2.46/libctf/ctf-open.c:1497:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
binutils-with-gold-2.46/libctf/ctf-open.c:1500:3: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1502:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1508:15: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1509:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-open.c:1512:6: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1512:6: branch_false: following ‘false’ branch (when ‘foreign_endian == 0’)...
binutils-with-gold-2.46/libctf/ctf-open.c:1514:23: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-open.c:1526:14: danger: ‘fp’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
# 1524|       {
# 1525|         ctf_err_warn (NULL, 0, ECTF_CORRUPT, _("header offset exceeds CTF size"));
# 1526|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1527|       }
# 1528|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def274]
binutils-with-gold-2.46/libctf/ctf-serialize.c:573:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
binutils-with-gold-2.46/libctf/ctf-serialize.c:1260:1: enter_function: entry to ‘ctf_write_thresholded’
binutils-with-gold-2.46/libctf/ctf-serialize.c:1269:14: call_function: calling ‘ctf_write_mem’ from ‘ctf_write_thresholded’
#  571|        in ctf_link_deduplicating_variables.  */
#  572|   
#  573|->   if (s->filter_syms && s->symfp->ctf_dynsyms &&
#  574|         symtypetab_delete_nonstatics (fp, s->symfp) < 0)
#  575|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
binutils-with-gold-2.46/libctf/ctf-string.c:827:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
binutils-with-gold-2.46/libctf/ctf-string.c:662:6: branch_false: following ‘false’ branch (when ‘strtab’ is non-NULL)...
binutils-with-gold-2.46/libctf/ctf-string.c:671:21: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-string.c:700:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-string.c:709:32: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-string.c:714:6: branch_false: following ‘false’ branch (when ‘sorttab’ is non-NULL)...
binutils-with-gold-2.46/libctf/ctf-string.c:714:6: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-string.c:740:27: acquire_memory: allocated here
binutils-with-gold-2.46/libctf/ctf-string.c:740:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libctf/ctf-string.c:743:16: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-string.c:745:6: branch_false: following ‘false’ branch (when ‘new_strtab == 0’)...
binutils-with-gold-2.46/libctf/ctf-string.c:751:31: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-string.c:760:15: branch_false: following ‘false’ branch (when ‘strtab_count <= i’)...
binutils-with-gold-2.46/libctf/ctf-string.c:766:3: branch_false: ...to here
binutils-with-gold-2.46/libctf/ctf-string.c:790:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libctf/ctf-string.c:792:7: branch_true: ...to here
binutils-with-gold-2.46/libctf/ctf-string.c:827:3: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  825|     free (sorttab);
#  826|    err_strtab:
#  827|->   free (strtab);
#  828|     return NULL;
#  829|   }

Error: COMPILER_WARNING: [#def276]
binutils-with-gold-2.46/libiberty/cp-demangle.c: scope_hint: In function ‘cplus_demangle_print_callback.constprop’
binutils-with-gold-2.46/libiberty/cp-demangle.c:4682:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 4682 | cplus_demangle_print_callback (int options,
#      | ^
# 4680|   CP_STATIC_IF_GLIBCPP_V3
# 4681|   int
# 4682|-> cplus_demangle_print_callback (int options,
# 4683|                                  struct demangle_component *dc,
# 4684|                                  demangle_callbackref callback, void *opaque)

Error: CPPCHECK_WARNING (CWE-562): [#def277]
binutils-with-gold-2.46/libiberty/cp-demangle.c:5224: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5222|   
# 5223|   	    adpm[i].next = dpi->modifiers;
# 5224|-> 	    dpi->modifiers = &adpm[i];
# 5225|   	    adpm[i].mod = typed_name;
# 5226|   	    adpm[i].printed = 0;

Error: CPPCHECK_WARNING (CWE-562): [#def278]
binutils-with-gold-2.46/libiberty/cp-demangle.c:5262: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5260|   		adpm[i] = adpm[i - 1];
# 5261|   		adpm[i].next = &adpm[i - 1];
# 5262|-> 		dpi->modifiers = &adpm[i];
# 5263|   
# 5264|   		adpm[i - 1].mod = typed_name;

Error: CPPCHECK_WARNING (CWE-562): [#def279]
binutils-with-gold-2.46/libiberty/cp-demangle.c:5283: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5281|   	  {
# 5282|   	    dpt.next = dpi->templates;
# 5283|-> 	    dpi->templates = &dpt;
# 5284|   	    dpt.template_decl = typed_name;
# 5285|   

Error: CPPCHECK_WARNING (CWE-562): [#def280]
binutils-with-gold-2.46/libiberty/cp-demangle.c:5758: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5756|   
# 5757|   	adpm[0].next = hold_modifiers;
# 5758|-> 	dpi->modifiers = &adpm[0];
# 5759|   	adpm[0].mod = dc;
# 5760|   	adpm[0].printed = 0;

Error: CPPCHECK_WARNING (CWE-562): [#def281]
binutils-with-gold-2.46/libiberty/cp-demangle.c:6794: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6792|       {
# 6793|         dpt.next = dpi->templates;
# 6794|->       dpi->templates = &dpt;
# 6795|         dpt.template_decl = dpi->current_template;
# 6796|       }

Error: CPPCHECK_WARNING (CWE-909): [#def282]
binutils-with-gold-2.46/libiberty/cp-demangle.c:6801: error[uninitStructMember]: Uninitialized struct member: dpt.next
# 6799|   
# 6800|     if (dpi->current_template != NULL)
# 6801|->     dpi->templates = dpt.next;
# 6802|   }
# 6803|   

Error: COMPILER_WARNING: [#def283]
binutils-with-gold-2.46/libiberty/cp-demangle.c: scope_hint: In function 'd_demangle_callback.constprop'
binutils-with-gold-2.46/libiberty/cp-demangle.c:6843:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 6843 | d_demangle_callback (const char *mangled, int options,
#      | ^
# 6841|   
# 6842|   static int
# 6843|-> d_demangle_callback (const char *mangled, int options,
# 6844|                        demangle_callbackref callback, void *opaque)
# 6845|   {

Error: COMPILER_WARNING: [#def284]
binutils-with-gold-2.46/libiberty/cp-demangle.c: scope_hint: In function ‘d_demangle’
binutils-with-gold-2.46/libiberty/cp-demangle.c:6960:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 6960 | d_demangle (const char *mangled, int options, size_t *palc)
#      | ^
# 6958|   
# 6959|   static char *
# 6960|-> d_demangle (const char *mangled, int options, size_t *palc)
# 6961|   {
# 6962|     struct d_growable_string dgs;

Error: COMPILER_WARNING: [#def285]
binutils-with-gold-2.46/libiberty/cp-demangle.c: scope_hint: In function ‘is_ctor_or_dtor’
binutils-with-gold-2.46/libiberty/cp-demangle.c:7166:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 7166 | is_ctor_or_dtor (const char *mangled,
#      | ^
# 7164|   
# 7165|   static int
# 7166|-> is_ctor_or_dtor (const char *mangled,
# 7167|                    enum gnu_v3_ctor_kinds *ctor_kind,
# 7168|                    enum gnu_v3_dtor_kinds *dtor_kind)

Error: GCC_ANALYZER_WARNING (CWE-465): [#def286]
binutils-with-gold-2.46/libiberty/dyn-string.c:251:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
binutils-with-gold-2.46/libiberty/dyn-string.c:244:1: enter_function: entry to ‘dyn_string_insert’
binutils-with-gold-2.46/libiberty/dyn-string.c:248:6: branch_false: following ‘false’ branch (when ‘src != dest’)...
binutils-with-gold-2.46/libiberty/dyn-string.c:251:32: branch_false: ...to here
binutils-with-gold-2.46/libiberty/dyn-string.c:251:7: call_function: calling ‘dyn_string_resize’ from ‘dyn_string_insert’
binutils-with-gold-2.46/libiberty/dyn-string.c:251:7: return_function: returning to ‘dyn_string_insert’ from ‘dyn_string_resize’
binutils-with-gold-2.46/libiberty/dyn-string.c:251:6: danger: pointer ‘dest’ is checked for NULL here but it was already dereferenced at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  249|       abort ();
#  250|   
#  251|->   if (dyn_string_resize (dest, dest->length + src->length) == NULL)
#  252|       return 0;
#  253|     /* Make room for the insertion.  Be sure to copy the NUL.  */

Error: GCC_ANALYZER_WARNING (CWE-465): [#def287]
binutils-with-gold-2.46/libiberty/dyn-string.c:274:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
binutils-with-gold-2.46/libiberty/dyn-string.c:269:1: enter_function: entry to ‘dyn_string_insert_cstr’
binutils-with-gold-2.46/libiberty/dyn-string.c:274:7: call_function: calling ‘dyn_string_resize’ from ‘dyn_string_insert_cstr’
binutils-with-gold-2.46/libiberty/dyn-string.c:274:7: return_function: returning to ‘dyn_string_insert_cstr’ from ‘dyn_string_resize’
binutils-with-gold-2.46/libiberty/dyn-string.c:274:6: danger: pointer ‘dest’ is checked for NULL here but it was already dereferenced at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#  272|     int length = strlen (src);
#  273|   
#  274|->   if (dyn_string_resize (dest, dest->length + length) == NULL)
#  275|       return 0;
#  276|     /* Make room for the insertion.  Be sure to copy the NUL.  */

Error: GCC_ANALYZER_WARNING (CWE-465): [#def288]
binutils-with-gold-2.46/libiberty/dyn-string.c:295:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
binutils-with-gold-2.46/libiberty/dyn-string.c:291:1: enter_function: entry to ‘dyn_string_insert_char’
binutils-with-gold-2.46/libiberty/dyn-string.c:295:7: call_function: calling ‘dyn_string_resize’ from ‘dyn_string_insert_char’
binutils-with-gold-2.46/libiberty/dyn-string.c:295:7: return_function: returning to ‘dyn_string_insert_char’ from ‘dyn_string_resize’
binutils-with-gold-2.46/libiberty/dyn-string.c:295:6: danger: pointer ‘dest’ is checked for NULL here but it was already dereferenced at [(2)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/1)
#  293|     int i;
#  294|   
#  295|->   if (dyn_string_resize (dest, dest->length + 1) == NULL)
#  296|       return 0;
#  297|     /* Make room for the insertion.  Be sure to copy the NUL.  */

Error: GCC_ANALYZER_WARNING (CWE-465): [#def289]
binutils-with-gold-2.46/libiberty/dyn-string.c:314:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
binutils-with-gold-2.46/libiberty/dyn-string.c:312:1: enter_function: entry to ‘dyn_string_append’
binutils-with-gold-2.46/libiberty/dyn-string.c:314:7: call_function: calling ‘dyn_string_resize’ from ‘dyn_string_append’
binutils-with-gold-2.46/libiberty/dyn-string.c:314:7: return_function: returning to ‘dyn_string_append’ from ‘dyn_string_resize’
binutils-with-gold-2.46/libiberty/dyn-string.c:314:6: danger: pointer ‘dest’ is checked for NULL here but it was already dereferenced at [(2)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/1)
#  312|   dyn_string_append (dyn_string_t dest, dyn_string_t s)
#  313|   {
#  314|->   if (dyn_string_resize (dest, dest->length + s->length) == 0)
#  315|       return 0;
#  316|     strcpy (dest->s + dest->length, s->s);

Error: GCC_ANALYZER_WARNING (CWE-465): [#def290]
binutils-with-gold-2.46/libiberty/dyn-string.c:332:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
binutils-with-gold-2.46/libiberty/dyn-string.c:326:1: enter_function: entry to ‘dyn_string_append_cstr’
binutils-with-gold-2.46/libiberty/dyn-string.c:332:7: call_function: calling ‘dyn_string_resize’ from ‘dyn_string_append_cstr’
binutils-with-gold-2.46/libiberty/dyn-string.c:332:7: return_function: returning to ‘dyn_string_append_cstr’ from ‘dyn_string_resize’
binutils-with-gold-2.46/libiberty/dyn-string.c:332:6: danger: pointer ‘dest’ is checked for NULL here but it was already dereferenced at [(2)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/1)
#  330|     /* The new length is the old length plus the size of our string, plus
#  331|        one for the null at the end.  */
#  332|->   if (dyn_string_resize (dest, dest->length + len) == NULL)
#  333|       return 0;
#  334|     strcpy (dest->s + dest->length, s);

Error: GCC_ANALYZER_WARNING (CWE-465): [#def291]
binutils-with-gold-2.46/libiberty/dyn-string.c:346:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
binutils-with-gold-2.46/libiberty/dyn-string.c:343:1: enter_function: entry to ‘dyn_string_append_char’
binutils-with-gold-2.46/libiberty/dyn-string.c:346:7: call_function: calling ‘dyn_string_resize’ from ‘dyn_string_append_char’
binutils-with-gold-2.46/libiberty/dyn-string.c:346:7: return_function: returning to ‘dyn_string_append_char’ from ‘dyn_string_resize’
binutils-with-gold-2.46/libiberty/dyn-string.c:346:6: danger: pointer ‘dest’ is checked for NULL here but it was already dereferenced at [(2)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/1)
#  344|   {
#  345|     /* Make room for the extra character.  */
#  346|->   if (dyn_string_resize (dest, dest->length + 1) == NULL)
#  347|       return 0;
#  348|     /* Append the character; it will overwrite the old NUL.  */

Error: GCC_ANALYZER_WARNING (CWE-122): [#def292]
binutils-with-gold-2.46/libiberty/ldirname.c:83:1: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
binutils-with-gold-2.46/libiberty/ldirname.c:83:1: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libiberty/ldirname.c:83:1: danger: write of ‘size’ bytes at offset ‘0’ exceeds the buffer
#   81|     }
#   82|   
#   83|-> LDIRNAME(dos,1)
#   84|   LDIRNAME(unix,0)
#   85|   

Error: GCC_ANALYZER_WARNING (CWE-122): [#def293]
binutils-with-gold-2.46/libiberty/ldirname.c:84:1: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
binutils-with-gold-2.46/libiberty/ldirname.c:84:1: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libiberty/ldirname.c:84:1: danger: write of ‘size’ bytes at offset ‘0’ exceeds the buffer
#   82|   
#   83|   LDIRNAME(dos,1)
#   84|-> LDIRNAME(unix,0)
#   85|   
#   86|   char *

Error: CPPCHECK_WARNING (CWE-476): [#def294]
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:110: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  108|     char *result = (char *) malloc (len + 1);
#  109|   
#  110|->   memcpy (result, s, len);
#  111|     result[len] = 0;
#  112|     return result;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def295]
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:110:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘result’ where non-null expected
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:118:1: enter_function: entry to ‘split_directories’
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:150:6: branch_false: following ‘false’ branch (when ‘dirs’ is non-NULL)...
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:150:6: branch_false: ...to here
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:188:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:189:24: branch_true: ...to here
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:189:24: call_function: calling ‘save_string’ from ‘split_directories’
#  108|     char *result = (char *) malloc (len + 1);
#  109|   
#  110|->   memcpy (result, s, len);
#  111|     result[len] = 0;
#  112|     return result;

Error: CPPCHECK_WARNING (CWE-476): [#def296]
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:111: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  109|   
#  110|     memcpy (result, s, len);
#  111|->   result[len] = 0;
#  112|     return result;
#  113|   }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def297]
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:192:7: warning[-Wanalyzer-out-of-bounds]: heap-based buffer under-read
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:150:6: branch_false: following ‘false’ branch (when ‘dirs’ is non-NULL)...
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:150:6: branch_false: ...to here
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:188:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:190:7: branch_false: ...to here
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:192:7: danger: out-of-bounds read from byte -8 till byte -1 but region starts at byte 0
#  190|     dirs[num_dirs] = NULL;
#  191|   
#  192|->   if (dirs[num_dirs - 1] == NULL)
#  193|       {
#  194|         free_split_directories (dirs);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:215:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:428:1: enter_function: entry to ‘make_relative_prefix_ignore_links’
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:432:10: call_function: calling ‘make_relative_prefix_1’ from ‘make_relative_prefix_ignore_links’
#  213|   	free (dirs[i++]);
#  214|   
#  215|->       free ((char *) dirs);
#  216|       }
#  217|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def299]
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:274:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘nstore’
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:428:1: enter_function: entry to ‘make_relative_prefix_ignore_links’
binutils-with-gold-2.46/libiberty/make-relative-prefix.c:432:10: call_function: calling ‘make_relative_prefix_1’ from ‘make_relative_prefix_ignore_links’
#  272|   		  if (endp == startp)
#  273|   		    {
#  274|-> 		      nstore[0] = '.';
#  275|   		      nstore[1] = DIR_SEPARATOR;
#  276|   		      nstore[2] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def300]
binutils-with-gold-2.46/libiberty/obstack.c:210:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘new_chunk’
binutils-with-gold-2.46/libiberty/obstack.c:209:3: release_memory: ‘new_chunk’ is NULL
binutils-with-gold-2.46/libiberty/obstack.c:210:3: danger: dereference of NULL ‘new_chunk’
#  208|       (*obstack_alloc_failed_handler)();
#  209|     h->chunk = new_chunk;
#  210|->   new_chunk->prev = old_chunk;
#  211|     new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
#  212|   

Error: CPPCHECK_WARNING (CWE-401): [#def301]
binutils-with-gold-2.46/libiberty/regex.c:2444: error[memleak]: Memory leak: compile_stack.stack
# 2442|           }
# 2443|   
# 2444|->       if (!COMPILED_BUFFER_VAR) FREE_STACK_RETURN (REG_ESPACE);
# 2445|   #ifdef WCHAR
# 2446|         bufp->buffer = (char*)COMPILED_BUFFER_VAR;

Error: GCC_ANALYZER_WARNING (CWE-787): [#def302]
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1091:11: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1334:1: enter_function: entry to ‘simple_object_mach_o_write_to_file’
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1340:8: call_function: calling ‘simple_object_mach_o_write_segment’ from ‘simple_object_mach_o_write_to_file’
# 1089|   	   section = section->next, sect++)
# 1090|   	{
# 1091|-> 	  index[sect*4+2] = name_offset;
# 1092|   	  index[sect*4+3] = strlen (section->name) + 1;
# 1093|   	  name_offset += strlen (section->name) + 1;

Error: GCC_ANALYZER_WARNING (CWE-787): [#def303]
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1092:11: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1334:1: enter_function: entry to ‘simple_object_mach_o_write_to_file’
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1340:8: call_function: calling ‘simple_object_mach_o_write_segment’ from ‘simple_object_mach_o_write_to_file’
# 1090|   	{
# 1091|   	  index[sect*4+2] = name_offset;
# 1092|-> 	  index[sect*4+3] = strlen (section->name) + 1;
# 1093|   	  name_offset += strlen (section->name) + 1;
# 1094|   	}

Error: GCC_ANALYZER_WARNING (CWE-787): [#def304]
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1148:11: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1334:1: enter_function: entry to ‘simple_object_mach_o_write_to_file’
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1340:8: call_function: calling ‘simple_object_mach_o_write_segment’ from ‘simple_object_mach_o_write_to_file’
# 1146|         if (sobj->segment_name != NULL)
# 1147|   	{
# 1148|-> 	  index[sect*4+0] = (unsigned int) offset;
# 1149|   	  index[sect*4+1] = secsize;
# 1150|   	  /* Stash the section name in our table.  */

Error: GCC_ANALYZER_WARNING (CWE-787): [#def305]
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1149:11: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1334:1: enter_function: entry to ‘simple_object_mach_o_write_to_file’
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1340:8: call_function: calling ‘simple_object_mach_o_write_segment’ from ‘simple_object_mach_o_write_to_file’
# 1147|   	{
# 1148|   	  index[sect*4+0] = (unsigned int) offset;
# 1149|-> 	  index[sect*4+1] = secsize;
# 1150|   	  /* Stash the section name in our table.  */
# 1151|   	  memcpy (snames + index[sect * 4 + 2], section->name,

Error: GCC_ANALYZER_WARNING (CWE-787): [#def306]
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1151:28: warning[-Wanalyzer-out-of-bounds]: buffer over-read
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1334:1: enter_function: entry to ‘simple_object_mach_o_write_to_file’
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1340:8: call_function: calling ‘simple_object_mach_o_write_segment’ from ‘simple_object_mach_o_write_to_file’
# 1149|   	  index[sect*4+1] = secsize;
# 1150|   	  /* Stash the section name in our table.  */
# 1151|-> 	  memcpy (snames + index[sect * 4 + 2], section->name,
# 1152|   		  index[sect * 4 + 3]);
# 1153|   	}

Error: GCC_ANALYZER_WARNING (CWE-787): [#def307]
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1152:19: warning[-Wanalyzer-out-of-bounds]: buffer over-read
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1334:1: enter_function: entry to ‘simple_object_mach_o_write_to_file’
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1340:8: call_function: calling ‘simple_object_mach_o_write_segment’ from ‘simple_object_mach_o_write_to_file’
# 1150|   	  /* Stash the section name in our table.  */
# 1151|   	  memcpy (snames + index[sect * 4 + 2], section->name,
# 1152|-> 		  index[sect * 4 + 3]);
# 1153|   	}
# 1154|         else

Error: GCC_ANALYZER_WARNING (CWE-787): [#def308]
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1199:27: warning[-Wanalyzer-out-of-bounds]: buffer over-read
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1334:1: enter_function: entry to ‘simple_object_mach_o_write_to_file’
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1340:8: call_function: calling ‘simple_object_mach_o_write_segment’ from ‘simple_object_mach_o_write_to_file’
# 1197|   	 created section.  */
# 1198|   
# 1199|->       secsize = (offset - index[0]);
# 1200|         if (!simple_object_mach_o_write_section_header (sobj, descriptor,
# 1201|   						      sechdr_offset,

Error: GCC_ANALYZER_WARNING (CWE-787): [#def309]
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1215:7: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1334:1: enter_function: entry to ‘simple_object_mach_o_write_to_file’
binutils-with-gold-2.46/libiberty/simple-object-mach-o.c:1340:8: call_function: calling ‘simple_object_mach_o_write_segment’ from ‘simple_object_mach_o_write_to_file’
# 1213|         for (i = 1; i < nsects_in; ++i)
# 1214|   	index[4 * i] -= index[0];
# 1215|->       index[0] = 0;
# 1216|   
# 1217|         /* Swap the indices, if required.  */

Error: CPPCHECK_WARNING (CWE-562): [#def310]
binutils-with-gold-2.46/libiberty/simple-object.c:295: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning.
#  293|     /* Copy over .note.GNU-stack section under the same name if present.  */
#  294|     else if (strcmp (name, ".note.GNU-stack") == 0)
#  295|->     return strcpy (newname, name);
#  296|     /* Copy over .note.gnu.property section under the same name if present.  */
#  297|     else if (strcmp (name, ".note.gnu.property") == 0)

Error: CPPCHECK_WARNING (CWE-562): [#def311]
binutils-with-gold-2.46/libiberty/simple-object.c:298: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning.
#  296|     /* Copy over .note.gnu.property section under the same name if present.  */
#  297|     else if (strcmp (name, ".note.gnu.property") == 0)
#  298|->     return strcpy (newname, name);
#  299|     /* Copy over .comment section under the same name if present.  Solaris
#  300|        ld uses them to relax its checking of ELF gABI access rules for

Error: CPPCHECK_WARNING (CWE-562): [#def312]
binutils-with-gold-2.46/libiberty/simple-object.c:303: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning.
#  301|        COMDAT sections in objects produced by GCC.  */
#  302|     else if (strcmp (name, ".comment") == 0)
#  303|->     return strcpy (newname, name);
#  304|     /* Copy over .GCC.command.line section under the same name if present.  */
#  305|     else if (strcmp (name, ".GCC.command.line") == 0)

Error: CPPCHECK_WARNING (CWE-562): [#def313]
binutils-with-gold-2.46/libiberty/simple-object.c:306: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning.
#  304|     /* Copy over .GCC.command.line section under the same name if present.  */
#  305|     else if (strcmp (name, ".GCC.command.line") == 0)
#  306|->     return strcpy (newname, name);
#  307|     /* Copy over .ctf section under the same name if present.  */
#  308|     else if (strcmp (name, ".ctf") == 0)

Error: CPPCHECK_WARNING (CWE-562): [#def314]
binutils-with-gold-2.46/libiberty/simple-object.c:309: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning.
#  307|     /* Copy over .ctf section under the same name if present.  */
#  308|     else if (strcmp (name, ".ctf") == 0)
#  309|->     return strcpy (newname, name);
#  310|     /* Copy over .BTF section under the same name if present.  */
#  311|     else if (strcmp (name, ".BTF") == 0)

Error: CPPCHECK_WARNING (CWE-562): [#def315]
binutils-with-gold-2.46/libiberty/simple-object.c:312: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning.
#  310|     /* Copy over .BTF section under the same name if present.  */
#  311|     else if (strcmp (name, ".BTF") == 0)
#  312|->     return strcpy (newname, name);
#  313|     free (newname);
#  314|     return NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def316]
binutils-with-gold-2.46/libiberty/strerror.c:756:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_names’
binutils-with-gold-2.46/libiberty/strerror.c:744:1: enter_function: entry to ‘strtoerrno’
binutils-with-gold-2.46/libiberty/strerror.c:748:6: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
binutils-with-gold-2.46/libiberty/strerror.c:750:11: branch_true: ...to here
binutils-with-gold-2.46/libiberty/strerror.c:750:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libiberty/strerror.c:752:11: branch_true: ...to here
binutils-with-gold-2.46/libiberty/strerror.c:752:11: call_function: calling ‘init_error_tables’ from ‘strtoerrno’
binutils-with-gold-2.46/libiberty/strerror.c:752:11: return_function: returning to ‘strtoerrno’ from ‘init_error_tables’
binutils-with-gold-2.46/libiberty/strerror.c:754:26: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libiberty/strerror.c:756:27: branch_true: ...to here
binutils-with-gold-2.46/libiberty/strerror.c:756:16: danger: dereference of NULL ‘error_names + (long unsigned int)errnoval * 8’
#  754|         for (errnoval = 0; errnoval < num_error_names; errnoval++)
#  755|   	{
#  756|-> 	  if ((error_names[errnoval] != NULL) &&
#  757|   	      (strcmp (name, error_names[errnoval]) == 0))
#  758|   	    {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def317]
binutils-with-gold-2.46/libiberty/strsignal.c:524:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘signal_names’
binutils-with-gold-2.46/libiberty/strsignal.c:512:1: enter_function: entry to ‘strtosigno’
binutils-with-gold-2.46/libiberty/strsignal.c:516:6: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
binutils-with-gold-2.46/libiberty/strsignal.c:518:11: branch_true: ...to here
binutils-with-gold-2.46/libiberty/strsignal.c:518:10: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libiberty/strsignal.c:520:11: branch_true: ...to here
binutils-with-gold-2.46/libiberty/strsignal.c:520:11: call_function: calling ‘init_signal_tables’ from ‘strtosigno’
binutils-with-gold-2.46/libiberty/strsignal.c:520:11: return_function: returning to ‘strtosigno’ from ‘init_signal_tables’
binutils-with-gold-2.46/libiberty/strsignal.c:522:23: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libiberty/strsignal.c:524:28: branch_true: ...to here
binutils-with-gold-2.46/libiberty/strsignal.c:524:16: danger: dereference of NULL ‘signal_names + (long unsigned int)signo * 8’
#  522|         for (signo = 0; signo < num_signal_names; signo++)
#  523|   	{
#  524|-> 	  if ((signal_names[signo] != NULL) &&
#  525|   	      (strcmp (name, signal_names[signo]) == 0))
#  526|   	    {

Error: CPPCHECK_WARNING (CWE-664): [#def318]
binutils-with-gold-2.46/libiberty/vprintf-support.c:52: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
#   50|     va_copy (ap, args);
#   51|   #else
#   52|->   memcpy ((void *) &ap, (void *) &args, sizeof (va_list));
#   53|   #endif
#   54|   

Error: CPPCHECK_WARNING (CWE-664): [#def319]
binutils-with-gold-2.46/libiberty/vprintf-support.c:65: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
#   63|   	    {
#   64|   	      ++p;
#   65|-> 	      total_width += abs (va_arg (ap, int));
#   66|   	    }
#   67|   	  else

Error: CPPCHECK_WARNING (CWE-664): [#def320]
binutils-with-gold-2.46/libiberty/vprintf-support.c:75: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
#   73|   		{
#   74|   		  ++p;
#   75|-> 		  total_width += abs (va_arg (ap, int));
#   76|   		}
#   77|   	      else

Error: CPPCHECK_WARNING (CWE-664): [#def321]
binutils-with-gold-2.46/libiberty/vprintf-support.c:129: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
#  127|   	      switch (prec)
#  128|   		{
#  129|-> 		case 0: (void) va_arg (ap, int); break;
#  130|   		case 1: (void) va_arg (ap, long int); break;
#  131|   		case 2: (void) va_arg (ap, long long int); break;

Error: CPPCHECK_WARNING (CWE-476): [#def322]
binutils-with-gold-2.46/libsframe/sframe-dump.c:203: warning[nullPointer]: Possible null pointer dereference: ver_str
#  201|     printf ("  %s :\n", subsec_name);
#  202|     printf ("\n");
#  203|->   printf ("    Version: %s\n", ver_str);
#  204|   
#  205|     dump_sframe_header_flags (sfd_ctx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
binutils-with-gold-2.46/libsframe/sframe.c:88:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fre_tbl’
binutils-with-gold-2.46/libsframe/sframe.c:2196:1: enter_function: entry to ‘sframe_encoder_add_fres_buf’
binutils-with-gold-2.46/libsframe/sframe.c:2206:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:2211:7: call_function: calling ‘sframe_encoder_get_funcdesc_at_index’ from ‘sframe_encoder_add_fres_buf’
binutils-with-gold-2.46/libsframe/sframe.c:2211:7: return_function: returning to ‘sframe_encoder_add_fres_buf’ from ‘sframe_encoder_get_funcdesc_at_index’
binutils-with-gold-2.46/libsframe/sframe.c:2212:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:2215:15: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:2218:25: call_function: calling ‘sframe_grow_fre_tbl’ from ‘sframe_encoder_add_fres_buf’
binutils-with-gold-2.46/libsframe/sframe.c:2218:25: return_function: returning to ‘sframe_encoder_add_fres_buf’ from ‘sframe_grow_fre_tbl’
binutils-with-gold-2.46/libsframe/sframe.c:2219:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:2228:3: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:2240:10: branch_true: following ‘true’ branch (when ‘remaining != 0’)...
binutils-with-gold-2.46/libsframe/sframe.c:2242:35: branch_true: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:2244:7: call_function: calling ‘sframe_decode_fre’ from ‘sframe_encoder_add_fres_buf’
binutils-with-gold-2.46/libsframe/sframe.c:2244:7: return_function: returning to ‘sframe_encoder_add_fres_buf’ from ‘sframe_decode_fre’
binutils-with-gold-2.46/libsframe/sframe.c:2246:12: call_function: calling ‘sframe_fre_sanity_check_p’ from ‘sframe_encoder_add_fres_buf’
binutils-with-gold-2.46/libsframe/sframe.c:2246:12: return_function: returning to ‘sframe_encoder_add_fres_buf’ from ‘sframe_fre_sanity_check_p’
binutils-with-gold-2.46/libsframe/sframe.c:2246:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:2207:12: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:88:1: danger: ‘fre_tbl’ leaks here; was allocated at [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20)
#   86|         va_end (args);
#   87|       }
#   88|-> }
#   89|   
#   90|   /* Generate bitmask of given size in bytes.  This is used for

Error: GCC_ANALYZER_WARNING (CWE-476): [#def324]
binutils-with-gold-2.46/libsframe/sframe.c:203:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
binutils-with-gold-2.46/libsframe/sframe.c:2038:1: enter_function: entry to ‘sframe_encoder_get_hdr_size’
binutils-with-gold-2.46/libsframe/sframe.c:2040:30: call_function: inlined call to ‘sframe_encoder_get_header’ from ‘sframe_encoder_get_hdr_size’
binutils-with-gold-2.46/libsframe/sframe.c:2041:10: call_function: inlined call to ‘sframe_get_hdr_size’ from ‘sframe_encoder_get_hdr_size’
#  201|   sframe_get_hdr_size (const sframe_header *sfh)
#  202|   {
#  203|->   return SFRAME_V1_HDR_SIZE (*sfh);
#  204|   }
#  205|   

Error: CPPCHECK_WARNING (CWE-401): [#def325]
binutils-with-gold-2.46/libsframe/sframe.c:1447: error[memleak]: Memory leak: dctx
# 1445|         tempbuf = (char *) malloc (sf_size * sizeof (char));
# 1446|         if (tempbuf == NULL)
# 1447|-> 	return sframe_ret_set_errno (errp, SFRAME_ERR_NOMEM);
# 1448|         memcpy (tempbuf, sf_buf, sf_size);
# 1449|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def326]
binutils-with-gold-2.46/libsframe/sframe.c:1542:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
binutils-with-gold-2.46/libsframe/sframe.c:1539:1: enter_function: entry to ‘sframe_decoder_get_abi_arch’
binutils-with-gold-2.46/libsframe/sframe.c:1541:30: call_function: inlined call to ‘sframe_decoder_get_header’ from ‘sframe_decoder_get_abi_arch’
binutils-with-gold-2.46/libsframe/sframe.c:1542:10: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:1542:10: danger: dereference of NULL ‘hp’
# 1540|   {
# 1541|     const sframe_header *dhp = sframe_decoder_get_header (dctx);
# 1542|->   return dhp->sfh_abi_arch;
# 1543|   }
# 1544|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def327]
binutils-with-gold-2.46/libsframe/sframe.c:1568:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
binutils-with-gold-2.46/libsframe/sframe.c:1565:1: enter_function: entry to ‘sframe_decoder_get_fixed_fp_offset’
binutils-with-gold-2.46/libsframe/sframe.c:1567:30: call_function: inlined call to ‘sframe_decoder_get_header’ from ‘sframe_decoder_get_fixed_fp_offset’
binutils-with-gold-2.46/libsframe/sframe.c:1568:10: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:1568:10: danger: dereference of NULL ‘hp’
# 1566|   {
# 1567|     const sframe_header *dhp = sframe_decoder_get_header (ctx);
# 1568|->   return dhp->sfh_cfa_fixed_fp_offset;
# 1569|   }
# 1570|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def328]
binutils-with-gold-2.46/libsframe/sframe.c:1576:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
binutils-with-gold-2.46/libsframe/sframe.c:1573:1: enter_function: entry to ‘sframe_decoder_get_fixed_ra_offset’
binutils-with-gold-2.46/libsframe/sframe.c:1575:30: call_function: inlined call to ‘sframe_decoder_get_header’ from ‘sframe_decoder_get_fixed_ra_offset’
binutils-with-gold-2.46/libsframe/sframe.c:1576:10: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:1576:10: danger: dereference of NULL ‘hp’
# 1574|   {
# 1575|     const sframe_header *dhp = sframe_decoder_get_header (ctx);
# 1576|->   return dhp->sfh_cfa_fixed_ra_offset;
# 1577|   }
# 1578|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def329]
binutils-with-gold-2.46/libsframe/sframe.c:1916:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
binutils-with-gold-2.46/libsframe/sframe.c:1899:1: enter_function: entry to ‘sframe_decoder_get_fres_buf’
binutils-with-gold-2.46/libsframe/sframe.c:1911:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:1915:10: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:1915:10: call_function: calling ‘sframe_decoder_get_funcdesc_at_index’ from ‘sframe_decoder_get_fres_buf’
binutils-with-gold-2.46/libsframe/sframe.c:1915:10: return_function: returning to ‘sframe_decoder_get_fres_buf’ from ‘sframe_decoder_get_funcdesc_at_index’
binutils-with-gold-2.46/libsframe/sframe.c:1916:15: danger: dereference of NULL ‘sframe_decoder_get_funcdesc_at_index(dctx,  func_idx)’
# 1914|     /* Get function descriptor entry at index func_idx.  */
# 1915|     fdep = sframe_decoder_get_funcdesc_at_index (dctx, func_idx);
# 1916|->   *num_fres = fdep->func_num_fres;
# 1917|   
# 1918|     if (fdep == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def330]
binutils-with-gold-2.46/libsframe/sframe.c:2001:1: warning[-Wanalyzer-malloc-leak]: leak of ‘ectx’
binutils-with-gold-2.46/libsframe/sframe.c:1970:1: enter_function: entry to ‘sframe_encode’
binutils-with-gold-2.46/libsframe/sframe.c:1976:6: branch_false: following ‘false’ branch (when ‘ver == 3’)...
binutils-with-gold-2.46/libsframe/sframe.c:1979:15: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:1979:15: acquire_memory: allocated here
binutils-with-gold-2.46/libsframe/sframe.c:1979:6: branch_false: following ‘false’ branch (when ‘ectx’ is non-NULL)...
binutils-with-gold-2.46/libsframe/sframe.c:1982:3: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:1993:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:1994:11: call_function: inlined call to ‘sframe_ret_set_errno’ from ‘sframe_encode’
binutils-with-gold-2.46/libsframe/sframe.c:2001:1: danger: ‘ectx’ leaks here; was allocated at [(4)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/3)
# 1999|   
# 2000|     return ectx;
# 2001|-> }
# 2002|   
# 2003|   /* Free the encoder context ECTXP.  */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def331]
binutils-with-gold-2.46/libsframe/sframe.c:2150:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘fre_tbl’
binutils-with-gold-2.46/libsframe/sframe.c:2114:1: enter_function: entry to ‘sframe_encoder_add_fre’
binutils-with-gold-2.46/libsframe/sframe.c:2125:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:2127:8: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:2127:8: call_function: calling ‘sframe_fre_sanity_check_p’ from ‘sframe_encoder_add_fre’
binutils-with-gold-2.46/libsframe/sframe.c:2127:8: return_function: returning to ‘sframe_encoder_add_fre’ from ‘sframe_fre_sanity_check_p’
binutils-with-gold-2.46/libsframe/sframe.c:2127:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:2131:10: branch_true: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:2131:10: call_function: calling ‘sframe_encoder_get_funcdesc_at_index’ from ‘sframe_encoder_add_fre’
binutils-with-gold-2.46/libsframe/sframe.c:2131:10: return_function: returning to ‘sframe_encoder_add_fre’ from ‘sframe_encoder_get_funcdesc_at_index’
binutils-with-gold-2.46/libsframe/sframe.c:2133:6: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:2136:14: call_function: inlined call to ‘sframe_get_fre_type’ from ‘sframe_encoder_add_fre’
binutils-with-gold-2.46/libsframe/sframe.c:2139:7: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:2141:25: branch_true: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:2141:25: call_function: calling ‘sframe_grow_fre_tbl’ from ‘sframe_encoder_add_fre’
binutils-with-gold-2.46/libsframe/sframe.c:2141:25: return_function: returning to ‘sframe_encoder_add_fre’ from ‘sframe_grow_fre_tbl’
binutils-with-gold-2.46/libsframe/sframe.c:2142:10: branch_false: following ‘false’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:2150:31: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:2150:31: danger: dereference of NULL ‘fre_tbl’
# 2148|       }
# 2149|   
# 2150|->   ectx_frep = &fre_tbl->entry[fre_tbl->count];
# 2151|     ectx_frep->fre_start_addr
# 2152|       = frep->fre_start_addr;

Error: CPPCHECK_WARNING (CWE-562): [#def332]
binutils-with-gold-2.46/opcodes/i386-dis.c:9858: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 9856|     info->bytes_per_line = 7;
# 9857|   
# 9858|->   info->private_data = &priv;
# 9859|     priv.fetched = 0;
# 9860|     priv.insn_start = pc;

Scan Properties

analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-19.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namebinutils-2.46-1.fc44
store-results-to/tmp/tmp846u5hdk/binutils-2.46-1.fc44.tar.xz
time-created2026-06-01 11:31:21
time-finished2026-06-01 11:44:13
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp846u5hdk/binutils-2.46-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp846u5hdk/binutils-2.46-1.fc44.src.rpm'
tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9