Coverage Report

Created: 2025-08-24 06:28

/src/elfutils/lib/system.h
Line
Count
Source (jump to first uncovered line)
1
/* Declarations for common convenience functions.
2
   Copyright (C) 2006-2011 Red Hat, Inc.
3
   Copyright (C) 2022 Mark J. Wielaard <mark@klomp.org>
4
   Copyright (C) 2023 Khem Raj.
5
   This file is part of elfutils.
6
7
   This file is free software; you can redistribute it and/or modify
8
   it under the terms of either
9
10
     * the GNU Lesser General Public License as published by the Free
11
       Software Foundation; either version 3 of the License, or (at
12
       your option) any later version
13
14
   or
15
16
     * the GNU General Public License as published by the Free
17
       Software Foundation; either version 2 of the License, or (at
18
       your option) any later version
19
20
   or both in parallel, as here.
21
22
   elfutils is distributed in the hope that it will be useful, but
23
   WITHOUT ANY WARRANTY; without even the implied warranty of
24
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25
   General Public License for more details.
26
27
   You should have received copies of the GNU General Public License and
28
   the GNU Lesser General Public License along with this program.  If
29
   not, see <http://www.gnu.org/licenses/>.  */
30
31
#ifndef LIB_SYSTEM_H
32
#define LIB_SYSTEM_H  1
33
34
/* Prevent double inclusion of config.h, config.h includes eu-config.h.  */
35
#ifdef HAVE_CONFIG_H
36
#ifndef EU_CONFIG_H
37
# include <config.h>
38
#endif
39
#endif
40
41
#include <errno.h>
42
#include <stdbool.h>
43
#include <stddef.h>
44
#include <stdint.h>
45
#include <string.h>
46
#include <stdarg.h>
47
#include <stdlib.h>
48
49
/* System dependent headers */
50
#include <byteswap.h>
51
#include <endian.h>
52
#include <sys/mman.h>
53
#include <sys/param.h>
54
#include <unistd.h>
55
56
#if defined(HAVE_ERROR_H)
57
#include <error.h>
58
#elif defined(HAVE_ERR_H)
59
extern int error_message_count;
60
void error(int status, int errnum, const char *format, ...);
61
#else
62
#error "err.h or error.h must be available"
63
#endif
64
65
/* error (EXIT_FAILURE, ...) should be noreturn but on some systems it
66
   isn't.  This may cause warnings about code that should not be reachable.
67
   So have an explicit error_exit wrapper that is noreturn (because it
68
   calls exit explicitly).  */
69
#define error_exit(errnum,...) do { \
70
    error (EXIT_FAILURE,errnum,__VA_ARGS__); \
71
    exit (EXIT_FAILURE); \
72
  } while (0)
73
74
#if BYTE_ORDER == LITTLE_ENDIAN
75
892k
# define LE32(n)  (n)
76
676k
# define LE64(n)  (n)
77
623k
# define BE32(n)  bswap_32 (n)
78
1.08M
# define BE64(n)  bswap_64 (n)
79
#elif BYTE_ORDER == BIG_ENDIAN
80
# define BE32(n)  (n)
81
# define BE64(n)  (n)
82
# define LE32(n)  bswap_32 (n)
83
# define LE64(n)  bswap_64 (n)
84
#else
85
# error "Unknown byte order"
86
#endif
87
88
#ifndef MAX
89
#define MAX(m, n) ((m) < (n) ? (n) : (m))
90
#endif
91
92
#ifndef MIN
93
#define MIN(m, n) ((m) < (n) ? (m) : (n))
94
#endif
95
96
#if !HAVE_DECL_POWEROF2
97
#define powerof2(x) (((x) & ((x) - 1)) == 0)
98
#endif
99
100
#if !HAVE_DECL_MEMPCPY
101
#define mempcpy(dest, src, n) \
102
    ((void *) ((char *) memcpy (dest, src, n) + (size_t) n))
103
#endif
104
105
#if !HAVE_DECL_REALLOCARRAY
106
static inline void *
107
reallocarray (void *ptr, size_t nmemb, size_t size)
108
{
109
  if (size > 0 && nmemb > SIZE_MAX / size)
110
    {
111
      errno = ENOMEM;
112
      return NULL;
113
    }
114
  return realloc (ptr, nmemb * size);
115
}
116
#endif
117
118
/* Return TRUE if the start of STR matches PREFIX, FALSE otherwise.  */
119
120
static inline int
121
startswith (const char *str, const char *prefix)
122
54
{
123
54
  return strncmp (str, prefix, strlen (prefix)) == 0;
124
54
}
Unexecuted instantiation: fuzz-libdwfl.c:startswith
Unexecuted instantiation: dwfl_begin.c:startswith
Unexecuted instantiation: dwfl_end.c:startswith
Unexecuted instantiation: dwfl_error.c:startswith
Unexecuted instantiation: dwfl_module.c:startswith
Unexecuted instantiation: offline.c:startswith
Unexecuted instantiation: dwfl_module_getdwarf.c:startswith
Unexecuted instantiation: find-debuginfo.c:startswith
Unexecuted instantiation: dwfl_build_id_find_debuginfo.c:startswith
Unexecuted instantiation: libdwfl_crc32_file.c:startswith
Unexecuted instantiation: open.c:startswith
Unexecuted instantiation: image-header.c:startswith
Unexecuted instantiation: dwfl_frame.c:startswith
Unexecuted instantiation: frame_unwind.c:startswith
Unexecuted instantiation: dwfl_frame_pc.c:startswith
Unexecuted instantiation: dwfl_frame_regs.c:startswith
Unexecuted instantiation: gzip.c:startswith
Unexecuted instantiation: dwflst_process_tracker.c:startswith
Unexecuted instantiation: dwflst_tracker_find_elf.c:startswith
Unexecuted instantiation: dwflst_tracker_elftab.c:startswith
Unexecuted instantiation: dwflst_tracker_dwfltab.c:startswith
Unexecuted instantiation: dwelf_elf_gnu_debuglink.c:startswith
Unexecuted instantiation: dwelf_dwarf_gnu_debugaltlink.c:startswith
Unexecuted instantiation: dwelf_elf_gnu_build_id.c:startswith
Unexecuted instantiation: eblopenbackend.c:startswith
Unexecuted instantiation: arm_symbol.c:startswith
Unexecuted instantiation: aarch64_symbol.c:startswith
Unexecuted instantiation: aarch64_initreg.c:startswith
Unexecuted instantiation: sparc_initreg.c:startswith
Unexecuted instantiation: ppc_initreg.c:startswith
Unexecuted instantiation: s390_initreg.c:startswith
Unexecuted instantiation: riscv_init.c:startswith
Unexecuted instantiation: riscv_initreg.c:startswith
Unexecuted instantiation: csky_initreg.c:startswith
Unexecuted instantiation: loongarch_initreg.c:startswith
Unexecuted instantiation: mips_init.c:startswith
Unexecuted instantiation: mips_symbol.c:startswith
Unexecuted instantiation: mips_regs.c:startswith
Unexecuted instantiation: mips_retval.c:startswith
Unexecuted instantiation: i386_disasm.c:startswith
Unexecuted instantiation: x86_64_disasm.c:startswith
Unexecuted instantiation: bpf_disasm.c:startswith
Unexecuted instantiation: riscv_disasm.c:startswith
dwarf_begin_elf.c:startswith
Line
Count
Source
122
54
{
123
54
  return strncmp (str, prefix, strlen (prefix)) == 0;
124
54
}
Unexecuted instantiation: dwarf_end.c:startswith
Unexecuted instantiation: dwarf_tag.c:startswith
Unexecuted instantiation: dwarf_error.c:startswith
Unexecuted instantiation: dwarf_attr.c:startswith
Unexecuted instantiation: dwarf_abbrev_hash.c:startswith
Unexecuted instantiation: dwarf_sig8_hash.c:startswith
Unexecuted instantiation: dwarf_attr_integrate.c:startswith
Unexecuted instantiation: dwarf_hasattr_integrate.c:startswith
Unexecuted instantiation: dwarf_child.c:startswith
Unexecuted instantiation: dwarf_formudata.c:startswith
Unexecuted instantiation: dwarf_formref_die.c:startswith
Unexecuted instantiation: dwarf_siblingof.c:startswith
Unexecuted instantiation: dwarf_diecu.c:startswith
Unexecuted instantiation: dwarf_hasattr.c:startswith
Unexecuted instantiation: dwarf_bytesize.c:startswith
Unexecuted instantiation: dwarf_bitsize.c:startswith
Unexecuted instantiation: dwarf_formflag.c:startswith
Unexecuted instantiation: libdw_findcu.c:startswith
Unexecuted instantiation: libdw_form.c:startswith
Unexecuted instantiation: libdw_alloc.c:startswith
Unexecuted instantiation: frame-cache.c:startswith
Unexecuted instantiation: dwarf_frame_cfa.c:startswith
Unexecuted instantiation: dwarf_frame_register.c:startswith
Unexecuted instantiation: dwarf_cfi_addrframe.c:startswith
Unexecuted instantiation: dwarf_cfi_end.c:startswith
Unexecuted instantiation: dwarf_aggregate_size.c:startswith
Unexecuted instantiation: dwarf_getalt.c:startswith
Unexecuted instantiation: dwarf_setalt.c:startswith
Unexecuted instantiation: dwarf_peel_type.c:startswith
Unexecuted instantiation: dwarf_default_lower_bound.c:startswith
Unexecuted instantiation: libdw_find_split_unit.c:startswith
Unexecuted instantiation: dwarf_cu_dwp_section_info.c:startswith
Unexecuted instantiation: dwfl_report_elf.c:startswith
Unexecuted instantiation: relocate.c:startswith
Unexecuted instantiation: dwfl_module_build_id.c:startswith
Unexecuted instantiation: dwfl_build_id_find_elf.c:startswith
Unexecuted instantiation: linux-proc-maps.c:startswith
Unexecuted instantiation: dwfl_addrmodule.c:startswith
Unexecuted instantiation: libdwfl_crc32.c:startswith
Unexecuted instantiation: elf-from-memory.c:startswith
Unexecuted instantiation: dwfl_module_dwarf_cfi.c:startswith
Unexecuted instantiation: dwfl_module_eh_cfi.c:startswith
Unexecuted instantiation: linux-pid-attach.c:startswith
Unexecuted instantiation: dwarf_begin.c:startswith
Unexecuted instantiation: dwarf_getabbrev.c:startswith
Unexecuted instantiation: dwarf_nextcu.c:startswith
Unexecuted instantiation: dwarf_offdie.c:startswith
Unexecuted instantiation: dwarf_formstring.c:startswith
Unexecuted instantiation: dwarf_haschildren.c:startswith
Unexecuted instantiation: dwarf_formsdata.c:startswith
Unexecuted instantiation: dwarf_formref.c:startswith
Unexecuted instantiation: dwarf_srclang.c:startswith
Unexecuted instantiation: dwarf_getlocation.c:startswith
Unexecuted instantiation: fde.c:startswith
Unexecuted instantiation: cfi.c:startswith
Unexecuted instantiation: dwarf_getcfi.c:startswith
Unexecuted instantiation: dwarf_getcfi_elf.c:startswith
Unexecuted instantiation: dwarf_get_units.c:startswith
Unexecuted instantiation: segment.c:startswith
Unexecuted instantiation: dwarf_formaddr.c:startswith
Unexecuted instantiation: dwarf_lowpc.c:startswith
Unexecuted instantiation: dwarf_ranges.c:startswith
Unexecuted instantiation: dwarf_formblock.c:startswith
Unexecuted instantiation: dwarf_next_cfi.c:startswith
Unexecuted instantiation: cie.c:startswith
Unexecuted instantiation: dwarf_highpc.c:startswith
Unexecuted instantiation: elf_version.c:startswith
Unexecuted instantiation: elf_hash.c:startswith
Unexecuted instantiation: elf_error.c:startswith
Unexecuted instantiation: elf_begin.c:startswith
Unexecuted instantiation: elf_next.c:startswith
Unexecuted instantiation: elf_end.c:startswith
Unexecuted instantiation: elf_kind.c:startswith
Unexecuted instantiation: gelf_getclass.c:startswith
Unexecuted instantiation: elf_getident.c:startswith
Unexecuted instantiation: gelf_fsize.c:startswith
Unexecuted instantiation: elf32_xlatetof.c:startswith
Unexecuted instantiation: elf32_xlatetom.c:startswith
Unexecuted instantiation: elf64_xlatetof.c:startswith
Unexecuted instantiation: elf64_xlatetom.c:startswith
Unexecuted instantiation: gelf_xlate.c:startswith
Unexecuted instantiation: gelf_getehdr.c:startswith
Unexecuted instantiation: gelf_getphdr.c:startswith
Unexecuted instantiation: elf_getarhdr.c:startswith
Unexecuted instantiation: elf_rawfile.c:startswith
Unexecuted instantiation: elf_readall.c:startswith
Unexecuted instantiation: elf_cntl.c:startswith
Unexecuted instantiation: elf_getscn.c:startswith
Unexecuted instantiation: elf_nextscn.c:startswith
Unexecuted instantiation: elf_ndxscn.c:startswith
Unexecuted instantiation: gelf_getshdr.c:startswith
Unexecuted instantiation: gelf_update_shdr.c:startswith
Unexecuted instantiation: elf_strptr.c:startswith
Unexecuted instantiation: elf_rawdata.c:startswith
Unexecuted instantiation: elf_getdata.c:startswith
Unexecuted instantiation: elf_getdata_rawchunk.c:startswith
Unexecuted instantiation: elf_memory.c:startswith
Unexecuted instantiation: gelf_getrel.c:startswith
Unexecuted instantiation: gelf_getrela.c:startswith
Unexecuted instantiation: gelf_update_rel.c:startswith
Unexecuted instantiation: gelf_update_rela.c:startswith
Unexecuted instantiation: gelf_getdyn.c:startswith
Unexecuted instantiation: gelf_getnote.c:startswith
Unexecuted instantiation: gelf_xlatetof.c:startswith
Unexecuted instantiation: gelf_xlatetom.c:startswith
Unexecuted instantiation: gelf_getsymshndx.c:startswith
Unexecuted instantiation: elf_getphdrnum.c:startswith
Unexecuted instantiation: elf_getshdrnum.c:startswith
Unexecuted instantiation: elf_getshdrstrndx.c:startswith
Unexecuted instantiation: gelf_offscn.c:startswith
Unexecuted instantiation: elf_compress.c:startswith
Unexecuted instantiation: elf_compress_gnu.c:startswith
Unexecuted instantiation: elf32_getphdr.c:startswith
Unexecuted instantiation: elf64_getphdr.c:startswith
Unexecuted instantiation: elf32_getshdr.c:startswith
Unexecuted instantiation: elf64_getshdr.c:startswith
Unexecuted instantiation: elf32_offscn.c:startswith
Unexecuted instantiation: elf64_offscn.c:startswith
Unexecuted instantiation: gelf_getchdr.c:startswith
Unexecuted instantiation: elf32_getchdr.c:startswith
Unexecuted instantiation: elf64_getchdr.c:startswith
Unexecuted instantiation: core-file.c:startswith
Unexecuted instantiation: linux-core-attach.c:startswith
Unexecuted instantiation: dwfl_segment_report_module.c:startswith
Unexecuted instantiation: link_map.c:startswith
Unexecuted instantiation: dwfl_module_report_build_id.c:startswith
Unexecuted instantiation: derelocate.c:startswith
Unexecuted instantiation: elf_clone.c:startswith
Unexecuted instantiation: fuzz-libelf.c:startswith
125
126
/* Return TRUE if STR[FROM] is a valid string with a zero terminator
127
   at or before STR[TO - 1].  Note FROM is an index into the STR
128
   array, while TO is the maximum size of the STR array.  This
129
   function returns FALSE when TO is zero or FROM >= TO.  */
130
static inline bool
131
validate_str (const char *str, size_t from, size_t to)
132
398k
{
133
398k
#if HAVE_DECL_MEMRCHR
134
  // Check end first, which is likely a zero terminator,
135
  // to prevent function call
136
398k
  return (to > 0
137
398k
    && (str[to - 1] == '\0'
138
398k
        || (to > from
139
150k
      && memrchr (&str[from], '\0', to - from - 1) != NULL)));
140
#else
141
  do {
142
    if (to <= from)
143
      return false;
144
145
    to--;
146
  } while (str[to]);
147
148
  return true;
149
#endif
150
398k
}
Unexecuted instantiation: fuzz-libdwfl.c:validate_str
Unexecuted instantiation: dwfl_begin.c:validate_str
Unexecuted instantiation: dwfl_end.c:validate_str
Unexecuted instantiation: dwfl_error.c:validate_str
Unexecuted instantiation: dwfl_module.c:validate_str
Unexecuted instantiation: offline.c:validate_str
Unexecuted instantiation: dwfl_module_getdwarf.c:validate_str
Unexecuted instantiation: find-debuginfo.c:validate_str
Unexecuted instantiation: dwfl_build_id_find_debuginfo.c:validate_str
Unexecuted instantiation: libdwfl_crc32_file.c:validate_str
Unexecuted instantiation: open.c:validate_str
Unexecuted instantiation: image-header.c:validate_str
Unexecuted instantiation: dwfl_frame.c:validate_str
Unexecuted instantiation: frame_unwind.c:validate_str
Unexecuted instantiation: dwfl_frame_pc.c:validate_str
Unexecuted instantiation: dwfl_frame_regs.c:validate_str
Unexecuted instantiation: gzip.c:validate_str
Unexecuted instantiation: dwflst_process_tracker.c:validate_str
Unexecuted instantiation: dwflst_tracker_find_elf.c:validate_str
Unexecuted instantiation: dwflst_tracker_elftab.c:validate_str
Unexecuted instantiation: dwflst_tracker_dwfltab.c:validate_str
Unexecuted instantiation: dwelf_elf_gnu_debuglink.c:validate_str
Unexecuted instantiation: dwelf_dwarf_gnu_debugaltlink.c:validate_str
Unexecuted instantiation: dwelf_elf_gnu_build_id.c:validate_str
Unexecuted instantiation: eblopenbackend.c:validate_str
Unexecuted instantiation: arm_symbol.c:validate_str
Unexecuted instantiation: aarch64_symbol.c:validate_str
Unexecuted instantiation: aarch64_initreg.c:validate_str
Unexecuted instantiation: sparc_initreg.c:validate_str
Unexecuted instantiation: ppc_initreg.c:validate_str
Unexecuted instantiation: s390_initreg.c:validate_str
Unexecuted instantiation: riscv_init.c:validate_str
Unexecuted instantiation: riscv_initreg.c:validate_str
Unexecuted instantiation: csky_initreg.c:validate_str
Unexecuted instantiation: loongarch_initreg.c:validate_str
Unexecuted instantiation: mips_init.c:validate_str
Unexecuted instantiation: mips_symbol.c:validate_str
Unexecuted instantiation: mips_regs.c:validate_str
Unexecuted instantiation: mips_retval.c:validate_str
Unexecuted instantiation: i386_disasm.c:validate_str
Unexecuted instantiation: x86_64_disasm.c:validate_str
Unexecuted instantiation: bpf_disasm.c:validate_str
Unexecuted instantiation: riscv_disasm.c:validate_str
Unexecuted instantiation: dwarf_begin_elf.c:validate_str
Unexecuted instantiation: dwarf_end.c:validate_str
Unexecuted instantiation: dwarf_tag.c:validate_str
Unexecuted instantiation: dwarf_error.c:validate_str
Unexecuted instantiation: dwarf_attr.c:validate_str
Unexecuted instantiation: dwarf_abbrev_hash.c:validate_str
Unexecuted instantiation: dwarf_sig8_hash.c:validate_str
Unexecuted instantiation: dwarf_attr_integrate.c:validate_str
Unexecuted instantiation: dwarf_hasattr_integrate.c:validate_str
Unexecuted instantiation: dwarf_child.c:validate_str
Unexecuted instantiation: dwarf_formudata.c:validate_str
Unexecuted instantiation: dwarf_formref_die.c:validate_str
Unexecuted instantiation: dwarf_siblingof.c:validate_str
Unexecuted instantiation: dwarf_diecu.c:validate_str
Unexecuted instantiation: dwarf_hasattr.c:validate_str
Unexecuted instantiation: dwarf_bytesize.c:validate_str
Unexecuted instantiation: dwarf_bitsize.c:validate_str
Unexecuted instantiation: dwarf_formflag.c:validate_str
Unexecuted instantiation: libdw_findcu.c:validate_str
Unexecuted instantiation: libdw_form.c:validate_str
Unexecuted instantiation: libdw_alloc.c:validate_str
Unexecuted instantiation: frame-cache.c:validate_str
Unexecuted instantiation: dwarf_frame_cfa.c:validate_str
Unexecuted instantiation: dwarf_frame_register.c:validate_str
Unexecuted instantiation: dwarf_cfi_addrframe.c:validate_str
Unexecuted instantiation: dwarf_cfi_end.c:validate_str
Unexecuted instantiation: dwarf_aggregate_size.c:validate_str
Unexecuted instantiation: dwarf_getalt.c:validate_str
Unexecuted instantiation: dwarf_setalt.c:validate_str
Unexecuted instantiation: dwarf_peel_type.c:validate_str
Unexecuted instantiation: dwarf_default_lower_bound.c:validate_str
Unexecuted instantiation: libdw_find_split_unit.c:validate_str
Unexecuted instantiation: dwarf_cu_dwp_section_info.c:validate_str
Unexecuted instantiation: dwfl_report_elf.c:validate_str
Unexecuted instantiation: relocate.c:validate_str
Unexecuted instantiation: dwfl_module_build_id.c:validate_str
Unexecuted instantiation: dwfl_build_id_find_elf.c:validate_str
Unexecuted instantiation: linux-proc-maps.c:validate_str
Unexecuted instantiation: dwfl_addrmodule.c:validate_str
Unexecuted instantiation: libdwfl_crc32.c:validate_str
Unexecuted instantiation: elf-from-memory.c:validate_str
Unexecuted instantiation: dwfl_module_dwarf_cfi.c:validate_str
Unexecuted instantiation: dwfl_module_eh_cfi.c:validate_str
Unexecuted instantiation: linux-pid-attach.c:validate_str
Unexecuted instantiation: dwarf_begin.c:validate_str
Unexecuted instantiation: dwarf_getabbrev.c:validate_str
Unexecuted instantiation: dwarf_nextcu.c:validate_str
Unexecuted instantiation: dwarf_offdie.c:validate_str
Unexecuted instantiation: dwarf_formstring.c:validate_str
Unexecuted instantiation: dwarf_haschildren.c:validate_str
Unexecuted instantiation: dwarf_formsdata.c:validate_str
Unexecuted instantiation: dwarf_formref.c:validate_str
Unexecuted instantiation: dwarf_srclang.c:validate_str
Unexecuted instantiation: dwarf_getlocation.c:validate_str
Unexecuted instantiation: fde.c:validate_str
Unexecuted instantiation: cfi.c:validate_str
Unexecuted instantiation: dwarf_getcfi.c:validate_str
Unexecuted instantiation: dwarf_getcfi_elf.c:validate_str
Unexecuted instantiation: dwarf_get_units.c:validate_str
Unexecuted instantiation: segment.c:validate_str
Unexecuted instantiation: dwarf_formaddr.c:validate_str
Unexecuted instantiation: dwarf_lowpc.c:validate_str
Unexecuted instantiation: dwarf_ranges.c:validate_str
Unexecuted instantiation: dwarf_formblock.c:validate_str
Unexecuted instantiation: dwarf_next_cfi.c:validate_str
Unexecuted instantiation: cie.c:validate_str
Unexecuted instantiation: dwarf_highpc.c:validate_str
Unexecuted instantiation: elf_version.c:validate_str
Unexecuted instantiation: elf_hash.c:validate_str
Unexecuted instantiation: elf_error.c:validate_str
Unexecuted instantiation: elf_begin.c:validate_str
Unexecuted instantiation: elf_next.c:validate_str
Unexecuted instantiation: elf_end.c:validate_str
Unexecuted instantiation: elf_kind.c:validate_str
Unexecuted instantiation: gelf_getclass.c:validate_str
Unexecuted instantiation: elf_getident.c:validate_str
Unexecuted instantiation: gelf_fsize.c:validate_str
Unexecuted instantiation: elf32_xlatetof.c:validate_str
Unexecuted instantiation: elf32_xlatetom.c:validate_str
Unexecuted instantiation: elf64_xlatetof.c:validate_str
Unexecuted instantiation: elf64_xlatetom.c:validate_str
Unexecuted instantiation: gelf_xlate.c:validate_str
Unexecuted instantiation: gelf_getehdr.c:validate_str
Unexecuted instantiation: gelf_getphdr.c:validate_str
Unexecuted instantiation: elf_getarhdr.c:validate_str
Unexecuted instantiation: elf_rawfile.c:validate_str
Unexecuted instantiation: elf_readall.c:validate_str
Unexecuted instantiation: elf_cntl.c:validate_str
Unexecuted instantiation: elf_getscn.c:validate_str
Unexecuted instantiation: elf_nextscn.c:validate_str
Unexecuted instantiation: elf_ndxscn.c:validate_str
Unexecuted instantiation: gelf_getshdr.c:validate_str
Unexecuted instantiation: gelf_update_shdr.c:validate_str
elf_strptr.c:validate_str
Line
Count
Source
132
398k
{
133
398k
#if HAVE_DECL_MEMRCHR
134
  // Check end first, which is likely a zero terminator,
135
  // to prevent function call
136
398k
  return (to > 0
137
398k
    && (str[to - 1] == '\0'
138
398k
        || (to > from
139
150k
      && memrchr (&str[from], '\0', to - from - 1) != NULL)));
140
#else
141
  do {
142
    if (to <= from)
143
      return false;
144
145
    to--;
146
  } while (str[to]);
147
148
  return true;
149
#endif
150
398k
}
Unexecuted instantiation: elf_rawdata.c:validate_str
Unexecuted instantiation: elf_getdata.c:validate_str
Unexecuted instantiation: elf_getdata_rawchunk.c:validate_str
Unexecuted instantiation: elf_memory.c:validate_str
Unexecuted instantiation: gelf_getrel.c:validate_str
Unexecuted instantiation: gelf_getrela.c:validate_str
Unexecuted instantiation: gelf_update_rel.c:validate_str
Unexecuted instantiation: gelf_update_rela.c:validate_str
Unexecuted instantiation: gelf_getdyn.c:validate_str
Unexecuted instantiation: gelf_getnote.c:validate_str
Unexecuted instantiation: gelf_xlatetof.c:validate_str
Unexecuted instantiation: gelf_xlatetom.c:validate_str
Unexecuted instantiation: gelf_getsymshndx.c:validate_str
Unexecuted instantiation: elf_getphdrnum.c:validate_str
Unexecuted instantiation: elf_getshdrnum.c:validate_str
Unexecuted instantiation: elf_getshdrstrndx.c:validate_str
Unexecuted instantiation: gelf_offscn.c:validate_str
Unexecuted instantiation: elf_compress.c:validate_str
Unexecuted instantiation: elf_compress_gnu.c:validate_str
Unexecuted instantiation: elf32_getphdr.c:validate_str
Unexecuted instantiation: elf64_getphdr.c:validate_str
Unexecuted instantiation: elf32_getshdr.c:validate_str
Unexecuted instantiation: elf64_getshdr.c:validate_str
Unexecuted instantiation: elf32_offscn.c:validate_str
Unexecuted instantiation: elf64_offscn.c:validate_str
Unexecuted instantiation: gelf_getchdr.c:validate_str
Unexecuted instantiation: elf32_getchdr.c:validate_str
Unexecuted instantiation: elf64_getchdr.c:validate_str
Unexecuted instantiation: core-file.c:validate_str
Unexecuted instantiation: linux-core-attach.c:validate_str
Unexecuted instantiation: dwfl_segment_report_module.c:validate_str
Unexecuted instantiation: link_map.c:validate_str
Unexecuted instantiation: dwfl_module_report_build_id.c:validate_str
Unexecuted instantiation: derelocate.c:validate_str
Unexecuted instantiation: elf_clone.c:validate_str
Unexecuted instantiation: fuzz-libelf.c:validate_str
151
152
/* A special gettext function we use if the strings are too short.  */
153
#define sgettext(Str) \
154
  ({ const char *__res = strrchr (_(Str), '|');           \
155
     __res ? __res + 1 : Str; })
156
157
#define gettext_noop(Str) Str
158
159
#ifndef TEMP_FAILURE_RETRY
160
#define TEMP_FAILURE_RETRY(expression) \
161
  ({ ssize_t __res; \
162
     do \
163
       __res = expression; \
164
     while (__res == -1 && errno == EINTR); \
165
     __res; })
166
#endif
167
168
#ifndef ACCESSPERMS
169
#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
170
#endif
171
172
#ifndef ALLPERMS
173
#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
174
#endif
175
176
#ifndef DEFFILEMODE
177
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666 */
178
#endif
179
180
static inline ssize_t __attribute__ ((unused))
181
pwrite_retry (int fd, const void *buf, size_t len, off_t off)
182
0
{
183
0
  ssize_t recvd = 0;
184
0
185
0
  do
186
0
    {
187
0
      ssize_t ret = TEMP_FAILURE_RETRY (pwrite (fd, ((char *)buf) + recvd, len - recvd,
188
0
            off + recvd));
189
0
      if (ret <= 0)
190
0
  return ret < 0 ? ret : recvd;
191
0
192
0
      recvd += ret;
193
0
    }
194
0
  while ((size_t) recvd < len);
195
0
196
0
  return recvd;
197
0
}
Unexecuted instantiation: fuzz-libdwfl.c:pwrite_retry
Unexecuted instantiation: dwfl_begin.c:pwrite_retry
Unexecuted instantiation: dwfl_end.c:pwrite_retry
Unexecuted instantiation: dwfl_error.c:pwrite_retry
Unexecuted instantiation: dwfl_module.c:pwrite_retry
Unexecuted instantiation: offline.c:pwrite_retry
Unexecuted instantiation: dwfl_module_getdwarf.c:pwrite_retry
Unexecuted instantiation: find-debuginfo.c:pwrite_retry
Unexecuted instantiation: dwfl_build_id_find_debuginfo.c:pwrite_retry
Unexecuted instantiation: libdwfl_crc32_file.c:pwrite_retry
Unexecuted instantiation: open.c:pwrite_retry
Unexecuted instantiation: image-header.c:pwrite_retry
Unexecuted instantiation: dwfl_frame.c:pwrite_retry
Unexecuted instantiation: frame_unwind.c:pwrite_retry
Unexecuted instantiation: dwfl_frame_pc.c:pwrite_retry
Unexecuted instantiation: dwfl_frame_regs.c:pwrite_retry
Unexecuted instantiation: gzip.c:pwrite_retry
Unexecuted instantiation: dwflst_process_tracker.c:pwrite_retry
Unexecuted instantiation: dwflst_tracker_find_elf.c:pwrite_retry
Unexecuted instantiation: dwflst_tracker_elftab.c:pwrite_retry
Unexecuted instantiation: dwflst_tracker_dwfltab.c:pwrite_retry
Unexecuted instantiation: dwelf_elf_gnu_debuglink.c:pwrite_retry
Unexecuted instantiation: dwelf_dwarf_gnu_debugaltlink.c:pwrite_retry
Unexecuted instantiation: dwelf_elf_gnu_build_id.c:pwrite_retry
Unexecuted instantiation: eblopenbackend.c:pwrite_retry
Unexecuted instantiation: arm_symbol.c:pwrite_retry
Unexecuted instantiation: aarch64_symbol.c:pwrite_retry
Unexecuted instantiation: aarch64_initreg.c:pwrite_retry
Unexecuted instantiation: sparc_initreg.c:pwrite_retry
Unexecuted instantiation: ppc_initreg.c:pwrite_retry
Unexecuted instantiation: s390_initreg.c:pwrite_retry
Unexecuted instantiation: riscv_init.c:pwrite_retry
Unexecuted instantiation: riscv_initreg.c:pwrite_retry
Unexecuted instantiation: csky_initreg.c:pwrite_retry
Unexecuted instantiation: loongarch_initreg.c:pwrite_retry
Unexecuted instantiation: mips_init.c:pwrite_retry
Unexecuted instantiation: mips_symbol.c:pwrite_retry
Unexecuted instantiation: mips_regs.c:pwrite_retry
Unexecuted instantiation: mips_retval.c:pwrite_retry
Unexecuted instantiation: i386_disasm.c:pwrite_retry
Unexecuted instantiation: x86_64_disasm.c:pwrite_retry
Unexecuted instantiation: bpf_disasm.c:pwrite_retry
Unexecuted instantiation: riscv_disasm.c:pwrite_retry
Unexecuted instantiation: dwarf_begin_elf.c:pwrite_retry
Unexecuted instantiation: dwarf_end.c:pwrite_retry
Unexecuted instantiation: dwarf_tag.c:pwrite_retry
Unexecuted instantiation: dwarf_error.c:pwrite_retry
Unexecuted instantiation: dwarf_attr.c:pwrite_retry
Unexecuted instantiation: dwarf_abbrev_hash.c:pwrite_retry
Unexecuted instantiation: dwarf_sig8_hash.c:pwrite_retry
Unexecuted instantiation: dwarf_attr_integrate.c:pwrite_retry
Unexecuted instantiation: dwarf_hasattr_integrate.c:pwrite_retry
Unexecuted instantiation: dwarf_child.c:pwrite_retry
Unexecuted instantiation: dwarf_formudata.c:pwrite_retry
Unexecuted instantiation: dwarf_formref_die.c:pwrite_retry
Unexecuted instantiation: dwarf_siblingof.c:pwrite_retry
Unexecuted instantiation: dwarf_diecu.c:pwrite_retry
Unexecuted instantiation: dwarf_hasattr.c:pwrite_retry
Unexecuted instantiation: dwarf_bytesize.c:pwrite_retry
Unexecuted instantiation: dwarf_bitsize.c:pwrite_retry
Unexecuted instantiation: dwarf_formflag.c:pwrite_retry
Unexecuted instantiation: libdw_findcu.c:pwrite_retry
Unexecuted instantiation: libdw_form.c:pwrite_retry
Unexecuted instantiation: libdw_alloc.c:pwrite_retry
Unexecuted instantiation: frame-cache.c:pwrite_retry
Unexecuted instantiation: dwarf_frame_cfa.c:pwrite_retry
Unexecuted instantiation: dwarf_frame_register.c:pwrite_retry
Unexecuted instantiation: dwarf_cfi_addrframe.c:pwrite_retry
Unexecuted instantiation: dwarf_cfi_end.c:pwrite_retry
Unexecuted instantiation: dwarf_aggregate_size.c:pwrite_retry
Unexecuted instantiation: dwarf_getalt.c:pwrite_retry
Unexecuted instantiation: dwarf_setalt.c:pwrite_retry
Unexecuted instantiation: dwarf_peel_type.c:pwrite_retry
Unexecuted instantiation: dwarf_default_lower_bound.c:pwrite_retry
Unexecuted instantiation: libdw_find_split_unit.c:pwrite_retry
Unexecuted instantiation: dwarf_cu_dwp_section_info.c:pwrite_retry
Unexecuted instantiation: dwfl_report_elf.c:pwrite_retry
Unexecuted instantiation: relocate.c:pwrite_retry
Unexecuted instantiation: dwfl_module_build_id.c:pwrite_retry
Unexecuted instantiation: dwfl_build_id_find_elf.c:pwrite_retry
Unexecuted instantiation: linux-proc-maps.c:pwrite_retry
Unexecuted instantiation: dwfl_addrmodule.c:pwrite_retry
Unexecuted instantiation: libdwfl_crc32.c:pwrite_retry
Unexecuted instantiation: elf-from-memory.c:pwrite_retry
Unexecuted instantiation: dwfl_module_dwarf_cfi.c:pwrite_retry
Unexecuted instantiation: dwfl_module_eh_cfi.c:pwrite_retry
Unexecuted instantiation: linux-pid-attach.c:pwrite_retry
Unexecuted instantiation: dwarf_begin.c:pwrite_retry
Unexecuted instantiation: dwarf_getabbrev.c:pwrite_retry
Unexecuted instantiation: dwarf_nextcu.c:pwrite_retry
Unexecuted instantiation: dwarf_offdie.c:pwrite_retry
Unexecuted instantiation: dwarf_formstring.c:pwrite_retry
Unexecuted instantiation: dwarf_haschildren.c:pwrite_retry
Unexecuted instantiation: dwarf_formsdata.c:pwrite_retry
Unexecuted instantiation: dwarf_formref.c:pwrite_retry
Unexecuted instantiation: dwarf_srclang.c:pwrite_retry
Unexecuted instantiation: dwarf_getlocation.c:pwrite_retry
Unexecuted instantiation: fde.c:pwrite_retry
Unexecuted instantiation: cfi.c:pwrite_retry
Unexecuted instantiation: dwarf_getcfi.c:pwrite_retry
Unexecuted instantiation: dwarf_getcfi_elf.c:pwrite_retry
Unexecuted instantiation: dwarf_get_units.c:pwrite_retry
Unexecuted instantiation: segment.c:pwrite_retry
Unexecuted instantiation: dwarf_formaddr.c:pwrite_retry
Unexecuted instantiation: dwarf_lowpc.c:pwrite_retry
Unexecuted instantiation: dwarf_ranges.c:pwrite_retry
Unexecuted instantiation: dwarf_formblock.c:pwrite_retry
Unexecuted instantiation: dwarf_next_cfi.c:pwrite_retry
Unexecuted instantiation: cie.c:pwrite_retry
Unexecuted instantiation: dwarf_highpc.c:pwrite_retry
Unexecuted instantiation: elf_version.c:pwrite_retry
Unexecuted instantiation: elf_hash.c:pwrite_retry
Unexecuted instantiation: elf_error.c:pwrite_retry
Unexecuted instantiation: elf_begin.c:pwrite_retry
Unexecuted instantiation: elf_next.c:pwrite_retry
Unexecuted instantiation: elf_end.c:pwrite_retry
Unexecuted instantiation: elf_kind.c:pwrite_retry
Unexecuted instantiation: gelf_getclass.c:pwrite_retry
Unexecuted instantiation: elf_getident.c:pwrite_retry
Unexecuted instantiation: gelf_fsize.c:pwrite_retry
Unexecuted instantiation: elf32_xlatetof.c:pwrite_retry
Unexecuted instantiation: elf32_xlatetom.c:pwrite_retry
Unexecuted instantiation: elf64_xlatetof.c:pwrite_retry
Unexecuted instantiation: elf64_xlatetom.c:pwrite_retry
Unexecuted instantiation: gelf_xlate.c:pwrite_retry
Unexecuted instantiation: gelf_getehdr.c:pwrite_retry
Unexecuted instantiation: gelf_getphdr.c:pwrite_retry
Unexecuted instantiation: elf_getarhdr.c:pwrite_retry
Unexecuted instantiation: elf_rawfile.c:pwrite_retry
Unexecuted instantiation: elf_readall.c:pwrite_retry
Unexecuted instantiation: elf_cntl.c:pwrite_retry
Unexecuted instantiation: elf_getscn.c:pwrite_retry
Unexecuted instantiation: elf_nextscn.c:pwrite_retry
Unexecuted instantiation: elf_ndxscn.c:pwrite_retry
Unexecuted instantiation: gelf_getshdr.c:pwrite_retry
Unexecuted instantiation: gelf_update_shdr.c:pwrite_retry
Unexecuted instantiation: elf_strptr.c:pwrite_retry
Unexecuted instantiation: elf_rawdata.c:pwrite_retry
Unexecuted instantiation: elf_getdata.c:pwrite_retry
Unexecuted instantiation: elf_getdata_rawchunk.c:pwrite_retry
Unexecuted instantiation: elf_memory.c:pwrite_retry
Unexecuted instantiation: gelf_getrel.c:pwrite_retry
Unexecuted instantiation: gelf_getrela.c:pwrite_retry
Unexecuted instantiation: gelf_update_rel.c:pwrite_retry
Unexecuted instantiation: gelf_update_rela.c:pwrite_retry
Unexecuted instantiation: gelf_getdyn.c:pwrite_retry
Unexecuted instantiation: gelf_getnote.c:pwrite_retry
Unexecuted instantiation: gelf_xlatetof.c:pwrite_retry
Unexecuted instantiation: gelf_xlatetom.c:pwrite_retry
Unexecuted instantiation: gelf_getsymshndx.c:pwrite_retry
Unexecuted instantiation: elf_getphdrnum.c:pwrite_retry
Unexecuted instantiation: elf_getshdrnum.c:pwrite_retry
Unexecuted instantiation: elf_getshdrstrndx.c:pwrite_retry
Unexecuted instantiation: gelf_offscn.c:pwrite_retry
Unexecuted instantiation: elf_compress.c:pwrite_retry
Unexecuted instantiation: elf_compress_gnu.c:pwrite_retry
Unexecuted instantiation: elf32_getphdr.c:pwrite_retry
Unexecuted instantiation: elf64_getphdr.c:pwrite_retry
Unexecuted instantiation: elf32_getshdr.c:pwrite_retry
Unexecuted instantiation: elf64_getshdr.c:pwrite_retry
Unexecuted instantiation: elf32_offscn.c:pwrite_retry
Unexecuted instantiation: elf64_offscn.c:pwrite_retry
Unexecuted instantiation: gelf_getchdr.c:pwrite_retry
Unexecuted instantiation: elf32_getchdr.c:pwrite_retry
Unexecuted instantiation: elf64_getchdr.c:pwrite_retry
Unexecuted instantiation: core-file.c:pwrite_retry
Unexecuted instantiation: linux-core-attach.c:pwrite_retry
Unexecuted instantiation: dwfl_segment_report_module.c:pwrite_retry
Unexecuted instantiation: link_map.c:pwrite_retry
Unexecuted instantiation: dwfl_module_report_build_id.c:pwrite_retry
Unexecuted instantiation: derelocate.c:pwrite_retry
Unexecuted instantiation: elf_clone.c:pwrite_retry
Unexecuted instantiation: fuzz-libelf.c:pwrite_retry
198
199
static inline ssize_t __attribute__ ((unused))
200
write_retry (int fd, const void *buf, size_t len)
201
5.78k
{
202
5.78k
  ssize_t recvd = 0;
203
204
5.78k
  do
205
5.78k
    {
206
5.78k
      ssize_t ret = TEMP_FAILURE_RETRY (write (fd, ((char *)buf) + recvd, len - recvd));
207
5.78k
      if (ret <= 0)
208
0
  return ret < 0 ? ret : recvd;
209
210
5.78k
      recvd += ret;
211
5.78k
    }
212
5.78k
  while ((size_t) recvd < len);
213
214
5.78k
  return recvd;
215
5.78k
}
fuzz-libdwfl.c:write_retry
Line
Count
Source
201
20
{
202
20
  ssize_t recvd = 0;
203
204
20
  do
205
20
    {
206
20
      ssize_t ret = TEMP_FAILURE_RETRY (write (fd, ((char *)buf) + recvd, len - recvd));
207
20
      if (ret <= 0)
208
0
  return ret < 0 ? ret : recvd;
209
210
20
      recvd += ret;
211
20
    }
212
20
  while ((size_t) recvd < len);
213
214
20
  return recvd;
215
20
}
Unexecuted instantiation: dwfl_begin.c:write_retry
Unexecuted instantiation: dwfl_end.c:write_retry
Unexecuted instantiation: dwfl_error.c:write_retry
Unexecuted instantiation: dwfl_module.c:write_retry
Unexecuted instantiation: offline.c:write_retry
Unexecuted instantiation: dwfl_module_getdwarf.c:write_retry
Unexecuted instantiation: find-debuginfo.c:write_retry
Unexecuted instantiation: dwfl_build_id_find_debuginfo.c:write_retry
Unexecuted instantiation: libdwfl_crc32_file.c:write_retry
Unexecuted instantiation: open.c:write_retry
Unexecuted instantiation: image-header.c:write_retry
Unexecuted instantiation: dwfl_frame.c:write_retry
Unexecuted instantiation: frame_unwind.c:write_retry
Unexecuted instantiation: dwfl_frame_pc.c:write_retry
Unexecuted instantiation: dwfl_frame_regs.c:write_retry
Unexecuted instantiation: gzip.c:write_retry
Unexecuted instantiation: dwflst_process_tracker.c:write_retry
Unexecuted instantiation: dwflst_tracker_find_elf.c:write_retry
Unexecuted instantiation: dwflst_tracker_elftab.c:write_retry
Unexecuted instantiation: dwflst_tracker_dwfltab.c:write_retry
Unexecuted instantiation: dwelf_elf_gnu_debuglink.c:write_retry
Unexecuted instantiation: dwelf_dwarf_gnu_debugaltlink.c:write_retry
Unexecuted instantiation: dwelf_elf_gnu_build_id.c:write_retry
Unexecuted instantiation: eblopenbackend.c:write_retry
Unexecuted instantiation: arm_symbol.c:write_retry
Unexecuted instantiation: aarch64_symbol.c:write_retry
Unexecuted instantiation: aarch64_initreg.c:write_retry
Unexecuted instantiation: sparc_initreg.c:write_retry
Unexecuted instantiation: ppc_initreg.c:write_retry
Unexecuted instantiation: s390_initreg.c:write_retry
Unexecuted instantiation: riscv_init.c:write_retry
Unexecuted instantiation: riscv_initreg.c:write_retry
Unexecuted instantiation: csky_initreg.c:write_retry
Unexecuted instantiation: loongarch_initreg.c:write_retry
Unexecuted instantiation: mips_init.c:write_retry
Unexecuted instantiation: mips_symbol.c:write_retry
Unexecuted instantiation: mips_regs.c:write_retry
Unexecuted instantiation: mips_retval.c:write_retry
Unexecuted instantiation: i386_disasm.c:write_retry
Unexecuted instantiation: x86_64_disasm.c:write_retry
Unexecuted instantiation: bpf_disasm.c:write_retry
Unexecuted instantiation: riscv_disasm.c:write_retry
Unexecuted instantiation: dwarf_begin_elf.c:write_retry
Unexecuted instantiation: dwarf_end.c:write_retry
Unexecuted instantiation: dwarf_tag.c:write_retry
Unexecuted instantiation: dwarf_error.c:write_retry
Unexecuted instantiation: dwarf_attr.c:write_retry
Unexecuted instantiation: dwarf_abbrev_hash.c:write_retry
Unexecuted instantiation: dwarf_sig8_hash.c:write_retry
Unexecuted instantiation: dwarf_attr_integrate.c:write_retry
Unexecuted instantiation: dwarf_hasattr_integrate.c:write_retry
Unexecuted instantiation: dwarf_child.c:write_retry
Unexecuted instantiation: dwarf_formudata.c:write_retry
Unexecuted instantiation: dwarf_formref_die.c:write_retry
Unexecuted instantiation: dwarf_siblingof.c:write_retry
Unexecuted instantiation: dwarf_diecu.c:write_retry
Unexecuted instantiation: dwarf_hasattr.c:write_retry
Unexecuted instantiation: dwarf_bytesize.c:write_retry
Unexecuted instantiation: dwarf_bitsize.c:write_retry
Unexecuted instantiation: dwarf_formflag.c:write_retry
Unexecuted instantiation: libdw_findcu.c:write_retry
Unexecuted instantiation: libdw_form.c:write_retry
Unexecuted instantiation: libdw_alloc.c:write_retry
Unexecuted instantiation: frame-cache.c:write_retry
Unexecuted instantiation: dwarf_frame_cfa.c:write_retry
Unexecuted instantiation: dwarf_frame_register.c:write_retry
Unexecuted instantiation: dwarf_cfi_addrframe.c:write_retry
Unexecuted instantiation: dwarf_cfi_end.c:write_retry
Unexecuted instantiation: dwarf_aggregate_size.c:write_retry
Unexecuted instantiation: dwarf_getalt.c:write_retry
Unexecuted instantiation: dwarf_setalt.c:write_retry
Unexecuted instantiation: dwarf_peel_type.c:write_retry
Unexecuted instantiation: dwarf_default_lower_bound.c:write_retry
Unexecuted instantiation: libdw_find_split_unit.c:write_retry
Unexecuted instantiation: dwarf_cu_dwp_section_info.c:write_retry
Unexecuted instantiation: dwfl_report_elf.c:write_retry
Unexecuted instantiation: relocate.c:write_retry
Unexecuted instantiation: dwfl_module_build_id.c:write_retry
Unexecuted instantiation: dwfl_build_id_find_elf.c:write_retry
Unexecuted instantiation: linux-proc-maps.c:write_retry
Unexecuted instantiation: dwfl_addrmodule.c:write_retry
Unexecuted instantiation: libdwfl_crc32.c:write_retry
Unexecuted instantiation: elf-from-memory.c:write_retry
Unexecuted instantiation: dwfl_module_dwarf_cfi.c:write_retry
Unexecuted instantiation: dwfl_module_eh_cfi.c:write_retry
Unexecuted instantiation: linux-pid-attach.c:write_retry
Unexecuted instantiation: dwarf_begin.c:write_retry
Unexecuted instantiation: dwarf_getabbrev.c:write_retry
Unexecuted instantiation: dwarf_nextcu.c:write_retry
Unexecuted instantiation: dwarf_offdie.c:write_retry
Unexecuted instantiation: dwarf_formstring.c:write_retry
Unexecuted instantiation: dwarf_haschildren.c:write_retry
Unexecuted instantiation: dwarf_formsdata.c:write_retry
Unexecuted instantiation: dwarf_formref.c:write_retry
Unexecuted instantiation: dwarf_srclang.c:write_retry
Unexecuted instantiation: dwarf_getlocation.c:write_retry
Unexecuted instantiation: fde.c:write_retry
Unexecuted instantiation: cfi.c:write_retry
Unexecuted instantiation: dwarf_getcfi.c:write_retry
Unexecuted instantiation: dwarf_getcfi_elf.c:write_retry
Unexecuted instantiation: dwarf_get_units.c:write_retry
Unexecuted instantiation: segment.c:write_retry
Unexecuted instantiation: dwarf_formaddr.c:write_retry
Unexecuted instantiation: dwarf_lowpc.c:write_retry
Unexecuted instantiation: dwarf_ranges.c:write_retry
Unexecuted instantiation: dwarf_formblock.c:write_retry
Unexecuted instantiation: dwarf_next_cfi.c:write_retry
Unexecuted instantiation: cie.c:write_retry
Unexecuted instantiation: dwarf_highpc.c:write_retry
Unexecuted instantiation: elf_version.c:write_retry
Unexecuted instantiation: elf_hash.c:write_retry
Unexecuted instantiation: elf_error.c:write_retry
Unexecuted instantiation: elf_begin.c:write_retry
Unexecuted instantiation: elf_next.c:write_retry
Unexecuted instantiation: elf_end.c:write_retry
Unexecuted instantiation: elf_kind.c:write_retry
Unexecuted instantiation: gelf_getclass.c:write_retry
Unexecuted instantiation: elf_getident.c:write_retry
Unexecuted instantiation: gelf_fsize.c:write_retry
Unexecuted instantiation: elf32_xlatetof.c:write_retry
Unexecuted instantiation: elf32_xlatetom.c:write_retry
Unexecuted instantiation: elf64_xlatetof.c:write_retry
Unexecuted instantiation: elf64_xlatetom.c:write_retry
Unexecuted instantiation: gelf_xlate.c:write_retry
Unexecuted instantiation: gelf_getehdr.c:write_retry
Unexecuted instantiation: gelf_getphdr.c:write_retry
Unexecuted instantiation: elf_getarhdr.c:write_retry
Unexecuted instantiation: elf_rawfile.c:write_retry
Unexecuted instantiation: elf_readall.c:write_retry
Unexecuted instantiation: elf_cntl.c:write_retry
Unexecuted instantiation: elf_getscn.c:write_retry
Unexecuted instantiation: elf_nextscn.c:write_retry
Unexecuted instantiation: elf_ndxscn.c:write_retry
Unexecuted instantiation: gelf_getshdr.c:write_retry
Unexecuted instantiation: gelf_update_shdr.c:write_retry
Unexecuted instantiation: elf_strptr.c:write_retry
Unexecuted instantiation: elf_rawdata.c:write_retry
Unexecuted instantiation: elf_getdata.c:write_retry
Unexecuted instantiation: elf_getdata_rawchunk.c:write_retry
Unexecuted instantiation: elf_memory.c:write_retry
Unexecuted instantiation: gelf_getrel.c:write_retry
Unexecuted instantiation: gelf_getrela.c:write_retry
Unexecuted instantiation: gelf_update_rel.c:write_retry
Unexecuted instantiation: gelf_update_rela.c:write_retry
Unexecuted instantiation: gelf_getdyn.c:write_retry
Unexecuted instantiation: gelf_getnote.c:write_retry
Unexecuted instantiation: gelf_xlatetof.c:write_retry
Unexecuted instantiation: gelf_xlatetom.c:write_retry
Unexecuted instantiation: gelf_getsymshndx.c:write_retry
Unexecuted instantiation: elf_getphdrnum.c:write_retry
Unexecuted instantiation: elf_getshdrnum.c:write_retry
Unexecuted instantiation: elf_getshdrstrndx.c:write_retry
Unexecuted instantiation: gelf_offscn.c:write_retry
Unexecuted instantiation: elf_compress.c:write_retry
Unexecuted instantiation: elf_compress_gnu.c:write_retry
Unexecuted instantiation: elf32_getphdr.c:write_retry
Unexecuted instantiation: elf64_getphdr.c:write_retry
Unexecuted instantiation: elf32_getshdr.c:write_retry
Unexecuted instantiation: elf64_getshdr.c:write_retry
Unexecuted instantiation: elf32_offscn.c:write_retry
Unexecuted instantiation: elf64_offscn.c:write_retry
Unexecuted instantiation: gelf_getchdr.c:write_retry
Unexecuted instantiation: elf32_getchdr.c:write_retry
Unexecuted instantiation: elf64_getchdr.c:write_retry
Unexecuted instantiation: core-file.c:write_retry
Unexecuted instantiation: linux-core-attach.c:write_retry
Unexecuted instantiation: dwfl_segment_report_module.c:write_retry
Unexecuted instantiation: link_map.c:write_retry
Unexecuted instantiation: dwfl_module_report_build_id.c:write_retry
Unexecuted instantiation: derelocate.c:write_retry
Unexecuted instantiation: elf_clone.c:write_retry
fuzz-libelf.c:write_retry
Line
Count
Source
201
5.76k
{
202
5.76k
  ssize_t recvd = 0;
203
204
5.76k
  do
205
5.76k
    {
206
5.76k
      ssize_t ret = TEMP_FAILURE_RETRY (write (fd, ((char *)buf) + recvd, len - recvd));
207
5.76k
      if (ret <= 0)
208
0
  return ret < 0 ? ret : recvd;
209
210
5.76k
      recvd += ret;
211
5.76k
    }
212
5.76k
  while ((size_t) recvd < len);
213
214
5.76k
  return recvd;
215
5.76k
}
216
217
static inline ssize_t __attribute__ ((unused))
218
pread_retry (int fd, void *buf, size_t len, off_t off)
219
155k
{
220
155k
  ssize_t recvd = 0;
221
222
155k
  do
223
155k
    {
224
155k
      ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
225
155k
                 off + recvd));
226
155k
      if (ret <= 0)
227
12.0k
  return ret < 0 ? ret : recvd;
228
229
143k
      recvd += ret;
230
143k
    }
231
155k
  while ((size_t) recvd < len);
232
233
143k
  return recvd;
234
155k
}
Unexecuted instantiation: fuzz-libdwfl.c:pread_retry
Unexecuted instantiation: dwfl_begin.c:pread_retry
Unexecuted instantiation: dwfl_end.c:pread_retry
Unexecuted instantiation: dwfl_error.c:pread_retry
Unexecuted instantiation: dwfl_module.c:pread_retry
Unexecuted instantiation: offline.c:pread_retry
Unexecuted instantiation: dwfl_module_getdwarf.c:pread_retry
Unexecuted instantiation: find-debuginfo.c:pread_retry
Unexecuted instantiation: dwfl_build_id_find_debuginfo.c:pread_retry
Unexecuted instantiation: libdwfl_crc32_file.c:pread_retry
Unexecuted instantiation: open.c:pread_retry
Unexecuted instantiation: image-header.c:pread_retry
Unexecuted instantiation: dwfl_frame.c:pread_retry
Unexecuted instantiation: frame_unwind.c:pread_retry
Unexecuted instantiation: dwfl_frame_pc.c:pread_retry
Unexecuted instantiation: dwfl_frame_regs.c:pread_retry
Unexecuted instantiation: gzip.c:pread_retry
Unexecuted instantiation: dwflst_process_tracker.c:pread_retry
Unexecuted instantiation: dwflst_tracker_find_elf.c:pread_retry
Unexecuted instantiation: dwflst_tracker_elftab.c:pread_retry
Unexecuted instantiation: dwflst_tracker_dwfltab.c:pread_retry
Unexecuted instantiation: dwelf_elf_gnu_debuglink.c:pread_retry
Unexecuted instantiation: dwelf_dwarf_gnu_debugaltlink.c:pread_retry
Unexecuted instantiation: dwelf_elf_gnu_build_id.c:pread_retry
Unexecuted instantiation: eblopenbackend.c:pread_retry
Unexecuted instantiation: arm_symbol.c:pread_retry
Unexecuted instantiation: aarch64_symbol.c:pread_retry
Unexecuted instantiation: aarch64_initreg.c:pread_retry
Unexecuted instantiation: sparc_initreg.c:pread_retry
Unexecuted instantiation: ppc_initreg.c:pread_retry
Unexecuted instantiation: s390_initreg.c:pread_retry
Unexecuted instantiation: riscv_init.c:pread_retry
Unexecuted instantiation: riscv_initreg.c:pread_retry
Unexecuted instantiation: csky_initreg.c:pread_retry
Unexecuted instantiation: loongarch_initreg.c:pread_retry
Unexecuted instantiation: mips_init.c:pread_retry
Unexecuted instantiation: mips_symbol.c:pread_retry
Unexecuted instantiation: mips_regs.c:pread_retry
Unexecuted instantiation: mips_retval.c:pread_retry
Unexecuted instantiation: i386_disasm.c:pread_retry
Unexecuted instantiation: x86_64_disasm.c:pread_retry
Unexecuted instantiation: bpf_disasm.c:pread_retry
Unexecuted instantiation: riscv_disasm.c:pread_retry
Unexecuted instantiation: dwarf_begin_elf.c:pread_retry
Unexecuted instantiation: dwarf_end.c:pread_retry
Unexecuted instantiation: dwarf_tag.c:pread_retry
Unexecuted instantiation: dwarf_error.c:pread_retry
Unexecuted instantiation: dwarf_attr.c:pread_retry
Unexecuted instantiation: dwarf_abbrev_hash.c:pread_retry
Unexecuted instantiation: dwarf_sig8_hash.c:pread_retry
Unexecuted instantiation: dwarf_attr_integrate.c:pread_retry
Unexecuted instantiation: dwarf_hasattr_integrate.c:pread_retry
Unexecuted instantiation: dwarf_child.c:pread_retry
Unexecuted instantiation: dwarf_formudata.c:pread_retry
Unexecuted instantiation: dwarf_formref_die.c:pread_retry
Unexecuted instantiation: dwarf_siblingof.c:pread_retry
Unexecuted instantiation: dwarf_diecu.c:pread_retry
Unexecuted instantiation: dwarf_hasattr.c:pread_retry
Unexecuted instantiation: dwarf_bytesize.c:pread_retry
Unexecuted instantiation: dwarf_bitsize.c:pread_retry
Unexecuted instantiation: dwarf_formflag.c:pread_retry
Unexecuted instantiation: libdw_findcu.c:pread_retry
Unexecuted instantiation: libdw_form.c:pread_retry
Unexecuted instantiation: libdw_alloc.c:pread_retry
Unexecuted instantiation: frame-cache.c:pread_retry
Unexecuted instantiation: dwarf_frame_cfa.c:pread_retry
Unexecuted instantiation: dwarf_frame_register.c:pread_retry
Unexecuted instantiation: dwarf_cfi_addrframe.c:pread_retry
Unexecuted instantiation: dwarf_cfi_end.c:pread_retry
Unexecuted instantiation: dwarf_aggregate_size.c:pread_retry
Unexecuted instantiation: dwarf_getalt.c:pread_retry
Unexecuted instantiation: dwarf_setalt.c:pread_retry
Unexecuted instantiation: dwarf_peel_type.c:pread_retry
Unexecuted instantiation: dwarf_default_lower_bound.c:pread_retry
Unexecuted instantiation: libdw_find_split_unit.c:pread_retry
Unexecuted instantiation: dwarf_cu_dwp_section_info.c:pread_retry
Unexecuted instantiation: dwfl_report_elf.c:pread_retry
Unexecuted instantiation: relocate.c:pread_retry
Unexecuted instantiation: dwfl_module_build_id.c:pread_retry
Unexecuted instantiation: dwfl_build_id_find_elf.c:pread_retry
Unexecuted instantiation: linux-proc-maps.c:pread_retry
Unexecuted instantiation: dwfl_addrmodule.c:pread_retry
Unexecuted instantiation: libdwfl_crc32.c:pread_retry
Unexecuted instantiation: elf-from-memory.c:pread_retry
Unexecuted instantiation: dwfl_module_dwarf_cfi.c:pread_retry
Unexecuted instantiation: dwfl_module_eh_cfi.c:pread_retry
Unexecuted instantiation: linux-pid-attach.c:pread_retry
Unexecuted instantiation: dwarf_begin.c:pread_retry
Unexecuted instantiation: dwarf_getabbrev.c:pread_retry
Unexecuted instantiation: dwarf_nextcu.c:pread_retry
Unexecuted instantiation: dwarf_offdie.c:pread_retry
Unexecuted instantiation: dwarf_formstring.c:pread_retry
Unexecuted instantiation: dwarf_haschildren.c:pread_retry
Unexecuted instantiation: dwarf_formsdata.c:pread_retry
Unexecuted instantiation: dwarf_formref.c:pread_retry
Unexecuted instantiation: dwarf_srclang.c:pread_retry
Unexecuted instantiation: dwarf_getlocation.c:pread_retry
Unexecuted instantiation: fde.c:pread_retry
Unexecuted instantiation: cfi.c:pread_retry
Unexecuted instantiation: dwarf_getcfi.c:pread_retry
Unexecuted instantiation: dwarf_getcfi_elf.c:pread_retry
Unexecuted instantiation: dwarf_get_units.c:pread_retry
Unexecuted instantiation: segment.c:pread_retry
Unexecuted instantiation: dwarf_formaddr.c:pread_retry
Unexecuted instantiation: dwarf_lowpc.c:pread_retry
Unexecuted instantiation: dwarf_ranges.c:pread_retry
Unexecuted instantiation: dwarf_formblock.c:pread_retry
Unexecuted instantiation: dwarf_next_cfi.c:pread_retry
Unexecuted instantiation: cie.c:pread_retry
Unexecuted instantiation: dwarf_highpc.c:pread_retry
Unexecuted instantiation: elf_version.c:pread_retry
Unexecuted instantiation: elf_hash.c:pread_retry
Unexecuted instantiation: elf_error.c:pread_retry
elf_begin.c:pread_retry
Line
Count
Source
219
30.0k
{
220
30.0k
  ssize_t recvd = 0;
221
222
30.0k
  do
223
30.0k
    {
224
30.0k
      ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
225
30.0k
                 off + recvd));
226
30.0k
      if (ret <= 0)
227
12.0k
  return ret < 0 ? ret : recvd;
228
229
18.0k
      recvd += ret;
230
18.0k
    }
231
30.0k
  while ((size_t) recvd < len);
232
233
18.0k
  return recvd;
234
30.0k
}
Unexecuted instantiation: elf_next.c:pread_retry
Unexecuted instantiation: elf_end.c:pread_retry
Unexecuted instantiation: elf_kind.c:pread_retry
Unexecuted instantiation: gelf_getclass.c:pread_retry
Unexecuted instantiation: elf_getident.c:pread_retry
Unexecuted instantiation: gelf_fsize.c:pread_retry
Unexecuted instantiation: elf32_xlatetof.c:pread_retry
Unexecuted instantiation: elf32_xlatetom.c:pread_retry
Unexecuted instantiation: elf64_xlatetof.c:pread_retry
Unexecuted instantiation: elf64_xlatetom.c:pread_retry
Unexecuted instantiation: gelf_xlate.c:pread_retry
Unexecuted instantiation: gelf_getehdr.c:pread_retry
Unexecuted instantiation: gelf_getphdr.c:pread_retry
Unexecuted instantiation: elf_getarhdr.c:pread_retry
Unexecuted instantiation: elf_rawfile.c:pread_retry
elf_readall.c:pread_retry
Line
Count
Source
219
5.71k
{
220
5.71k
  ssize_t recvd = 0;
221
222
5.71k
  do
223
5.71k
    {
224
5.71k
      ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
225
5.71k
                 off + recvd));
226
5.71k
      if (ret <= 0)
227
0
  return ret < 0 ? ret : recvd;
228
229
5.71k
      recvd += ret;
230
5.71k
    }
231
5.71k
  while ((size_t) recvd < len);
232
233
5.71k
  return recvd;
234
5.71k
}
Unexecuted instantiation: elf_cntl.c:pread_retry
Unexecuted instantiation: elf_getscn.c:pread_retry
Unexecuted instantiation: elf_nextscn.c:pread_retry
Unexecuted instantiation: elf_ndxscn.c:pread_retry
Unexecuted instantiation: gelf_getshdr.c:pread_retry
Unexecuted instantiation: gelf_update_shdr.c:pread_retry
Unexecuted instantiation: elf_strptr.c:pread_retry
Unexecuted instantiation: elf_rawdata.c:pread_retry
elf_getdata.c:pread_retry
Line
Count
Source
219
109k
{
220
109k
  ssize_t recvd = 0;
221
222
109k
  do
223
109k
    {
224
109k
      ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
225
109k
                 off + recvd));
226
109k
      if (ret <= 0)
227
0
  return ret < 0 ? ret : recvd;
228
229
109k
      recvd += ret;
230
109k
    }
231
109k
  while ((size_t) recvd < len);
232
233
109k
  return recvd;
234
109k
}
Unexecuted instantiation: elf_getdata_rawchunk.c:pread_retry
Unexecuted instantiation: elf_memory.c:pread_retry
Unexecuted instantiation: gelf_getrel.c:pread_retry
Unexecuted instantiation: gelf_getrela.c:pread_retry
Unexecuted instantiation: gelf_update_rel.c:pread_retry
Unexecuted instantiation: gelf_update_rela.c:pread_retry
Unexecuted instantiation: gelf_getdyn.c:pread_retry
Unexecuted instantiation: gelf_getnote.c:pread_retry
Unexecuted instantiation: gelf_xlatetof.c:pread_retry
Unexecuted instantiation: gelf_xlatetom.c:pread_retry
Unexecuted instantiation: gelf_getsymshndx.c:pread_retry
Unexecuted instantiation: elf_getphdrnum.c:pread_retry
Unexecuted instantiation: elf_getshdrnum.c:pread_retry
elf_getshdrstrndx.c:pread_retry
Line
Count
Source
219
297
{
220
297
  ssize_t recvd = 0;
221
222
297
  do
223
297
    {
224
297
      ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
225
297
                 off + recvd));
226
297
      if (ret <= 0)
227
0
  return ret < 0 ? ret : recvd;
228
229
297
      recvd += ret;
230
297
    }
231
297
  while ((size_t) recvd < len);
232
233
297
  return recvd;
234
297
}
Unexecuted instantiation: gelf_offscn.c:pread_retry
Unexecuted instantiation: elf_compress.c:pread_retry
Unexecuted instantiation: elf_compress_gnu.c:pread_retry
Unexecuted instantiation: elf32_getphdr.c:pread_retry
Unexecuted instantiation: elf64_getphdr.c:pread_retry
elf32_getshdr.c:pread_retry
Line
Count
Source
219
7.96k
{
220
7.96k
  ssize_t recvd = 0;
221
222
7.96k
  do
223
7.96k
    {
224
7.96k
      ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
225
7.96k
                 off + recvd));
226
7.96k
      if (ret <= 0)
227
0
  return ret < 0 ? ret : recvd;
228
229
7.96k
      recvd += ret;
230
7.96k
    }
231
7.96k
  while ((size_t) recvd < len);
232
233
7.96k
  return recvd;
234
7.96k
}
elf64_getshdr.c:pread_retry
Line
Count
Source
219
2.08k
{
220
2.08k
  ssize_t recvd = 0;
221
222
2.08k
  do
223
2.08k
    {
224
2.08k
      ssize_t ret = TEMP_FAILURE_RETRY (pread (fd, ((char *)buf) + recvd, len - recvd,
225
2.08k
                 off + recvd));
226
2.08k
      if (ret <= 0)
227
0
  return ret < 0 ? ret : recvd;
228
229
2.08k
      recvd += ret;
230
2.08k
    }
231
2.08k
  while ((size_t) recvd < len);
232
233
2.08k
  return recvd;
234
2.08k
}
Unexecuted instantiation: elf32_offscn.c:pread_retry
Unexecuted instantiation: elf64_offscn.c:pread_retry
Unexecuted instantiation: gelf_getchdr.c:pread_retry
Unexecuted instantiation: elf32_getchdr.c:pread_retry
Unexecuted instantiation: elf64_getchdr.c:pread_retry
Unexecuted instantiation: core-file.c:pread_retry
Unexecuted instantiation: linux-core-attach.c:pread_retry
Unexecuted instantiation: dwfl_segment_report_module.c:pread_retry
Unexecuted instantiation: link_map.c:pread_retry
Unexecuted instantiation: dwfl_module_report_build_id.c:pread_retry
Unexecuted instantiation: derelocate.c:pread_retry
Unexecuted instantiation: elf_clone.c:pread_retry
Unexecuted instantiation: fuzz-libelf.c:pread_retry
235
236
/* The demangler from libstdc++.  */
237
extern char *__cxa_demangle (const char *mangled_name, char *output_buffer,
238
           size_t *length, int *status);
239
240
/* A static assertion.  This will cause a compile-time error if EXPR,
241
   which must be a compile-time constant, is false.  */
242
243
#define eu_static_assert(expr)            \
244
69
  extern int never_defined_just_used_for_checking[(expr) ? 1 : -1]  \
245
69
    __attribute__ ((unused))
246
247
/* We really want a basename implementation that doesn't modify the
248
   input argument.  Normally you get that from string.h with _GNU_SOURCE
249
   define.  But some libc implementations don't define it and other
250
   define it, but provide an implementation that still modifies the
251
   argument.  So define our own and poison a bare basename symbol.  */
252
static inline const char *
253
xbasename(const char *s)
254
7.46k
{
255
7.46k
  const char *p = strrchr(s, '/');
256
7.46k
  return p ? p+1 : s;
257
7.46k
}
Unexecuted instantiation: fuzz-libdwfl.c:xbasename
Unexecuted instantiation: dwfl_begin.c:xbasename
Unexecuted instantiation: dwfl_end.c:xbasename
Unexecuted instantiation: dwfl_error.c:xbasename
Unexecuted instantiation: dwfl_module.c:xbasename
Unexecuted instantiation: offline.c:xbasename
Unexecuted instantiation: dwfl_module_getdwarf.c:xbasename
find-debuginfo.c:xbasename
Line
Count
Source
254
2
{
255
2
  const char *p = strrchr(s, '/');
256
2
  return p ? p+1 : s;
257
2
}
Unexecuted instantiation: dwfl_build_id_find_debuginfo.c:xbasename
Unexecuted instantiation: libdwfl_crc32_file.c:xbasename
Unexecuted instantiation: open.c:xbasename
Unexecuted instantiation: image-header.c:xbasename
Unexecuted instantiation: dwfl_frame.c:xbasename
Unexecuted instantiation: frame_unwind.c:xbasename
Unexecuted instantiation: dwfl_frame_pc.c:xbasename
Unexecuted instantiation: dwfl_frame_regs.c:xbasename
Unexecuted instantiation: gzip.c:xbasename
Unexecuted instantiation: dwflst_process_tracker.c:xbasename
Unexecuted instantiation: dwflst_tracker_find_elf.c:xbasename
Unexecuted instantiation: dwflst_tracker_elftab.c:xbasename
Unexecuted instantiation: dwflst_tracker_dwfltab.c:xbasename
Unexecuted instantiation: dwelf_elf_gnu_debuglink.c:xbasename
Unexecuted instantiation: dwelf_dwarf_gnu_debugaltlink.c:xbasename
Unexecuted instantiation: dwelf_elf_gnu_build_id.c:xbasename
Unexecuted instantiation: eblopenbackend.c:xbasename
Unexecuted instantiation: arm_symbol.c:xbasename
Unexecuted instantiation: aarch64_symbol.c:xbasename
Unexecuted instantiation: aarch64_initreg.c:xbasename
Unexecuted instantiation: sparc_initreg.c:xbasename
Unexecuted instantiation: ppc_initreg.c:xbasename
Unexecuted instantiation: s390_initreg.c:xbasename
Unexecuted instantiation: riscv_init.c:xbasename
Unexecuted instantiation: riscv_initreg.c:xbasename
Unexecuted instantiation: csky_initreg.c:xbasename
Unexecuted instantiation: loongarch_initreg.c:xbasename
Unexecuted instantiation: mips_init.c:xbasename
Unexecuted instantiation: mips_symbol.c:xbasename
Unexecuted instantiation: mips_regs.c:xbasename
Unexecuted instantiation: mips_retval.c:xbasename
Unexecuted instantiation: i386_disasm.c:xbasename
Unexecuted instantiation: x86_64_disasm.c:xbasename
Unexecuted instantiation: bpf_disasm.c:xbasename
Unexecuted instantiation: riscv_disasm.c:xbasename
Unexecuted instantiation: dwarf_begin_elf.c:xbasename
Unexecuted instantiation: dwarf_end.c:xbasename
Unexecuted instantiation: dwarf_tag.c:xbasename
Unexecuted instantiation: dwarf_error.c:xbasename
Unexecuted instantiation: dwarf_attr.c:xbasename
Unexecuted instantiation: dwarf_abbrev_hash.c:xbasename
Unexecuted instantiation: dwarf_sig8_hash.c:xbasename
Unexecuted instantiation: dwarf_attr_integrate.c:xbasename
Unexecuted instantiation: dwarf_hasattr_integrate.c:xbasename
Unexecuted instantiation: dwarf_child.c:xbasename
Unexecuted instantiation: dwarf_formudata.c:xbasename
Unexecuted instantiation: dwarf_formref_die.c:xbasename
Unexecuted instantiation: dwarf_siblingof.c:xbasename
Unexecuted instantiation: dwarf_diecu.c:xbasename
Unexecuted instantiation: dwarf_hasattr.c:xbasename
Unexecuted instantiation: dwarf_bytesize.c:xbasename
Unexecuted instantiation: dwarf_bitsize.c:xbasename
Unexecuted instantiation: dwarf_formflag.c:xbasename
Unexecuted instantiation: libdw_findcu.c:xbasename
Unexecuted instantiation: libdw_form.c:xbasename
Unexecuted instantiation: libdw_alloc.c:xbasename
Unexecuted instantiation: frame-cache.c:xbasename
Unexecuted instantiation: dwarf_frame_cfa.c:xbasename
Unexecuted instantiation: dwarf_frame_register.c:xbasename
Unexecuted instantiation: dwarf_cfi_addrframe.c:xbasename
Unexecuted instantiation: dwarf_cfi_end.c:xbasename
Unexecuted instantiation: dwarf_aggregate_size.c:xbasename
Unexecuted instantiation: dwarf_getalt.c:xbasename
Unexecuted instantiation: dwarf_setalt.c:xbasename
Unexecuted instantiation: dwarf_peel_type.c:xbasename
Unexecuted instantiation: dwarf_default_lower_bound.c:xbasename
Unexecuted instantiation: libdw_find_split_unit.c:xbasename
Unexecuted instantiation: dwarf_cu_dwp_section_info.c:xbasename
Unexecuted instantiation: dwfl_report_elf.c:xbasename
Unexecuted instantiation: relocate.c:xbasename
Unexecuted instantiation: dwfl_module_build_id.c:xbasename
Unexecuted instantiation: dwfl_build_id_find_elf.c:xbasename
Unexecuted instantiation: linux-proc-maps.c:xbasename
Unexecuted instantiation: dwfl_addrmodule.c:xbasename
Unexecuted instantiation: libdwfl_crc32.c:xbasename
Unexecuted instantiation: elf-from-memory.c:xbasename
Unexecuted instantiation: dwfl_module_dwarf_cfi.c:xbasename
Unexecuted instantiation: dwfl_module_eh_cfi.c:xbasename
Unexecuted instantiation: linux-pid-attach.c:xbasename
Unexecuted instantiation: dwarf_begin.c:xbasename
Unexecuted instantiation: dwarf_getabbrev.c:xbasename
Unexecuted instantiation: dwarf_nextcu.c:xbasename
Unexecuted instantiation: dwarf_offdie.c:xbasename
Unexecuted instantiation: dwarf_formstring.c:xbasename
Unexecuted instantiation: dwarf_haschildren.c:xbasename
Unexecuted instantiation: dwarf_formsdata.c:xbasename
Unexecuted instantiation: dwarf_formref.c:xbasename
Unexecuted instantiation: dwarf_srclang.c:xbasename
Unexecuted instantiation: dwarf_getlocation.c:xbasename
Unexecuted instantiation: fde.c:xbasename
Unexecuted instantiation: cfi.c:xbasename
Unexecuted instantiation: dwarf_getcfi.c:xbasename
Unexecuted instantiation: dwarf_getcfi_elf.c:xbasename
Unexecuted instantiation: dwarf_get_units.c:xbasename
Unexecuted instantiation: segment.c:xbasename
Unexecuted instantiation: dwarf_formaddr.c:xbasename
Unexecuted instantiation: dwarf_lowpc.c:xbasename
Unexecuted instantiation: dwarf_ranges.c:xbasename
Unexecuted instantiation: dwarf_formblock.c:xbasename
Unexecuted instantiation: dwarf_next_cfi.c:xbasename
Unexecuted instantiation: cie.c:xbasename
Unexecuted instantiation: dwarf_highpc.c:xbasename
Unexecuted instantiation: elf_version.c:xbasename
Unexecuted instantiation: elf_hash.c:xbasename
Unexecuted instantiation: elf_error.c:xbasename
Unexecuted instantiation: elf_begin.c:xbasename
Unexecuted instantiation: elf_next.c:xbasename
Unexecuted instantiation: elf_end.c:xbasename
Unexecuted instantiation: elf_kind.c:xbasename
Unexecuted instantiation: gelf_getclass.c:xbasename
Unexecuted instantiation: elf_getident.c:xbasename
Unexecuted instantiation: gelf_fsize.c:xbasename
Unexecuted instantiation: elf32_xlatetof.c:xbasename
Unexecuted instantiation: elf32_xlatetom.c:xbasename
Unexecuted instantiation: elf64_xlatetof.c:xbasename
Unexecuted instantiation: elf64_xlatetom.c:xbasename
Unexecuted instantiation: gelf_xlate.c:xbasename
Unexecuted instantiation: gelf_getehdr.c:xbasename
Unexecuted instantiation: gelf_getphdr.c:xbasename
Unexecuted instantiation: elf_getarhdr.c:xbasename
Unexecuted instantiation: elf_rawfile.c:xbasename
Unexecuted instantiation: elf_readall.c:xbasename
Unexecuted instantiation: elf_cntl.c:xbasename
Unexecuted instantiation: elf_getscn.c:xbasename
Unexecuted instantiation: elf_nextscn.c:xbasename
Unexecuted instantiation: elf_ndxscn.c:xbasename
Unexecuted instantiation: gelf_getshdr.c:xbasename
Unexecuted instantiation: gelf_update_shdr.c:xbasename
Unexecuted instantiation: elf_strptr.c:xbasename
Unexecuted instantiation: elf_rawdata.c:xbasename
Unexecuted instantiation: elf_getdata.c:xbasename
Unexecuted instantiation: elf_getdata_rawchunk.c:xbasename
Unexecuted instantiation: elf_memory.c:xbasename
Unexecuted instantiation: gelf_getrel.c:xbasename
Unexecuted instantiation: gelf_getrela.c:xbasename
Unexecuted instantiation: gelf_update_rel.c:xbasename
Unexecuted instantiation: gelf_update_rela.c:xbasename
Unexecuted instantiation: gelf_getdyn.c:xbasename
Unexecuted instantiation: gelf_getnote.c:xbasename
Unexecuted instantiation: gelf_xlatetof.c:xbasename
Unexecuted instantiation: gelf_xlatetom.c:xbasename
Unexecuted instantiation: gelf_getsymshndx.c:xbasename
Unexecuted instantiation: elf_getphdrnum.c:xbasename
Unexecuted instantiation: elf_getshdrnum.c:xbasename
Unexecuted instantiation: elf_getshdrstrndx.c:xbasename
Unexecuted instantiation: gelf_offscn.c:xbasename
Unexecuted instantiation: elf_compress.c:xbasename
Unexecuted instantiation: elf_compress_gnu.c:xbasename
Unexecuted instantiation: elf32_getphdr.c:xbasename
Unexecuted instantiation: elf64_getphdr.c:xbasename
Unexecuted instantiation: elf32_getshdr.c:xbasename
Unexecuted instantiation: elf64_getshdr.c:xbasename
Unexecuted instantiation: elf32_offscn.c:xbasename
Unexecuted instantiation: elf64_offscn.c:xbasename
Unexecuted instantiation: gelf_getchdr.c:xbasename
Unexecuted instantiation: elf32_getchdr.c:xbasename
Unexecuted instantiation: elf64_getchdr.c:xbasename
core-file.c:xbasename
Line
Count
Source
254
4.86k
{
255
4.86k
  const char *p = strrchr(s, '/');
256
4.86k
  return p ? p+1 : s;
257
4.86k
}
Unexecuted instantiation: linux-core-attach.c:xbasename
dwfl_segment_report_module.c:xbasename
Line
Count
Source
254
2.59k
{
255
2.59k
  const char *p = strrchr(s, '/');
256
2.59k
  return p ? p+1 : s;
257
2.59k
}
Unexecuted instantiation: link_map.c:xbasename
Unexecuted instantiation: dwfl_module_report_build_id.c:xbasename
Unexecuted instantiation: derelocate.c:xbasename
Unexecuted instantiation: elf_clone.c:xbasename
Unexecuted instantiation: fuzz-libelf.c:xbasename
258
#pragma GCC poison basename
259
260
#endif /* system.h */