binutils-2.43.50-5.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/archive.c: scope_hint: In function ‘_bfd_compute_and_write_armap’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/archive.c:2389:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘syms’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/archive.c: scope_hint: In function ‘_bfd_compute_and_write_armap’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/archive.c: scope_hint: In function ‘_bfd_compute_and_write_armap’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/archive.c: scope_hint: In function ‘_bfd_compute_and_write_armap’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/bfd/bfd.h:1279:8: note: in expansion of macro ‘BFD_SEND’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/archive.c:2381:26: note: in expansion of macro ‘bfd_canonicalize_symtab’
# 2387|   	      for (src_count = 0; src_count < symcount; src_count++)
# 2388|   		{
# 2389|-> 		  flagword flags = (syms[src_count])->flags;
# 2390|   		  asection *sec = syms[src_count]->section;
# 2391|   

Error: GCC_ANALYZER_WARNING (CWE-674): [#def2]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/bfd.c: scope_hint: In function ‘bfd_errmsg’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/bfd.c:889:25: warning[-Wanalyzer-infinite-recursion]: infinite recursion
#  887|     if (error_tag == bfd_error_on_input)
#  888|       {
#  889|->       const char *msg = bfd_errmsg (input_error);
#  890|         char *ret = bfd_asprintf (_(bfd_errmsgs[error_tag]),
#  891|   				bfd_get_filename (input_bfd), msg);

Error: CPPCHECK_WARNING (CWE-457): [#def3]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3375: warning[uninitvar]: Uninitialized variable: *pelength
# 3373|       *value = (unsigned int) (b[0] + (b[1] << 8));
# 3374|   
# 3375|->   *pelength += status;
# 3376|   
# 3377|     return true;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def4]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coff-i386.c:706: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/pei-i386.c:45: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h: scope_hint: In function ‘coff_read_word’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3375:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*pelength’
# 3373|       *value = (unsigned int) (b[0] + (b[1] << 8));
# 3374|   
# 3375|->   *pelength += status;
# 3376|   
# 3377|     return true;

Error: GCC_ANALYZER_WARNING (CWE-465): [#def5]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3848:22: warning[-Wanalyzer-deref-before-check]: check of ‘*((struct bfd_symbol **)psymsec)’ for NULL after already dereferencing it
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3782:11: note: in expansion of macro ‘COFF_ENCODE_ALIGNMENT’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/libcoff.h:915:32: note: in expansion of macro ‘coff_backend_info’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3814:31: note: in expansion of macro ‘bfd_coff_scnhsz’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3847:26: note: in expansion of macro ‘coff_symbol_from’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3847:26: note: in expansion of macro ‘coff_symbol_from’
# 3846|   		{
# 3847|   		  csym = coff_symbol_from (*psym);
# 3848|-> 		  if (csym == NULL
# 3849|   		      || csym->native == NULL
# 3850|   		      || ! csym->native->is_sym

Error: GCC_ANALYZER_WARNING (CWE-465): [#def6]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coff-x86_64.c:887: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/pe-x86_64.c:104: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3848:22: warning[-Wanalyzer-deref-before-check]: check of ‘**abfd.outsymbols’ for NULL after already dereferencing it
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/pe-x86_64.c:29: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3782:11: note: in expansion of macro ‘COFF_ENCODE_ALIGNMENT’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/pe-x86_64.c:30: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/libcoff.h:915:32: note: in expansion of macro ‘coff_backend_info’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3814:31: note: in expansion of macro ‘bfd_coff_scnhsz’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/libcoff.h:30: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3847:26: note: in expansion of macro ‘coff_symbol_from’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3847:26: note: in expansion of macro ‘coff_symbol_from’
# 3846|   		{
# 3847|   		  csym = coff_symbol_from (*psym);
# 3848|-> 		  if (csym == NULL
# 3849|   		      || csym->native == NULL
# 3850|   		      || ! csym->native->is_sym

Error: GCC_ANALYZER_WARNING (CWE-465): [#def7]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3848:22: warning[-Wanalyzer-deref-before-check]: check of ‘*psym’ for NULL after already dereferencing it
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3782:11: note: in expansion of macro ‘COFF_ENCODE_ALIGNMENT’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/libcoff.h:915:32: note: in expansion of macro ‘coff_backend_info’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3814:31: note: in expansion of macro ‘bfd_coff_scnhsz’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3847:26: note: in expansion of macro ‘coff_symbol_from’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3847:26: note: in expansion of macro ‘coff_symbol_from’
# 3846|   		{
# 3847|   		  csym = coff_symbol_from (*psym);
# 3848|-> 		  if (csym == NULL
# 3849|   		      || csym->native == NULL
# 3850|   		      || ! csym->native->is_sym

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3872:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘csym’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coff-i386.c:31: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h:3782:11: note: in expansion of macro ‘COFF_ENCODE_ALIGNMENT’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
# 3870|   		 x_associated field is not currently supported.  */
# 3871|   
# 3872|-> 	      aux = csym->native + 1;
# 3873|   	      BFD_ASSERT (! aux->is_sym);
# 3874|   	      switch (current->flags & SEC_LINK_DUPLICATES)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffgen.c: scope_hint: In function ‘_bfd_coff_gc_mark_hook’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffgen.c:2945:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffgen.c: scope_hint: In function ‘_bfd_coff_gc_mark_hook’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/libcoff.h:30: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffgen.c:44: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/coffgen.c:618:7: note: in expansion of macro ‘coff_section_data’
# 2943|       }
# 2944|   
# 2945|->   return coff_section_from_bfd_index (sec->owner, sym->n_scnum);
# 2946|   }
# 2947|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/cofflink.c: scope_hint: In function ‘_bfd_coff_generic_relocate_section’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/cofflink.c:3004:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/cofflink.c:29: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/libcoff.h:46:40: note: in expansion of macro ‘coff_data’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/cofflink.c:2943:45: note: in expansion of macro ‘obj_raw_syment_count’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/cofflink.c:2952:15: note: in expansion of macro ‘obj_coff_sym_hashes’
# 3002|   	      val = (sec->output_section->vma
# 3003|   		     + sec->output_offset
# 3004|-> 		     + sym->n_value);
# 3005|   	      if (! obj_pe (input_bfd))
# 3006|   		val -= sec->vma;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/cofflink.c:3132:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/cofflink.c:25: included_from: Included from here.
# 3130|   		/* Reverse the hack where 4 is subtracted from the addend.  */
# 3131|   		&& (addend + 4) == 0
# 3132|-> 		&& sym->n_sclass == C_NT_WEAK
# 3133|   		&& bfd_coff_classify_symbol (output_bfd, sym)
# 3134|   		     == COFF_SYMBOL_UNDEFINED)

Error: COMPILER_WARNING (CWE-1164): [#def12]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/doc/chew.c:206:1: warning[-Wunused-function]: ‘find’ defined but not used
#  206 | find (string_type *str, char *what)
#      | ^~~~
#  204|   
#  205|   static int
#  206|-> find (string_type *str, char *what)
#  207|   {
#  208|     unsigned int i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/doc/chew.c:1312:19: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
# 1310|       {
# 1311|         entry->code_length += 2;
# 1312|->       entry->code = xrealloc (entry->code,
# 1313|   			      entry->code_length * sizeof (*entry->code));
# 1314|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c: scope_hint: In function ‘_bfd_elf_parse_eh_frame’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:744:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cie’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:583:11: note: in definition of macro ‘REQUIRE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:621:3: note: in expansion of macro ‘REQUIRE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:583:11: note: in definition of macro ‘REQUIRE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:625:3: note: in expansion of macro ‘REQUIRE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:25: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-bfd.h:1902:39: note: in definition of macro ‘xvec_get_elf_backend_data’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:627:15: note: in expansion of macro ‘get_elf_backend_data’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:629:3: note: in expansion of macro ‘REQUIRE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:661:3: note: in expansion of macro ‘REQUIRE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:583:11: note: in definition of macro ‘REQUIRE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c: scope_hint: In function ‘_bfd_elf_parse_eh_frame’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:712:7: note: in expansion of macro ‘REQUIRE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:583:11: note: in definition of macro ‘REQUIRE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c: scope_hint: In function ‘_bfd_elf_parse_eh_frame’
#  742|   	  cie = local_cies + cie_count++;
#  743|   
#  744|-> 	  cie->cie_inf = this_inf;
#  745|   	  cie->length = hdr_length;
#  746|   	  start = buf;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c: scope_hint: In function ‘offset_adjust’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:1361:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ent’
# 1359|   
# 1360|     if (!ent->removed)
# 1361|->     delta = (bfd_vma) ent->new_offset - (bfd_vma) ent->offset;
# 1362|     else if (ent->cie && ent->u.cie.merged)
# 1363|       {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:1366:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ent’
# 1364|         struct eh_cie_fde *cie = ent->u.cie.u.merged_with;
# 1365|         delta = ((bfd_vma) cie->new_offset + cie->u.cie.u.sec->output_offset
# 1366|-> 	       - (bfd_vma) ent->offset - sec->output_offset);
# 1367|       }
# 1368|     else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:1374:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ent’
# 1372|         struct eh_cie_fde *last = sec_info->entry + sec_info->count;
# 1373|         delta = ((bfd_vma) next_cie_fde_offset (ent, last, sec)
# 1374|-> 	       - (bfd_vma) ent->offset);
# 1375|         return delta;
# 1376|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c: scope_hint: In function ‘_bfd_elf_fixup_eh_frame_hdr’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-eh-frame.c:2324:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sec’
# 2322|   
# 2323|     /* Fix the link_order to match.  */
# 2324|->   for (p = sec->output_section->map_head.link_order; p != NULL; p = p->next)
# 2325|       {
# 2326|         if (p->type != bfd_indirect_link_order)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c: scope_hint: In function ‘elf_i386_finish_dynamic_symbol’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3597:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 3595|   
# 3596|     /* Use the second PLT section only if there is .plt section.  */
# 3597|->   use_plt_second = htab->elf.splt != NULL && htab->plt_second != NULL;
# 3598|   
# 3599|     eh = (struct elf_x86_link_hash_entry *) h;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3707:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:21: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3606:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3631:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:25: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/bfd/bfd.h:207:3: note: in expansion of macro ‘BFD_SEND’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3682:11: note: in expansion of macro ‘bfd_put_32’
# 3705|   		 the other PLT slots. */
# 3706|   	      reloc_index = k + s * PLT_NON_JUMP_SLOT_RELOCS;
# 3707|-> 	      loc = (htab->srelplt2->contents + reloc_index
# 3708|   		     * sizeof (Elf32_External_Rel));
# 3709|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3743:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/bfd/bfd.h:7551:30: note: in definition of macro ‘BFD_SEND’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3739:13: note: in expansion of macro ‘bfd_put_32’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3606:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3631:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/bfd/bfd.h:207:3: note: in expansion of macro ‘BFD_SEND’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3739:13: note: in expansion of macro ‘bfd_put_32’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/bfd/bfd.h:7551:30: note: in definition of macro ‘BFD_SEND’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3739:13: note: in expansion of macro ‘bfd_put_32’
# 3741|   			 + plt->output_offset
# 3742|   			 + h->plt.offset
# 3743|-> 			 + htab->lazy_plt->plt_lazy_offset),
# 3744|   			gotplt->contents + got_offset);
# 3745|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3766:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3606:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3631:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
# 3764|   	      rel.r_info = ELF32_R_INFO (0, R_386_IRELATIVE);
# 3765|   
# 3766|-> 	      if (htab->params->report_relative_reloc)
# 3767|   		_bfd_x86_elf_link_report_relative_reloc
# 3768|   		  (info, relplt, h, sym, "R_386_IRELATIVE", &rel);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3776:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3606:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3631:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-bfd.h:27: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:28: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3775:28: note: in expansion of macro ‘ELF32_R_INFO’
# 3774|   	    {
# 3775|   	      rel.r_info = ELF32_R_INFO (h->dynindx, R_386_JUMP_SLOT);
# 3776|-> 	      plt_index = htab->next_jump_slot_index++;
# 3777|   	    }
# 3778|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3805:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3606:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
# 3803|   
# 3804|         /* Set the entry in the GOT procedure linkage table.  */
# 3805|->       plt = htab->plt_got;
# 3806|         got = htab->elf.sgot;
# 3807|         gotplt = htab->elf.sgotplt;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3931:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3606:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3862:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:26: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/bfdlink.h:331:37: note: in expansion of macro ‘bfd_link_dll’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3915:20: note: in expansion of macro ‘bfd_link_pic’
# 3929|   		 contains the real function addres if we need pointer
# 3930|   		 equality.  We load the GOT entry with the PLT entry.  */
# 3931|-> 	      if (htab->plt_second != NULL)
# 3932|   		{
# 3933|   		  plt = htab->plt_second;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3972:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3606:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3862:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf32-i386.c:3949:19: note: in expansion of macro ‘SYMBOL_REFERENCES_LOCAL_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:27: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/libbfd.h:749:14: note: in definition of macro ‘BFD_ASSERT’
# 3970|   	{
# 3971|   	  if (relative_reloc_name != NULL
# 3972|-> 	      && htab->params->report_relative_reloc)
# 3973|   	    _bfd_x86_elf_link_report_relative_reloc
# 3974|   	      (info, relgot, h, sym, relative_reloc_name, &rel);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_check_tls_transition’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:1277:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:22: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2070:10: note: in expansion of macro ‘elf_x86_hash_table’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2070:10: note: in expansion of macro ‘elf_x86_hash_table’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2070:10: note: in expansion of macro ‘elf_x86_hash_table’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_check_tls_transition’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2070:10: note: in expansion of macro ‘elf_x86_hash_table’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:27: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/libbfd.h:749:14: note: in definition of macro ‘BFD_ASSERT’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2077:15: note: in expansion of macro ‘is_x86_elf’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_check_tls_transition’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2113:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2113:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2113:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-bfd.h:27: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/elf/common.h:1083:43: note: in definition of macro ‘ELF_ST_TYPE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-bfd.h:1902:39: note: in definition of macro ‘xvec_get_elf_backend_data’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:106:4: note: in expansion of macro ‘get_elf_backend_data’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2159:12: note: in expansion of macro ‘ABI_64_P’
# 1275|   	}
# 1276|   
# 1277|->       r_symndx = htab->r_sym (rel[1].r_info);
# 1278|         if (r_symndx < symtab_hdr->sh_info)
# 1279|   	return elf_x86_tls_error_yes;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_convert_load_reloc’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:1727:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2070:10: note: in expansion of macro ‘elf_x86_hash_table’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2070:10: note: in expansion of macro ‘elf_x86_hash_table’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2070:10: note: in expansion of macro ‘elf_x86_hash_table’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_convert_load_reloc’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2070:10: note: in expansion of macro ‘elf_x86_hash_table’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/libbfd.h:749:14: note: in definition of macro ‘BFD_ASSERT’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2077:15: note: in expansion of macro ‘is_x86_elf’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_convert_load_reloc’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2113:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2113:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2113:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/elf/common.h:1083:43: note: in definition of macro ‘ELF_ST_TYPE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf-bfd.h:1902:39: note: in definition of macro ‘xvec_get_elf_backend_data’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:106:4: note: in expansion of macro ‘get_elf_backend_data’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:2159:12: note: in expansion of macro ‘ABI_64_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:1708:10: note: in expansion of macro ‘elf_x86_hash_table’
# 1725|     no_overflow = link_info->disable_target_specific_optimizations > 1;
# 1726|   
# 1727|->   r_symndx = htab->r_sym (irel->r_info);
# 1728|   
# 1729|     opcode = bfd_get_8 (abfd, contents + roff - 2);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_finish_dynamic_symbol’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4607:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 4605|   
# 4606|     /* Use the second PLT section only if there is .plt section.  */
# 4607|->   use_plt_second = htab->elf.splt != NULL && htab->plt_second != NULL;
# 4608|   
# 4609|     eh = (struct elf_x86_link_hash_entry *) h;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def30]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4718:44: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/bfd/bfd.h:7551:30: note: in definition of macro ‘BFD_SEND’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4715:13: note: in expansion of macro ‘bfd_put_64’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4616:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4643:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/bfd/bfd.h:216:3: note: in expansion of macro ‘BFD_SEND’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4715:13: note: in expansion of macro ‘bfd_put_64’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/bfd/bfd.h:7551:30: note: in definition of macro ‘BFD_SEND’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4715:13: note: in expansion of macro ‘bfd_put_64’
# 4716|   				     + plt->output_offset
# 4717|   				     + h->plt.offset
# 4718|-> 				     + htab->lazy_plt->plt_lazy_offset),
# 4719|   			gotplt->contents + got_offset);
# 4720|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4733:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4616:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4643:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
# 4731|   	      /* If an STT_GNU_IFUNC symbol is locally defined, generate
# 4732|   		 R_X86_64_IRELATIVE instead of R_X86_64_JUMP_SLOT.  */
# 4733|-> 	      rela.r_info = htab->r_info (0, R_X86_64_IRELATIVE);
# 4734|   	      rela.r_addend = (h->root.u.def.value
# 4735|   			       + h->root.u.def.section->output_section->vma

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4747:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4616:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4643:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
# 4745|   	  else
# 4746|   	    {
# 4747|-> 	      rela.r_info = htab->r_info (h->dynindx, R_X86_64_JUMP_SLOT);
# 4748|   	      if (htab->params->mark_plt)
# 4749|   		rela.r_addend = (resolved_plt->output_section->vma

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4794:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4616:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
# 4792|   
# 4793|         /* Set the entry in the GOT procedure linkage table.  */
# 4794|->       plt = htab->plt_got;
# 4795|         got = htab->elf.sgot;
# 4796|         got_offset = h->got.offset;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4899:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4616:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4858:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
# 4897|   					  h->root.u.def.section->owner);
# 4898|   
# 4899|-> 		  rela.r_info = htab->r_info (0,
# 4900|   					      R_X86_64_IRELATIVE);
# 4901|   		  rela.r_addend = (h->root.u.def.value

Error: GCC_ANALYZER_WARNING (CWE-476): [#def35]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4925:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4616:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4858:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:26: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/bfdlink.h:331:37: note: in expansion of macro ‘bfd_link_dll’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4909:20: note: in expansion of macro ‘bfd_link_pic’
# 4923|   		 contains the real function addres if we need pointer
# 4924|   		 equality.  We load the GOT entry with the PLT entry.  */
# 4925|-> 	      if (htab->plt_second != NULL)
# 4926|   		{
# 4927|   		  plt = htab->plt_second;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def36]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4952:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4616:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4858:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/bfdlink.h:331:37: note: in expansion of macro ‘bfd_link_dll’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4942:16: note: in expansion of macro ‘bfd_link_pic’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4943:19: note: in expansion of macro ‘SYMBOL_REFERENCES_LOCAL_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4945:16: note: in expansion of macro ‘SYMBOL_DEFINED_NON_SHARED_P’
# 4950|   	  else
# 4951|   	    {
# 4952|-> 	      rela.r_info = htab->r_info (0, R_X86_64_RELATIVE);
# 4953|   	      rela.r_addend = (h->root.u.def.value
# 4954|   			       + h->root.u.def.section->output_section->vma

Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4965:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4616:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4858:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
# 4963|   	  bfd_put_64 (output_bfd, (bfd_vma) 0,
# 4964|   		      htab->elf.sgot->contents + h->got.offset);
# 4965|-> 	  rela.r_info = htab->r_info (h->dynindx, R_X86_64_GLOB_DAT);
# 4966|   	  rela.r_addend = 0;
# 4967|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4991:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4616:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4986:7: note: in expansion of macro ‘VERIFY_COPY_RELOC’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:4986:7: note: in expansion of macro ‘VERIFY_COPY_RELOC’
# 4989|   		       + h->root.u.def.section->output_section->vma
# 4990|   		       + h->root.u.def.section->output_offset);
# 4991|->       rela.r_info = htab->r_info (h->dynindx, R_X86_64_COPY);
# 4992|         rela.r_addend = 0;
# 4993|         if (h->root.u.def.section == htab->elf.sdynrelro)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def39]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_reloc_type_class’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elf64-x86-64.c:5055:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 5053|         /* Check relocation against STT_GNU_IFUNC symbol if there are
# 5054|   	 dynamic symbols.  */
# 5055|->       unsigned long r_symndx = htab->r_sym (rela->r_info);
# 5056|         if (r_symndx != STN_UNDEF)
# 5057|   	{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def40]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.c: scope_hint: In function ‘_bfd_x86_elf_create_sframe_plt’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.c:1854:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1852|     plt0_generated_p = htab->plt.has_plt0;
# 1853|     plt0_entry_size
# 1854|->     = (plt0_generated_p) ? htab->sframe_plt->plt0_entry_size : 0;
# 1855|   
# 1856|     switch (plt_sec_type)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.c:1864:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1862|   
# 1863|   	  plt_entry_size = htab->plt.plt_entry_size;
# 1864|-> 	  num_pltn_fres = htab->sframe_plt->pltn_num_fres;
# 1865|   	  num_pltn_entries
# 1866|   	    = (dpltsec->size - plt0_entry_size) / plt_entry_size;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def42]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.c:1874:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1872|   	  ectx = &htab->plt_second_cfe_ctx;
# 1873|   	  /* FIXME - this or htab->plt_second_sframe ?  */
# 1874|-> 	  dpltsec = htab->plt_second_eh_frame;
# 1875|   
# 1876|   	  plt_entry_size = htab->sframe_plt->sec_pltn_entry_size;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def43]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.c: scope_hint: In function ‘_bfd_x86_elf_write_sframe_plt’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.c:1977:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1975|       {
# 1976|       case SFRAME_PLT:
# 1977|->       ectx = htab->plt_cfe_ctx;
# 1978|         sec = htab->plt_sframe;
# 1979|         break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def44]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.c:1981:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1979|         break;
# 1980|       case SFRAME_PLT_SEC:
# 1981|->       ectx = htab->plt_second_cfe_ctx;
# 1982|         sec = htab->plt_second_sframe;
# 1983|         break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def45]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.c: scope_hint: In function ‘_bfd_x86_elf_link_report_tls_transition_error’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/elfxx-x86.c:3266:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 3264|   
# 3265|       case elf_x86_tls_error_indirect_call:
# 3266|->       info->callbacks->einfo
# 3267|   	/* xgettext:c-format */
# 3268|   	(_("%pB(%pA+0x%v): relocation %s against `%s' must be used "

Error: GCC_ANALYZER_WARNING (CWE-476): [#def46]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:135:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:135:24: note: in expansion of macro ‘NIBBLE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:333:23: note: in expansion of macro ‘HEX2’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:513:13: note: in expansion of macro ‘ISHEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:297:21: note: in expansion of macro ‘ISHEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:135:24: note: in expansion of macro ‘NIBBLE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:333:23: note: in expansion of macro ‘HEX2’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:135:24: note: in expansion of macro ‘NIBBLE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:333:23: note: in expansion of macro ‘HEX2’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:135:24: note: in expansion of macro ‘NIBBLE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:333:23: note: in expansion of macro ‘HEX2’
#  133|   
#  134|   #define NIBBLE(x)    (hex_value (x))
#  135|-> #define HEX2(buffer) ((NIBBLE ((buffer)[0]) << 4) + NIBBLE ((buffer)[1]))
#  136|   #define HEX4(buffer) ((HEX2 (buffer) << 8) + HEX2 ((buffer) + 2))
#  137|   #define ISHEX(x)     (hex_p (x))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:125: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c: scope_hint: In function ‘ihex_scan’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:323:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:323:21: note: in expansion of macro ‘ISHEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:513:13: note: in expansion of macro ‘ISHEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:297:21: note: in expansion of macro ‘ISHEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:323:21: note: in expansion of macro ‘ISHEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:323:21: note: in expansion of macro ‘ISHEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/ihex.c:323:21: note: in expansion of macro ‘ISHEX’
#  321|   	  for (i = 0; i < chars; i++)
#  322|   	    {
#  323|-> 	      if (! ISHEX (buf[i]))
#  324|   		{
#  325|   		  ihex_bad_byte (abfd, lineno, buf[i], error);

Error: CPPCHECK_WARNING (CWE-119): [#def48]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/peXXigen.c:302: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: ext->x_file.x_fname
#  300|   	}
#  301|         else
#  302|-> 	memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
#  303|         return;
#  304|   

Error: CPPCHECK_WARNING (CWE-457): [#def49]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/peXXigen.c:2667: warning[uninitvar]: Uninitialized variable: signature
# 2665|   	  fprintf (file, _("(format %c%c%c%c signature %s age %ld pdb %s)\n"),
# 2666|   		   buffer[0], buffer[1], buffer[2], buffer[3],
# 2667|-> 		   signature, cvinfo->Age, pdb[0] ? pdb : "(none)");
# 2668|   
# 2669|   	  free (pdb);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def50]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:107: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c: scope_hint: In function ‘srec_scan’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:116:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:521:30: note: in expansion of macro ‘HEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:121:21: note: in expansion of macro ‘hex_p’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:469:19: note: in expansion of macro ‘ISHEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:115:22: note: in expansion of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:479:33: note: in expansion of macro ‘HEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:521:30: note: in expansion of macro ‘HEX’
#  114|   
#  115|   #define NIBBLE(x)    hex_value(x)
#  116|-> #define HEX(buffer) ((NIBBLE ((buffer)[0])<<4) + NIBBLE ((buffer)[1]))
#  117|   #define TOHEX(d, x, ch) \
#  118|   	d[1] = digs[(x) & 0xf]; \

Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:116:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘data’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:527:30: note: in expansion of macro ‘HEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:121:21: note: in expansion of macro ‘hex_p’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:469:19: note: in expansion of macro ‘ISHEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:115:22: note: in expansion of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:479:33: note: in expansion of macro ‘HEX’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/srec.c:527:30: note: in expansion of macro ‘HEX’
#  114|   
#  115|   #define NIBBLE(x)    hex_value(x)
#  116|-> #define HEX(buffer) ((NIBBLE ((buffer)[0])<<4) + NIBBLE ((buffer)[1]))
#  117|   #define TOHEX(d, x, ch) \
#  118|   	d[1] = digs[(x) & 0xf]; \

Error: GCC_ANALYZER_WARNING (CWE-688): [#def52]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/stabs.c: scope_hint: In function ‘_bfd_link_section_stabs’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/stabs.c:401:20: warning[-Wanalyzer-null-argument]: use of NULL ‘symb’ where non-null expected
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/stabs.c:28: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/stabs.c:389:11: note: in expansion of macro ‘BFD_ASSERT’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/sysdep.h:38: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/bfd/stabs.c:26: included_from: Included from here.
/usr/include/string.h:64:12: note: argument 2 of ‘memcmp’ must be non-null
#  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: CPPCHECK_WARNING (CWE-562): [#def53]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/debug.c:3075: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3073|     top.t2 = t2;
# 3074|     top.next = info->compare_list;
# 3075|->   info->compare_list = &top;
# 3076|   
# 3077|     switch (t1->kind)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/elfcomm.c: scope_hint: In function ‘setup_archive’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/elfcomm.c:512:9: warning[-Wanalyzer-malloc-leak]: leak of ‘*arch.file_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): [#def55]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/elfcomm.c: scope_hint: In function ‘setup_nested_archive’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/elfcomm.c:613:6: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(member_file_name, "rb")’
#  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): [#def56]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/elfcomm.c:613:6: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(member_file_name, "rb")’
#  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): [#def57]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/elfcomm.c: scope_hint: In function ‘setup_archive’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/elfcomm.c:615:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(member_file_name, "rb")’
#  613|     if (fstat (fileno (member_file), &statbuf) < 0)
#  614|       return 1;
#  615|->   return setup_archive (nested_arch, member_file_name, member_file,
#  616|   			statbuf.st_size, 0, 0);
#  617|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/elfcomm.c:615:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(member_file_name, "rb")’
#  613|     if (fstat (fileno (member_file), &statbuf) < 0)
#  614|       return 1;
#  615|->   return setup_archive (nested_arch, member_file_name, member_file,
#  616|   			statbuf.st_size, 0, 0);
#  617|   }

Error: CPPCHECK_WARNING (CWE-119): [#def59]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/elfedit.c:471: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: ehdr32.e_type
#  469|   
#  470|       case ELFCLASS32:
#  471|->       if (fread (ehdr32.e_type, sizeof (ehdr32) - EI_NIDENT,
#  472|   		 1, file) != 1)
#  473|   	return 0;

Error: CPPCHECK_WARNING (CWE-119): [#def60]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/elfedit.c:504: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: ehdr64.e_type
#  502|   	}
#  503|   
#  504|->       if (fread (ehdr64.e_type, sizeof (ehdr64) - EI_NIDENT,
#  505|   		 1, file) != 1)
#  506|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def61]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/prdbg.c: scope_hint: In function ‘substitute_type’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/prdbg.c:414:49: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘s’ where non-null expected
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/prdbg.c:27: included_from: Included from here.
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  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: GCC_ANALYZER_WARNING (CWE-688): [#def62]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/prdbg.c:426:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘s’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strchr’ must be non-null
#  424|       }
#  425|   
#  426|->   if (strchr (s, '|') != NULL
#  427|         && (strchr (info->stack->type, '{') != NULL
#  428|   	  || strchr (info->stack->type, '(') != NULL))

Error: CPPCHECK_WARNING (CWE-457): [#def63]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/readelf.c:2555: error[legacyUninitvar]: Uninitialized variable: rels
# 2553|       }
# 2554|   
# 2555|->   free (rels);
# 2556|   
# 2557|     return res;

Error: CPPCHECK_WARNING (CWE-119): [#def64]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/readelf.c:23492: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: ehdr32.e_type
#23490|         Elf32_External_Ehdr ehdr32;
#23491|   
#23492|->       if (fread (ehdr32.e_type, sizeof (ehdr32) - EI_NIDENT, 1, filedata->handle) != 1)
#23493|   	return false;
#23494|   

Error: CPPCHECK_WARNING (CWE-119): [#def65]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/readelf.c:23513: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: ehdr64.e_type
#23511|         Elf64_External_Ehdr ehdr64;
#23512|   
#23513|->       if (fread (ehdr64.e_type, sizeof (ehdr64) - EI_NIDENT, 1, filedata->handle) != 1)
#23514|   	return false;
#23515|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def66]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/strings.c: scope_hint: In function ‘display_utf8_char’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/strings.c:755:55: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buffer[2]’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/strings.c:1105:17: note: in expansion of macro ‘STRING_ISGRAPHIC’
#  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): [#def67]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/strings.c:762:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buffer[2]’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/strings.c:1105:17: note: in expansion of macro ‘STRING_ISGRAPHIC’
#  760|   		  ((buffer[0] & 0x07) << 6) | ((buffer[1] & 0x3c) >> 2),
#  761|   		  ((buffer[1] & 0x03) << 6) | ((buffer[2] & 0x3c) >> 2),
#  762|-> 		  ((buffer[2] & 0x03) << 6) | ((buffer[3] & 0x3f)));
#  763|   	  break;
#  764|   	default:

Error: GCC_ANALYZER_WARNING (CWE-457): [#def68]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/strings.c:762:55: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buffer[3]’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/strings.c:1105:17: note: in expansion of macro ‘STRING_ISGRAPHIC’
#  760|   		  ((buffer[0] & 0x07) << 6) | ((buffer[1] & 0x3c) >> 2),
#  761|   		  ((buffer[1] & 0x03) << 6) | ((buffer[2] & 0x3c) >> 2),
#  762|-> 		  ((buffer[2] & 0x03) << 6) | ((buffer[3] & 0x3f)));
#  763|   	  break;
#  764|   	default:

Error: GCC_ANALYZER_WARNING (CWE-688): [#def69]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c: scope_hint: In function ‘stab_modify_type’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:925:26: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  923|   
#  924|   	  s = stab_pop_type (info);
#  925|-> 	  buf = xmalloc (strlen (s) + 23);
#  926|   	  sprintf (buf, "%ld=%c%s", tindex, mod, s);
#  927|   	  free (s);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def70]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c: scope_hint: In function ‘stab_function_type.part.0’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:970:26: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  968|   	  s = stab_pop_type (info);
#  969|   
#  970|-> 	  buf = xmalloc (strlen (s) + 3);
#  971|   	  sprintf (buf, ":t%s", s);
#  972|   	  free (s);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def71]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c: scope_hint: In function ‘stab_offset_type’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:1109:36: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 1107|     base = stab_pop_type (info);
# 1108|   
# 1109|->   buf = xmalloc (strlen (target) + strlen (base) + 3);
# 1110|     sprintf (buf, "@%s,%s", base, target);
# 1111|     free (base);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def72]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c: scope_hint: In function ‘stab_method_type’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:1196:27: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 1194|     return_type = stab_pop_type (info);
# 1195|   
# 1196|->   len = strlen (domain) + strlen (return_type) + 4 + argcount;
# 1197|     for (i = 0; i < argcount; i++)
# 1198|       len += strlen (args[i]);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def73]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c: scope_hint: In function ‘stab_tag’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:1932:33: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 1930|     s = stab_pop_type (info);
# 1931|   
# 1932|->   buf = xmalloc (strlen (tag) + strlen (s) + 3);
# 1933|   
# 1934|     sprintf (buf, "%s:T%s", tag, s);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def74]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c: scope_hint: In function ‘stab_typed_constant’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:1978:34: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 1976|     s = stab_pop_type (info);
# 1977|   
# 1978|->   buf = xmalloc (strlen (name) + strlen (s) + 20);
# 1979|     sprintf (buf, "%s:c=e%s,%ld", name, s, (long) val);
# 1980|     free (s);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def75]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:30: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c: scope_hint: In function ‘stab_variable’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:2023:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/safe-ctype.h:87:42: note: in definition of macro ‘_sch_test’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:2023:13: note: in expansion of macro ‘ISDIGIT’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/safe-ctype.h:87:42: note: in definition of macro ‘_sch_test’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:2023:13: note: in expansion of macro ‘ISDIGIT’
# 2021|   
# 2022|         /* Make sure that this is a type reference or definition.  */
# 2023|->       if (! ISDIGIT (*s))
# 2024|   	{
# 2025|   	  char *n;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def76]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:2043:34: warning[-Wanalyzer-null-argument]: use of NULL ‘s’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 2041|       }
# 2042|   
# 2043|->   buf = xmalloc (strlen (name) + strlen (s) + 3);
# 2044|     sprintf (buf, "%s:%s%s", name, kindstr, s);
# 2045|     free (s);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def77]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c: scope_hint: In function ‘stab_start_function.part.0’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:2063:34: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 2061|     rettype = stab_pop_type (info);
# 2062|   
# 2063|->   buf = xmalloc (strlen (name) + strlen (rettype) + 3);
# 2064|     sprintf (buf, "%s:%c%s", name,
# 2065|   	   globalp ? 'F' : 'f',

Error: GCC_ANALYZER_WARNING (CWE-688): [#def78]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c: scope_hint: In function ‘stab_function_parameter’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/binutils/wrstabs.c:2113:34: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 2111|       }
# 2112|   
# 2113|->   buf = xmalloc (strlen (name) + strlen (s) + 3);
# 2114|     sprintf (buf, "%s:%c%s", name, kindc, s);
# 2115|     free (s);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def79]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/bfd/bfd.h:2325:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘abfd’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c: scope_hint: In function ‘auto_export’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3731:1: note: in expansion of macro ‘pe_dll_build_sections’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3733:3: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:462:1: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3733:3: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:850:7: note: in expansion of macro ‘pe_dll_kill_ats’
# 2323|   bfd_get_filename (const bfd *abfd)
# 2324|   {
# 2325|->   return abfd->filename;
# 2326|   }
# 2327|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def80]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/ld/ei386pe.c: scope_hint: In function ‘pe_fixup_stdcalls’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/ld/ei386pe.c:1086:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1084|   	      *cname = '_';
# 1085|   	    if (at)
# 1086|-> 	      * strchr (cname, '@') = 0;
# 1087|   	    sym = bfd_link_hash_lookup (link_info.hash, cname, false, false, true);
# 1088|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def81]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/config/obj-elf.c: scope_hint: In function ‘elf_frob_file_before_adjust’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/config/obj-elf.c:3016:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
# 3014|   		     is reserved for definitions of the default version
# 3015|   		     to link against.  */
# 3016|-> 		  if (!sy_obj->rename && p[1] == ELF_VER_CHR)
# 3017|   		    {
# 3018|   		      as_bad (_("invalid attempt to declare external "

Error: CPPCHECK_WARNING (CWE-457): [#def82]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/dwarf2dbg.c:1093: error[uninitvar]: Uninitialized variable: *lss->pmove_tail
# 1091|   
# 1092|     now = frag_now_fix ();
# 1093|->   while ((e = *lss->pmove_tail))
# 1094|       {
# 1095|         if (S_GET_VALUE (e->label) == now)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def83]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/listing.c: scope_hint: In function ‘buffer_line’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/listing.c:514:7: warning[-Wanalyzer-null-argument]: use of NULL ‘last_open_file’ where non-null expected
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/as.h:42: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/listing.c:90: included_from: Included from here.
/usr/include/stdio.h:575:12: note: argument 1 of ‘fgetc’ must be non-null
#  512|       }
#  513|   
#  514|->   c = fgetc (last_open_file);
#  515|   
#  516|     while (c != EOF && c != '\n' && c != '\r')

Error: GCC_ANALYZER_WARNING (CWE-688): [#def84]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/macro.c: scope_hint: In function ‘buffer_and_nest’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/macro.c:108:16: warning[-Wanalyzer-null-argument]: use of NULL ‘from’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  106|       }
#  107|     else
#  108|->     from_len = strlen (from);
#  109|   
#  110|     /* Record the present source position, such that diagnostics and debug info

Error: GCC_ANALYZER_WARNING (CWE-835): [#def85]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c:1501:40: warning[-Wanalyzer-infinite-loop]: infinite loop
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c: scope_hint: In function ‘equals’
# 1499|   #else
# 1500|     for (s = input_line_pointer;
# 1501|->        !is_end_of_line[(unsigned char) *s];
# 1502|          s++)
# 1503|       ;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def86]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c: scope_hint: In function ‘mri_comment_end’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c:1519:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘stop’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/as.h:562: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c:33: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c:4352:3: note: in expansion of macro ‘expression’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/as.h:164:17: note: in expansion of macro ‘gas_assert’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c:1516:3: note: in expansion of macro ‘know’
# 1517|   
# 1518|     input_line_pointer = stop;
# 1519|->   *stop = stopc;
# 1520|     while (!is_end_of_line[(unsigned char) *input_line_pointer])
# 1521|       ++input_line_pointer;

Error: CPPCHECK_WARNING (CWE-682): [#def87]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c:5268: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 5266|   	  if (orig)
# 5267|   	    *p = byte;
# 5268|-> 	  p++;
# 5269|   	}
# 5270|         while ((byte & 0x80) != 0 && loaded >= 7);

Error: CPPCHECK_WARNING (CWE-682): [#def88]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c:5320: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 5318|         if (orig)
# 5319|   	*p = byte;
# 5320|->       p++;
# 5321|       }
# 5322|     while (byte & 0x80);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def89]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/as.h:578: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c: scope_hint: In function ‘decode_base64_and_append’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c:5613:48: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘b[1]’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/frags.h:124:51: note: in definition of macro ‘FRAG_APPEND_1_CHAR’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c: scope_hint: In function ‘decode_base64_and_append’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/read.c:5611:3: note: in expansion of macro ‘gas_assert’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/frags.h:124:51: note: in definition of macro ‘FRAG_APPEND_1_CHAR’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gas/frags.h:124:51: note: in definition of macro ‘FRAG_APPEND_1_CHAR’
# 5611|     gas_assert (len > 1);
# 5612|   
# 5613|->   FRAG_APPEND_1_CHAR ((b64[b[0]] << 2) | (b64[b[1]] >> 4));
# 5614|   
# 5615|     if (len == 2)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def90]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/basic_blocks.c: scope_hint: In function ‘annotate_with_count’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/basic_blocks.c:439:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&tmpbuf’
#  437|         if (len >= width)
#  438|   	{
#  439|-> 	  strncpy (buf, tmpbuf, width);
#  440|   	  buf[width] = '\0';
#  441|   	}

Error: GCC_ANALYZER_WARNING (CWE-617): [#def91]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/gmon_io.c: scope_hint: In function ‘gmon_out_read’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/gmon_io.c:351:15: warning[-Wanalyzer-tainted-assertion]: use of attacked-controlled value in condition for assertion
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/gprof.h:34: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/gmon_io.c:22: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/build-x86_64-redhat-linux/bfd/bfd.h:211:3: note: in expansion of macro ‘BFD_SEND’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/gmon_io.c:314:27: note: in expansion of macro ‘bfd_get_32’
#  349|   		       _("%s: %s: found bad tag %d (file corrupted?)\n"),
#  350|   		       whoami, filename, tag);
#  351|-> 	      done (1);
#  352|   	    }
#  353|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def92]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/gmon_io.c: scope_hint: In function ‘gmon_out_write’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/gmon_io.c:587:30: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "w")’
#  585|       }
#  586|   
#  587|->   if (file_format == FF_AUTO || file_format == FF_MAGIC)
#  588|       {
#  589|         /* Write gmon header.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/gmon_io.c:587:30: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "w")’
#  585|       }
#  586|   
#  587|->   if (file_format == FF_AUTO || file_format == FF_MAGIC)
#  588|       {
#  589|         /* Write gmon header.  */

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

Error: GCC_ANALYZER_WARNING (CWE-775): [#def95]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/source.c: scope_hint: In function ‘annotate_source’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/source.c:119:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
#  117|   
#  118|         ifp = fopen (fname, FOPEN_RB);
#  119|->       if (fname != sf->name)
#  120|   	free (fname);
#  121|         if (ifp)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprof/source.c:119:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
#  117|   
#  118|         ifp = fopen (fname, FOPEN_RB);
#  119|->       if (fname != sf->name)
#  120|   	free (fname);
#  121|         if (ifp)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def97]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/src/dbe_hwcfuncs.c:23: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwcfuncs.c: scope_hint: In function ‘process_data_descriptor’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwcfuncs.c:410:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dsp’
#  408|       }
#  409|   
#  410|->   if (*dsp)
#  411|       err = HWCFUNCS_ERROR_HWCARGS;
#  412|     if (err != 0)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def98]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwcfuncs.c: scope_hint: In function ‘hwcfuncs_parse_attrs’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwcfuncs.c:472:10: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘counter_copy’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strchr’ must be non-null
#  470|   
#  471|     /* advance pointer to first attribute */
#  472|->   tail = strchr (counter_copy, HWCFUNCS_PARSE_ATTR);
#  473|     if (tail)
#  474|       *tail = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def99]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwcfuncs.c: scope_hint: In function ‘hwcfuncs_parse_ctr’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwcfuncs.c:559:14: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘copy’
#  557|     /* plus */
#  558|     plus = 0;
#  559|->   if (nameptr[0] == HWCFUNCS_PARSE_BACKTRACK)
#  560|       {
#  561|         plus = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/src/dbe_hwctable.c:23: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwctable.c: scope_hint: In function ‘ptr_list_add’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwctable.c:1400:10: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(attr)’
# 1398|   ptr_list_add (ptr_list *lst, char* ptr)
# 1399|   { // ptr must be freeable
# 1400|->   if (lst->sz >= lst->max - 1)
# 1401|       {
# 1402|         void * * new;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwctable.c: scope_hint: In function ‘list_append_shallow_copy’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwctable.c:1405:10: warning[-Wanalyzer-malloc-leak]: leak of ‘<return-value>’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwctable.c: scope_hint: In function ‘list_append_shallow_copy’
# 1403|         int newmax = lst->max ? lst->max * 2 : 16;
# 1404|         new = (void**) realloc (lst->array, newmax * sizeof (void*));
# 1405|->       if (!new) return; // failed, discard add
# 1406|         lst->max = newmax;
# 1407|         lst->array = new;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwctable.c:1405:10: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/common/hwctable.c: scope_hint: In function ‘list_append_shallow_copy’
# 1403|         int newmax = lst->max ? lst->max * 2 : 16;
# 1404|         new = (void**) realloc (lst->array, newmax * sizeof (void*));
# 1405|->       if (!new) return; // failed, discard add
# 1406|         lst->max = newmax;
# 1407|         lst->array = new;

Error: CPPCHECK_WARNING (CWE-457): [#def103]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def104]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/linetrace.c:35: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/linetrace.c: scope_hint: In function ‘gprofng_posix_spawnp’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/descendants.h:56:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘guard’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/linetrace.c:1504:3: note: in expansion of macro ‘PUSH_REENTRANCE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/linetrace.c:1512:5: note: in definition of macro ‘DCL_POSIX_SPAWNP’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/linetrace.c:1526:1: note: in expansion of macro ‘DCL_FUNC_VER’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/collector.h:53:3: note: in expansion of macro ‘DCL_POSIX_SPAWNP’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/linetrace.c:1526:1: note: in expansion of macro ‘DCL_FUNC_VER’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/linetrace.c:1504:3: note: in expansion of macro ‘PUSH_REENTRANCE’
#   54|   #define INIT_REENTRANCE(x)  ((x) = __collector_tsd_get_by_key (line_key))
#   55|   #define CHCK_REENTRANCE(x)  (((INIT_REENTRANCE(x)) == NULL) || (*(x) != 0))
#   56|-> #define PUSH_REENTRANCE(x)  ((*(x))++)
#   57|   #define POP_REENTRANCE(x)   ((*(x))--)
#   58|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def105]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/iotrace.c: scope_hint: In function ‘gprofng_fgetpos’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/iotrace.c:84:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘guard’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/iotrace.c:2924:7: note: in expansion of macro ‘POP_REENTRANCE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/src/collector_module.h:26: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/collector.h:29: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/iotrace.c:38: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/iotrace.c:2956:1: note: in expansion of macro ‘DCL_FGETPOS’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/iotrace.c:2919:3: note: in expansion of macro ‘PUSH_REENTRANCE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/iotrace.c:2922:7: note: in expansion of macro ‘RECHCK_REENTRANCE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/iotrace.c:2922:7: note: in expansion of macro ‘RECHCK_REENTRANCE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/iotrace.c:2924:7: note: in expansion of macro ‘POP_REENTRANCE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/iotrace.c:2924:7: note: in expansion of macro ‘POP_REENTRANCE’
#   82|   #define RECHCK_REENTRANCE(x) (!io_mode || ((x) = collector_interface->getKey( io_key )) == NULL || (*(x) == 0))
#   83|   #define PUSH_REENTRANCE(x)   ((*(x))++)
#   84|-> #define POP_REENTRANCE(x)    ((*(x))--)
#   85|   #define gethrtime collector_interface->getHiResTime
#   86|   

Error: COMPILER_WARNING (CWE-252): [#def106]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/linetrace.c: scope_hint: In function ‘linetrace_ext_fork_epilogue’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def107]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/linetrace.c: scope_hint: In function ‘linetrace_ext_exec_epilogue’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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: GCC_ANALYZER_WARNING (CWE-476): [#def108]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/synctrace.c: scope_hint: In function ‘gprofng_pthread_join’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/synctrace.c:85:35: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘guard’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/synctrace.c:727:7: note: in expansion of macro ‘POP_REENTRANCE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/synctrace.c:33: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/synctrace.c:757:1: note: in expansion of macro ‘DCL_PTHREAD_JOIN’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/synctrace.c:722:3: note: in expansion of macro ‘PUSH_REENTRANCE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/synctrace.c:725:7: note: in expansion of macro ‘RECHCK_NREENTRANCE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/synctrace.c:725:7: note: in expansion of macro ‘RECHCK_NREENTRANCE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/synctrace.c:727:7: note: in expansion of macro ‘POP_REENTRANCE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/libcollector/synctrace.c:727:7: note: in expansion of macro ‘POP_REENTRANCE’
#   83|   #define RECHCK_JREENTRANCE(x)   (!sync_java || !sync_mode || ((x) = collector_interface->getKey( sync_key )) == NULL || (*(x) == 0))
#   84|   #define PUSH_REENTRANCE(x)      ((*(x))++)
#   85|-> #define POP_REENTRANCE(x)       ((*(x))--)
#   86|   #define gethrtime	collector_interface->getHiResTime
#   87|   

Error: COMPILER_WARNING (CWE-252): [#def109]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/src/DbeSession.cc: scope_hint: In destructor ‘DbeSession::~DbeSession()’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def110]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/src/DbeSession.cc: scope_hint: In member function ‘void DbeSession::unlink_tmp_files()’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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 (CWE-457): [#def111]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/src/Elf.cc: scope_hint: In member function ‘Elf::elf_getdata(unsigned int)’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/src/Elf.cc:412:13: warning[-Wmaybe-uninitialized]: ‘*_135’ may be used uninitialized
#  412 |   Elf_Data *edta = data[sec];
#      |             ^~~~
#  410|   	data[i] = NULL;
#  411|       }
#  412|->   Elf_Data *edta = data[sec];
#  413|     if (edta == NULL)
#  414|       {

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

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

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

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

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

Error: COMPILER_WARNING (CWE-252): [#def117]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/src/gp-collect-app.cc: scope_hint: In member function ‘void collect::writeStr(int, const char*)’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/src/gp-collect-app.cc:1520:11: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
# 1520 |     write (f, buf, strlen (buf));
#      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
# 1518|   {
# 1519|     if (buf != NULL)
# 1520|->     write (f, buf, strlen (buf));
# 1521|   }

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

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

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

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

Error: CPPCHECK_WARNING (CWE-401): [#def122]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/gprofng/src/vec.h:244: error[memleakOnRealloc]: Common realloc mistake: 'data' nulled but not freed upon failure
#  242|   	limit = limit * 2;
#  243|       }
#  244|->   data = (ITEM *) realloc (data, limit * sizeof (ITEM));
#  245|   }
#  246|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def123]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/sframe.h:168:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c:110:10: note: in expansion of macro ‘SFRAME_V1_HDR_SIZE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c: scope_hint: In function ‘sframe_encoder_get_hdr_size’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c: scope_hint: In function ‘sframe_encoder_get_hdr_size’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c:110:10: note: in expansion of macro ‘SFRAME_V1_HDR_SIZE’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c:110:10: note: in expansion of macro ‘SFRAME_V1_HDR_SIZE’
#  166|   
#  167|   #define SFRAME_V1_HDR_SIZE(sframe_hdr)	\
#  168|->   ((sizeof (sframe_header) + (sframe_hdr).sfh_auxhdr_len))
#  169|   
#  170|   /* Two possible keys for executable (instruction) pointers signing.  */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def124]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldelfgen.c: scope_hint: In function ‘add_link_order_input_section’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldelfgen.c:60:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘os’
#   58|   			      lang_output_section_statement_type *os)
#   59|   {
#   60|->   struct os_sections *os_info = os->data;
#   61|     asection *s;
#   62|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def125]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldexp.c: scope_hint: In function ‘update_definedness’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldexp.c:322:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘h’
#  320|     ret = true;
#  321|     if (!h->ldscript_def
#  322|->       && (h->type == bfd_link_hash_defined
#  323|   	  || h->type == bfd_link_hash_defweak
#  324|   	  || h->type == bfd_link_hash_common))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def126]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldexp.c: scope_hint: In function ‘exp_fold_tree_1’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldexp.c:1214:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘h’
# 1212|                    that it can be seen by other expressions.  */
# 1213|                 if (!expld.result.valid_p
# 1214|->                   && h->type == bfd_link_hash_new)
# 1215|                   {
# 1216|                     expld.result.value = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def127]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldexp.c:1241:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘h’
# 1239|   		  if (expld.phase == lang_fixed_phase_enum)
# 1240|   		    {
# 1241|-> 		      if (h->type == bfd_link_hash_defined)
# 1242|   			{
# 1243|   			  expld.result.value = h->u.def.value;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def128]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldexp.c:1249:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘h’
# 1247|   		  else
# 1248|   		    {
# 1249|-> 		      h->type = bfd_link_hash_defined;
# 1250|   		      h->u.def.value = expld.result.value;
# 1251|   		      h->u.def.section = expld.result.section;

Error: CPPCHECK_WARNING (CWE-476): [#def129]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldlang.c:1482: warning[nullPointer]: Possible null pointer dereference: region
# 1480|     n = stat_alloc (sizeof (lang_memory_region_name));
# 1481|     n->name = xstrdup (alias);
# 1482|->   n->next = region->name_list.next;
# 1483|     region->name_list.next = n;
# 1484|   }

Error: CPPCHECK_WARNING (CWE-476): [#def130]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldlang.c:1483: warning[nullPointer]: Possible null pointer dereference: region
# 1481|     n->name = xstrdup (alias);
# 1482|     n->next = region->name_list.next;
# 1483|->   region->name_list.next = n;
# 1484|   }
# 1485|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def131]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c: scope_hint: In function ‘write_dependency_file’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:201:3: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(config.dependency_file, "w")’ where non-null expected
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/sysdep.h:30: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:22: included_from: Included from here.
/usr/include/stdio.h:357:12: note: argument 1 of ‘fprintf’ must be non-null
#  199|       }
#  200|   
#  201|->   fprintf (out, "%s:", output_filename);
#  202|   
#  203|     for (dep = dependency_files; dep != NULL; dep = dep->next)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def132]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c: scope_hint: In function ‘main’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:629:27: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(output_filename, "r")’ where non-null expected
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:28: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/filenames.h:58:6: note: in definition of macro ‘IS_DIR_SEPARATOR_1’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/filenames.h:53:31: note: in expansion of macro ‘IS_UNIX_DIR_SEPARATOR’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:706:7: note: in expansion of macro ‘IS_DIR_SEPARATOR’
/usr/include/stdio.h:728:15: note: argument 4 of ‘fread’ must be non-null
#  627|   		einfo (_("%F%P: unable to open for destination of copy `%s'\n"),
#  628|   		       dst_name);
#  629|-> 	      while ((l = fread (buf, 1, bsize, src)) > 0)
#  630|   		{
#  631|   		  int done = fwrite (buf, 1, l, dst);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def133]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:631:30: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(xmalloc((long unsigned int)(len + 5)), "w")’ where non-null expected
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/filenames.h:58:6: note: in definition of macro ‘IS_DIR_SEPARATOR_1’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/filenames.h:53:31: note: in expansion of macro ‘IS_UNIX_DIR_SEPARATOR’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:706:7: note: in expansion of macro ‘IS_DIR_SEPARATOR’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ld.h:43: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:31: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:627:24: note: in expansion of macro ‘_’
/usr/include/stdio.h:735:15: note: argument 4 of ‘fwrite’ must be non-null
#  629|   	      while ((l = fread (buf, 1, bsize, src)) > 0)
#  630|   		{
#  631|-> 		  int done = fwrite (buf, 1, l, dst);
#  632|   
#  633|   		  if (done != l)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def134]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:638:19: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(xmalloc((long unsigned int)(len + 5)), "w")’ where non-null expected
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/filenames.h:58:6: note: in definition of macro ‘IS_DIR_SEPARATOR_1’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/filenames.h:53:31: note: in expansion of macro ‘IS_UNIX_DIR_SEPARATOR’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:706:7: note: in expansion of macro ‘IS_DIR_SEPARATOR’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmain.c:627:24: note: in expansion of macro ‘_’
/usr/include/stdio.h:184:12: note: argument 1 of ‘fclose’ must be non-null
#  636|   
#  637|   	      fclose (src);
#  638|-> 	      if (fclose (dst) == EOF)
#  639|   		einfo (_("%P: error closing file `%s'\n"), dst_name);
#  640|   	      free (dst_name);

Error: CPPCHECK_WARNING (CWE-664): [#def135]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldmisc.c:660: error[va_start_subsequentCalls]: va_start() or va_copy() called subsequently on 'arg' without va_end() in between.
#  658|         /* If vsnprintf fails or truncates, output the warning directly.  */
#  659|         fflush (stdout);
#  660|->       va_start (arg, fmt);
#  661|         vfinfo (stderr, fmt, arg, true);
#  662|         fflush (stderr);

Error: GCC_ANALYZER_WARNING (CWE-787): [#def136]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldwrite.c:27: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldwrite.c: scope_hint: In function ‘clone_section’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldwrite.c:322:31: warning[-Wanalyzer-out-of-bounds]: buffer over-read
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/safe-ctype.h:87:42: note: in definition of macro ‘_sch_test’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldwrite.c:322:17: note: in expansion of macro ‘ISDIGIT’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/safe-ctype.h:87:42: note: in definition of macro ‘_sch_test’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldwrite.c:322:17: note: in expansion of macro ‘ISDIGIT’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/safe-ctype.h:87:42: note: in definition of macro ‘_sch_test’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldwrite.c:322:17: note: in expansion of macro ‘ISDIGIT’
#  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: GCC_ANALYZER_WARNING (CWE-787): [#def137]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldwrite.c:324:23: warning[-Wanalyzer-out-of-bounds]: buffer over-read
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/safe-ctype.h:87:42: note: in definition of macro ‘_sch_test’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldwrite.c:322:17: note: in expansion of macro ‘ISDIGIT’
#  322|     while (len && ISDIGIT (tname[len-1]))
#  323|       len--;
#  324|->   if (len > 1 && tname[len-1] == '.')
#  325|       /* It was a dotted number. */
#  326|       tname[len-1] = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def138]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldwrite.c: scope_hint: In function ‘split_sections’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ldwrite.c:498:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  496|   
#  497|   	      shift_offset = p->offset;
#  498|-> 	      n->size = cursor->size - shift_offset;
#  499|   	      cursor->size = shift_offset;
#  500|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def139]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/lexsup.c: scope_hint: In function ‘parse_args’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/lexsup.c:1453:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘optarg2’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/ld.h:43: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/lexsup.c:33: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/lexsup.c:1447:22: note: in expansion of macro ‘_’
# 1451|   
# 1452|   	    /* So far so good.  Are all the args present?  */
# 1453|-> 	    if ((*optarg == '\0') || (*optarg2 == '\0'))
# 1454|   	      einfo (_("%F%P: missing argument(s) to option"
# 1455|   		       " \"--section-start\"\n"));

Error: CPPCHECK_WARNING (CWE-457): [#def140]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:602: 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
#  600|     /* Return false if n is in the d->exports table.  */
#  601|     if (d->num_exports != 0
#  602|->       && bsearch (&key, d->exports, d->num_exports,
#  603|   		  sizeof (pe_def_file->exports[0]), pe_export_sort))
#  604|       return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def141]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c: scope_hint: In function ‘auto_export’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:612:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘abfd’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3731:1: note: in expansion of macro ‘pe_dll_build_sections’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3733:3: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:462:1: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3733:3: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:850:7: note: in expansion of macro ‘pe_dll_kill_ats’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:611:11: note: in expansion of macro ‘pe_dll_extra_pe_debug’
#  610|   
#  611|         if (pe_dll_extra_pe_debug)
#  612|-> 	printf ("considering exporting: %s, abfd=%p, abfd->my_arc=%p\n",
#  613|   		n, abfd, abfd->my_archive);
#  614|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def142]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c: scope_hint: In function ‘process_def_file_and_drectve’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:896:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3731:1: note: in expansion of macro ‘pe_dll_build_sections’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3733:3: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:462:1: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3733:3: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:850:7: note: in expansion of macro ‘pe_dll_kill_ats’
#  894|   	      char *tmp = xstrdup (pe_def_file->exports[i].name + lead_at);
#  895|   
#  896|-> 	      *(strchr (tmp, '@')) = 0;
#  897|   	      if (auto_export (NULL, pe_def_file, tmp))
#  898|   		def_file_add_export (pe_def_file, tmp,

Error: GCC_ANALYZER_WARNING (CWE-787): [#def143]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c: scope_hint: In function ‘generate_edata’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:1133:25: warning[-Wanalyzer-out-of-bounds]: buffer overflow
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3731:1: note: in expansion of macro ‘pe_dll_build_sections’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3733:3: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:462:1: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3733:3: note: in expansion of macro ‘pe_dll_id_target’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:850:7: note: in expansion of macro ‘pe_dll_kill_ats’
# 1131|     exported_symbols = xmalloc (export_table_size * sizeof (int));
# 1132|     for (i = 0; i < export_table_size; i++)
# 1133|->     exported_symbols[i] = -1;
# 1134|   
# 1135|     /* Now we need to assign ordinals to those that don't have them.  */

Error: CPPCHECK_WARNING (CWE-457): [#def144]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3138: warning[uninitvar]: Uninitialized variable: &key.oname
# 3136|   
# 3137|     key.key = lname;
# 3138|->   kv = bsearch (&key, udef_table, undef_count, sizeof (struct key_value),
# 3139|   		undef_sort_cmp);
# 3140|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def145]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c: scope_hint: In function ‘pe_find_cdecl_alias_match’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/pe-dll.c:3172:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 3170|   	}
# 3171|         if (at)
# 3172|-> 	*strchr (lname, '@') = 0;
# 3173|         key.key = lname;
# 3174|         kv = bsearch (&key, udef_table, undef_count,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def146]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/plugin.c: scope_hint: In function ‘plugin_load_plugins’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/plugin.c:1149:13: warning[-Wanalyzer-jump-through-null]: jump through null pointer
# 1147|         set_tv_plugin_args (curplug, &my_tv[tv_header_size]);
# 1148|         called_plugin = curplug;
# 1149|->       rv = (*onloadfn) (my_tv);
# 1150|         called_plugin = NULL;
# 1151|         if (rv != LDPS_OK)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def147]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/plugin.c: scope_hint: In function ‘plugin_object_p’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/plugin.c:1315:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/plugin.c: scope_hint: In function ‘plugin_object_p’
# 1313|         ibfd->plugin_dummy_bfd = abfd;
# 1314|         bfd_make_readable (abfd);
# 1315|->       abfd->no_export = ibfd->no_export;
# 1316|         return plugin_cleanup;
# 1317|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/testplug.c: scope_hint: In function ‘onclaim_file’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/testplug.c:573:10: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
#  571|         if (buffer == NULL)
#  572|           return LDPS_ERR;
#  573|->       if (read (file->fd, buffer, bytes_to_read_before_claim) < 0)
#  574|           return LDPS_ERR;
#  575|         free (buffer);

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

Error: GCC_ANALYZER_WARNING (CWE-688): [#def150]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/testplug2.c: scope_hint: In function ‘xstrdup’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/testplug2.c:514:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  512|     size_t len = strlen (s) + 1;
#  513|     char *ret = malloc (len + 1);
#  514|->   return (char *) memcpy (ret, s, len);
#  515|   }
#  516|   

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

Error: GCC_ANALYZER_WARNING (CWE-688): [#def152]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/testplug3.c: scope_hint: In function ‘xstrdup’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/testplug3.c:493:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  491|     size_t len = strlen (s) + 1;
#  492|     char *ret = malloc (len + 1);
#  493|->   return (char *) memcpy (ret, s, len);
#  494|   }
#  495|   

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

Error: GCC_ANALYZER_WARNING (CWE-688): [#def154]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/testplug4.c: scope_hint: In function ‘xstrdup’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/ld/testplug4.c:520:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  518|     size_t len = strlen (s) + 1;
#  519|     char *ret = malloc (len + 1);
#  520|->   return (char *) memcpy (ret, s, len);
#  521|   }
#  522|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def155]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-archive.c: scope_hint: In function ‘ctf_arc_import_parent’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-archive.c:768:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘err’
#  766|   						 fp->ctf_parname, &err);
#  767|         if (errp)
#  768|-> 	*errp = err;
#  769|   
#  770|         if (parent)

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

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

Error: GCC_ANALYZER_WARNING (CWE-122): [#def158]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-hash.c: scope_hint: In function ‘ctf_dynhash_create_sized’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-hash.c:186:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-hash.c:186:25: note: write of 8 bytes to beyond the end of the region
#  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): [#def159]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-hash.c:187:27: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-hash.c:187:27: note: write of 8 bytes to beyond the end of the region
#  185|       {
#  186|         dynhash->key_free = key_free;
#  187|->       dynhash->value_free = value_free;
#  188|       }
#  189|   

Error: GCC_ANALYZER_WARNING (CWE-131): [#def160]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-hash.c: scope_hint: In function ‘ctf_hashtab_insert’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-hash.c:233:17: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  231|   	{
#  232|   	  void *p = malloc (offsetof (ctf_helem_t, owner));
#  233|-> 	  *slot = p;
#  234|   	}
#  235|         if (!*slot)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-inlines.h:96:17: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-link.c: scope_hint: In function ‘ctf_accumulate_archive_names’
#   94|   ctf_set_errno (ctf_dict_t *fp, int err)
#   95|   {
#   96|->   fp->ctf_errno = err;
#   97|     /* Don't rely on CTF_ERR here as it will not properly sign extend on 64-bit
#   98|        Windows ABI.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-inlines.h:96:17: warning[-Wanalyzer-malloc-leak]: leak of ‘names’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-link.c: scope_hint: In function ‘ctf_accumulate_archive_names’
#   94|   ctf_set_errno (ctf_dict_t *fp, int err)
#   95|   {
#   96|->   fp->ctf_errno = err;
#   97|     /* Don't rely on CTF_ERR here as it will not properly sign extend on 64-bit
#   98|        Windows ABI.  */

Error: CPPCHECK_WARNING (CWE-457): [#def163]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-link.c:254: error[uninitvar]: Uninitialized variable: err
#  252|     if (!input->clin_arc)
#  253|       {
#  254|->       if (err == ECTF_NOCTFDATA)
#  255|   	return 0;
#  256|   

Error: CPPCHECK_WARNING (CWE-457): [#def164]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-link.c:1760: error[legacyUninitvar]: Uninitialized variable: name
# 1758|     while ((err = ctf_dynhash_next (fp->ctf_dynsyms, &i, &name_, &sym_)) == 0)
# 1759|       {
# 1760|->       const char *name = (const char *) name;
# 1761|         ctf_link_sym_t *symp = (ctf_link_sym_t *) sym_;
# 1762|   

Error: GCC_ANALYZER_WARNING (CWE-131): [#def165]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-lookup.c: scope_hint: In function ‘ctf_symidx_sort’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-lookup.c:590:17: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  588|     size_t i;
#  589|   
#  590|->   if ((sorted = malloc (len)) == NULL)
#  591|       {
#  592|         ctf_set_errno (fp, ENOMEM);

Error: CPPCHECK_WARNING (CWE-457): [#def166]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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: CPPCHECK_WARNING (CWE-401): [#def167]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-open.c:1524: error[memleak]: Memory leak: fp
# 1522|       {
# 1523|         ctf_err_warn (NULL, 0, ECTF_CORRUPT, _("header offset exceeds CTF size"));
# 1524|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1525|       }
# 1526|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-open.c:1524:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-open.c:1512:27: note: in expansion of macro ‘cth_flags’
# 1522|       {
# 1523|         ctf_err_warn (NULL, 0, ECTF_CORRUPT, _("header offset exceeds CTF size"));
# 1524|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1525|       }
# 1526|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-open.c: scope_hint: In function ‘ctf_bufopen.part.0’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-open.c:1524:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/include/ctf-api.h:29: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-impl.h:27: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-open.c:20: included_from: Included from here.
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-open.c:1512:27: note: in expansion of macro ‘cth_flags’
# 1522|       {
# 1523|         ctf_err_warn (NULL, 0, ECTF_CORRUPT, _("header offset exceeds CTF size"));
# 1524|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1525|       }
# 1526|   

Error: CPPCHECK_WARNING (CWE-401): [#def170]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-open.c:1536: error[memleak]: Memory leak: fp
# 1534|       {
# 1535|         ctf_err_warn (NULL, 0, ECTF_CORRUPT, _("overlapping CTF sections"));
# 1536|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1537|       }
# 1538|   

Error: CPPCHECK_WARNING (CWE-401): [#def171]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-open.c:1546: error[memleak]: Memory leak: fp
# 1544|         ctf_err_warn (NULL, 0, ECTF_CORRUPT,
# 1545|   		    _("CTF sections not properly aligned"));
# 1546|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1547|       }
# 1548|   

Error: CPPCHECK_WARNING (CWE-401): [#def172]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-open.c:1560: error[memleak]: Memory leak: fp
# 1558|   		      "bytes"), hp->cth_funcoff - hp->cth_objtoff,
# 1559|   		    hp->cth_funcidxoff - hp->cth_objtidxoff);
# 1560|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1561|       }
# 1562|   

Error: CPPCHECK_WARNING (CWE-401): [#def173]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-open.c:1573: error[memleak]: Memory leak: fp
# 1571|   		      "bytes"), hp->cth_objtidxoff - hp->cth_funcoff,
# 1572|   		    hp->cth_varoff - hp->cth_funcidxoff);
# 1573|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1574|       }
# 1575|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def174]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-string.c: scope_hint: In function ‘ctf_str_write_strtab’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libctf/ctf-string.c:827:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  825|     free (sorttab);
#  826|    err_strtab:
#  827|->   free (strtab);
#  828|     return NULL;
#  829|   }

Error: COMPILER_WARNING: [#def175]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c: scope_hint: In function ‘cplus_demangle_print_callback.constprop’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c:4642:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 4642 | cplus_demangle_print_callback (int options,
#      | ^
# 4640|   CP_STATIC_IF_GLIBCPP_V3
# 4641|   int
# 4642|-> cplus_demangle_print_callback (int options,
# 4643|                                  struct demangle_component *dc,
# 4644|                                  demangle_callbackref callback, void *opaque)

Error: CPPCHECK_WARNING (CWE-562): [#def176]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c:5183: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5181|   
# 5182|   	    adpm[i].next = dpi->modifiers;
# 5183|-> 	    dpi->modifiers = &adpm[i];
# 5184|   	    adpm[i].mod = typed_name;
# 5185|   	    adpm[i].printed = 0;

Error: CPPCHECK_WARNING (CWE-562): [#def177]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c:5221: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5219|   		adpm[i] = adpm[i - 1];
# 5220|   		adpm[i].next = &adpm[i - 1];
# 5221|-> 		dpi->modifiers = &adpm[i];
# 5222|   
# 5223|   		adpm[i - 1].mod = typed_name;

Error: CPPCHECK_WARNING (CWE-562): [#def178]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c:5242: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5240|   	  {
# 5241|   	    dpt.next = dpi->templates;
# 5242|-> 	    dpi->templates = &dpt;
# 5243|   	    dpt.template_decl = typed_name;
# 5244|   

Error: CPPCHECK_WARNING (CWE-562): [#def179]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c:5717: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5715|   
# 5716|   	adpm[0].next = hold_modifiers;
# 5717|-> 	dpi->modifiers = &adpm[0];
# 5718|   	adpm[0].mod = dc;
# 5719|   	adpm[0].printed = 0;

Error: CPPCHECK_WARNING (CWE-562): [#def180]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c:6745: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6743|       {
# 6744|         dpt.next = dpi->templates;
# 6745|->       dpi->templates = &dpt;
# 6746|         dpt.template_decl = dpi->current_template;
# 6747|       }

Error: CPPCHECK_WARNING (CWE-909): [#def181]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c:6752: error[uninitStructMember]: Uninitialized struct member: dpt.next
# 6750|   
# 6751|     if (dpi->current_template != NULL)
# 6752|->     dpi->templates = dpt.next;
# 6753|   }
# 6754|   

Error: COMPILER_WARNING: [#def182]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c: scope_hint: In function ‘d_demangle_callback.constprop’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c:6794:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 6794 | d_demangle_callback (const char *mangled, int options,
#      | ^
# 6792|   
# 6793|   static int
# 6794|-> d_demangle_callback (const char *mangled, int options,
# 6795|                        demangle_callbackref callback, void *opaque)
# 6796|   {

Error: COMPILER_WARNING: [#def183]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c: scope_hint: In function ‘d_demangle’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c:6911:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 6911 | d_demangle (const char *mangled, int options, size_t *palc)
#      | ^
# 6909|   
# 6910|   static char *
# 6911|-> d_demangle (const char *mangled, int options, size_t *palc)
# 6912|   {
# 6913|     struct d_growable_string dgs;

Error: COMPILER_WARNING: [#def184]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c: scope_hint: In function ‘is_ctor_or_dtor’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/cp-demangle.c:7117:1: warning[-Wstack-usage=]: stack usage might be unbounded
# 7117 | is_ctor_or_dtor (const char *mangled,
#      | ^
# 7115|   
# 7116|   static int
# 7117|-> is_ctor_or_dtor (const char *mangled,
# 7118|                    enum gnu_v3_ctor_kinds *ctor_kind,
# 7119|                    enum gnu_v3_dtor_kinds *dtor_kind)

Error: GCC_ANALYZER_WARNING (CWE-465): [#def185]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_insert’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c:251:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
#  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): [#def186]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_insert_cstr’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c:274:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
#  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): [#def187]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_insert_char’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c:295:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
#  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): [#def188]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_append’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c:314:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
#  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): [#def189]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_append_cstr’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c:332:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
#  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): [#def190]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_append_char’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/dyn-string.c:346:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it
#  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: CPPCHECK_WARNING (CWE-823): [#def191]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/hashtab.c:187: error[arrayIndexOutOfBounds]: Array 'prime_tab[30]' accessed at index 30, which is out of bounds.
#  185|   
#  186|     /* If we've run out of primes, abort.  */
#  187|->   if (n > prime_tab[low].prime)
#  188|       {
#  189|         fprintf (stderr, "Cannot find prime bigger than %lu\n", n);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def192]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/make-relative-prefix.c: scope_hint: In function ‘save_string’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/make-relative-prefix.c:110:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘result’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  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-127): [#def193]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/make-relative-prefix.c: scope_hint: In function ‘split_directories’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/make-relative-prefix.c:192:11: warning[-Wanalyzer-out-of-bounds]: heap-based buffer under-read
#  190|     dirs[num_dirs] = NULL;
#  191|   
#  192|->   if (dirs[num_dirs - 1] == NULL)
#  193|       {
#  194|         free_split_directories (dirs);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def194]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/make-relative-prefix.c: scope_hint: In function ‘make_relative_prefix_1’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/make-relative-prefix.c:274:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘nstore’
#  272|   		  if (endp == startp)
#  273|   		    {
#  274|-> 		      nstore[0] = '.';
#  275|   		      nstore[1] = DIR_SEPARATOR;
#  276|   		      nstore[2] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-688): [#def195]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/make-relative-prefix.c:280:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘nstore’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  278|   		  else
#  279|   		    {
#  280|-> 		      memcpy (nstore, startp, endp - startp);
#  281|   		      if (! IS_DIR_SEPARATOR (endp[-1]))
#  282|   			{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def196]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/obstack.c: scope_hint: In function ‘_obstack_newchunk’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/obstack.c:210:19: warning[-Wanalyzer-null-dereference]: 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): [#def197]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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-476): [#def198]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/simple-object-mach-o.c: scope_hint: In function ‘simple_object_mach_o_write_segment’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/simple-object-mach-o.c:1159:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘index’
# 1157|         if (sobj->segment_name != NULL)
# 1158|   	{
# 1159|-> 	  index[sect*4+0] = (unsigned int) offset;
# 1160|   	  index[sect*4+1] = secsize;
# 1161|   	  /* Stash the section name in our table.  */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def199]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/simple-object-mach-o.c:1210:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘index’
# 1208|   	 created section.  */
# 1209|   
# 1210|->       secsize = (offset - index[0]);
# 1211|         if (!simple_object_mach_o_write_section_header (sobj, descriptor,
# 1212|   						      sechdr_offset,

Error: CPPCHECK_WARNING (CWE-562): [#def200]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def201]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def202]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def203]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def204]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def205]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def206]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/strerror.c: scope_hint: In function ‘strtoerrno’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/strerror.c:756:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_names’
#  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): [#def207]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/strsignal.c: scope_hint: In function ‘strtosigno’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libiberty/strsignal.c:524:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘signal_names’
#  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): [#def208]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def209]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def210]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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): [#def211]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/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: GCC_ANALYZER_WARNING (CWE-688): [#def212]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe-dump.c: scope_hint: In function ‘dump_sframe_header’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe-dump.c:76:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘flags_str’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#   74|       {
#   75|         if (flags & SFRAME_F_FDE_SORTED)
#   76|-> 	strcpy (flags_str, flag_names[0]);
#   77|         if (flags & SFRAME_F_FRAME_POINTER)
#   78|   	{

Error: GCC_ANALYZER_WARNING (CWE-688): [#def213]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe-dump.c:81:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘flags_str’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#   79|   	  if (strlen (flags_str) > 0)
#   80|   	    strcpy (flags_str, ",");
#   81|-> 	  strcpy (flags_str, flag_names[1]);
#   82|   	}
#   83|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def214]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe-dump.c:85:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘flags_str’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#   83|       }
#   84|     else
#   85|->     strcpy (flags_str, "NONE");
#   86|   
#   87|     /* CFA fixed FP and RA offsets.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c: scope_hint: In function ‘sframe_decode’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c:870:12: warning[-Wanalyzer-malloc-leak]: leak of ‘dctx’
#  868|   
#  869|     if ((sf_buf == NULL) || (!sf_size))
#  870|->     return sframe_ret_set_errno (errp, SFRAME_ERR_INVAL);
#  871|     else if (sf_size < sizeof (sframe_header))
#  872|       return sframe_ret_set_errno (errp, SFRAME_ERR_BUF_INVAL);

Error: CPPCHECK_WARNING (CWE-401): [#def216]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c:898: error[memleak]: Memory leak: dctx
#  896|         tempbuf = (char *) malloc (sf_size * sizeof (char));
#  897|         if (tempbuf == NULL)
#  898|-> 	return sframe_ret_set_errno (errp, SFRAME_ERR_NOMEM);
#  899|         memcpy (tempbuf, sf_buf, sf_size);
#  900|   

Error: CPPCHECK_WARNING (CWE-401): [#def217]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c:908: error[memleak]: Memory leak: dctx
#  906|   	{
#  907|   	  free (tempbuf);
#  908|-> 	  return sframe_ret_set_errno (errp, SFRAME_ERR_BUF_INVAL);
#  909|   	}
#  910|         frame_buf = tempbuf;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def218]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c: scope_hint: In function ‘sframe_decoder_get_abi_arch’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c:987:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c: scope_hint: In function ‘sframe_decoder_get_abi_arch’
#  985|     sframe_header *sframe_header;
#  986|     sframe_header = sframe_decoder_get_header (dctx);
#  987|->   return sframe_header->sfh_abi_arch;
#  988|   }
#  989|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def219]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c: scope_hint: In function ‘sframe_decoder_get_fixed_fp_offset’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c:1006:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c: scope_hint: In function ‘sframe_decoder_get_fixed_fp_offset’
# 1004|     sframe_header *dhp;
# 1005|     dhp = sframe_decoder_get_header (ctx);
# 1006|->   return dhp->sfh_cfa_fixed_fp_offset;
# 1007|   }
# 1008|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def220]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c: scope_hint: In function ‘sframe_decoder_get_fixed_ra_offset’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c:1015:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c: scope_hint: In function ‘sframe_decoder_get_fixed_ra_offset’
# 1013|     sframe_header *dhp;
# 1014|     dhp = sframe_decoder_get_header (ctx);
# 1015|->   return dhp->sfh_cfa_fixed_ra_offset;
# 1016|   }
# 1017|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def221]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c: scope_hint: In function ‘sframe_sort_funcdesc’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c:1649:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘encoder’
binutils-2.43.50-build/binutils-2.43.50-22c62092858/libsframe/sframe.c: scope_hint: In function ‘sframe_sort_funcdesc’
# 1647|     ehp = sframe_encoder_get_header (encoder);
# 1648|     /* Sort and write out the FDE table.  */
# 1649|->   sf_fde_tbl *fd_info = encoder->sfe_funcdesc;
# 1650|     if (fd_info)
# 1651|       {

Error: CPPCHECK_WARNING (CWE-562): [#def222]
binutils-2.43.50-build/binutils-2.43.50-22c62092858/opcodes/i386-dis.c:9407: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 9405|     info->bytes_per_line = 7;
# 9406|   
# 9407|->   info->private_data = &priv;
# 9408|     priv.fetched = 0;
# 9409|     priv.insn_start = pc;

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-102.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namebinutils-2.43.50-5.fc42
store-results-to/tmp/tmp5wfj0cex/binutils-2.43.50-5.fc42.tar.xz
time-created2024-11-12 23:25:57
time-finished2024-11-12 23:40:33
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp5wfj0cex/binutils-2.43.50-5.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp5wfj0cex/binutils-2.43.50-5.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9