gdb-15.2-2.fc42

List of Findings

Error: SHELLCHECK_WARNING (CWE-569): [#def1]
/usr/bin/gdb-add-index:150:13: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
#  148|   
#  149|   # Ensure intermediate index file is removed when we exit.
#  150|-> trap "rm -f $tmp_files" 0
#  151|   
#  152|   $GDB --batch -nx -iex 'set auto-load no' \

Error: SHELLCHECK_WARNING (CWE-156): [#def2]
/usr/bin/gdb-add-index:204:4: warning[SC2046]: Quote this to prevent word splitting.
#  202|   	$OBJCOPY --add-section $section="$index" \
#  203|   		 --set-section-flags $section=readonly \
#  204|-> 		 $(if $debugstradd; then \
#  205|   		       echo --add-section .debug_str="$debugstrmerge"; \
#  206|   		       echo --set-section-flags .debug_str=readonly; \

Error: SHELLCHECK_WARNING (CWE-156): [#def3]
/usr/bin/gstack:20:13: warning[SC2046]: Quote this to prevent word splitting.
#   18|   if test -d /proc/$1/task ; then
#   19|       # Newer kernel; has a task/ directory.
#   20|->     if test `/bin/ls /proc/$1/task | /usr/bin/wc -l` -gt 1 2>/dev/null ; then
#   21|   	backtrace="thread apply all bt"
#   22|       fi

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
gdb-15.2-build/gdb-15.2/bfd/archive.c: scope_hint: In function ‘_bfd_compute_and_write_armap’
gdb-15.2-build/gdb-15.2/bfd/archive.c:2389:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘syms’
gdb-15.2-build/gdb-15.2/bfd/archive.c: scope_hint: In function ‘_bfd_compute_and_write_armap’
gdb-15.2-build/gdb-15.2/bfd/archive.c: scope_hint: In function ‘_bfd_compute_and_write_armap’
gdb-15.2-build/gdb-15.2/bfd/archive.c: scope_hint: In function ‘_bfd_compute_and_write_armap’
gdb-15.2-build/gdb-15.2/build-x86_64-redhat-linux-gnu-minimal/bfd/bfd.h:1279:8: note: in expansion of macro ‘BFD_SEND’
gdb-15.2-build/gdb-15.2/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): [#def5]
gdb-15.2-build/gdb-15.2/bfd/bfd.c: scope_hint: In function ‘bfd_errmsg’
gdb-15.2-build/gdb-15.2/bfd/bfd.c:888:25: warning[-Wanalyzer-infinite-recursion]: infinite recursion
#  886|     if (error_tag == bfd_error_on_input)
#  887|       {
#  888|->       const char *msg = bfd_errmsg (input_error);
#  889|         char *ret = bfd_asprintf (_(bfd_errmsgs[error_tag]),
#  890|   				bfd_get_filename (input_bfd), msg);

Error: CPPCHECK_WARNING (CWE-457): [#def6]
gdb-15.2-build/gdb-15.2/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): [#def7]
gdb-15.2-build/gdb-15.2/bfd/coff-i386.c:706: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/pei-i386.c:45: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/coffcode.h: scope_hint: In function ‘coff_read_word’
gdb-15.2-build/gdb-15.2/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): [#def8]
gdb-15.2-build/gdb-15.2/bfd/coff-x86_64.c:887: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/pe-x86_64.c:104: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
gdb-15.2-build/gdb-15.2/bfd/coffcode.h:3848:22: warning[-Wanalyzer-deref-before-check]: check of ‘**abfd.outsymbols’ for NULL after already dereferencing it
gdb-15.2-build/gdb-15.2/bfd/pe-x86_64.c:29: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/coffcode.h:3782:11: note: in expansion of macro ‘COFF_ENCODE_ALIGNMENT’
gdb-15.2-build/gdb-15.2/bfd/pe-x86_64.c:30: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/libcoff.h:915:32: note: in expansion of macro ‘coff_backend_info’
gdb-15.2-build/gdb-15.2/bfd/coffcode.h:3814:31: note: in expansion of macro ‘bfd_coff_scnhsz’
gdb-15.2-build/gdb-15.2/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
gdb-15.2-build/gdb-15.2/bfd/libcoff.h:30: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/coffcode.h:3847:26: note: in expansion of macro ‘coff_symbol_from’
gdb-15.2-build/gdb-15.2/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
gdb-15.2-build/gdb-15.2/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): [#def9]
gdb-15.2-build/gdb-15.2/bfd/coffcode.h:3848:22: warning[-Wanalyzer-deref-before-check]: check of ‘*psym’ for NULL after already dereferencing it
gdb-15.2-build/gdb-15.2/bfd/coffcode.h:3782:11: note: in expansion of macro ‘COFF_ENCODE_ALIGNMENT’
gdb-15.2-build/gdb-15.2/bfd/libcoff.h:915:32: note: in expansion of macro ‘coff_backend_info’
gdb-15.2-build/gdb-15.2/bfd/coffcode.h:3814:31: note: in expansion of macro ‘bfd_coff_scnhsz’
gdb-15.2-build/gdb-15.2/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
gdb-15.2-build/gdb-15.2/bfd/coffcode.h:3847:26: note: in expansion of macro ‘coff_symbol_from’
gdb-15.2-build/gdb-15.2/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
gdb-15.2-build/gdb-15.2/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): [#def10]
gdb-15.2-build/gdb-15.2/bfd/coffcode.h: scope_hint: In function ‘coff_write_object_contents’
gdb-15.2-build/gdb-15.2/bfd/coffcode.h:3872:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘csym’
gdb-15.2-build/gdb-15.2/bfd/coff-i386.c:31: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/coffcode.h:3782:11: note: in expansion of macro ‘COFF_ENCODE_ALIGNMENT’
gdb-15.2-build/gdb-15.2/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): [#def11]
gdb-15.2-build/gdb-15.2/bfd/coffgen.c: scope_hint: In function ‘_bfd_coff_gc_mark_hook’
gdb-15.2-build/gdb-15.2/bfd/coffgen.c:2941:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
gdb-15.2-build/gdb-15.2/bfd/coffgen.c: scope_hint: In function ‘_bfd_coff_gc_mark_hook’
gdb-15.2-build/gdb-15.2/bfd/libcoff.h:30: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/coffgen.c:44: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/coffgen.c:618:7: note: in expansion of macro ‘coff_section_data’
# 2939|       }
# 2940|   
# 2941|->   return coff_section_from_bfd_index (sec->owner, sym->n_scnum);
# 2942|   }
# 2943|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
gdb-15.2-build/gdb-15.2/bfd/cofflink.c: scope_hint: In function ‘_bfd_coff_generic_relocate_section’
gdb-15.2-build/gdb-15.2/bfd/cofflink.c:3004:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
gdb-15.2-build/gdb-15.2/bfd/cofflink.c:29: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/libcoff.h:46:40: note: in expansion of macro ‘coff_data’
gdb-15.2-build/gdb-15.2/bfd/cofflink.c:2943:45: note: in expansion of macro ‘obj_raw_syment_count’
gdb-15.2-build/gdb-15.2/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): [#def13]
gdb-15.2-build/gdb-15.2/bfd/cofflink.c:3132:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
gdb-15.2-build/gdb-15.2/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): [#def14]
gdb-15.2-build/gdb-15.2/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): [#def15]
gdb-15.2-build/gdb-15.2/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
gdb-15.2-build/gdb-15.2/bfd/doc/chew.c:1312:19: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
gdb-15.2-build/gdb-15.2/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
gdb-15.2-build/gdb-15.2/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
gdb-15.2-build/gdb-15.2/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
gdb-15.2-build/gdb-15.2/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
gdb-15.2-build/gdb-15.2/bfd/doc/chew.c: scope_hint: In function ‘add_to_definition’
gdb-15.2-build/gdb-15.2/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): [#def16]
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c: scope_hint: In function ‘_bfd_elf_parse_eh_frame’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:744:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cie’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:583:11: note: in definition of macro ‘REQUIRE’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:621:3: note: in expansion of macro ‘REQUIRE’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:583:11: note: in definition of macro ‘REQUIRE’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:625:3: note: in expansion of macro ‘REQUIRE’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:25: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/elf-bfd.h:1906:39: note: in definition of macro ‘xvec_get_elf_backend_data’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:627:15: note: in expansion of macro ‘get_elf_backend_data’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:629:3: note: in expansion of macro ‘REQUIRE’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:661:3: note: in expansion of macro ‘REQUIRE’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:583:11: note: in definition of macro ‘REQUIRE’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c: scope_hint: In function ‘_bfd_elf_parse_eh_frame’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:712:7: note: in expansion of macro ‘REQUIRE’
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c:583:11: note: in definition of macro ‘REQUIRE’
gdb-15.2-build/gdb-15.2/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): [#def17]
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c: scope_hint: In function ‘offset_adjust’
gdb-15.2-build/gdb-15.2/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): [#def18]
gdb-15.2-build/gdb-15.2/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): [#def19]
gdb-15.2-build/gdb-15.2/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): [#def20]
gdb-15.2-build/gdb-15.2/bfd/elf-eh-frame.c: scope_hint: In function ‘_bfd_elf_fixup_eh_frame_hdr’
gdb-15.2-build/gdb-15.2/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: CPPCHECK_WARNING (CWE-457): [#def21]
gdb-15.2-build/gdb-15.2/bfd/elf-nacl.c:192: error[uninitvar]: Uninitialized variable: *m
#  190|   
#  191|         m = first_load;
#  192|->       while ((seg = *m) != NULL)
#  193|   	{
#  194|   	  if (seg->p_type == PT_LOAD)

Error: CPPCHECK_WARNING (CWE-457): [#def22]
gdb-15.2-build/gdb-15.2/bfd/elf32-arm.c:5632: error[uninitvar]: Uninitialized variables: &key.destination, &key.hash, &key.sym_name, &key.r_type, &key.branch_type, &key.non_a8_stub
# 5630|   		  key.from = base_vma + i;
# 5631|   		  found = (struct a8_erratum_reloc *)
# 5632|-> 		      bsearch (&key, a8_relocs, num_a8_relocs,
# 5633|   			       sizeof (struct a8_erratum_reloc),
# 5634|   			       &a8_reloc_compare);

Error: CPPCHECK_WARNING (CWE-457): [#def23]
gdb-15.2-build/gdb-15.2/bfd/elf32-arm.c:17558: error[uninitvar]: Uninitialized variable: &rel
#17556|   	      Elf_Internal_Rela rel;
#17557|   
#17558|-> 	      SWAP_RELOC_IN (htab) (output_bfd, p, &rel);
#17559|   	      rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_ARM_ABS32);
#17560|   	      SWAP_RELOC_OUT (htab) (output_bfd, &rel, p);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c: scope_hint: In function ‘elf_i386_finish_dynamic_symbol’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3587:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 3585|   
# 3586|     /* Use the second PLT section only if there is .plt section.  */
# 3587|->   use_plt_second = htab->elf.splt != NULL && htab->plt_second != NULL;
# 3588|   
# 3589|     eh = (struct elf_x86_link_hash_entry *) h;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3697:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:21: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3596:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3621:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:25: included_from: Included from here.
gdb-15.2-build/gdb-15.2/build-x86_64-redhat-linux-gnu-minimal/bfd/bfd.h:212:3: note: in expansion of macro ‘BFD_SEND’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3672:11: note: in expansion of macro ‘bfd_put_32’
# 3695|   		 the other PLT slots. */
# 3696|   	      reloc_index = k + s * PLT_NON_JUMP_SLOT_RELOCS;
# 3697|-> 	      loc = (htab->srelplt2->contents + reloc_index
# 3698|   		     * sizeof (Elf32_External_Rel));
# 3699|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3733:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/build-x86_64-redhat-linux-gnu-minimal/bfd/bfd.h:7550:30: note: in definition of macro ‘BFD_SEND’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3729:13: note: in expansion of macro ‘bfd_put_32’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3596:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3621:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
gdb-15.2-build/gdb-15.2/build-x86_64-redhat-linux-gnu-minimal/bfd/bfd.h:212:3: note: in expansion of macro ‘BFD_SEND’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3729:13: note: in expansion of macro ‘bfd_put_32’
gdb-15.2-build/gdb-15.2/build-x86_64-redhat-linux-gnu-minimal/bfd/bfd.h:7550:30: note: in definition of macro ‘BFD_SEND’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3729:13: note: in expansion of macro ‘bfd_put_32’
# 3731|   			 + plt->output_offset
# 3732|   			 + h->plt.offset
# 3733|-> 			 + htab->lazy_plt->plt_lazy_offset),
# 3734|   			gotplt->contents + got_offset);
# 3735|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3756:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3596:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3621:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
# 3754|   	      rel.r_info = ELF32_R_INFO (0, R_386_IRELATIVE);
# 3755|   
# 3756|-> 	      if (htab->params->report_relative_reloc)
# 3757|   		_bfd_x86_elf_link_report_relative_reloc
# 3758|   		  (info, relplt, h, sym, "R_386_IRELATIVE", &rel);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3766:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3596:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3621:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
gdb-15.2-build/gdb-15.2/bfd/elf-bfd.h:27: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:28: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3765:28: note: in expansion of macro ‘ELF32_R_INFO’
# 3764|   	    {
# 3765|   	      rel.r_info = ELF32_R_INFO (h->dynindx, R_386_JUMP_SLOT);
# 3766|-> 	      plt_index = htab->next_jump_slot_index++;
# 3767|   	    }
# 3768|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3795:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3596:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
# 3793|   
# 3794|         /* Set the entry in the GOT procedure linkage table.  */
# 3795|->       plt = htab->plt_got;
# 3796|         got = htab->elf.sgot;
# 3797|         gotplt = htab->elf.sgotplt;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def30]
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3921:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3596:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3852:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:26: included_from: Included from here.
gdb-15.2-build/gdb-15.2/include/bfdlink.h:328:37: note: in expansion of macro ‘bfd_link_dll’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3905:20: note: in expansion of macro ‘bfd_link_pic’
# 3919|   		 contains the real function addres if we need pointer
# 3920|   		 equality.  We load the GOT entry with the PLT entry.  */
# 3921|-> 	      if (htab->plt_second != NULL)
# 3922|   		{
# 3923|   		  plt = htab->plt_second;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3962:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3596:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3852:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
gdb-15.2-build/gdb-15.2/bfd/elf32-i386.c:3939:19: note: in expansion of macro ‘SYMBOL_REFERENCES_LOCAL_P’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:27: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/libbfd.h:749:14: note: in definition of macro ‘BFD_ASSERT’
# 3960|   	{
# 3961|   	  if (relative_reloc_name != NULL
# 3962|-> 	      && htab->params->report_relative_reloc)
# 3963|   	    _bfd_x86_elf_link_report_relative_reloc
# 3964|   	      (info, relgot, h, sym, relative_reloc_name, &rel);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
gdb-15.2-build/gdb-15.2/bfd/elf32-s390.c: scope_hint: In function ‘elf_s390_late_size_sections’
gdb-15.2-build/gdb-15.2/bfd/elf32-s390.c:1915:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1913|   	  || s == htab->elf.iplt
# 1914|   	  || s == htab->elf.igotplt
# 1915|-> 	  || s == htab->irelifunc)
# 1916|   	{
# 1917|   	  /* Strip this section if we don't need it; see the

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
gdb-15.2-build/gdb-15.2/bfd/elf32-s390.c: scope_hint: In function ‘elf_s390_relocate_section’
gdb-15.2-build/gdb-15.2/bfd/elf32-s390.c:3119:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
gdb-15.2-build/gdb-15.2/bfd/elf32-s390.c:2040:10: note: in expansion of macro ‘elf_s390_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf32-s390.c:2040:10: note: in expansion of macro ‘elf_s390_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf32-s390.c:2040:10: note: in expansion of macro ‘elf_s390_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf32-s390.c: scope_hint: In function ‘elf_s390_relocate_section’
gdb-15.2-build/gdb-15.2/bfd/elf32-s390.c:2040:10: note: in expansion of macro ‘elf_s390_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf32-s390.c:2140:11: note: in expansion of macro ‘RELOC_FOR_GLOBAL_SYMBOL’
gdb-15.2-build/gdb-15.2/bfd/elf32-s390.c:2140:11: note: in expansion of macro ‘RELOC_FOR_GLOBAL_SYMBOL’
# 3117|   	      name = bfd_elf_string_from_elf_section (input_bfd,
# 3118|   						      symtab_hdr->sh_link,
# 3119|-> 						      sym->st_name);
# 3120|   	      if (name == NULL)
# 3121|   		return false;

Error: CPPCHECK_WARNING (CWE-457): [#def34]
gdb-15.2-build/gdb-15.2/bfd/elf64-ppc.c:7337: error[uninitvar]: Uninitialized variable: *pp
# 7335|   
# 7336|         is_ifunc = ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC;
# 7337|->       while ((p = *pp) != NULL)
# 7338|   	{
# 7339|   	  if (p->sec == sec && p->ifunc == is_ifunc)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def35]
gdb-15.2-build/gdb-15.2/bfd/elf64-s390.c: scope_hint: In function ‘elf_s390_relocate_section’
gdb-15.2-build/gdb-15.2/bfd/elf64-s390.c:3158:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
gdb-15.2-build/gdb-15.2/bfd/elf64-s390.c:2009:10: note: in expansion of macro ‘elf_s390_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf64-s390.c:2009:10: note: in expansion of macro ‘elf_s390_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf64-s390.c:2009:10: note: in expansion of macro ‘elf_s390_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf64-s390.c: scope_hint: In function ‘elf_s390_relocate_section’
gdb-15.2-build/gdb-15.2/bfd/elf64-s390.c:2009:10: note: in expansion of macro ‘elf_s390_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf-bfd.h:27: included_from: Included from here.
gdb-15.2-build/gdb-15.2/include/elf/common.h:1112:35: note: in definition of macro ‘ELF64_R_TYPE’
gdb-15.2-build/gdb-15.2/include/elf/common.h:1112:35: note: in definition of macro ‘ELF64_R_TYPE’
gdb-15.2-build/gdb-15.2/include/elf/common.h:1112:35: note: in definition of macro ‘ELF64_R_TYPE’
gdb-15.2-build/gdb-15.2/include/elf/common.h:1112:35: note: in definition of macro ‘ELF64_R_TYPE’
gdb-15.2-build/gdb-15.2/bfd/elf64-s390.c:2115:11: note: in expansion of macro ‘RELOC_FOR_GLOBAL_SYMBOL’
gdb-15.2-build/gdb-15.2/bfd/elf64-s390.c:2115:11: note: in expansion of macro ‘RELOC_FOR_GLOBAL_SYMBOL’
# 3156|   	      name = bfd_elf_string_from_elf_section (input_bfd,
# 3157|   						      symtab_hdr->sh_link,
# 3158|-> 						      sym->st_name);
# 3159|   	      if (name == NULL)
# 3160|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def36]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_check_tls_transition’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:1277:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:22: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2048:10: note: in expansion of macro ‘elf_x86_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2048:10: note: in expansion of macro ‘elf_x86_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2048:10: note: in expansion of macro ‘elf_x86_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_check_tls_transition’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2048:10: note: in expansion of macro ‘elf_x86_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:27: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/libbfd.h:749:14: note: in definition of macro ‘BFD_ASSERT’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2055:15: note: in expansion of macro ‘is_x86_elf’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_check_tls_transition’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2091:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2091:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2091:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
gdb-15.2-build/gdb-15.2/bfd/elf-bfd.h:27: included_from: Included from here.
gdb-15.2-build/gdb-15.2/include/elf/common.h:1048:43: note: in definition of macro ‘ELF_ST_TYPE’
gdb-15.2-build/gdb-15.2/bfd/elf-bfd.h:1906:39: note: in definition of macro ‘xvec_get_elf_backend_data’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:106:4: note: in expansion of macro ‘get_elf_backend_data’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2137: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 false;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_convert_load_reloc’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:1705:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2048:10: note: in expansion of macro ‘elf_x86_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2048:10: note: in expansion of macro ‘elf_x86_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2048:10: note: in expansion of macro ‘elf_x86_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_convert_load_reloc’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2048:10: note: in expansion of macro ‘elf_x86_hash_table’
gdb-15.2-build/gdb-15.2/bfd/libbfd.h:749:14: note: in definition of macro ‘BFD_ASSERT’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2055:15: note: in expansion of macro ‘is_x86_elf’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_convert_load_reloc’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2091:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2091:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2091:23: note: in expansion of macro ‘NUM_SHDR_ENTRIES’
gdb-15.2-build/gdb-15.2/include/elf/common.h:1048:43: note: in definition of macro ‘ELF_ST_TYPE’
gdb-15.2-build/gdb-15.2/bfd/elf-bfd.h:1906:39: note: in definition of macro ‘xvec_get_elf_backend_data’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:106:4: note: in expansion of macro ‘get_elf_backend_data’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:2137:12: note: in expansion of macro ‘ABI_64_P’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:1686:10: note: in expansion of macro ‘elf_x86_hash_table’
# 1703|     no_overflow = link_info->disable_target_specific_optimizations > 1;
# 1704|   
# 1705|->   r_symndx = htab->r_sym (irel->r_info);
# 1706|   
# 1707|     opcode = bfd_get_8 (abfd, contents + roff - 2);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_finish_dynamic_symbol’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4585:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 4583|   
# 4584|     /* Use the second PLT section only if there is .plt section.  */
# 4585|->   use_plt_second = htab->elf.splt != NULL && htab->plt_second != NULL;
# 4586|   
# 4587|     eh = (struct elf_x86_link_hash_entry *) h;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def39]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4696:44: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/build-x86_64-redhat-linux-gnu-minimal/bfd/bfd.h:7550:30: note: in definition of macro ‘BFD_SEND’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4693:13: note: in expansion of macro ‘bfd_put_64’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4594:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4621:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
gdb-15.2-build/gdb-15.2/build-x86_64-redhat-linux-gnu-minimal/bfd/bfd.h:221:3: note: in expansion of macro ‘BFD_SEND’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4693:13: note: in expansion of macro ‘bfd_put_64’
gdb-15.2-build/gdb-15.2/build-x86_64-redhat-linux-gnu-minimal/bfd/bfd.h:7550:30: note: in definition of macro ‘BFD_SEND’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4693:13: note: in expansion of macro ‘bfd_put_64’
# 4694|   				     + plt->output_offset
# 4695|   				     + h->plt.offset
# 4696|-> 				     + htab->lazy_plt->plt_lazy_offset),
# 4697|   			gotplt->contents + got_offset);
# 4698|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def40]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4711:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4594:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4621:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
# 4709|   	      /* If an STT_GNU_IFUNC symbol is locally defined, generate
# 4710|   		 R_X86_64_IRELATIVE instead of R_X86_64_JUMP_SLOT.  */
# 4711|-> 	      rela.r_info = htab->r_info (0, R_X86_64_IRELATIVE);
# 4712|   	      rela.r_addend = (h->root.u.def.value
# 4713|   			       + h->root.u.def.section->output_section->vma

Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4725:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4594:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4621:7: note: in expansion of macro ‘VERIFY_PLT_ENTRY’
# 4723|   	  else
# 4724|   	    {
# 4725|-> 	      rela.r_info = htab->r_info (h->dynindx, R_X86_64_JUMP_SLOT);
# 4726|   	      if (htab->params->mark_plt)
# 4727|   		rela.r_addend = (resolved_plt->output_section->vma

Error: GCC_ANALYZER_WARNING (CWE-476): [#def42]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4772:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4594:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
# 4770|   
# 4771|         /* Set the entry in the GOT procedure linkage table.  */
# 4772|->       plt = htab->plt_got;
# 4773|         got = htab->elf.sgot;
# 4774|         got_offset = h->got.offset;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def43]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4877:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4594:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4836:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
# 4875|   					  h->root.u.def.section->owner);
# 4876|   
# 4877|-> 		  rela.r_info = htab->r_info (0,
# 4878|   					      R_X86_64_IRELATIVE);
# 4879|   		  rela.r_addend = (h->root.u.def.value

Error: GCC_ANALYZER_WARNING (CWE-476): [#def44]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4903:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4594:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4836:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:26: included_from: Included from here.
gdb-15.2-build/gdb-15.2/include/bfdlink.h:328:37: note: in expansion of macro ‘bfd_link_dll’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4887:20: note: in expansion of macro ‘bfd_link_pic’
# 4901|   		 contains the real function addres if we need pointer
# 4902|   		 equality.  We load the GOT entry with the PLT entry.  */
# 4903|-> 	      if (htab->plt_second != NULL)
# 4904|   		{
# 4905|   		  plt = htab->plt_second;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def45]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4930:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4594:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4836:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
gdb-15.2-build/gdb-15.2/include/bfdlink.h:328:37: note: in expansion of macro ‘bfd_link_dll’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4920:16: note: in expansion of macro ‘bfd_link_pic’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4921:19: note: in expansion of macro ‘SYMBOL_REFERENCES_LOCAL_P’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4923:16: note: in expansion of macro ‘SYMBOL_DEFINED_NON_SHARED_P’
# 4928|   	  else
# 4929|   	    {
# 4930|-> 	      rela.r_info = htab->r_info (0, R_X86_64_RELATIVE);
# 4931|   	      rela.r_addend = (h->root.u.def.value
# 4932|   			       + h->root.u.def.section->output_section->vma

Error: GCC_ANALYZER_WARNING (CWE-476): [#def46]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4943:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4594:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.h:536:5: note: in definition of macro ‘GOT_TLS_GD_P’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4836:12: note: in expansion of macro ‘GOT_TLS_GD_ANY_P’
# 4941|   	  bfd_put_64 (output_bfd, (bfd_vma) 0,
# 4942|   		      htab->elf.sgot->contents + h->got.offset);
# 4943|-> 	  rela.r_info = htab->r_info (h->dynindx, R_X86_64_GLOB_DAT);
# 4944|   	  rela.r_addend = 0;
# 4945|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4969:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4594:21: note: in expansion of macro ‘UNDEFINED_WEAK_RESOLVED_TO_ZERO’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4964:7: note: in expansion of macro ‘VERIFY_COPY_RELOC’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:4964:7: note: in expansion of macro ‘VERIFY_COPY_RELOC’
# 4967|   		       + h->root.u.def.section->output_section->vma
# 4968|   		       + h->root.u.def.section->output_offset);
# 4969|->       rela.r_info = htab->r_info (h->dynindx, R_X86_64_COPY);
# 4970|         rela.r_addend = 0;
# 4971|         if (h->root.u.def.section == htab->elf.sdynrelro)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def48]
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c: scope_hint: In function ‘elf_x86_64_reloc_type_class’
gdb-15.2-build/gdb-15.2/bfd/elf64-x86-64.c:5033:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 5031|         /* Check relocation against STT_GNU_IFUNC symbol if there are
# 5032|   	 dynamic symbols.  */
# 5033|->       unsigned long r_symndx = htab->r_sym (rela->r_info);
# 5034|         if (r_symndx != STN_UNDEF)
# 5035|   	{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def49]
gdb-15.2-build/gdb-15.2/bfd/elfnn-aarch64.c: scope_hint: In function ‘elf32_aarch64_finish_dynamic_symbol’
gdb-15.2-build/gdb-15.2/bfd/elfnn-aarch64.c:9680:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
# 9678|   	  /* Mark the symbol as undefined, rather than as defined in
# 9679|   	     the .plt section.  */
# 9680|-> 	  sym->st_shndx = SHN_UNDEF;
# 9681|   	  /* If the symbol is weak we need to clear the value.
# 9682|   	     Otherwise, the PLT entry would provide a definition for

Error: GCC_ANALYZER_WARNING (CWE-476): [#def50]
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c: scope_hint: In function ‘riscv_elf_get_local_sym_hash’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:451:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2233:20: note: in expansion of macro ‘sec_addr’
gdb-15.2-build/gdb-15.2/bfd/elf-bfd.h:27: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:30: included_from: Included from here.
gdb-15.2-build/gdb-15.2/include/elf/common.h:1111:35: note: in definition of macro ‘ELF64_R_SYM’
gdb-15.2-build/gdb-15.2/include/elf/common.h:1048:43: note: in definition of macro ‘ELF_ST_TYPE’
#  449|     eh.elf.indx = sec->id;
#  450|     eh.elf.dynstr_index = ELFNN_R_SYM (rel->r_info);
#  451|->   slot = htab_find_slot_with_hash (htab->loc_hash_table, &eh, h,
#  452|   				   create ? INSERT : NO_INSERT);
#  453|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c: scope_hint: In function ‘riscv_elf_relocate_section’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2522:55: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2210:44: note: in expansion of macro ‘riscv_elf_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2210:44: note: in expansion of macro ‘riscv_elf_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c: scope_hint: In function ‘riscv_elf_relocate_section’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2210:44: note: in expansion of macro ‘riscv_elf_hash_table’
gdb-15.2-build/gdb-15.2/bfd/elf-bfd.h:2227:34: note: in expansion of macro ‘elf_tdata’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2211:36: note: in expansion of macro ‘elf_symtab_hdr’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2233:20: note: in expansion of macro ‘sec_addr’
gdb-15.2-build/gdb-15.2/include/elf/common.h:1111:35: note: in definition of macro ‘ELF64_R_SYM’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2271:11: note: in expansion of macro ‘RELOC_FOR_GLOBAL_SYMBOL’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2271:11: note: in expansion of macro ‘RELOC_FOR_GLOBAL_SYMBOL’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2271:11: note: in expansion of macro ‘RELOC_FOR_GLOBAL_SYMBOL’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2271:11: note: in expansion of macro ‘RELOC_FOR_GLOBAL_SYMBOL’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:2271:11: note: in expansion of macro ‘RELOC_FOR_GLOBAL_SYMBOL’
# 2520|   	{
# 2521|   	  name = (bfd_elf_string_from_elf_section
# 2522|-> 		  (input_bfd, symtab_hdr->sh_link, sym->st_name));
# 2523|   	  if (name == NULL || *name == '\0')
# 2524|   	    name = bfd_section_name (sec);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def52]
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c: scope_hint: In function ‘riscv_elf_finish_dynamic_symbol’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:3308:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:3240:24: note: in expansion of macro ‘sec_addr’
# 3306|   	  /* Mark the symbol as undefined, rather than as defined in
# 3307|   	     the .plt section.  Leave the value alone.  */
# 3308|-> 	  sym->st_shndx = SHN_UNDEF;
# 3309|   	  /* If the symbol is weak, we do need to clear the value.
# 3310|   	     Otherwise, the PLT entry would provide a definition for

Error: GCC_ANALYZER_WARNING (CWE-476): [#def53]
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:3467:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sym’
# 3465|     if (h == htab->elf.hdynamic
# 3466|         || (h == htab->elf.hgot || h == htab->elf.hplt))
# 3467|->     sym->st_shndx = SHN_ABS;
# 3468|   
# 3469|     return true;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def54]
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c: scope_hint: In function ‘riscv_elf_finish_dynamic_sections’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:3611:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 3609|   
# 3610|     /* Fill PLT and GOT entries for local STT_GNU_IFUNC symbols.  */
# 3611|->   htab_traverse (htab->loc_hash_table,
# 3612|   		 riscv_elf_finish_local_dynamic_symbol,
# 3613|   		 info);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def55]
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c: scope_hint: In function ‘_bfd_riscv_relax_lui’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:4731:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 4729|     bfd_byte *contents = elf_section_data (sec)->this_hdr.contents;
# 4730|     /* Can relax to x0 even when gp relaxation is disabled.  */
# 4731|->   bfd_vma gp = htab->params->relax_gp
# 4732|   	       ? riscv_global_pointer_value (link_info)
# 4733|   	       : 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def56]
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c: scope_hint: In function ‘_bfd_riscv_relax_pc’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:4945:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 4943|     struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (link_info);
# 4944|     /* Can relax to x0 even when gp relaxation is disabled.  */
# 4945|->   bfd_vma gp = htab->params->relax_gp
# 4946|   	       ? riscv_global_pointer_value (link_info)
# 4947|   	       : 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def57]
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c: scope_hint: In function ‘bfd_elf64_riscv_set_data_segment_info’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:5078:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 5076|   {
# 5077|     struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info);
# 5078|->   htab->data_segment_phase = data_segment_phase;
# 5079|   }
# 5080|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def58]
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c: scope_hint: In function ‘_bfd_riscv_relax_section’
gdb-15.2-build/gdb-15.2/bfd/elfnn-riscv.c:5113:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 5111|         /* The exp_seg_relro_adjust is enum phase_enum (0x4),
# 5112|   	 and defined in ld/ldexp.h.  */
# 5113|->       || *(htab->data_segment_phase) == 4)
# 5114|       return true;
# 5115|   

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

Error: GCC_ANALYZER_WARNING (CWE-476): [#def60]
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.c:1862:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1860|   
# 1861|   	  plt_entry_size = htab->plt.plt_entry_size;
# 1862|-> 	  num_pltn_fres = htab->sframe_plt->pltn_num_fres;
# 1863|   	  num_pltn_entries
# 1864|   	    = (dpltsec->size - plt0_entry_size) / plt_entry_size;

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

Error: GCC_ANALYZER_WARNING (CWE-476): [#def62]
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.c: scope_hint: In function ‘_bfd_x86_elf_write_sframe_plt’
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.c:1975:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1973|       {
# 1974|       case SFRAME_PLT:
# 1975|->       ectx = htab->plt_cfe_ctx;
# 1976|         sec = htab->plt_sframe;
# 1977|         break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def63]
gdb-15.2-build/gdb-15.2/bfd/elfxx-x86.c:1979:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1977|         break;
# 1978|       case SFRAME_PLT_SEC:
# 1979|->       ectx = htab->plt_second_cfe_ctx;
# 1980|         sec = htab->plt_second_sframe;
# 1981|         break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def64]
gdb-15.2-build/gdb-15.2/bfd/ihex.c:135:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:135:24: note: in expansion of macro ‘NIBBLE’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:333:23: note: in expansion of macro ‘HEX2’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:513:13: note: in expansion of macro ‘ISHEX’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:297:21: note: in expansion of macro ‘ISHEX’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:135:24: note: in expansion of macro ‘NIBBLE’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:333:23: note: in expansion of macro ‘HEX2’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:135:24: note: in expansion of macro ‘NIBBLE’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:333:23: note: in expansion of macro ‘HEX2’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:135:24: note: in expansion of macro ‘NIBBLE’
gdb-15.2-build/gdb-15.2/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): [#def65]
gdb-15.2-build/gdb-15.2/bfd/ihex.c:125: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/ihex.c: scope_hint: In function ‘ihex_scan’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:323:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:323:21: note: in expansion of macro ‘ISHEX’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:513:13: note: in expansion of macro ‘ISHEX’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:297:21: note: in expansion of macro ‘ISHEX’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:323:21: note: in expansion of macro ‘ISHEX’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:323:21: note: in expansion of macro ‘ISHEX’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/ihex.c:137:23: note: in expansion of macro ‘hex_p’
gdb-15.2-build/gdb-15.2/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): [#def66]
gdb-15.2-build/gdb-15.2/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): [#def67]
gdb-15.2-build/gdb-15.2/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): [#def68]
gdb-15.2-build/gdb-15.2/bfd/srec.c:107: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/srec.c: scope_hint: In function ‘srec_scan’
gdb-15.2-build/gdb-15.2/bfd/srec.c:116:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
gdb-15.2-build/gdb-15.2/bfd/srec.c:521:30: note: in expansion of macro ‘HEX’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/srec.c:121:21: note: in expansion of macro ‘hex_p’
gdb-15.2-build/gdb-15.2/bfd/srec.c:469:19: note: in expansion of macro ‘ISHEX’
gdb-15.2-build/gdb-15.2/bfd/srec.c:115:22: note: in expansion of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
gdb-15.2-build/gdb-15.2/bfd/srec.c:479:33: note: in expansion of macro ‘HEX’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
gdb-15.2-build/gdb-15.2/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): [#def69]
gdb-15.2-build/gdb-15.2/bfd/srec.c:116:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘data’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
gdb-15.2-build/gdb-15.2/bfd/srec.c:527:30: note: in expansion of macro ‘HEX’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/srec.c:121:21: note: in expansion of macro ‘hex_p’
gdb-15.2-build/gdb-15.2/bfd/srec.c:469:19: note: in expansion of macro ‘ISHEX’
gdb-15.2-build/gdb-15.2/bfd/srec.c:115:22: note: in expansion of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
gdb-15.2-build/gdb-15.2/bfd/srec.c:479:33: note: in expansion of macro ‘HEX’
gdb-15.2-build/gdb-15.2/include/libiberty.h:396:69: note: in definition of macro ‘hex_value’
gdb-15.2-build/gdb-15.2/bfd/srec.c:116:23: note: in expansion of macro ‘NIBBLE’
gdb-15.2-build/gdb-15.2/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): [#def70]
gdb-15.2-build/gdb-15.2/bfd/stabs.c: scope_hint: In function ‘_bfd_link_section_stabs’
gdb-15.2-build/gdb-15.2/bfd/stabs.c:401:20: warning[-Wanalyzer-null-argument]: use of NULL ‘symb’ where non-null expected
gdb-15.2-build/gdb-15.2/bfd/stabs.c:28: included_from: Included from here.
gdb-15.2-build/gdb-15.2/bfd/stabs.c:389:11: note: in expansion of macro ‘BFD_ASSERT’
gdb-15.2-build/gdb-15.2/bfd/sysdep.h:38: included_from: Included from here.
gdb-15.2-build/gdb-15.2/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: COMPILER_WARNING (CWE-457): [#def71]
gdb-15.2-build/gdb-15.2/gdb/ui-out.h:415:18: warning[-Wmaybe-uninitialized]: ‘*(ui_out_emit_type<ui_out_type_list>*)((char*)&sources_list + offsetof(std::optional<ui_out_emit_type<ui_out_type_list> >,std::optional<ui_out_emit_type<ui_out_type_list> >::<unnamed>.std::_Optional_base<ui_out_emit_type<ui_out_type_list>, false, false>::<unnamed>)).ui_out_emit_type<ui_out_type_list>::m_uiout’ may be used uninitialized
#  415 |     m_uiout->end (Type);
#      |     ~~~~~~~~~~~~~^~~~~~
gdb-15.2-build/gdb-15.2/gdb/symtab.c: scope_hint: In function ‘void info_sources_worker(ui_out*, bool, const info_sources_filter&)’
gdb-15.2-build/gdb-15.2/gdb/symtab.c:4662:35: note: ‘*(ui_out_emit_type<ui_out_type_list>*)((char*)&sources_list + offsetof(std::optional<ui_out_emit_type<ui_out_type_list> >,std::optional<ui_out_emit_type<ui_out_type_list> >::<unnamed>.std::_Optional_base<ui_out_emit_type<ui_out_type_list>, false, false>::<unnamed>)).ui_out_emit_type<ui_out_type_list>::m_uiout’ was declared here
# 4662 |   std::optional<ui_out_emit_list> sources_list;
#      |                                   ^~~~~~~~~~~~
#  413|     ~ui_out_emit_type ()
#  414|     {
#  415|->     m_uiout->end (Type);
#  416|     }
#  417|   

Error: COMPILER_WARNING (CWE-457): [#def72]
gdb-15.2-build/gdb-15.2/gdb/ui-out.h:415:18: warning[-Wmaybe-uninitialized]: ‘*(ui_out_emit_type<ui_out_type_tuple>*)((char*)&output_tuple + offsetof(std::optional<ui_out_emit_type<ui_out_type_tuple> >,std::optional<ui_out_emit_type<ui_out_type_tuple> >::<unnamed>.std::_Optional_base<ui_out_emit_type<ui_out_type_tuple>, false, false>::<unnamed>)).ui_out_emit_type<ui_out_type_tuple>::m_uiout’ may be used uninitialized
#  415 |     m_uiout->end (Type);
#      |     ~~~~~~~~~~~~~^~~~~~
gdb-15.2-build/gdb-15.2/gdb/symtab.c: scope_hint: In function ‘void info_sources_worker(ui_out*, bool, const info_sources_filter&)’
gdb-15.2-build/gdb-15.2/gdb/symtab.c:4661:36: note: ‘*(ui_out_emit_type<ui_out_type_tuple>*)((char*)&output_tuple + offsetof(std::optional<ui_out_emit_type<ui_out_type_tuple> >,std::optional<ui_out_emit_type<ui_out_type_tuple> >::<unnamed>.std::_Optional_base<ui_out_emit_type<ui_out_type_tuple>, false, false>::<unnamed>)).ui_out_emit_type<ui_out_type_tuple>::m_uiout’ was declared here
# 4661 |   std::optional<ui_out_emit_tuple> output_tuple;
#      |                                    ^~~~~~~~~~~~
#  413|     ~ui_out_emit_type ()
#  414|     {
#  415|->     m_uiout->end (Type);
#  416|     }
#  417|   

Error: COMPILER_WARNING (CWE-457): [#def73]
gdb-15.2-build/gdb-15.2/gdb/ui-out.h:415:18: warning[-Wmaybe-uninitialized]: ‘*(ui_out_emit_type<ui_out_type_tuple>*)((char*)&tuple_emitter + offsetof(std::optional<ui_out_emit_type<ui_out_type_tuple> >,std::optional<ui_out_emit_type<ui_out_type_tuple> >::<unnamed>.std::_Optional_base<ui_out_emit_type<ui_out_type_tuple>, false, false>::<unnamed>)).ui_out_emit_type<ui_out_type_tuple>::m_uiout’ may be used uninitialized
#  415 |     m_uiout->end (Type);
#      |     ~~~~~~~~~~~~~^~~~~~
gdb-15.2-build/gdb-15.2/gdb/disasm.c: scope_hint: In function ‘void do_mixed_source_and_assembly(gdbarch*, ui_out*, symtab*, CORE_ADDR, CORE_ADDR, int, gdb_disassembly_flags)’
gdb-15.2-build/gdb-15.2/gdb/disasm.c:818:36: note: ‘*(ui_out_emit_type<ui_out_type_tuple>*)((char*)&tuple_emitter + offsetof(std::optional<ui_out_emit_type<ui_out_type_tuple> >,std::optional<ui_out_emit_type<ui_out_type_tuple> >::<unnamed>.std::_Optional_base<ui_out_emit_type<ui_out_type_tuple>, false, false>::<unnamed>)).ui_out_emit_type<ui_out_type_tuple>::m_uiout’ was declared here
#  818 |   std::optional<ui_out_emit_tuple> tuple_emitter;
#      |                                    ^~~~~~~~~~~~~
#  413|     ~ui_out_emit_type ()
#  414|     {
#  415|->     m_uiout->end (Type);
#  416|     }
#  417|   

Error: CPPCHECK_WARNING (CWE-570): [#def74]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1688: error[subtractPointers]: Subtracting pointers that point to different objects
# 1686|   amd64_emit_prologue (void)
# 1687|   {
# 1688|->   EMIT_ASM (amd64_prologue,
# 1689|   	    "pushq %rbp\n\t"
# 1690|   	    "movq %rsp,%rbp\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def75]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1700: error[subtractPointers]: Subtracting pointers that point to different objects
# 1698|   amd64_emit_epilogue (void)
# 1699|   {
# 1700|->   EMIT_ASM (amd64_epilogue,
# 1701|   	    "movq -16(%rbp),%rdi\n\t"
# 1702|   	    "movq %rax,(%rdi)\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def76]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1711: error[subtractPointers]: Subtracting pointers that point to different objects
# 1709|   amd64_emit_add (void)
# 1710|   {
# 1711|->   EMIT_ASM (amd64_add,
# 1712|   	    "add (%rsp),%rax\n\t"
# 1713|   	    "lea 0x8(%rsp),%rsp");

Error: CPPCHECK_WARNING (CWE-570): [#def77]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1719: error[subtractPointers]: Subtracting pointers that point to different objects
# 1717|   amd64_emit_sub (void)
# 1718|   {
# 1719|->   EMIT_ASM (amd64_sub,
# 1720|   	    "sub %rax,(%rsp)\n\t"
# 1721|   	    "pop %rax");

Error: CPPCHECK_WARNING (CWE-570): [#def78]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1754: error[subtractPointers]: Subtracting pointers that point to different objects
# 1752|       {
# 1753|       case 8:
# 1754|->       EMIT_ASM (amd64_ext_8,
# 1755|   		"cbtw\n\t"
# 1756|   		"cwtl\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def79]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1760: error[subtractPointers]: Subtracting pointers that point to different objects
# 1758|         break;
# 1759|       case 16:
# 1760|->       EMIT_ASM (amd64_ext_16,
# 1761|   		"cwtl\n\t"
# 1762|   		"cltq");

Error: CPPCHECK_WARNING (CWE-570): [#def80]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1765: error[subtractPointers]: Subtracting pointers that point to different objects
# 1763|         break;
# 1764|       case 32:
# 1765|->       EMIT_ASM (amd64_ext_32,
# 1766|   		"cltq");
# 1767|         break;

Error: CPPCHECK_WARNING (CWE-570): [#def81]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1776: error[subtractPointers]: Subtracting pointers that point to different objects
# 1774|   amd64_emit_log_not (void)
# 1775|   {
# 1776|->   EMIT_ASM (amd64_log_not,
# 1777|   	    "test %rax,%rax\n\t"
# 1778|   	    "sete %cl\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def82]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1785: error[subtractPointers]: Subtracting pointers that point to different objects
# 1783|   amd64_emit_bit_and (void)
# 1784|   {
# 1785|->   EMIT_ASM (amd64_and,
# 1786|   	    "and (%rsp),%rax\n\t"
# 1787|   	    "lea 0x8(%rsp),%rsp");

Error: CPPCHECK_WARNING (CWE-570): [#def83]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1793: error[subtractPointers]: Subtracting pointers that point to different objects
# 1791|   amd64_emit_bit_or (void)
# 1792|   {
# 1793|->   EMIT_ASM (amd64_or,
# 1794|   	    "or (%rsp),%rax\n\t"
# 1795|   	    "lea 0x8(%rsp),%rsp");

Error: CPPCHECK_WARNING (CWE-570): [#def84]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1801: error[subtractPointers]: Subtracting pointers that point to different objects
# 1799|   amd64_emit_bit_xor (void)
# 1800|   {
# 1801|->   EMIT_ASM (amd64_xor,
# 1802|   	    "xor (%rsp),%rax\n\t"
# 1803|   	    "lea 0x8(%rsp),%rsp");

Error: CPPCHECK_WARNING (CWE-570): [#def85]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1809: error[subtractPointers]: Subtracting pointers that point to different objects
# 1807|   amd64_emit_bit_not (void)
# 1808|   {
# 1809|->   EMIT_ASM (amd64_bit_not,
# 1810|   	    "xorq $0xffffffffffffffff,%rax");
# 1811|   }

Error: CPPCHECK_WARNING (CWE-570): [#def86]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1816: error[subtractPointers]: Subtracting pointers that point to different objects
# 1814|   amd64_emit_equal (void)
# 1815|   {
# 1816|->   EMIT_ASM (amd64_equal,
# 1817|   	    "cmp %rax,(%rsp)\n\t"
# 1818|   	    "je .Lamd64_equal_true\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def87]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1830: error[subtractPointers]: Subtracting pointers that point to different objects
# 1828|   amd64_emit_less_signed (void)
# 1829|   {
# 1830|->   EMIT_ASM (amd64_less_signed,
# 1831|   	    "cmp %rax,(%rsp)\n\t"
# 1832|   	    "jl .Lamd64_less_signed_true\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def88]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1844: error[subtractPointers]: Subtracting pointers that point to different objects
# 1842|   amd64_emit_less_unsigned (void)
# 1843|   {
# 1844|->   EMIT_ASM (amd64_less_unsigned,
# 1845|   	    "cmp %rax,(%rsp)\n\t"
# 1846|   	    "jb .Lamd64_less_unsigned_true\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def89]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1861: error[subtractPointers]: Subtracting pointers that point to different objects
# 1859|       {
# 1860|       case 1:
# 1861|->       EMIT_ASM (amd64_ref1,
# 1862|   		"movb (%rax),%al");
# 1863|         break;

Error: CPPCHECK_WARNING (CWE-570): [#def90]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1865: error[subtractPointers]: Subtracting pointers that point to different objects
# 1863|         break;
# 1864|       case 2:
# 1865|->       EMIT_ASM (amd64_ref2,
# 1866|   		"movw (%rax),%ax");
# 1867|         break;

Error: CPPCHECK_WARNING (CWE-570): [#def91]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1869: error[subtractPointers]: Subtracting pointers that point to different objects
# 1867|         break;
# 1868|       case 4:
# 1869|->       EMIT_ASM (amd64_ref4,
# 1870|   		"movl (%rax),%eax");
# 1871|         break;

Error: CPPCHECK_WARNING (CWE-570): [#def92]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1873: error[subtractPointers]: Subtracting pointers that point to different objects
# 1871|         break;
# 1872|       case 8:
# 1873|->       EMIT_ASM (amd64_ref8,
# 1874|   		"movq (%rax),%rax");
# 1875|         break;

Error: CPPCHECK_WARNING (CWE-570): [#def93]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1882: error[subtractPointers]: Subtracting pointers that point to different objects
# 1880|   amd64_emit_if_goto (int *offset_p, int *size_p)
# 1881|   {
# 1882|->   EMIT_ASM (amd64_if_goto,
# 1883|   	    "mov %rax,%rcx\n\t"
# 1884|   	    "pop %rax\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def94]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1896: error[subtractPointers]: Subtracting pointers that point to different objects
# 1894|   amd64_emit_goto (int *offset_p, int *size_p)
# 1895|   {
# 1896|->   EMIT_ASM (amd64_goto,
# 1897|   	    ".byte 0xe9, 0x0, 0x0, 0x0, 0x0");
# 1898|     if (offset_p)

Error: CPPCHECK_WARNING (CWE-570): [#def95]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:1998: error[subtractPointers]: Subtracting pointers that point to different objects
# 1996|   amd64_emit_pop (void)
# 1997|   {
# 1998|->   EMIT_ASM (amd64_pop,
# 1999|   	    "pop %rax");
# 2000|   }

Error: CPPCHECK_WARNING (CWE-570): [#def96]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2005: error[subtractPointers]: Subtracting pointers that point to different objects
# 2003|   amd64_emit_stack_flush (void)
# 2004|   {
# 2005|->   EMIT_ASM (amd64_stack_flush,
# 2006|   	    "push %rax");
# 2007|   }

Error: CPPCHECK_WARNING (CWE-570): [#def97]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2015: error[subtractPointers]: Subtracting pointers that point to different objects
# 2013|       {
# 2014|       case 8:
# 2015|->       EMIT_ASM (amd64_zero_ext_8,
# 2016|   		"and $0xff,%rax");
# 2017|         break;

Error: CPPCHECK_WARNING (CWE-570): [#def98]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2019: error[subtractPointers]: Subtracting pointers that point to different objects
# 2017|         break;
# 2018|       case 16:
# 2019|->       EMIT_ASM (amd64_zero_ext_16,
# 2020|   		"and $0xffff,%rax");
# 2021|         break;

Error: CPPCHECK_WARNING (CWE-570): [#def99]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2023: error[subtractPointers]: Subtracting pointers that point to different objects
# 2021|         break;
# 2022|       case 32:
# 2023|->       EMIT_ASM (amd64_zero_ext_32,
# 2024|   		"mov $0xffffffff,%rcx\n\t"
# 2025|   		"and %rcx,%rax");

Error: CPPCHECK_WARNING (CWE-570): [#def100]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2035: error[subtractPointers]: Subtracting pointers that point to different objects
# 2033|   amd64_emit_swap (void)
# 2034|   {
# 2035|->   EMIT_ASM (amd64_swap,
# 2036|   	    "mov %rax,%rcx\n\t"
# 2037|   	    "pop %rax\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def101]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2094: error[subtractPointers]: Subtracting pointers that point to different objects
# 2092|     append_insns (&buildaddr, i, buf);
# 2093|     current_insn_ptr = buildaddr;
# 2094|->   EMIT_ASM (amd64_void_call_2_a,
# 2095|   	    /* Save away a copy of the stack top.  */
# 2096|   	    "push %rax\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def102]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2100: error[subtractPointers]: Subtracting pointers that point to different objects
# 2098|   	    "mov %rax,%rsi");
# 2099|     amd64_emit_call (fn);
# 2100|->   EMIT_ASM (amd64_void_call_2_b,
# 2101|   	    /* Restore the stack top, %rax may have been trashed.  */
# 2102|   	    "pop %rax");

Error: CPPCHECK_WARNING (CWE-570): [#def103]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2108: error[subtractPointers]: Subtracting pointers that point to different objects
# 2106|   amd64_emit_eq_goto (int *offset_p, int *size_p)
# 2107|   {
# 2108|->   EMIT_ASM (amd64_eq,
# 2109|   	    "cmp %rax,(%rsp)\n\t"
# 2110|   	    "jne .Lamd64_eq_fallthru\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def104]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2128: error[subtractPointers]: Subtracting pointers that point to different objects
# 2126|   amd64_emit_ne_goto (int *offset_p, int *size_p)
# 2127|   {
# 2128|->   EMIT_ASM (amd64_ne,
# 2129|   	    "cmp %rax,(%rsp)\n\t"
# 2130|   	    "je .Lamd64_ne_fallthru\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def105]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2148: error[subtractPointers]: Subtracting pointers that point to different objects
# 2146|   amd64_emit_lt_goto (int *offset_p, int *size_p)
# 2147|   {
# 2148|->   EMIT_ASM (amd64_lt,
# 2149|   	    "cmp %rax,(%rsp)\n\t"
# 2150|   	    "jnl .Lamd64_lt_fallthru\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def106]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2168: error[subtractPointers]: Subtracting pointers that point to different objects
# 2166|   amd64_emit_le_goto (int *offset_p, int *size_p)
# 2167|   {
# 2168|->   EMIT_ASM (amd64_le,
# 2169|   	    "cmp %rax,(%rsp)\n\t"
# 2170|   	    "jnle .Lamd64_le_fallthru\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def107]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2188: error[subtractPointers]: Subtracting pointers that point to different objects
# 2186|   amd64_emit_gt_goto (int *offset_p, int *size_p)
# 2187|   {
# 2188|->   EMIT_ASM (amd64_gt,
# 2189|   	    "cmp %rax,(%rsp)\n\t"
# 2190|   	    "jng .Lamd64_gt_fallthru\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def108]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2208: error[subtractPointers]: Subtracting pointers that point to different objects
# 2206|   amd64_emit_ge_goto (int *offset_p, int *size_p)
# 2207|   {
# 2208|->   EMIT_ASM (amd64_ge,
# 2209|   	    "cmp %rax,(%rsp)\n\t"
# 2210|   	    "jnge .Lamd64_ge_fallthru\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def109]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2272: error[subtractPointers]: Subtracting pointers that point to different objects
# 2270|   i386_emit_prologue (void)
# 2271|   {
# 2272|->   EMIT_ASM32 (i386_prologue,
# 2273|   	    "push %ebp\n\t"
# 2274|   	    "mov %esp,%ebp\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def110]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2283: error[subtractPointers]: Subtracting pointers that point to different objects
# 2281|   i386_emit_epilogue (void)
# 2282|   {
# 2283|->   EMIT_ASM32 (i386_epilogue,
# 2284|   	    "mov 12(%ebp),%ecx\n\t"
# 2285|   	    "mov %eax,(%ecx)\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def111]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2296: error[subtractPointers]: Subtracting pointers that point to different objects
# 2294|   i386_emit_add (void)
# 2295|   {
# 2296|->   EMIT_ASM32 (i386_add,
# 2297|   	    "add (%esp),%eax\n\t"
# 2298|   	    "adc 0x4(%esp),%ebx\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def112]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2305: error[subtractPointers]: Subtracting pointers that point to different objects
# 2303|   i386_emit_sub (void)
# 2304|   {
# 2305|->   EMIT_ASM32 (i386_sub,
# 2306|   	    "subl %eax,(%esp)\n\t"
# 2307|   	    "sbbl %ebx,4(%esp)\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def113]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2342: error[subtractPointers]: Subtracting pointers that point to different objects
# 2340|       {
# 2341|       case 8:
# 2342|->       EMIT_ASM32 (i386_ext_8,
# 2343|   		"cbtw\n\t"
# 2344|   		"cwtl\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def114]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2349: error[subtractPointers]: Subtracting pointers that point to different objects
# 2347|         break;
# 2348|       case 16:
# 2349|->       EMIT_ASM32 (i386_ext_16,
# 2350|   		"cwtl\n\t"
# 2351|   		"movl %eax,%ebx\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def115]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2355: error[subtractPointers]: Subtracting pointers that point to different objects
# 2353|         break;
# 2354|       case 32:
# 2355|->       EMIT_ASM32 (i386_ext_32,
# 2356|   		"movl %eax,%ebx\n\t"
# 2357|   		"sarl $31,%ebx");

Error: CPPCHECK_WARNING (CWE-570): [#def116]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2367: error[subtractPointers]: Subtracting pointers that point to different objects
# 2365|   i386_emit_log_not (void)
# 2366|   {
# 2367|->   EMIT_ASM32 (i386_log_not,
# 2368|   	    "or %ebx,%eax\n\t"
# 2369|   	    "test %eax,%eax\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def117]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2378: error[subtractPointers]: Subtracting pointers that point to different objects
# 2376|   i386_emit_bit_and (void)
# 2377|   {
# 2378|->   EMIT_ASM32 (i386_and,
# 2379|   	    "and (%esp),%eax\n\t"
# 2380|   	    "and 0x4(%esp),%ebx\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def118]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2387: error[subtractPointers]: Subtracting pointers that point to different objects
# 2385|   i386_emit_bit_or (void)
# 2386|   {
# 2387|->   EMIT_ASM32 (i386_or,
# 2388|   	    "or (%esp),%eax\n\t"
# 2389|   	    "or 0x4(%esp),%ebx\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def119]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2396: error[subtractPointers]: Subtracting pointers that point to different objects
# 2394|   i386_emit_bit_xor (void)
# 2395|   {
# 2396|->   EMIT_ASM32 (i386_xor,
# 2397|   	    "xor (%esp),%eax\n\t"
# 2398|   	    "xor 0x4(%esp),%ebx\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def120]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2405: error[subtractPointers]: Subtracting pointers that point to different objects
# 2403|   i386_emit_bit_not (void)
# 2404|   {
# 2405|->   EMIT_ASM32 (i386_bit_not,
# 2406|   	    "xor $0xffffffff,%eax\n\t"
# 2407|   	    "xor $0xffffffff,%ebx\n\t");

Error: CPPCHECK_WARNING (CWE-570): [#def121]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2413: error[subtractPointers]: Subtracting pointers that point to different objects
# 2411|   i386_emit_equal (void)
# 2412|   {
# 2413|->   EMIT_ASM32 (i386_equal,
# 2414|   	    "cmpl %ebx,4(%esp)\n\t"
# 2415|   	    "jne .Li386_equal_false\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def122]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2431: error[subtractPointers]: Subtracting pointers that point to different objects
# 2429|   i386_emit_less_signed (void)
# 2430|   {
# 2431|->   EMIT_ASM32 (i386_less_signed,
# 2432|   	    "cmpl %ebx,4(%esp)\n\t"
# 2433|   	    "jl .Li386_less_signed_true\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def123]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2450: error[subtractPointers]: Subtracting pointers that point to different objects
# 2448|   i386_emit_less_unsigned (void)
# 2449|   {
# 2450|->   EMIT_ASM32 (i386_less_unsigned,
# 2451|   	    "cmpl %ebx,4(%esp)\n\t"
# 2452|   	    "jb .Li386_less_unsigned_true\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def124]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2472: error[subtractPointers]: Subtracting pointers that point to different objects
# 2470|       {
# 2471|       case 1:
# 2472|->       EMIT_ASM32 (i386_ref1,
# 2473|   		"movb (%eax),%al");
# 2474|         break;

Error: CPPCHECK_WARNING (CWE-570): [#def125]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2476: error[subtractPointers]: Subtracting pointers that point to different objects
# 2474|         break;
# 2475|       case 2:
# 2476|->       EMIT_ASM32 (i386_ref2,
# 2477|   		"movw (%eax),%ax");
# 2478|         break;

Error: CPPCHECK_WARNING (CWE-570): [#def126]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2480: error[subtractPointers]: Subtracting pointers that point to different objects
# 2478|         break;
# 2479|       case 4:
# 2480|->       EMIT_ASM32 (i386_ref4,
# 2481|   		"movl (%eax),%eax");
# 2482|         break;

Error: CPPCHECK_WARNING (CWE-570): [#def127]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2484: error[subtractPointers]: Subtracting pointers that point to different objects
# 2482|         break;
# 2483|       case 8:
# 2484|->       EMIT_ASM32 (i386_ref8,
# 2485|   		"movl 4(%eax),%ebx\n\t"
# 2486|   		"movl (%eax),%eax");

Error: CPPCHECK_WARNING (CWE-570): [#def128]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2494: error[subtractPointers]: Subtracting pointers that point to different objects
# 2492|   i386_emit_if_goto (int *offset_p, int *size_p)
# 2493|   {
# 2494|->   EMIT_ASM32 (i386_if_goto,
# 2495|   	    "mov %eax,%ecx\n\t"
# 2496|   	    "or %ebx,%ecx\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def129]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2512: error[subtractPointers]: Subtracting pointers that point to different objects
# 2510|   i386_emit_goto (int *offset_p, int *size_p)
# 2511|   {
# 2512|->   EMIT_ASM32 (i386_goto,
# 2513|   	    /* Don't trust the assembler to choose the right jump */
# 2514|   	    ".byte 0xe9, 0x0, 0x0, 0x0, 0x0");

Error: CPPCHECK_WARNING (CWE-570): [#def130]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2588: error[subtractPointers]: Subtracting pointers that point to different objects
# 2586|     CORE_ADDR buildaddr;
# 2587|   
# 2588|->   EMIT_ASM32 (i386_reg_a,
# 2589|   	    "sub $0x8,%esp");
# 2590|     buildaddr = current_insn_ptr;

Error: CPPCHECK_WARNING (CWE-570): [#def131]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2597: error[subtractPointers]: Subtracting pointers that point to different objects
# 2595|     append_insns (&buildaddr, i, buf);
# 2596|     current_insn_ptr = buildaddr;
# 2597|->   EMIT_ASM32 (i386_reg_b,
# 2598|   	    "mov %eax,4(%esp)\n\t"
# 2599|   	    "mov 8(%ebp),%eax\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def132]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2602: error[subtractPointers]: Subtracting pointers that point to different objects
# 2600|   	    "mov %eax,(%esp)");
# 2601|     i386_emit_call (get_raw_reg_func_addr ());
# 2602|->   EMIT_ASM32 (i386_reg_c,
# 2603|   	    "xor %ebx,%ebx\n\t"
# 2604|   	    "lea 0x8(%esp),%esp");

Error: CPPCHECK_WARNING (CWE-570): [#def133]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2610: error[subtractPointers]: Subtracting pointers that point to different objects
# 2608|   i386_emit_pop (void)
# 2609|   {
# 2610|->   EMIT_ASM32 (i386_pop,
# 2611|   	    "pop %eax\n\t"
# 2612|   	    "pop %ebx");

Error: CPPCHECK_WARNING (CWE-570): [#def134]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2618: error[subtractPointers]: Subtracting pointers that point to different objects
# 2616|   i386_emit_stack_flush (void)
# 2617|   {
# 2618|->   EMIT_ASM32 (i386_stack_flush,
# 2619|   	    "push %ebx\n\t"
# 2620|   	    "push %eax");

Error: CPPCHECK_WARNING (CWE-570): [#def135]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2629: error[subtractPointers]: Subtracting pointers that point to different objects
# 2627|       {
# 2628|       case 8:
# 2629|->       EMIT_ASM32 (i386_zero_ext_8,
# 2630|   		"and $0xff,%eax\n\t"
# 2631|   		"xor %ebx,%ebx");

Error: CPPCHECK_WARNING (CWE-570): [#def136]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2634: error[subtractPointers]: Subtracting pointers that point to different objects
# 2632|         break;
# 2633|       case 16:
# 2634|->       EMIT_ASM32 (i386_zero_ext_16,
# 2635|   		"and $0xffff,%eax\n\t"
# 2636|   		"xor %ebx,%ebx");

Error: CPPCHECK_WARNING (CWE-570): [#def137]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2639: error[subtractPointers]: Subtracting pointers that point to different objects
# 2637|         break;
# 2638|       case 32:
# 2639|->       EMIT_ASM32 (i386_zero_ext_32,
# 2640|   		"xor %ebx,%ebx");
# 2641|         break;

Error: CPPCHECK_WARNING (CWE-570): [#def138]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2650: error[subtractPointers]: Subtracting pointers that point to different objects
# 2648|   i386_emit_swap (void)
# 2649|   {
# 2650|->   EMIT_ASM32 (i386_swap,
# 2651|   	    "mov %eax,%ecx\n\t"
# 2652|   	    "mov %ebx,%edx\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def139]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2684: error[subtractPointers]: Subtracting pointers that point to different objects
# 2682|     CORE_ADDR buildaddr;
# 2683|   
# 2684|->   EMIT_ASM32 (i386_int_call_1_a,
# 2685|   	    /* Reserve a bit of stack space.  */
# 2686|   	    "sub $0x8,%esp");

Error: CPPCHECK_WARNING (CWE-570): [#def140]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2698: error[subtractPointers]: Subtracting pointers that point to different objects
# 2696|     current_insn_ptr = buildaddr;
# 2697|     i386_emit_call (fn);
# 2698|->   EMIT_ASM32 (i386_int_call_1_c,
# 2699|   	    "mov %edx,%ebx\n\t"
# 2700|   	    "lea 0x8(%esp),%esp");

Error: CPPCHECK_WARNING (CWE-570): [#def141]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2712: error[subtractPointers]: Subtracting pointers that point to different objects
# 2710|     CORE_ADDR buildaddr;
# 2711|   
# 2712|->   EMIT_ASM32 (i386_void_call_2_a,
# 2713|   	    /* Preserve %eax only; we don't have to worry about %ebx.  */
# 2714|   	    "push %eax\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def142]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2733: error[subtractPointers]: Subtracting pointers that point to different objects
# 2731|     current_insn_ptr = buildaddr;
# 2732|     i386_emit_call (fn);
# 2733|->   EMIT_ASM32 (i386_void_call_2_b,
# 2734|   	    "lea 0x10(%esp),%esp\n\t"
# 2735|   	    /* Restore original stack top.  */

Error: CPPCHECK_WARNING (CWE-570): [#def143]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2743: error[subtractPointers]: Subtracting pointers that point to different objects
# 2741|   i386_emit_eq_goto (int *offset_p, int *size_p)
# 2742|   {
# 2743|->   EMIT_ASM32 (eq,
# 2744|   	      /* Check low half first, more likely to be decider  */
# 2745|   	      "cmpl %eax,(%esp)\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def144]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2768: error[subtractPointers]: Subtracting pointers that point to different objects
# 2766|   i386_emit_ne_goto (int *offset_p, int *size_p)
# 2767|   {
# 2768|->   EMIT_ASM32 (ne,
# 2769|   	      /* Check low half first, more likely to be decider  */
# 2770|   	      "cmpl %eax,(%esp)\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def145]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2794: error[subtractPointers]: Subtracting pointers that point to different objects
# 2792|   i386_emit_lt_goto (int *offset_p, int *size_p)
# 2793|   {
# 2794|->   EMIT_ASM32 (lt,
# 2795|   	      "cmpl %ebx,4(%esp)\n\t"
# 2796|   	      "jl .Llt_jump\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def146]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2820: error[subtractPointers]: Subtracting pointers that point to different objects
# 2818|   i386_emit_le_goto (int *offset_p, int *size_p)
# 2819|   {
# 2820|->   EMIT_ASM32 (le,
# 2821|   	      "cmpl %ebx,4(%esp)\n\t"
# 2822|   	      "jle .Lle_jump\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def147]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2846: error[subtractPointers]: Subtracting pointers that point to different objects
# 2844|   i386_emit_gt_goto (int *offset_p, int *size_p)
# 2845|   {
# 2846|->   EMIT_ASM32 (gt,
# 2847|   	      "cmpl %ebx,4(%esp)\n\t"
# 2848|   	      "jg .Lgt_jump\n\t"

Error: CPPCHECK_WARNING (CWE-570): [#def148]
gdb-15.2-build/gdb-15.2/gdbserver/linux-x86-low.cc:2872: error[subtractPointers]: Subtracting pointers that point to different objects
# 2870|   i386_emit_ge_goto (int *offset_p, int *size_p)
# 2871|   {
# 2872|->   EMIT_ASM32 (ge,
# 2873|   	      "cmpl %ebx,4(%esp)\n\t"
# 2874|   	      "jge .Lge_jump\n\t"

Error: CPPCHECK_WARNING (CWE-562): [#def149]
gdb-15.2-build/gdb-15.2/gdbserver/mem-break.cc:477: error[returnDanglingLifetime]: Returning pointer to local variable 'bp_holder' that will be invalid when returning.
#  475|         proc->raw_breakpoints = bp;
#  476|       }
#  477|->   return bp;
#  478|   }
#  479|   

Error: CPPCHECK_WARNING (CWE-457): [#def150]
gdb-15.2-build/gdb-15.2/gdbsupport/filestuff.cc:154: error[uninitvar]: Uninitialized variable: max
#  152|         }
#  153|   
#  154|->     for (fd = 0; fd < max; ++fd)
#  155|         {
#  156|   	struct stat sb;

Error: CPPCHECK_WARNING (CWE-562): [#def151]
gdb-15.2-build/gdb-15.2/gnulib/import/gettext.h:247: error[returnDanglingLifetime]: Returning pointer to local variable 'msg_ctxt_id' that will be invalid when returning.
#  245|   #endif
#  246|         if (found_translation)
#  247|->         return translation;
#  248|       }
#  249|     return msgid;

Error: CPPCHECK_WARNING (CWE-401): [#def152]
gdb-15.2-build/gdb-15.2/gnulib/import/malloc/scratch_buffer_dupfree.c:38: error[memleak]: Memory leak: copy
#   36|       {
#   37|         void *copy = realloc (data, size);
#   38|->       return copy != NULL ? copy : data;
#   39|       }
#   40|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def153]
gdb-15.2-build/gdb-15.2/include/sframe.h:168:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
gdb-15.2-build/gdb-15.2/libsframe/sframe.c:110:10: note: in expansion of macro ‘SFRAME_V1_HDR_SIZE’
gdb-15.2-build/gdb-15.2/libsframe/sframe.c: scope_hint: In function ‘sframe_decoder_get_hdr_size’
gdb-15.2-build/gdb-15.2/libsframe/sframe.c: scope_hint: In function ‘sframe_decoder_get_hdr_size’
gdb-15.2-build/gdb-15.2/libsframe/sframe.c:110:10: note: in expansion of macro ‘SFRAME_V1_HDR_SIZE’
gdb-15.2-build/gdb-15.2/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-457): [#def154]
gdb-15.2-build/gdb-15.2/libctf/ctf-archive.c: scope_hint: In function ‘ctf_arc_import_parent’
gdb-15.2-build/gdb-15.2/libctf/ctf-archive.c:774:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘err’
#  772|   						 fp->ctf_parname, &err);
#  773|         if (errp)
#  774|-> 	*errp = err;
#  775|   
#  776|         if (parent)

Error: CPPCHECK_WARNING (CWE-190): [#def155]
gdb-15.2-build/gdb-15.2/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): [#def156]
gdb-15.2-build/gdb-15.2/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: COMPILER_WARNING: [#def157]
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c: scope_hint: In function ‘ctf_dynhash_create_sized’
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c:167:13: warning[-Walloc-size]: allocation of insufficient size ‘8’ for type ‘ctf_dynhash_t’ {aka ‘struct ctf_dynhash’} with size ‘24’
#  167 |     dynhash = malloc (offsetof (ctf_dynhash_t, key_free));
#      |             ^
#  165|       dynhash = malloc (sizeof (ctf_dynhash_t));
#  166|     else
#  167|->     dynhash = malloc (offsetof (ctf_dynhash_t, key_free));
#  168|     if (!dynhash)
#  169|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-131): [#def158]
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c: scope_hint: In function ‘ctf_dynhash_create_sized’
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c:167:15: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  165|       dynhash = malloc (sizeof (ctf_dynhash_t));
#  166|     else
#  167|->     dynhash = malloc (offsetof (ctf_dynhash_t, key_free));
#  168|     if (!dynhash)
#  169|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def159]
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c:183:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c:183:25: note: write of 8 bytes to beyond the end of the region
#  181|     if (key_free || value_free)
#  182|       {
#  183|->       dynhash->key_free = key_free;
#  184|         dynhash->value_free = value_free;
#  185|       }

Error: GCC_ANALYZER_WARNING (CWE-122): [#def160]
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c:184:27: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c:184:27: note: write of 8 bytes to beyond the end of the region
#  182|       {
#  183|         dynhash->key_free = key_free;
#  184|->       dynhash->value_free = value_free;
#  185|       }
#  186|   

Error: COMPILER_WARNING: [#def161]
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c: scope_hint: In function ‘ctf_hashtab_insert’
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c:228:15: warning[-Walloc-size]: allocation of insufficient size ‘16’ for type ‘ctf_helem_t’ {aka ‘struct ctf_helem’} with size ‘24’
#  228 |         *slot = malloc (offsetof (ctf_helem_t, owner));
#      |               ^
#  226|   	*slot = malloc (sizeof (ctf_helem_t));
#  227|         else
#  228|-> 	*slot = malloc (offsetof (ctf_helem_t, owner));
#  229|         if (!*slot)
#  230|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-131): [#def162]
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c: scope_hint: In function ‘ctf_hashtab_insert’
gdb-15.2-build/gdb-15.2/libctf/ctf-hash.c:228:15: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  226|   	*slot = malloc (sizeof (ctf_helem_t));
#  227|         else
#  228|-> 	*slot = malloc (offsetof (ctf_helem_t, owner));
#  229|         if (!*slot)
#  230|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
gdb-15.2-build/gdb-15.2/libctf/ctf-inlines.h:96:17: warning[-Wanalyzer-malloc-leak]: leak of ‘files’
gdb-15.2-build/gdb-15.2/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): [#def164]
gdb-15.2-build/gdb-15.2/libctf/ctf-inlines.h:96:17: warning[-Wanalyzer-malloc-leak]: leak of ‘names’
gdb-15.2-build/gdb-15.2/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): [#def165]
gdb-15.2-build/gdb-15.2/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): [#def166]
gdb-15.2-build/gdb-15.2/libctf/ctf-link.c:1754: error[legacyUninitvar]: Uninitialized variable: name
# 1752|     while ((err = ctf_dynhash_next (fp->ctf_dynsyms, &i, &name_, &sym_)) == 0)
# 1753|       {
# 1754|->       const char *name = (const char *) name;
# 1755|         ctf_link_sym_t *symp = (ctf_link_sym_t *) sym_;
# 1756|   

Error: GCC_ANALYZER_WARNING (CWE-131): [#def167]
gdb-15.2-build/gdb-15.2/libctf/ctf-lookup.c: scope_hint: In function ‘ctf_symidx_sort’
gdb-15.2-build/gdb-15.2/libctf/ctf-lookup.c:445:17: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
gdb-15.2-build/gdb-15.2/libctf/ctf-lookup.c: scope_hint: In function ‘ctf_symidx_sort’
#  443|     size_t i;
#  444|   
#  445|->   if ((sorted = malloc (len)) == NULL)
#  446|       {
#  447|         ctf_set_errno (fp, ENOMEM);

Error: CPPCHECK_WARNING (CWE-457): [#def168]
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c:1302: error[uninitvar]: Uninitialized variables: &skeleton.cts_data, &skeleton.cts_size
# 1300|     if (ctfsect)
# 1301|       {
# 1302|->       memcpy (&ctf_sect, &skeleton, sizeof (struct ctf_sect));
# 1303|         ctf_sect.cts_data = ctfsect;
# 1304|         ctf_sect.cts_size = ctfsect_size;

Error: CPPCHECK_WARNING (CWE-401): [#def169]
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c:1447: error[memleak]: Memory leak: fp
# 1445|       {
# 1446|         ctf_err_warn (NULL, 0, ECTF_CORRUPT, _("header offset exceeds CTF size"));
# 1447|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1448|       }
# 1449|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c:1447:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c:1435:27: note: in expansion of macro ‘cth_flags’
# 1445|       {
# 1446|         ctf_err_warn (NULL, 0, ECTF_CORRUPT, _("header offset exceeds CTF size"));
# 1447|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1448|       }
# 1449|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c: scope_hint: In function ‘ctf_bufopen.part.0’
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c:1447:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
gdb-15.2-build/gdb-15.2/include/ctf-api.h:28: included_from: Included from here.
gdb-15.2-build/gdb-15.2/libctf/ctf-impl.h:27: included_from: Included from here.
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c:20: included_from: Included from here.
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c:1435:27: note: in expansion of macro ‘cth_flags’
# 1445|       {
# 1446|         ctf_err_warn (NULL, 0, ECTF_CORRUPT, _("header offset exceeds CTF size"));
# 1447|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1448|       }
# 1449|   

Error: CPPCHECK_WARNING (CWE-401): [#def172]
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c:1459: error[memleak]: Memory leak: fp
# 1457|       {
# 1458|         ctf_err_warn (NULL, 0, ECTF_CORRUPT, _("overlapping CTF sections"));
# 1459|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1460|       }
# 1461|   

Error: CPPCHECK_WARNING (CWE-401): [#def173]
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c:1469: error[memleak]: Memory leak: fp
# 1467|         ctf_err_warn (NULL, 0, ECTF_CORRUPT,
# 1468|   		    _("CTF sections not properly aligned"));
# 1469|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1470|       }
# 1471|   

Error: CPPCHECK_WARNING (CWE-401): [#def174]
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c:1483: error[memleak]: Memory leak: fp
# 1481|   		      "bytes"), hp->cth_funcoff - hp->cth_objtoff,
# 1482|   		    hp->cth_funcidxoff - hp->cth_objtidxoff);
# 1483|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1484|       }
# 1485|   

Error: CPPCHECK_WARNING (CWE-401): [#def175]
gdb-15.2-build/gdb-15.2/libctf/ctf-open.c:1496: error[memleak]: Memory leak: fp
# 1494|   		      "bytes"), hp->cth_objtidxoff - hp->cth_funcoff,
# 1495|   		    hp->cth_varoff - hp->cth_funcidxoff);
# 1496|->       return (ctf_set_open_errno (errp, ECTF_CORRUPT));
# 1497|       }
# 1498|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
gdb-15.2-build/gdb-15.2/libctf/ctf-string.c: scope_hint: In function ‘ctf_str_write_strtab’
gdb-15.2-build/gdb-15.2/libctf/ctf-string.c:797:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  795|     free (sorttab);
#  796|    err_strtab:
#  797|->   free (strtab);
#  798|     return NULL;
#  799|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def177]
gdb-15.2-build/gdb-15.2/libdecnumber/decNumber.c: scope_hint: In function ‘decUnitCompare’
gdb-15.2-build/gdb-15.2/libdecnumber/decNumber.c:6276:37: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*u’
gdb-15.2-build/gdb-15.2/libdecnumber/decNumber.c:181: included_from: Included from here.
gdb-15.2-build/gdb-15.2/libdecnumber/decNumber.c:6204:36: note: in expansion of macro ‘D2U’
gdb-15.2-build/gdb-15.2/libdecnumber/decNumber.c:6203:36: note: in expansion of macro ‘D2U’
# 6274|      else {				/* non-negative result */
# 6275|       /* check units of the result before freeing any storage */
# 6276|->     for (u=acc; u<acc+accunits-1 && *u==0;) u++;
# 6277|       result=(*u==0 ? 0 : +1);
# 6278|       }

Error: GCC_ANALYZER_WARNING (CWE-126): [#def178]
gdb-15.2-build/gdb-15.2/libdecnumber/decNumber.c: scope_hint: In function ‘decUnitAddSub’
gdb-15.2-build/gdb-15.2/libdecnumber/decNumber.c:6376:19: warning[-Wanalyzer-out-of-bounds]: buffer over-read
gdb-15.2-build/gdb-15.2/libdecnumber/decNumber.c: scope_hint: In function ‘decUnitAddSub’
gdb-15.2-build/gdb-15.2/libdecnumber/decNumber.c:7213:26: note: in expansion of macro ‘D2U’
gdb-15.2-build/gdb-15.2/libdecnumber/decNumber.c:6376:19: note: read of 2 bytes from after the end of ‘uarrone’
gdb-15.2-build/gdb-15.2/libdecnumber/decNumber.c:6376:19: note: valid subscripts for ‘uarrone’ are ‘[0]’ to ‘[0]’
# 6374|       carry+=*a;
# 6375|       a++;
# 6376|->     carry+=((eInt)*b)*m;		/* [special-casing m=1/-1 */
# 6377|       b++;				/* here is not a win] */
# 6378|       /* here carry is new Unit of digits; it could be +ve or -ve */

Error: CPPCHECK_WARNING (CWE-562): [#def179]
gdb-15.2-build/gdb-15.2/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): [#def180]
gdb-15.2-build/gdb-15.2/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): [#def181]
gdb-15.2-build/gdb-15.2/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): [#def182]
gdb-15.2-build/gdb-15.2/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): [#def183]
gdb-15.2-build/gdb-15.2/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): [#def184]
gdb-15.2-build/gdb-15.2/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: GCC_ANALYZER_WARNING (CWE-465): [#def185]
gdb-15.2-build/gdb-15.2/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_insert’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_insert_cstr’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_insert_char’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_append’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_append_cstr’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_append_char’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/make-relative-prefix.c: scope_hint: In function ‘save_string’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/make-relative-prefix.c: scope_hint: In function ‘split_directories’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/make-relative-prefix.c: scope_hint: In function ‘make_relative_prefix_1’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/obstack.c: scope_hint: In function ‘_obstack_newchunk’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/simple-object-mach-o.c: scope_hint: In function ‘simple_object_mach_o_write_segment’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/strerror.c: scope_hint: In function ‘strtoerrno’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/strsignal.c: scope_hint: In function ‘strtosigno’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libiberty/vprintf-support.c:64: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
#   62|   	    {
#   63|   	      ++p;
#   64|-> 	      total_width += abs (va_arg (ap, int));
#   65|   	    }
#   66|   	  else

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

Error: CPPCHECK_WARNING (CWE-664): [#def211]
gdb-15.2-build/gdb-15.2/libiberty/vprintf-support.c:92: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
#   90|   	    case 'X':
#   91|   	    case 'c':
#   92|-> 	      (void) va_arg (ap, int);
#   93|   	      break;
#   94|   	    case 'f':

Error: GCC_ANALYZER_WARNING (CWE-688): [#def212]
gdb-15.2-build/gdb-15.2/libsframe/sframe-dump.c: scope_hint: In function ‘dump_sframe_header’
gdb-15.2-build/gdb-15.2/libsframe/sframe-dump.c:74: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
#   72|       {
#   73|         if (flags & SFRAME_F_FDE_SORTED)
#   74|-> 	strcpy (flags_str, flag_names[0]);
#   75|         if (flags & SFRAME_F_FRAME_POINTER)
#   76|   	{

Error: GCC_ANALYZER_WARNING (CWE-688): [#def213]
gdb-15.2-build/gdb-15.2/libsframe/sframe-dump.c:79: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
#   77|   	  if (strlen (flags_str) > 0)
#   78|   	    strcpy (flags_str, ",");
#   79|-> 	  strcpy (flags_str, flag_names[1]);
#   80|   	}
#   81|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def214]
gdb-15.2-build/gdb-15.2/libsframe/sframe-dump.c:83: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
#   81|       }
#   82|     else
#   83|->     strcpy (flags_str, "NONE");
#   84|   
#   85|     const char* subsec_name = "Header";

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
gdb-15.2-build/gdb-15.2/libsframe/sframe.c: scope_hint: In function ‘sframe_decode’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libsframe/sframe.c: scope_hint: In function ‘sframe_decoder_get_abi_arch’
gdb-15.2-build/gdb-15.2/libsframe/sframe.c:987:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libsframe/sframe.c:1006:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
gdb-15.2-build/gdb-15.2/libsframe/sframe.c: scope_hint: In function ‘sframe_fre_get_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]
gdb-15.2-build/gdb-15.2/libsframe/sframe.c: scope_hint: In function ‘sframe_decoder_get_fixed_ra_offset’
gdb-15.2-build/gdb-15.2/libsframe/sframe.c:1015:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hp’
gdb-15.2-build/gdb-15.2/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]
gdb-15.2-build/gdb-15.2/libsframe/sframe.c: scope_hint: In function ‘sframe_sort_funcdesc’
gdb-15.2-build/gdb-15.2/libsframe/sframe.c:1649:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘encoder’
gdb-15.2-build/gdb-15.2/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: GCC_ANALYZER_WARNING (CWE-835): [#def222]
gdb-15.2-build/gdb-15.2/opcodes/aarch64-dis.c: scope_hint: In function ‘do_special_decoding’
gdb-15.2-build/gdb-15.2/opcodes/aarch64-dis.c:2711:46: warning[-Wanalyzer-infinite-loop]: infinite loop
# 2709|         value = extract_field (FLD_rcpc3_size, inst->value, 0);
# 2710|         for (int i = 0;
# 2711|-> 	   aarch64_operands[inst->operands[i].type].op_class != AARCH64_OPND_CLASS_ADDRESS;
# 2712|   	   i++)
# 2713|   	{

Error: CPPCHECK_WARNING (CWE-457): [#def223]
gdb-15.2-build/gdb-15.2/opcodes/aarch64-opc.c:1357: warning[uninitvar]: Uninitialized variable: &imm_enc.encoding
# 1355|     imm_enc.imm = value;
# 1356|     imm_encoding = (const simd_imm_encoding *)
# 1357|->     bsearch(&imm_enc, simd_immediates, TOTAL_IMM_NB,
# 1358|               sizeof(simd_immediates[0]), simd_imm_encoding_cmp);
# 1359|     if (imm_encoding == NULL)

Error: CPPCHECK_WARNING (CWE-476): [#def224]
gdb-15.2-build/gdb-15.2/opcodes/aarch64-opc.c:5280: error[ctunullpointer]: Null pointer dereference: inst
# 5278|   		      aarch64_instr_sequence *insn_sequence)
# 5279|   {
# 5280|->   insn_sequence->instr[insn_sequence->num_added_insns++] = *inst;
# 5281|   }
# 5282|   

Error: CPPCHECK_WARNING (CWE-476): [#def225]
gdb-15.2-build/gdb-15.2/opcodes/aarch64-opc.c:5280: warning[nullPointer]: Possible null pointer dereference: inst
# 5278|   		      aarch64_instr_sequence *insn_sequence)
# 5279|   {
# 5280|->   insn_sequence->instr[insn_sequence->num_added_insns++] = *inst;
# 5281|   }
# 5282|   

Error: CPPCHECK_WARNING (CWE-562): [#def226]
gdb-15.2-build/gdb-15.2/opcodes/i386-dis.c:9518: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 9516|     info->bytes_per_line = 7;
# 9517|   
# 9518|->   info->private_data = &priv;
# 9519|     priv.fetched = 0;
# 9520|     priv.insn_start = pc;

Error: CPPCHECK_WARNING (CWE-401): [#def227]
gdb-15.2-build/gdb-15.2/opcodes/s390-mkopc.c:98: error[memleakOnRealloc]: Common realloc mistake: 'op_array' nulled but not freed upon failure
#   96|       {
#   97|         max_ops = max_ops * 2;
#   98|->       op_array = realloc (op_array, max_ops * sizeof (struct op_struct));
#   99|       }
#  100|   

Error: GCC_ANALYZER_WARNING (CWE-1335): [#def228]
gdb-15.2-build/gdb-15.2/opcodes/s390-mkopc.c: scope_hint: In function ‘insertOpcode’
gdb-15.2-build/gdb-15.2/opcodes/s390-mkopc.c:117:14: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘64’) >= precision of type (‘64’)
#  115|         str ++;
#  116|       }
#  117|->   sort_value <<= 4*(16 - ix);
#  118|     sort_value += (min_cpu << 8) + mode_bits;
#  119|     no_nibbles = ix;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def229]
gdb-15.2-build/gdb-15.2/opcodes/s390-mkopc.c:121:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  119|     no_nibbles = ix;
#  120|     for (ix = 0; ix < no_ops; ix++)
#  121|->     if (sort_value > op_array[ix].sort_value)
#  122|         break;
#  123|     for (k = no_ops; k > ix; k--)

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-6.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namegdb-15.2-2.fc42
store-results-to/tmp/tmp2di2gb86/gdb-15.2-2.fc42.tar.xz
time-created2024-11-13 00:15:23
time-finished2024-11-13 00:34:57
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp2di2gb86/gdb-15.2-2.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp2di2gb86/gdb-15.2-2.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9