pax_global_header00006660000000000000000000000064147233650350014522gustar00rootroot0000000000000052 comment=909af3e46b68335df6c4a901ddd256ffa0d193d2 libdwarf-code-0.11.1/000077500000000000000000000000001472336503500143045ustar00rootroot00000000000000libdwarf-code-0.11.1/.github/000077500000000000000000000000001472336503500156445ustar00rootroot00000000000000libdwarf-code-0.11.1/.github/workflows/000077500000000000000000000000001472336503500177015ustar00rootroot00000000000000libdwarf-code-0.11.1/.github/workflows/freebsd_autotools.yml000066400000000000000000000013151472336503500241470ustar00rootroot00000000000000name: freebsd_autotools on: workflow_dispatch: permissions: read-all jobs: freebsd_autotools: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: FreeBSD-with-autotools uses: cross-platform-actions/action@v0.23.0 with: operating_system: freebsd sync_files: runner-to-vm version: '14.0' run: | uname -a whoami freebsd-version echo $SHELL sudo pkg install -y python3 bash automake libtool sudo pkg install -y pkgconf gmake binutils lzlib autoreconf --warnings=all -vif ./configure make make check libdwarf-code-0.11.1/.github/workflows/freebsd_cmake.yml000066400000000000000000000014221472336503500231750ustar00rootroot00000000000000name: freebsd_cmake on: workflow_dispatch: permissions: read-all jobs: freebsd_cmake: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: FreeBSD-with-cmake uses: cross-platform-actions/action@v0.23.0 with: operating_system: freebsd sync_files: runner-to-vm version: '14.0' run: | uname -a freebsd-version echo $SHELL sudo pkg install -y python3 bash cmake ninja pkgconf sudo pkg install -y gmake binutils lzlib zstd mkdir builddir && cd builddir cmake -G Ninja -DDO_TESTING=YES -DBUILD_NON_SHARED=YES -DBUILD_SHARED=NO -DBUILD_DWARFEXAMPLE=ON ../CMakeLists.txt ninja ninja test libdwarf-code-0.11.1/.github/workflows/freebsd_meson.yml000066400000000000000000000013201472336503500232330ustar00rootroot00000000000000name: freebsd_meson on: workflow_dispatch: permissions: read-all jobs: freebsd_meson: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: FreeBSD-with-meson uses: cross-platform-actions/action@v0.23.0 with: operating_system: freebsd sync_files: runner-to-vm version: '14.0' run: | uname -a whoami freebsd-version echo $SHELL sudo pkg install -y python3 bash meson ninja pkgconf sudo pkg install -y gmake binutils zstd mkdir builddir && cd builddir meson setup -Ddwarfexample=true . .. ninja ninja test libdwarf-code-0.11.1/.github/workflows/mac_autotools.yml000066400000000000000000000007251472336503500233010ustar00rootroot00000000000000name: macautotool on: workflow_dispatch: permissions: read-all jobs: macos_autotools: runs-on: macos-latest steps: - uses: actions/checkout@v4 - name: tools run: brew install automake libtool - name: aclocal run: aclocal - name: autoreconf run: autoreconf --warnings=all -vif - name: config run: ./configure --enable-dwarfexample --enable-wall - name: make run: | make make check libdwarf-code-0.11.1/.github/workflows/mac_cmake.yml000066400000000000000000000006701472336503500223270ustar00rootroot00000000000000name: ci_mac_cmake on: workflow_dispatch: permissions: read-all jobs: macos_cmake: runs-on: macos-latest steps: - uses: actions/checkout@v4 - name: brew run: brew install cmake ninja - name: cmake run: | mkdir builddir && cd builddir cmake -G Ninja -DDO_TESTING=YES -DBUILD_NON_SHARED=YES -DBUILD_SHARED=NO -DBUILD_DWARFEXAMPLE=ON ../CMakeLists.txt ninja ninja test libdwarf-code-0.11.1/.github/workflows/mac_meson.yml000066400000000000000000000005601472336503500223660ustar00rootroot00000000000000name: ci_mac_meson on: workflow_dispatch: permissions: read-all jobs: macos_meson: runs-on: macos-latest steps: - uses: actions/checkout@v4 - name: tools run: | brew install meson ninja - name: run: | mkdir builddir && cd builddir meson setup -Ddwarfexample=true . .. ninja ninja test libdwarf-code-0.11.1/.github/workflows/msys2_autotools.yml000066400000000000000000000013421472336503500236120ustar00rootroot00000000000000 name: msys2autotool on: workflow_dispatch: permissions: read-all jobs: msys2_autotools: runs-on: windows-latest defaults: run: shell: msys2 {0} env: PYTHONIOENCODING: "utf-8" steps: - uses: actions/checkout@v4 - uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: base-devel git autoconf automake libtool mingw-w64-x86_64-toolchain mingw-w64-x86_64-zlib - name: Configure run: autoreconf -vif && ./configure --disable-static --enable-shared - name: Build run: make - name: Check run: make check - name: Distcheck run: make distcheck DISTCHECK_CONFIGURE_FLAGS="--disable-static --enable-shared" libdwarf-code-0.11.1/.github/workflows/msys2_cmake.yml000066400000000000000000000014441472336503500226440ustar00rootroot00000000000000 name: msys2cmake on: workflow_dispatch: permissions: read-all jobs: msys2_cmake: runs-on: windows-latest defaults: run: shell: msys2 {0} env: PYTHONIOENCODING: "utf-8" steps: - uses: actions/checkout@v4 - uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-zlib mingw-w64-x86_64-doxygen mingw-w64-x86_64-ninja - name: Build libdwarf run: | mkdir builddir && cd builddir cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/c/msys64/usr -DBUILD_DWARFEXAMPLE=ON -DDO_TESTING=ON -DBUILD_SHARED:BOOL=TRUE -DBUILD_NON_SHARED:BOOL=FALSE ../CMakeLists.txt ninja ninja install ninja test libdwarf-code-0.11.1/.github/workflows/msys2_meson.yml000066400000000000000000000014021472336503500226770ustar00rootroot00000000000000 name: msys2meson on: workflow_dispatch: permissions: read-all jobs: msys2_meson: runs-on: windows-latest defaults: run: shell: msys2 {0} env: PYTHONIOENCODING: "utf-8" steps: - uses: actions/checkout@v4 - uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python3 mingw-w64-x86_64-python3-pip mingw-w64-x86_64-meson mingw-w64-x86_64-ninja mingw-w64-x86_64-zlib mingw-w64-x86_64-doxygen - name: Build libdwarf run: | mkdir builddir && cd builddir meson setup --default-library shared -Ddwarfexample=true -Ddwarfgen=false . .. ninja ninja install ninja test libdwarf-code-0.11.1/.github/workflows/test.yml000066400000000000000000000145461472336503500214150ustar00rootroot00000000000000name: ci on: pull_request: branches: [ master ] workflow_dispatch: permissions: read-all jobs: linux_autotools: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: autoreconf run: autoreconf -vif - name: configure run: ./configure --enable-dwarfexample - name: make -j run: make - name: make -j check run: make check - name: make distcheck run: make distcheck linux_cmake: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install cmake run: | sudo apt-get -qq update sudo apt install build-essential cmake - name: Build libdwarf run: | mkdir builddir && cd builddir cmake -G "Unix Makefiles" -DDO_TESTING=ON -DBUILD_DWARFEXAMPLE=ON ../CMakeLists.txt make ctest -R self linux_meson: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install meson / ninja run: | sudo apt-get -qq update sudo apt install build-essential meson ninja-build python3-pip python3-setuptools pip3 install --upgrade pip pip3 install meson --user - name: Install doxygen run: | sudo apt install doxygen - name: Build libdwarf run: | mkdir builddir && cd builddir meson setup -Ddwarfexample=true . .. ninja ninja test freebsd_autotools: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: FreeBSD-with-autotools uses: cross-platform-actions/action@v0.23.0 with: operating_system: freebsd sync_files: runner-to-vm version: '14.0' run: | uname -a whoami freebsd-version echo $SHELL sudo pkg install -y python3 bash automake pkgconf sudo pkg install -y libtool gmake binutils lzlib autoreconf --warnings=all -vif ./configure make make check freebsd_cmake: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: FreeBSD-with-cmake uses: cross-platform-actions/action@v0.23.0 with: operating_system: freebsd sync_files: runner-to-vm version: '14.0' run: | uname -a freebsd-version echo $SHELL sudo pkg install -y python3 bash cmake ninja pkgconf sudo pkg install -y gmake binutils lzlib mkdir builddir && cd builddir cmake -G Ninja -DDO_TESTING=YES -DBUILD_NON_SHARED=YES -DBUILD_SHARED=NO -DBUILD_DWARFEXAMPLE=ON ../CMakeLists.txt ninja ninja test freebsd_meson: runs-on: ubuntu-latest name: FreeBSD-with-meson steps: - uses: actions/checkout@v4 - name: FreeBSD-meson uses: cross-platform-actions/action@v0.23.0 with: operating_system: freebsd sync_files: runner-to-vm version: '14.0' run: | uname -a freebsd-version echo $SHELL sudo pkg install -y python3 bash meson ninja sudo pkg install -y pkgconf gmake binutils zstd mkdir build && cd build meson setup -Ddwarfexample=true . .. ninja ninja test macos_autotools: runs-on: macos-latest steps: - uses: actions/checkout@v4 - name: tools run: brew install automake libtool - name: autoreconf run: autoreconf --warnings=all -vif - name: config run: ./configure --enable-dwarfexample --enable-wall - name: make run: | make make check macos_cmake: runs-on: macos-latest steps: - uses: actions/checkout@v4 - name: brew run: brew install cmake ninja - name: cmake run: | mkdir builddir && cd builddir cmake -G Ninja -DDO_TESTING=YES -DBUILD_NON_SHARED=YES -DBUILD_SHARED=NO -DBUILD_DWARFEXAMPLE=ON ../CMakeLists.txt ninja ninja test macos_meson: runs-on: macos-latest steps: - uses: actions/checkout@v4 - name: brew run: | brew install meson ninja - name: meson run: | mkdir builddir && cd builddir meson setup -Ddwarfexample=true . .. ninja ninja test msys2_autotools: runs-on: windows-latest defaults: run: shell: msys2 {0} env: PYTHONIOENCODING: "utf-8" steps: - uses: actions/checkout@v4 - uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: base-devel git autoconf automake libtool mingw-w64-x86_64-toolchain mingw-w64-x86_64-zlib - name: Configure run: autoreconf -vif && ./configure --disable-static --enable-shared - name: Build run: make - name: Check run: make check - name: Distcheck run: make distcheck DISTCHECK_CONFIGURE_FLAGS="--disable-static --enable-shared" msys2_cmake: runs-on: windows-latest defaults: run: shell: msys2 {0} env: PYTHONIOENCODING: "utf-8" steps: - uses: actions/checkout@v4 - uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-zlib mingw-w64-x86_64-doxygen mingw-w64-x86_64-ninja - name: Build libdwarf run: | mkdir builddir && cd builddir cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/c/msys64/usr -DBUILD_DWARFEXAMPLE=ON -DDO_TESTING=ON -DBUILD_SHARED:BOOL=TRUE -DBUILD_NON_SHARED:BOOL=FALSE ../CMakeLists.txt ninja ninja install ninja test msys2_meson: runs-on: windows-latest defaults: run: shell: msys2 {0} env: PYTHONIOENCODING: "utf-8" steps: - uses: actions/checkout@v4 - uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python3 mingw-w64-x86_64-python3-pip mingw-w64-x86_64-meson mingw-w64-x86_64-ninja mingw-w64-x86_64-zlib mingw-w64-x86_64-doxygen - name: Build libdwarf run: | mkdir builddir && cd builddir meson setup --default-library shared -Ddwarfexample=true -Ddwarfgen=false . .. ninja ninja install ninja test libdwarf-code-0.11.1/.gitignore000066400000000000000000000010371472336503500162750ustar00rootroot00000000000000*.[oa] junk* *~ build/ cscope.files TAGS *.exe bugxml/__pycache__ doc/libhtmldoc.tar config.h.in grepcmake grepconfigure grepmeson # autotools ignore *.lo *.la .dirstamp Makefile Makefile.in aclocal.m4 ar-lib compile config.guess config.h config.log config.sub configure config.status depcomp install-sh libdwarf.pc libdwarfp.pc libtool ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 missing stamp-h1 test-driver test-suite.log autom4te.cache/ .deps/ .libs/ test/*.log test/*.trs test/dwarfdump.conf libdwarf-code-0.11.1/.travis.yml000066400000000000000000000006471472336503500164240ustar00rootroot00000000000000 langage: c os: linux dist: bionic cache: false compiler: - gcc - clang os: linux arch: - amd64 - arm64 install: - sudo apt-get -qq update - sudo apt-get install build-essential zlib1g-dev dos2unix before_script: - autoreconf -vif script: - ./configure --disable-dependency-tracking --enable-wall --enable-dwarfexample && make && make check - ls src/bin/dwarfdump/.deps/ - cat test/test-suite.log libdwarf-code-0.11.1/AUTHORS000066400000000000000000000000631472336503500153530ustar00rootroot00000000000000David Anderson Carlos Alberto Enciso Vincent Torri libdwarf-code-0.11.1/CMakeLists.txt000066400000000000000000000231031472336503500170430ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.5) project(libdwarf VERSION 0.11.1 DESCRIPTION "Library to access DWARF debugging information" HOMEPAGE_URL "https://github.com/davea42/libdwarf-code.git" LANGUAGES C CXX) # libdwarf option(BUILD_NON_SHARED "build archive library libdwarf[p].a" TRUE) option(BUILD_SHARED "build shared library libdwarf[p].so and use it" FALSE) option(ENABLE_DECOMPRESSION "Enables support for compressed debug sections if both libz/libzstd are present" TRUE) # This adds compiler option -Wall (gcc compiler warnings) option(WALL "Add -Wall" FALSE) option(LIBDWARF_STATIC "add -DLIBDWARF_STATIC" FALSE) option(BUILD_DWARFDUMP "Build dwarfdump (default is YES)" TRUE) option(BUILD_DWARFGEN "Build dwarfgen (default is NO)" FALSE) message(STATUS "Building dwarfgen ... ${BUILD_DWARFGEN}") option(BUILD_DWARFEXAMPLE "Build dwarfexample (default is NO)" FALSE) message(STATUS "Building dwarfexample... ${BUILD_DWARFEXAMPLE}") option(DO_TESTING "Do certain api tests (default is NO)" FALSE) message(STATUS "Building api tests ... ${DOTESTS}") ### end what was configure.cmake option(PIC_ALWAYS "Build libdwarf with position-independent code for both static and shared (default is NO)" FALSE) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) include_directories( ${PROJECT_BINARY_DIR} ) # used to compile on MSVC upto 2013 where snprintf is not available macro(msvc_posix target) if(MSVC AND ("${MSVC_VERSION}" LESS 1900)) # under VS 2015 target_compile_definitions(${target} PUBLIC snprintf=_snprintf) endif() endmacro() set(LIBDWARF_CRT "MD" CACHE STRING "Either MT or MD, specifies whether to use the static or dynamic MSVCRT.") if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # Use CMAKE_MSVC_RUNTIME in versions 3.15 and up if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15") cmake_policy(SET CMP0091 NEW) if (LIBDWARF_CRT STREQUAL "MT") message(STATUS "Using MT runtime by CMAKE_MSVC_RUNTIME_LIBRARY") set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") elseif(LIBDWARF_CRT STREQUAL "MD") message(STATUS "Using MD runtime by CMAKE_MSVC_RUNTIME_LIBRARY") set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") else() message(FATAL_ERROR "LIBDWARF_CRT must be MT or MD") endif() # Use regexes in versions before 3.15 else() if (LIBDWARF_CRT STREQUAL "MT") message(STATUS "Using MT runtime by compile flag replacement") # taken from the CMake FAQ foreach(flag_v CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) if (${flag_v} MATCHES "([\\/\\-]M)D") string(REGEX REPLACE "([\\/\\-]M)D" "\\1T" ${flag_v} "${${flag_v}}") endif() endforeach() elseif(LIBDWARF_CRT STREQUAL "MD") message(STATUS "Using MD runtime by cmake default") else() message(FATAL_ERROR "LIBDWARF_CRT must be MT or MD") endif() endif() endif() # message("CMake flags are:") # message(" CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") # message(" CMAKE_C_FLAGS_DEBUG: ${CMAKE_C_FLAGS_DEBUG}") # message(" CMAKE_C_FLAGS_RELEASE: ${CMAKE_C_FLAGS_RELEASE}") # message(" CMAKE_C_FLAGS_MINSIZEREL: ${CMAKE_C_FLAGS_MINSIZEREL}") # message(" CMAKE_C_FLAGS_RELWITHDEBINFO: ${CMAKE_C_FLAGS_RELWITHDEBINFO}") # message(" CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") # message(" CMAKE_CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}") # message(" CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}") # message(" CMAKE_CXX_FLAGS_MINSIZEREL: ${CMAKE_CXX_FLAGS_MINSIZEREL}") # message(" CMAKE_CXX_FLAGS_RELWITHDEBINFO: ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") # set target folder on IDE macro(set_folder target folder) set_target_properties(${target} PROPERTIES FOLDER ${folder}) endmacro() # set source groups on IDE macro(set_source_group list_name group_name) set(${list_name} ${ARGN}) source_group(${group_name} FILES ${ARGN}) endmacro() # view folders on supported IDEs set_property(GLOBAL PROPERTY USE_FOLDERS ON) # tells cmake to look in 64bit first (cmake # would probably do this anyway). set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) ### begin what was configure.cmake # cmake macros include(TestBigEndian) include(CheckIncludeFile) include(CheckCSourceCompiles) include(CheckCSourceRuns) include(CheckSymbolExists) ### Version also appears in configure.ac set(PACKAGE_BUGREPORT "https://github.com/davea42/libdwarf-code/issues") set(PACKAGE_STRING "${PROJECT_NAME} ${PROJECT_VERSION}") string(REGEX REPLACE "[\"]" "" tarname1 "${PACKAGE_STRING}" ) string(REGEX REPLACE "[^a-zA-Z0-9_]" "-" tarname "${tarname1}" ) set(PACKAGE_TARNAME "\"${tarname}\"" ) test_big_endian(isBigEndian) if (${isBigEndian}) set ( WORDS_BIGENDIAN 1 ) endif() check_include_file( "sys/types.h" HAVE_SYS_TYPES_H) check_include_file( "sys/stat.h" HAVE_SYS_STAT_H ) check_include_file( "stdint.h" HAVE_STDINT_H ) check_include_file( "unistd.h" HAVE_UNISTD_H ) check_include_file( "stdafx.h" HAVE_STDAFX_H ) check_include_file( "fcntl.h" HAVE_FCNTL_H ) ### cmake provides no way to guarantee uint32_t present. ### configure does guarantee that. if(HAVE_STDINT_H) check_c_source_compiles(" #include int main() { uintptr_t i; i = 12; return (int)i; }" HAVE_UINTPTR_T) check_c_source_compiles(" #include int main() { intptr_t i; i = 12; return (int)i; }" HAVE_INTPTR_T) endif() if (HAVE_UINTPTR_T) message(STATUS "HAVE_UINTPTR_T 1: uintptr_t defined in stdint.h... YES") else() message(STATUS "uintptr_t defined in stdint.h... NO") set(uintptr_t "unsigned long long int" ) message(STATUS "Setting #define uintptr_t " ${uintptr_t}) endif() if (uintptr_t) message(STATUS "uintptr_t value considered YES ") else() message(STATUS "uintptr_t value considered NO ") endif() if (HAVE_INTPTR_T) message(STATUS "HAVE_INTPTR_T 1: intptr_t defined in stdint.h... YES") else() message(STATUS "intptr_t defined in stdint.h... NO") set(intptr_t "long long int" ) message(STATUS "Setting #define intptr_t " ${intptr_t}) endif() if (intptr_t) message(STATUS "intptr_t value considered YES ") else() message(STATUS "intptr_t value considered NO ") endif() message(STATUS "ENABLE_DECOMPRESSION : " ${ENABLE_DECOMPRESSION}) if (ENABLE_DECOMPRESSION) #message(STATUS "In ENABLE_DECOMPRESSION setup: TRUE") # Zlib and ZSTD need to be found otherwise disable it if(NOT TARGET ZLIB::ZLIB) find_package(ZLIB) else() # Presumably in this case, the target has been found externally but set this flag just in case set(ZLIB_FOUND TRUE) endif() # This feels excessive, however perhaps better safe than sorry if( NOT ( TARGET zstd::libzstd_shared OR TARGET zstd::libzstd_static OR TARGET libzstd_shared OR TARGET libzstd_static OR TARGET ZSTD::ZSTD ) ) find_package(zstd) else() # Presumably in this case, the target has been found externally but set this flag just in case set(zstd_FOUND TRUE) endif() # Unfortunately aliasing ZSTD::ZSTD to zstd::libzstd_shared/static can lead to problems for end-users, a variable # is used if(TARGET zstd::libzstd_shared) set(ZSTD_LIB zstd::libzstd_shared) elseif(TARGET zstd::libzstd_static) set(ZSTD_LIB zstd::libzstd_static) elseif(TARGET libzstd_shared) set(ZSTD_LIB libzstd_shared) elseif(TARGET libzstd_static) set(ZSTD_LIB libzstd_static) else() set(ZSTD_LIB ZSTD::ZSTD) endif() if (ZLIB_FOUND AND zstd_FOUND ) set(HAVE_ZLIB TRUE) set(HAVE_ZLIB_H TRUE) set(HAVE_ZSTD TRUE) set(HAVE_ZSTD_H TRUE) set(BUILT_WITH_ZLIB_AND_ZSTD TRUE) endif() message(STATUS "Found libzstd : ${zstd_FOUND}") message(STATUS "Found zlib : ${ZLIB_FOUND}") message(STATUS "Build with zlib and zstd: ${BUILT_WITH_ZLIB_AND_ZSTD}") else() message(STATUS "Build with zlib and zstd: NO") endif () message(STATUS "CMAKE_SIZEOF_VOID_P ... : ${CMAKE_SIZEOF_VOID_P}") # DW_FWALLXX are gnu C++ options. if (WALL) set(DW_FWALLXX -Wall -Wextra -Wno-unused-private-field -Wpointer-arith -Wmissing-declarations -Wcomment -Wformat -Wpedantic -Wuninitialized -Wshadow -Wno-long-long -Werror) set(DW_FWALL ${DW_FWALLXX} -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wextra -Wcomment -Wformat -Wpedantic -Wuninitialized -Wno-long-long -Wshadow -Werror ) message(STATUS "Compiler warning options... YES ${DW_FWALL}") else() unset(DW_FWALL ) message(STATUS "Compiler warning options... NO") endif() #if (LIBDWARF_STATIC) # set(DW_LIBDWARF_STATIC -DLIBDWARF_STATIC) #else() # unset(DW_LIBDWARF_STATIC) #endif() configure_file(cmake/config.h.in config.h) if(BUILD_NON_SHARED) set(DW_LIBDWARF_STATIC -DLIBDWARF_STATIC) set(BUILD_SHARED_LIBS NO) else() unset(DW_LIBDWARF_STATIC) set(BUILD_SHARED_LIBS YES) endif() include(GNUInstallDirs) add_subdirectory(src/lib/libdwarf) add_subdirectory(doc) if ( BUILD_DWARFDUMP ) add_subdirectory(src/bin/dwarfdump) endif() if ( BUILD_DWARFEXAMPLE ) add_subdirectory(src/bin/dwarfexample) endif() if ( BUILD_DWARFGEN ) add_subdirectory(src/lib/libdwarfp) add_subdirectory(src/bin/dwarfgen) endif() if (DO_TESTING) enable_testing() add_subdirectory(test) endif() message(STATUS "Install prefix ... ${CMAKE_INSTALL_PREFIX}" ) # installation of libdwarf[p] has to be in # src/lib/libdwarf[p]/CMakeLists.txt # so that it works properly for cmake before cmake 3.13. libdwarf-code-0.11.1/CODE_OF_CONDUCT.md000066400000000000000000000121221472336503500171010ustar00rootroot00000000000000# Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards Examples of behavior that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at . All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. ## Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ### 2. Warning **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. libdwarf-code-0.11.1/CODINGSTYLE.md000066400000000000000000000413531472336503500164200ustar00rootroot00000000000000# Libdwarf/dwarfdump etc coding style. Latest update (minor clarifications): 7 July 2023 Adapted from the Cairo coding style document Libdwarf/dwarfdump etc coding style. In "Tools that help" we provide a tool (dicheck) that enforces some parts of the coding style. Please don't submit changes (longer than a few lines) that cause messages from dicheck. This document is intended to be a short description of the preferred coding style for the libdwarf and related source code. Good style requires good taste, which means this can't all be reduced to automated rules, and there are exceptions. We want the code to be easy to understand and maintain, and consistent style plays an important part in that, even if some of the specific details seem trivial. If nothing else, this document gives a place to put consistent answers for issues that would otherwise be arbitrary. We avoid using features of C standardised after ANSI C89,ISO C90. Most of the guidelines here are demonstrated by examples, (which means this document is quicker to read than it might appear given its length). Most of the examples are positive examples that you should imitate. The few negative examples are clearly marked with a comment of /* Yuck! */. Please don't submit code for libdwarf that looks like any Yuck! Section list: Tab characters Braces Whitespace Struct Format and Content Managing nested blocks Test or Loop with Side Effect Switch statements Singly Linked Lists Macro Tests Commented Lookup Tables Memory allocation Naming, namespace Checking For Overflow Dwarfdump Flags Data Never use strcpy strcat strncpy Static data and functions Argument Lists Tools that help ### Indentation Each new level is indented 4 more spaces than the previous level, and an if is followed by a space and a left-parenthesis: if (condition) { do_something(); } Done solely with space characters. Similarly, for is to have a single space after the r followed by a left parenthesis. for (v; condition; v2) { do_something(); } ### Tab characters The tab character must never appear except in a printf string. ### Braces Most of the code in libdwarf uses bracing in the style of K&R: if (condition) { do_this(); do_that(); } else { do_the_other(); } and that is the preferred style. Even if all of the substatements of an if statement are single statements, the optional braces must always appear. if (condition) { do_this(); } else { do_that(); } Never if (condition) /* Yuck */ do_this(); /* Yuck */ else /* Yuck */ do_the_other(); /* Yuck */ Note that this last example also shows a situation in which the opening brace can be on its own line, though usually it looks like this example. The following can be difficult to read. if (condition && other_condition && yet_another) { /* But we usually do put the brace here */ do_something(); } ### Whitespace Separate logically distinct chunks with a single newline. This obviously applies between functions, but also applies within a function or block and can even be used to good effect within a structure definition. But don't get carried away with blank lines: struct _Dwarf_Data_s { struct Something_s op; double tolerance; Dwarf_Unsigned line_width; Dwarf_Unsigned line_height; Dwarf_Unsigned line_thickness; /* Notice the _s on struct declarations And notice indent of this comment and the blank line above this comment to make it clear the comment applies to fill_rule. */ struct Reg_Struct_s fill_rule; Dwarf_Signed distance_from_end; ... }; Having both CamelCase in names and _ in the names used by the library is perhaps unusual, but it's been that way in the libdwarf source since the library was first written. So we stick with it in most cases. Never use a space before a function-call left parenthesis or a macro-call left parenthesis. Don't remove newlines just because things would still fit on one line if removal breaks the expected visual structure of the code. Eliminate trailing whitespace on any line. Also, avoid putting initial or final blank lines into any file, and never use multiple blank lines instead of a single blank line. The trimtrailing program in the libdwarf-dicheck project will fix such issues. Use dicheck tools below to find trailing whitespace and indentation inconsistencies. You might find the git-stripspace utility helpful which acts as a filter to remove trailing whitespace as well as initial, final, and duplicate blank lines. As a special case of the bracing and whitespace guidelines, function definitions in libdwarf should always take the following form: int my_function (Dwarf_Debug dbg, Dwarf_Unsigned second_arg, Dwarf_Unsigned* ret_value; Dwarf_Error *error) { do_my_things(); /* The meaning of life */ *ret_value = 42; return DW_DLV_OK; } In dwarfdump, the code tends to follow this form too (but not always). Function prototypes inside libdwarf headers (as opposed to .c files) usually have the return type (and associated specifiers and qualifiers) the same line as the function name. If the line gets long additional lines are appropriate. In .c files the function name starts a line as shown above. Notice, above, how a too-long argument line gets folded with standard indentation(4). Break up long lines (> 70 characters) and use whitespace to align things nicely indenting by four spaces. For example the arguments in a long list to a function call should all (but the first) be aligned with each other: align_function_arguments (argument_the_first, argument_the_second, argument_the_third); And as a special rule, in a function prototype, (as well as in the definition), whitespace should be inserted between the parameter types and names so that the names are aligned: void align_parameter_names_in_prototypes(const char *char_star_arg, int int_arg, double *double_star_arg, double double_arg); Parameters with a * prefix are aligned one character to the left so that the actual names are aligned. ### Struct Format and Content Usually, avoid adding a comment alongside declarations unless it is a very short comment. The following example uses meaningless x y z field names (sorry), but but does show a short prefix related to the struct name. Generally struct members should have a prefix common to that struct and hopefully distinct from other struct declarations. This short prefix makes it much easier to find all uses of a particular field in the code (with grep). struct Dwarf_Nothing_Special_s { int ns_x; /* usually avoid comment here this is Yuck! and this is even worse as continuation. Yuck! */ /* Comment here about ns_y with blank line above and below to make it clear which line referred to. */ unsigned ns_y; unsigned ns_z; }; ### Managing nested blocks Long blocks that are deeply nested make the code very hard to read. Fortunately such blocks often indicate logically distinct chunks of functionality that are begging to be split into their own functions. Please listen to the blocks when they beg. You will notice many exceptions to this in the code, unfortunately. In other cases, gratuitous nesting comes about because the primary functionality gets buried in a nested block rather than living at the primary level where it belongs. Consider the following: foo = malloc (sizeof (foo_t)); if (foo) { /* Yuck! The error return becomes hard to see. */ ... /* lots of code to initialize foo */ ... return DW_DLV_OK; } _dwarf_error(dbg,error,DW_DLE_MALLOC_RETURNS_NULL); return DW_DLV_ERROR; This kind of gratuitous nesting can be avoided by following a pattern of handling exceptional cases early and returning: foo = malloc (sizeof (foo_t)); /* A test foo == NULL is fine but the following is better as there is no danger of turning == into = by accident. */ if (!foo) { _dwarf_error(dbg,error,DW_DLE_MALLOC_RETURNS_NULL); return DW_DLV_ERROR; } ... lots of code to initialize foo */ return DW_DLV_OK; In otherwords, refactor deeply nested code. There are places in the library and dwarfdump where appropriate refactoring has not yet been done. The return statement is often the best thing to use in a pattern like this. If it's not available due to additional nesting above which require some cleanup after the current block, then consider splitting the current block into a new function before using goto. ### Test or Loop with Side Effect Never do: if ((foo = malloc (sizeof (foo_t)))) { or if (foo = malloc (sizeof (foo_t))) { as the reader has to think carefully about it, whereas foo = malloc (sizeof (foo_t)); if (foo) { is more transparent (in some sense) and makes it easier to stop( in debugger) or add a printf in case this is a point where things might be going wrong somehow. Note the space between if and the left parenthesis. Also see "Managing nested blocks" just above. ### Switch statements We use the following indent practice: switch(x) { case a: { /* Define&use local variables, do something */ } case b: /* Do something, no new local variable needed. */ break; ... default: /* do something or break*/ } The default case is used everywhere (instead of being omitted when it could be omitted) to satisfy a Cobra rule. One thinks consistency reads well. dwarf_names.c (for example) is full of functions where all known values do a return on each case: and there the last entry is default: break; followed outside the switch by the return for the error case. ### Singly Linked Lists Many places in libdwarf build singly-linked lists. And do it without a check for NULL. Stephen Macguire, in Writing Solid Code (Microsoft Press, 1993) explains how and why one should do this on page 126. We assume it's well known. The same book's "Candy Machine Interfaces" chapter lead to the design of the return values used in the library. ### Macro Tests Commented #ifdef SOME_MACRO #else /* !SOME_MACRO */ #endif /* !SOME_MACRO */ #ifdef OTHER_MACRO #endif /* OTHER_MACRO */ The comments add clarity when one is not familiar with code in the area but are not required if the #else #endif are within a couple lines of the #if(def). In a spot with nested #if(def) the comments become necessary to avoid confusing the reader. There is nothing wrong with adding them everywhere. ### Lookup Tables Any situation requiring a lookup table should use one or the other tsearch functions. The practical ones are dwarf\_tsearchhash.c and dwarf\_tsearchbal.c. dwarfdump and libdwarf each use one of them and only one of them. See the tsearch-code project to see the full set available. These use the traditional UNIX tsearch arguments and return values even though those are not good designs by current standards. Expanded to have destroy() functions whose prototype was copied from GNU man pages. GNU libc has much nicer (in the sense of much nicer interface designs) non-standard tsearch functions, but we've ignored those to keep to the official Single Unix Specification standard interfaces. ### Memory allocation In general, be wary of performing any arithmetic operations in an argument to malloc. You should explicitly check for integer overflow yourself in any more complex situations. In libdwarf most allocations use \_dwarf\_alloc() instead of malloc. And the tables of valid types (which are predefined in libdwarf) allow for constructor/destructor functions. The \_dwarf\_alloc() code keeps a record of what is allocated so a careless user can simply call dwarf\_finish() at the end and all the allocated data will be freed that was not already freed via user calls to dwarf\_dealloc(). ### Naming, namespace Avoid conflicting with other libraries or with user code. Anything publicly visible in headers or in the library (.a or .so or .dll) must have only certain prefixes to names visible in dwarf.h or libdwarf.h or a library a user links in (.a or .so or .dll). Prefixes are: DW_ (this is from the DWARF Standard and dwarf.h) Dwarf_ (for types) dwarf_ (for functions) _dwarf_ (for non-static functions in the library but not for user code to call, so far this has worked acceptably). For a .so or .dll current builds (meaning September 2021 and later) ensure such names are invisible to callers. dw_ For public function argument names. dwarf.h and libdwarf.h functions must have all arguments named with a leading dw\_ so that doxygen has names to work with and to make the function prototypes more readable. Ensure new functions or changes are reflected in the libdwarf.h doxygen comments. Function names should be all lower-case and should use underbar(s) for readability. Function-local variables should be lower-case with underbars for readability. It's ok for a small loop with counters to use single letter names like i or k or m. structure members should have a struct-specific 2-character prefix to the name (followed by an underbar). This convention makes it much easier to grep for uses of members. ### Checking For Overflow Libdwarf and dwarfdump are often dealing with offsets and indexes read from disk object files and all such should be checked before use. That approach means that dwarfdump (and libdwarf callers in general) need not check the things that libdwarf has returned (at least those libdwarf could check). When it is possible that X +Y might overflow make every effort to check X an Y independently before attempting an addition. If you are confident X and Y are sensible (given available data like section sizes) you can add them and then determine if the sum (say an offset) is still within the relevant section or data-item usable range. There are many libdwarf-internal functions to read data from an object, and all of them require an end-pointer argument so the code can easily check for corrupt object-file or DWARF values without duplicating the error-code-setting. ### Dwarfdump Flags Data Dwarfdump has a large number of options and nearly all the option values are recorded as fields in a single global structure glflags (see dwarfdump.c). Option data not in that structure should be moved into it, in general. This makes it much simpler to find instances using flags and to know, reading dwarfdump source, when flags are being referred to.. The text in this document (not the examples!) was formatted with the vi command "!}fmt -64"...without the quotes. ### Never use strcpy strcat strncpy dwarfdump has dd\_safe\_strcpy(). libdwarf has \_dwarf\_safe\_strcpy(). These functions eliminate the need for the three traditional string functions strcpy, strcat, strncpy and do exactly what is needed safely while doing nothing extra. ### Static data and functions Any data or function not referenced outside the defining source file should be declared 'static'. In the libdwarf library itself static data is not appropriate except for data which is also const. Multiple Dwarf_Debug may be open at the same time in a single program (dwarfdump or user code) so static data will eventually be a bug. ### Argument Lists Beginning February 2023 we are moving to presenting argument lists with no space between any pointer * and the immediately following argument name. And with such lists mostly lining up the names (with the first argument usually not lined up with anything). functionname(Dwarf_Debug x, Dwarf_Off *out_value, Dwarf_Error *error) This format is suggested, not required. ### Tools that help The github.com/davea42/libdwarf-dicheck project is a tool that checks indentation and a few other things to find instances of failures to follow codingstyle rules. The program trimtrailing in that project removes trailing whitespace and changes a sequence of blank lines to a single blank line. The open-source project github.com/nimble-code/Cobra package is being used (beginning December 2021) as an aid to finding problematic or not-best-practices code. It does not compile anything, it does checking via source scans with regular expressions. Not everything it mentions is necessarily a bug or a defect. The primary commands used (in a source directory) are cobra -f basic *.h cobra -f basic *.c cobra -terse -f stats *.[ch] cobra -terse -f metrics *.[ch] # The cwe command generates lots of spurious output as they # check things we do not care much about. # But some of it has been useful. cwe *.h cwe *.c libdwarf-code-0.11.1/CONTRIBUTING.md000066400000000000000000000045261472336503500165440ustar00rootroot00000000000000Thank you for considering contributing to libdwarf development or documentation! Any and all email mentions here mean send to libdwarf -at- linuxmail -dot- org. ## Testing Contributions should provide open-source (small) test cases and instructions to prove the change is correct, or should mention what existing tests show correctness, or should explain how to test the change. It's not necessary to actually modify libdwarf-regressiontests, but documenting (in some way) how this change can be tested is important. ## Formalities If your contribution is just a few lines there is no paperwork to deal with. Generate a github pull request or generate a git diff and email it. If your intended contribution is more than a few lines and someone in your organization/company has already established a relationship with the project there is no paperwork needed. Email to enquire if you are already covered (name the relevant company/organization you are working for). Otherwise there is a simple form to fill out and sign (email a pdf of the signed document). Either https://www.prevanders.net/generic_takebacklite.txt or https://www.prevanders.net/special_takebacklite.txt will do. We will sign to and return via email a copy with all signatures. It is intended to assure the project that you have the right to contribute your code, that it's not code owned by anyone else. These forms were prepared by SGI / SUN (respectively) company lawyers 20+ years ago, not by the library authors ourselves.... If you are thinking of making a contribution of more than a few lines drop an email and describe what you have in mind. The file CODINGSTYLE.md describes the coding style in the project. Formatting is simple and the basic rule is 4 character indents and no tabs. All contributions should be correct for all the supported platforms (Linux (all), MacOS, and Windows Msys2) and supported endianness. That's nearly always trivial and needs no special effort. ## Tools for formatting A simple C++ tool is in the project libdwarf-dicheck containing the dicheck and trimtrailing program source. Compile the two protrams and run dicheck on any source file you change and fix any warnings (the trimtrailing C++ program will remove trailing whitespace for you.). ## Python Formatting All python code in the project is formatted with the python3-standard formatter ```black``` libdwarf-code-0.11.1/COPYING000066400000000000000000000016271472336503500153450ustar00rootroot00000000000000 COPYING August 6 2023 The source code in the libdwarf directory is LGPL version 2.1. See libdwarf/LIBDWARFCOPYRIGHT libdwarf/LGPL.txt A few of files use the two-clause BSD copyright ("FreeBSD License"). The source code in the dwarfdump directory is generally GPL version 2. See dwarfdump/COPYING dwarfdump/DWARFDUMPCOPYRIGHT dwarfdump/GPL.txt a A few files in some directories may have the 3-clause BSD copyright. The source code in the dwarfgen directory generally has the two-clause BSD copyright. See dwarfgen/COPYING Various files begin with a copyright and a notice saying the file is PUBLIC DOMAIN (sometimes spelled public domain). Such files can be copied, modified, and used by anyone for any purpose without attribution or restriction. Example source code is marked as public domain as we expect many people will use such as a starting point in their code. libdwarf-code-0.11.1/ChangeLog000066400000000000000000004646771472336503500161060ustar00rootroot000000000000002024-11-29: David Anderson commit 0f640f587a66277961bda4aabb44d6637a406f5d Added release of 1 Dec 2024 modified: README.md 2024-11-28: David Anderson commit 046aca5f5a5f1fa161752cbc3f87ca0de702bb02 Fixed an indent. modified: dwarf_errmsg_list.h Removde trailing whitespace. modified: dwarf_opaque.h 2024-11-28: David Anderson commit 3b2303c76806958cd8e8430b8db1dc034da8d55d Coverity scan noted two blocks of structurally dead code in two pretty much identical cases. _dwarf_which_loclists_context _dwarf_which_rnglists_context modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_rnglists.c Renoved the dead code and realigned the lines to avoid useless indentation. 2024-11-28: David Anderson commit fc51f91e8a28a1f0d2625f8e962f1c2c176daf29 Fixing too-long lines and indent mistakes and trailing whitespace. modified: src/lib/libdwarf/dwarf_fission_to_cu.c modified: src/lib/libdwarf/dwarf_loc.c Also removed #if 0 dead code. modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_rnglists.c 2024-11-28: David Anderson commit 716db1eee00862c53e6185c8776cbcf6cf55410c New internal function _dwarf_has_SECT_fission to unify access .debug_cu/tu_* sections for .debug_rnglilsts and .debug_loclists. modified: src/lib/libdwarf/dwarf_fission_to_cu.c Added prototype for the function. modified: src/lib/libdwarf/dwarf_opaque.h Corrected an error report string to ensure it is not identical to another report here. modified: src/lib/libdwarf/dwarf_form.c Significan correction for DWARF5 loclists modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loclists.c Slight modification of library internal function prototype. modified: src/lib/libdwarf/dwarf_loc.h Significan correction for DWARF5 rnglists Now rnglists and loclists handling is as similar as possible (or close to it). modified: src/lib/libdwarf/dwarf_rnglists.c 2024-11-22: David Anderson commit b27b8cbc675db87b4810846c3fdb8e1ffaf3c6e1 Made the fix for github issue 270 about .debug_rnglists in DWARF5. modified: dwarf_rnglists.c 2024-11-22: David Anderson commit 46c4ebea1a8a66d8a3baddb9cdf3947c214ad4e5 Corrected trailing whitespace and indents. modified: dwarf_query.c 2024-11-22: David Anderson commit 48f0da072578076b9f25472cca79609efaa9631a Corrected indent mistakes. modified: dwarf_util.c 2024-11-22: David Anderson commit 324bdd94517465e7d85fdcd1307db2a0e0a7c5ec Correcting trailing whitespace. modified: dwarf_generic_init.c 2024-11-22: David Anderson commit 78ef7b939eb1bf241e29c918f45a4b4c31ea1469 Fixing trailing whitespace. modified: dwarf_init_finish.c 2024-11-22: David Anderson commit dd1ed5fd203856cf21555484b74a7714506a3519 Correcting indents, trailing whitespace and a too-long line. modified: dwarf_die_deliv.c 2024-11-22: David Anderson commit 3be32bb07bbef37e656d3f485d90d45f529a4521 Corrected an indent mistake. modified: dwarf_peread.c 2024-11-22: David Anderson commit 87d534479414c2a43d96fccf60e3203e3172e269 Adjusting line length to match CODINGSTYLE modified: dwarf_loclists.c 2024-11-21: Jeremy Rifkin commit 9a9d1725889f679ca3f0f67a0caadffd5b90e271 Add an export set (#268) 2024-11-19: David Anderson commit e88395d8f86770dc6a5ec66fedec62438634ab1e Adding __debug_names to .debug_names though it is unclear of Apple generates that section. modified: src/lib/libdwarf/dwarf_machoread.c 2024-11-19: David Anderson commit a7a83e3ef56e68ef2db8699b0fc25cba8740fa92 DWARF5 MacOS objects have new sections. Adding the name translations so they are seen. + { "__debug_addr", ".debug_addr" }, + { "__debug_rnglists", ".debug_rnglists" }, + { "__debug_loclists", ".debug_loclists" }, + { "__debug_str_offs", ".debug_str_offsets" }, + { "__debug_line_str", ".debug_line_str" }, modified: src/lib/libdwarf/dwarf_machoread.c 2024-11-16: David Anderson commit de25355d90730eae2e56ecd7aeaa49de87a81480 Now with all the rnglists fixes in place. modified: ChangeLog 2024-11-29: David Anderson commit 0f640f587a66277961bda4aabb44d6637a406f5d Added release of 1 Dec 2024 modified: README.md 2024-11-28: David Anderson commit 046aca5f5a5f1fa161752cbc3f87ca0de702bb02 Fixed an indent. modified: dwarf_errmsg_list.h Removde trailing whitespace. modified: dwarf_opaque.h 2024-11-28: David Anderson commit 3b2303c76806958cd8e8430b8db1dc034da8d55d Coverity scan noted two blocks of structurally dead code in two pretty much identical cases. _dwarf_which_loclists_context _dwarf_which_rnglists_context modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_rnglists.c Renoved the dead code and realigned the lines to avoid useless indentation. 2024-11-28: David Anderson commit fc51f91e8a28a1f0d2625f8e962f1c2c176daf29 Fixing too-long lines and indent mistakes and trailing whitespace. modified: src/lib/libdwarf/dwarf_fission_to_cu.c modified: src/lib/libdwarf/dwarf_loc.c Also removed #if 0 dead code. modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_rnglists.c 2024-11-28: David Anderson commit 716db1eee00862c53e6185c8776cbcf6cf55410c New internal function _dwarf_has_SECT_fission to unify access .debug_cu/tu_* sections for .debug_rnglilsts and .debug_loclists. modified: src/lib/libdwarf/dwarf_fission_to_cu.c Added prototype for the function. modified: src/lib/libdwarf/dwarf_opaque.h Corrected an error report string to ensure it is not identical to another report here. modified: src/lib/libdwarf/dwarf_form.c Significan correction for DWARF5 loclists modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loclists.c Slight modification of library internal function prototype. modified: src/lib/libdwarf/dwarf_loc.h Significan correction for DWARF5 rnglists Now rnglists and loclists handling is as similar as possible (or close to it). modified: src/lib/libdwarf/dwarf_rnglists.c 2024-11-22: David Anderson commit b27b8cbc675db87b4810846c3fdb8e1ffaf3c6e1 Made the fix for github issue 270 about .debug_rnglists in DWARF5. modified: dwarf_rnglists.c 2024-11-22: David Anderson commit 46c4ebea1a8a66d8a3baddb9cdf3947c214ad4e5 Corrected trailing whitespace and indents. modified: dwarf_query.c 2024-11-22: David Anderson commit 48f0da072578076b9f25472cca79609efaa9631a Corrected indent mistakes. modified: dwarf_util.c 2024-11-22: David Anderson commit 324bdd94517465e7d85fdcd1307db2a0e0a7c5ec Correcting trailing whitespace. modified: dwarf_generic_init.c 2024-11-22: David Anderson commit 78ef7b939eb1bf241e29c918f45a4b4c31ea1469 Fixing trailing whitespace. modified: dwarf_init_finish.c 2024-11-22: David Anderson commit dd1ed5fd203856cf21555484b74a7714506a3519 Correcting indents, trailing whitespace and a too-long line. modified: dwarf_die_deliv.c 2024-11-22: David Anderson commit 3be32bb07bbef37e656d3f485d90d45f529a4521 Corrected an indent mistake. modified: dwarf_peread.c 2024-11-22: David Anderson commit 87d534479414c2a43d96fccf60e3203e3172e269 Adjusting line length to match CODINGSTYLE modified: dwarf_loclists.c 2024-11-21: Jeremy Rifkin commit 9a9d1725889f679ca3f0f67a0caadffd5b90e271 Add an export set (#268) 2024-11-19: David Anderson commit e88395d8f86770dc6a5ec66fedec62438634ab1e Adding __debug_names to .debug_names though it is unclear of Apple generates that section. modified: src/lib/libdwarf/dwarf_machoread.c 2024-11-19: David Anderson commit a7a83e3ef56e68ef2db8699b0fc25cba8740fa92 DWARF5 MacOS objects have new sections. Adding the name translations so they are seen. + { "__debug_addr", ".debug_addr" }, + { "__debug_rnglists", ".debug_rnglists" }, + { "__debug_loclists", ".debug_loclists" }, + { "__debug_str_offs", ".debug_str_offsets" }, + { "__debug_line_str", ".debug_line_str" }, modified: src/lib/libdwarf/dwarf_machoread.c 2024-11-16: David Anderson commit de25355d90730eae2e56ecd7aeaa49de87a81480 Now with all the rnglists fixes in place. modified: ChangeLog 2024-11-16: David Anderson commit 577159d68854f11e58821cc8d42c4f9e547f7cc0 github Issue 267 is now fixed. Cleaning up debug printf and ensuring that sanity checks in dwarf_rnglists.c are written correctly. undefining 2 libdwarf variables: DEBUG_RNGLIST DEBUG_PRIMARY_DBG (Neither visible or referred to in libdwarf.h or dwarf.h) as they should not be on in normal use. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_rnglists.c modified: src/lib/libdwarf/dwarf_fission_to_cu.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_util.c 2024-11-14: David Anderson commit 7202d80878cb8ff476ab8cf73825a940caadb9ab Added a DBG_IS_PRIMARY(dbg) check to know when to merge to primary from secondary. modified: src/lib/libdwarf/dwarf_die_deliv.c Now depends on DEBUG_PRIMARY_DBG to turn on/off debugging functions _dwarf_print_is_primary _dwarf_dump_prim_sec _dwarf_dump_optional_fields COrrected DBG_HAS_SECONDARY macro. modified: src/lib/libdwarf/dwarf_opaque.h Corrected the merge fields Removed a bogus test of cc_addr_base_offset_present from _dwarf_merge_all_base_attrs_of_cu_die() modified: src/lib/libdwarf/dwarf_query.c Implementation of debugging function _dwarf_dumpsig() protected by DEBUG_PRIMARY_DBG. modified: src/lib/libdwarf/dwarf_tied.c Added new debug functions protected by thes same macro. _dwarf_dump_optional_fields() is particulary useful for debugging split-dwarf merges. modified: src/lib/libdwarf/dwarf_util.c 2024-11-14: David Anderson commit ab86377bced3e22fc0de3335dc6c96ad89057fdb Corrected as the test for base group is now groupnumber DW_GROUPNUMBER_BASE instead of a simple 1. modified: print_section_groups.c 2024-11-14: David Anderson commit a7e37e351eb38602ff6948723e13df14135ad1b1 Shortened two too-long lines. modified: print_die.c 2024-11-13: David Anderson commit 6c6c905aaeca65721043c664361377b30acb1ba9 DO NOT USE THIS COMMIT. work continues. Major change in how Dwarf_Debug_s records and names the dbg fields of split-dwarf. modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_fission_to_cu.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_init_finish.c Revised naming for split-dwarf to de_primary_dng and de_secondary_dbg, adding HAS_SECONDARY_DGB and other macros so places in the text depending on these names are readily located.. modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_ranges.c modified: src/lib/libdwarf/dwarf_rnglists.c New small general-purpose debug function added related about split-dwarf objects. modified: src/lib/libdwarf/dwarf_util.c 2024-11-11: David Anderson commit 76b253aaff46a8df8a3c121b557c956e2828e170 Renamed de_main.dbg to de_primary_dbg de_tied_dbg to de_secondary_dbg in dwarf_opaque.h and whereever required as those original name were confusing in comments and...well... everywhere. modified: ../../lib/libdwarf/dwarf_die_deliv.c modified: ../../lib/libdwarf/dwarf_error.c modified: ../../lib/libdwarf/dwarf_form.c modified: ../../lib/libdwarf/dwarf_generic_init.c modified: ../../lib/libdwarf/dwarf_init_finish.c modified: ../../lib/libdwarf/dwarf_opaque.h modified: ../../lib/libdwarf/dwarf_query.c modified: ../../lib/libdwarf/dwarf_ranges.c modified: ../../lib/libdwarf/dwarf_rnglists.c 2024-11-10: David Anderson commit f4f6f782a06ab0618861cf0c4474989376c69c76 With all recent changes noted, including fix for Issue 265 and Issue 266 on github. modified: ChangeLog 2024-11-09: David Anderson commit c44c0d807acfdda5e22f4e38d44cff7afbde820d In new code yesterday we omitted dwarf_dealloc_error() when we were intending to ignore it harmlessly. modified: print_die.c 2024-11-09: David Anderson commit 1bb1cb5fb93f0ee67e73d395f86e2299a4d08ab6 Removing debnug-only code modified: src/lib/libdwarf/dwarf_ranges.c 2024-11-09: David Anderson commit 8874d929daf966b867ad2118fa27e8ab892147cd This completes the fixes for github Issue 265 Reports .debug_ranges more fully when DWARF4 split-dwarf extension is in use. modified: src/bin/dwarfdump/print_ranges.c 2024-11-09: David Anderson commit b71911394c4d089e5dc43dafd1f1f1eb7f714d41 Now for .debug_ranges does a better job in reporting DWARF4 split-dwarf extension ranges actual locations. modified: src/bin/dwarfdump/print_die.c 2024-11-09: David Anderson commit 12bae7a6095cb7b78ea558d2c88d062693ad6c02 Removing some debug code. modified: src/lib/libdwarf/dwarf_ranges.c 2024-11-09: David Anderson commit f62b865a955f02a560a46ffcef02060fd9cf9f94 Correcting _dwarf_merge_all_base_attrs_of_cu_die() so split dwarf works properly. Was omitting the inheritance of ranges base offset from the merge of skeleton data. modified: src/lib/libdwarf/dwarf_query.c 2024-11-09: David Anderson commit e71971a92131e83e9935749dbee4e5aff4ca5e80 Correct a comment spelling error. modified: src/lib/libdwarf/dwarf_opaque.h 2024-11-07: David Anderson commit 2db518897e30ea942dc0af0afe677de782a9fe06 Remove obsolete #if 0 code. modified: dwarf_die_deliv.c 2024-11-07: David Anderson commit e6148786f5dbf5a2e046de3aec88e1b0fa1fafd2 Adding checks to complete the fixes for github Issue #266 modified: dwarf_rnglists.c 2024-11-07: David Anderson commit fd5e13a6b5826d1de0588d41b7cbf33b6e466130 Removed a whitespace character at end of line modified: dwarf_setup_sections.c 2024-11-07: David Anderson commit 4f4b2e7d459bad59475b0e39f8f0f591aeb8f132 Removing unusable code (was #if 0) modified: dwarf_tied.c 2024-11-07: David Anderson commit 54f2e9539521644d0aed8a2d298d6f69e9f811a8 Cleaning up some unused code. modified: dwarf_ranges.c 2024-11-07: David Anderson commit 030ffb4c68af2e25232a2cfa02515f1f8a94ec8a A port of fixing a crash reading loclists, as shown in github issue #266 modified: dwarf_loclists.c 2024-11-07: David Anderson commit 3353fec2ebc893607128a7054860b20b4fce1c9a Adding define DW_DLE_LLE_ERROR 505 define DW_DLE_RLE_ERROR 506 for new error checks in dwarf_loclists.c dwarf_ranges,c dwarf_rnglists.c Related to github issue #266 modified: dwarf_errmsg_list.h modified: libdwarf.h 2024-11-07: David Anderson commit 2cfd1f75d5accfab505fb18b7e63792354a20270 Remove #if 0 code. two useless leftovers. modified: dwarf_alloc.c 2024-11-07: David Anderson commit 963e0392dd33c7314325ea37269addc18f19336e A set of changes reflecting corrections following a detailed review of the handling of and correct interpretation of .debug_rnglists and .debug_loclists data. Some errors (not affecting correctness, thankfully) were present. Removing a now-unused argument from _dwarf_next_cu_header_internal() and refinement of the test for entry_pc with if (entry_pc_attrnum >= 0 && cucon->cc_producer == CC_PROD_Apple) And rearrangement of the DW_AT_low_pc vs DW_AT_entry_pc (Apple only) checks modified: src/lib/libdwarf/dwarf_die_deliv.c Mainly debug printouts and preparation for a validity check of data read from a DWARF section. modified: src/lib/libdwarf/dwarf_loclists.c Added CC_PROD_Apple for sharpened handling of DW_AT_entry_pc. And new internal function _dwarf_entrypc() modified: src/lib/libdwarf/dwarf_opaque.h Refactoring Now dwarf_lowpc() and the new _dwarf_entrypc() use the same implementation code. modified: src/lib/libdwarf/dwarf_query.c Lots of ifdefed-out debug printf (to be removed pretty soon) and crucial correction of _dwarf_determine_die_range_offset() to get 'base address' correct. Leaving a superflous argument in dwarf_get_ranges_baseaddress() as the function is public. And corrected its code returning CU base address. Added (void)have_die_ranges_offset; /* FIXME */ to avoid compiler issues. modified: src/lib/libdwarf/dwarf_ranges.c Some #if 0 code will be deleted very soon. modified: src/lib/libdwarf/dwarf_rnglists.c Ill advised code in _dwarf_loop_reading_debug_info_for_cu() is now #if 0 out. To be deleted very soon. modified: src/lib/libdwarf/dwarf_tied.c Fixed dummy _dwarf_next_cu_header_internal() to reflect the revised internal function prototype. modified: test/test_dwarf_tied.c 2024-11-07: David Anderson commit ca4ee1438d54c31dcccb5dcec1ff13ba930c133f corrected a comment modified: src/lib/libdwarf/dwarf_rnglists.h 2024-11-07: David Anderson commit ee38cd9b8490d1ca6ca8dcd0e56d7df384360dd4 Corrected a comment and added a 1-line comment. modified: src/lib/libdwarf/dwarf_loc.c 2024-11-07: David Anderson commit 5a5426e2642d51cd2a647b1ad251f02a54a70d2c Reformatted the call arguments calling dwarf_get_ranges_baseaddress() Added a comment. modified: src/bin/dwarfdump/print_die.c 2024-11-07: David Anderson commit 9d3224578dcf9c0560c92f1f7c2136280fb3bdee October->November in the heading. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2024-11-03: David Anderson commit 62be899578e664f90455f00bffb8e70263d6c8a5 Report better on what cmake finds about libz zstd modified: CMakeLists.txt 2024-11-03: David Anderson commit 754d5627c2d2d6f48a7e444fa5173ef447ae0c07 copyright modified: src/lib/libdwarf/libdwarf.h 2024-10-29: David Anderson commit 852d30d733099c2c914c0715c0d28a5abb409942 October modified: bugxml/dwarfbuglohi.html 2024-10-29: David Anderson commit 4d8560204d189555d021a4bc659d6065692346bf October modified: bugxml/dwarfbug.html 2024-10-21: David Anderson commit 1bedfea64dd349d1638cc0b75ddfa4876b0bce9c Small static function both_strings_nonempty() avoids compiler warning 2024-09-28: David Anderson commit c658d71f036e082ecf0bcfff6613ea24560ad429 Further refinement of heuristic, distinguishing 32bit from 64 bit PE objects in the check. modified: dwarf_peread.c 2024-09-23: David Anderson commit a095d0db09700bc82411ff776e67a22dbded78e6 Fix violations of codingstyle: line length, trailing spaces, indent, if( etc. modified: libdwarf/dwarf_debugnames.c modified: libdwarf/dwarf_harmless.c modified: libdwarf/dwarf_line.c modified: libdwarf/dwarf_loc.c modified: libdwarf/dwarf_rnglists.c modified: libdwarf/dwarf_tsearchhash.c 2024-09-23: David Anderson commit a1ef665e1d2c21fd2555699dea1f442f23fcbfd3 Another set of violations of codingstandard: trailing whitespace, indent, and line length. modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/gennames/gennames.c modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/tag_tree.c 2024-09-23: David Anderson commit aa21630b4b119dfdeaf6585cd2353238506293cc Fix violations of the codingstandard: removing trailing whitespace, fixing indents and the like. modified: src/bin/dwarfdump/dd_attr_form.c modified: src/bin/dwarfdump/dd_attr_form.h modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c 2024-09-19: Keith W. Campbell commit 5108b1862936d67cd8e87af8ca04fcebdebc18c0 Fix typo in reference to threekey_s (#264) Signed-off-by: Keith W. Campbell 2024-09-19: David Anderson commit 251c9fa2fdf4b1f4e34c5636503c7846f3481403 A compiler noted that i, defined at line 197, was set but not used. Deleted i from the function. modified: dwarfdump/dd_attr_form.c 2024-09-18: David Anderson commit 277a7cf4cb89d893e2e707c556c7e356b89b5b10 Refactoring common code and removing intermediary calls. 45 less lines of code, no change in behavior. modified: dd_attr_form.c modified: dd_attr_form.h 2024-09-18: David Anderson commit 26b4f3a18dcff1b2fea79525470c0ee0eae8b7aa Rearramge the rebuild: target code to clearly separate std from ext with -af- as is done with -tt- and -ta- . modified: ../attr_form/Makefile.am Obsolete, now two tables in the same approach as -tt- and -ta- deleted: dwarfdump-af-table.h 2024-09-18: David Anderson commit 3f48beb19950621fa245aa8ada98d7cc64ef6eac This completes the transition to using struct Three_Key_Entry_s in data trees used with -k dwarfdump options. modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/dd_attr_form.c modified: src/bin/dwarfdump/dwarfdump-af-table-std.h 2024-09-18: David Anderson commit 94ec65ff66f6b3378ea225bdba1ca5afd6ccc13b Removed a bunch of lines with defines that we no longer need or want. modified: src/bin/dwarfdump/dd_tag_common.h 2024-09-18: David Anderson commit 361ce4593a31d23e11241f56a7ecf480cebb9981 Added comment on AF_ macros modified: src/bin/dwarfdump/dd_attr_form.h 2024-09-18: David Anderson commit 053a874577bafc0fa78e6ec5b43dfb62360bff48 Replacing dwarfdump-af-table.h with two header files, the new standard form for Three_Keys data. modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am 2024-09-18: David Anderson commit b201e11de54d3e6bc9098801e20b4e75b1ba91b1 regenerates in the new standard format of Three_Keys modified: src/bin/attr_form/Makefile.am modified: src/bin/attr_form/attr_form_build.c 2024-09-18: David Anderson commit 312d8fd96da82f3fbb9d08c3097f6827a018c233 Removing small accidents. rebuild working. modified: src/bin/dwarfdump/dwarfdump-af-table-std.h 2024-09-18: David Anderson commit 7a9179603e117283e8a1849876b1af4202110054 Correct content, it seems. modified: src/bin/dwarfdump/dwarfdump-af-table-ext.h modified: src/bin/dwarfdump/dwarfdump-af-table-std.h 2024-09-18: David Anderson commit 120f8c4fb9b459e7ad2917a6e44a001f502c6a64 New standard tables for af table data. new file: dwarfdump-af-table-ext.h new file: dwarfdump-af-table-std.h 2024-09-18: David Anderson commit 4f1096de14d60cf1371e8ddc1ce1eae9daf89288 Now in the new standard format. modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h 2024-09-18: David Anderson commit 058956efeff048c9911ebbd25cf80e4bfc2b3277 Now producing threekey structs in text for dwarfdump. simpler, faster. modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/tag_tree.c 2024-09-15: David Anderson commit da942e792942fd9b3cf3ec8ff0d8b7ea2a33fb04 Altered the .debug_names DW_IDX_parent output nessage to reflect the LLVM extension of DW_FORM_flag_present. modified: print_debug_names.c 2024-09-14: David Anderson commit 3c910e6e99bf2896ece6015ef27a76f8f3acf31a Using the latest official coverity build coverityscan discovered 12 Defects. These defects are mostly not new, but the detection of them is new! modified: src/bin/dwarfdump/dd_getopt.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfgen/dg_getopt.cc modified: src/lib/libdwarf/dwarf_debugaddr.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_ranges.c modified: src/lib/libdwarfp/dwarf_pro_log_extra_flag_strings.c 2024-09-13: David Anderson commit 59331dc46ad0063a3032b43c7ea835cddee04cd7 Removed the flag gf_print_usage_tag_attr_full as no longer relevant (all usage reports are full reports now) and altered the help message and options comments to reflect this. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_glflags.c modified: src/bin/dwarfdump/dd_glflags.h Ensure that the tag-* bases are initialized when tag-tree (ie, tag-tag) relations are being checked, this has been incorrect for years in that -kt on its own did not work fully or correctly. modified: src/bin/dwarfdump/dwarfdump.c 2024-09-13: David Anderson commit 0dbe0aeac751c43ffecca656fb5affb7e0c27df4 Correct a comment related to DW_AT_GNU_locviews. modified: src/bin/dwarfdump/print_die.c Remove trailing whitespace and re-insert the call to print_attr_form_usage() that was accidentally lost in the changes to -ku output. modified: src/bin/dwarfdump/print_tag_attributes_usage.c 2024-09-13: David Anderson commit f2a628dcbad82156ba7f0f1ed226b3173cc0a671 On two errors change the explanatory string to something specific and hopefully clear. modified: src/lib/libdwarf/dwarf_query.c 2024-09-13: David Anderson commit a47c324b91546342ce086681139ebbf2c408fdd7 Now with DW_AT_GNU_locviews we do not emit an error message about the inability to follow the DW_FORM_sec_offset. This requires further work to decide what should be done. modified: src/bin/dwarfdump/dd_trace_abstract_origin_etc.c 2024-09-13: David Anderson commit 6b75a825fce1fb32ec63250a6fc2850b7ecd09f0 Fix indents. Remove trailing whitespace modified: src/bin/dwarfdump/dd_attr_form.c Adjusted table sizes to match what is required by the tag and attr generation build. modified: src/bin/dwarfdump/dd_tag_common.h 2024-09-13: David Anderson commit 5e40a44dd5a1cfbb392cab9ecea052a00a599800 Removed trailing whitespace modified: src/bin/dwarfdump/dd_command_options.c 2024-09-13: David Anderson commit 7aa87acc8ae13d51d7652a209686f763f4a47de4 Adding known items to the lists for dwarfdump. modified: src/bin/tag_attr/tag_attr.list modified: src/bin/tag_tree/tag_tree.list modified: src/bin/attr_form/attr_formclass_ext.list Regenerated the tables used by dwarfdump. modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h 2024-09-13: David Anderson commit b3241522aada5225ae5a956be99397465723fca9 Added detailed instructions for MS Visual Studio users on how to eliminate warnings from a build. Works with Win 10 current VS. modified: READMEwin-msys2.md 2024-09-10: David Anderson commit c0e0da1c436d9e8ae5c805d49000a7d75c1c2c26 Up to date. modified: ChangeLog 2024-09-10: David Anderson commit b608cead3f2eee17e962ca970ae5c35805bc3ebd Merge: 96bd4edd 721d3d82 Merge branch 'threekey' Replaced much of the code generating tag/attr statistics from the dwarfdump -ku option. All these changes are in dwarfdump, none in libdwarf. The old approach of generating statistics left out things about non-standard TAGs and ATtributes as it would have been extra work at the time. Now, using dwarf_tsearch and building searchable and sortable data, additional targeted reports become easy to add and update. No doubt more will be added. 2024-09-10: David Anderson commit 721d3d824976a80ce2c7128e2a123a11d5217ed0 Removed debug printf modified: dd_attr_form.c modified: print_tag_attributes_usage.c 2024-09-10: David Anderson commit e175de85d37df08c5b7791a1b5b2636228b7ad44 Now with more statistics from -ku modified: src/bin/dwarfdump/dd_attr_form.c modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/print_tag_attributes_usage.c Corrected an accidental omission. modified: src/bin/tag_attr/tag_attr.list 2024-09-10: David Anderson commit f2c1cb8269bdc225ef720d16a73fd15ee63998a7 DO NOT USE THIS COMMIT Now with the beginnings working (of the new records of usages) modified: src/bin/dwarfdump/dd_attr_form.c modified: src/bin/dwarfdump/dd_attr_form.h modified: src/bin/dwarfdump/print_tag_attributes_usage.c Fixed an old bug in this file: DW_TAG_subprogram listed as a row twice. modified: src/bin/tag_tree/tag_tree.list 2024-09-10: David Anderson commit 01266626c48005afb15467da74f6bb0d0488982a DO NOT USE THIS COMMIT. Contains debug printf and is a step toward the new tag-tree tag-attr reporting. Works but does little but build trees (so far). modified: src/bin/dwarfdump/dd_attr_form.c modified: src/bin/dwarfdump/dd_attr_form.h modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_globals.h modified: src/bin/dwarfdump/dd_tag_common.h modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c 2024-09-10: David Anderson commit 839979975aed0a8ccd3319fb489dab64bde10813 Regenerated modified: dwarfdump/dwarfdump-ta-ext-table.h modified: dwarfdump/dwarfdump-ta-table.h modified: dwarfdump/dwarfdump-tt-table.h There were some duplicate entries, tne latest dwarfdump code noticed the errors and quit in 'make rebuild' modified: tag_attr/tag_attr.list modified: tag_attr/tag_attr_ext.list modified: tag_tree/tag_tree.list 2024-09-01: David Anderson commit 96bd4edd09167a1b4b8776c35c85049a0bfe0150 OUp to date with git log modified: ChangeLog 2024-09-01: David Anderson commit 65f52d2e095636571d01e8311cd8610ac1c7260a Now dated Sept (changes each month) modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2024-09-01: David Anderson commit 84bd9a6f42caacf323d31e403de1f7693df7fd26 Revising the formatting of the report on the .debug_names section for clarity. modified: src/bin/dwarfdump/print_debug_names.c 2024-08-31: David Anderson commit d8b55ace8276e2e5eac071adf3dca2edce127dfe Adjust debug_name final tables for better look and acurate values. modified: print_debug_names.c 2024-08-30: David Anderson commit 1038e7c77c0179d181c7a42dea11ee7b96eac1c5 Fixed error in reading .debug_names (with DW_FORM_ref4 in .debugnames the 4 byte length was counted twice). modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfdump/print_die.c modified: src/lib/libdwarf/dwarf_debugnames.c 2024-08-29: David Anderson commit a2ac6d2b32394812f2397513415587d798f5ce6c Updated from gitlog and more. modified: ChangeLog 2024-08-29: David Anderson commit 164771d2ed375c2d162ac28f968e4437bebc80f9 With this we complete some fixes: github issue #259 now reads .debug_rnglists data from its tied-file. github issue #260 We now report DW_FORM_flag and DW_FORM_flag_present when used in .debug_names (DWARF5) and everywhere else. We altered the (internal) struct Dwarf_Debug_s with better naming for loclists rnglists fields merged from a skeleton to the dwp/dwo. We revised DW_DLV_ERROR reports to always use the main-object, not the tied-object (if any) to report errors. Simpler and saver now we read more from the tied-object. Made possible by 3 new fields in dwarf_opaque.h (a libdwarf-private header). Removed trailing whitespace. modified: src/bin/dwarfdump/dd_globals.h modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_setup_sections.c 2024-08-29: David Anderson commit c7054db271ee668aef5ef4eb9fd47fc139ecb36b Removed all debug printf modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_fission_to_cu.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_tied.c 2024-08-29: David Anderson commit 3e364da8aea38a9e8eb22747d3abb7744f121c50 Now we print skeleton .debug_rnglists (DW5) and .debug_ranges (DW4 extension) properly, we think. Many #ifdef TEST_MER code blocks must now be deleted. DO NOT USE THIS COMMIT modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_tied.c modified: test/test_dwarf_tied.c 2024-08-28: David Anderson commit c3e72e2da521c6679309056fe4639e4dfcc2d897 Fixes for rnglists with tied-file .debug_rnglists modified: dwarf_die_deliv.c modified: dwarf_opaque.h modified: dwarf_query.c modified: dwarf_rnglists.c DO NOT USE THIS COMMIT 2024-08-25: David Anderson commit faa0ac96241387a662d0aad7a8b68b9a7d2cad37 Now seems to get skeleton data correctly from a tied-file. Now reads DW_AT_accessibility and DW_FORM_flag sensibly. Still with lots of printf (but all #ifdef out). DO NOT USE THIS COMMIT. modified: ../../lib/libdwarf/dwarf_debugnames.c modified: ../../lib/libdwarf/dwarf_die_deliv.c modified: ../../lib/libdwarf/dwarf_fission_to_cu.c modified: ../../lib/libdwarf/dwarf_form.c modified: ../../lib/libdwarf/dwarf_opaque.h modified: ../../lib/libdwarf/dwarf_query.c modified: ../../lib/libdwarf/dwarf_tied.c 2024-08-25: David Anderson commit c2310f8e499725ece9c5fb0af9191315aa8e2ceb DO NOT USE THIS COMMIT. it is a work in progress. Contains debug related to DWARF5 rnglists. modified: src/bin/dwarfdump/print_die.c Now all DW_DLV_ERROR allocations appear on the 'main file' errors allocations, never on the tied-file allocations. Simplifies dealing with reading from the tied-file. modified: src/lib/libdwarf/dwarf_alloc.c Lots of temporary debug printf (with ifdefs). Small but important changes dealing with tied-file. Includes eliminating de_tied_data.td_tied_object. modified: src/lib/libdwarf/dwarf_die_deliv.c Ensures all ERROR instances are on the main-file error list, even when reading from tied-file. Changes reflecting the new field de_tied_dbg modified: src/lib/libdwarf/dwarf_error.c Changes reflecting the new field de_tied_dbg Some debug printf (with #ifdef). modified: src/lib/libdwarf/dwarf_fission_to_cu.c Now all error deletes use dwarf_dealloc_error(). Changes reflecting the new field de_tied_dbg modified: src/lib/libdwarf/dwarf_form.c Big change in dwarf_set_tied_dbg() for correctness involving the new fields related to de_tied_dbg. And dwarf_get_tied_dbg(). No change in API. modified: src/lib/libdwarf/dwarf_generic_init.c Big changes in dwarf_object_init_b related to de_tied_dbg and de_errors_dbg etc. No API change. modified: src/lib/libdwarf/dwarf_init_finish.c renamed ll_cu_addr_base_present to ll_cu_addr_base_offset_present and a couple other fields to reflect the meaning of the field. Clarifying relationship to the DWARF5 specification. modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loc.h modified: src/lib/libdwarf/dwarf_loclists.c Now all error deletes use dwarf_dealloc_error(). modified: src/lib/libdwarf/dwarf_macro5.c Renamed cc_addr_base_present cc_base_address_present for clarity. Added struct Dwarf_Debug_s * de_main_dbg; struct Dwarf_Debug_s * de_tied_dbg; struct Dwarf_Debug_s * de_errors_dbg; for simplicity and clarity in handling main-file and tied-file requirements. modified: src/lib/libdwarf/dwarf_opaque.h Renaming cc_addr_base; to cc_addr_base_offset for clarity on the meaning of the field. Now all error deletes use dwarf_dealloc_error(). Removed de_tied_data.td_tied_object reference and use de_tied_dbg != de_main_dbg in its place. Removed completely an ill-advised #if 0 code block. Left debug printf in place (within #ifdef) Added cc_addr_base_offset[_present] to the fields merged from tied-file to main-file. modified: src/lib/libdwarf/dwarf_query.c Now using dbg->de_tied_dbg where needed. modified: src/lib/libdwarf/dwarf_ranges.c Using renamed-to rh_cu_addr_base_offset[_present] where needed. Left debug printf in place (within #ifdef) modified: src/lib/libdwarf/dwarf_rnglists.c renamed two fields to rh_cu_addr_base_offset[_present]. modified: src/lib/libdwarf/dwarf_rnglists.h Left debug printf in place (within #ifdef) modified: src/lib/libdwarf/dwarf_tied.c Deleted -_dwarf_error_mv_s_to_t() as it is no longer needed due to use of de_errors_dbg instead of plain dbg. modified: src/lib/libdwarf/dwarf_util.c modified: src/lib/libdwarf/dwarf_util.h Fully document dwarf_get_tied_dbg() for the first time. No change in API. modified: src/lib/libdwarf/libdwarf.h 2024-08-15: David Anderson commit 2511d3eea2aff3a570333c3f2cbe0c8520abf91a Removed an accidental dot (.) character that broke the build. modified: src/bin/dwarfdump/dd_true_section_name.c 2024-08-15: David Anderson commit 61d283637eab47b762db58b9d408803d223b3c0c Updated version to 0.11.1 before doing new work. modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: src/lib/libdwarf/libdwarf.h modified: tools/makerelease.sh 2024-08-15: David Anderson commit b3af76c32326cca960ff723e0f0948c689cf174d Show cflags. modified: meson.build sprintf->snprintf modified: src/bin/dwarfdump/dd_true_section_name.c sprintf->snprintf (only compiled for debugging). modified: src/lib/libdwarf/dwarf_util.c 2024-08-15: David Anderson commit 285d9d34f3e9f56cc1c487d0055f6dc54a9c54a1 Now with date today modified: doc/libdwarf.pdf 2024-08-15: David Anderson commit 9bba69fa73f925cc793e5a7456798e46d5a60d8a Updated document date to today. modified: doc/libdwarf.dox 2024-08-15: David Anderson commit 5c2899c95634ac60f7afe65a2ef5b37d1a08f73e Noted change to scripts/buildandreleasetest.sh modified: ChangeLog 2024-08-15: David Anderson commit e65fc8c50072f07fefd1017650c97e7282125e1d cmake and meson builds here defaulted to shared, which was not working on MacOS, possibly due to issues with copying libraries around (without the proper details for MacOS). So now we just default all build mechanisms to be static library builds. Works on Linux and MacOS without other changes. modified: scripts/buildandreleasetest.sh 2024-08-14: David Anderson commit b2a9ab26cadb7f52bab3e91f645d5659ce823f4a Latest from git log modified: ChangeLog 2024-08-14: David Anderson commit 1cf037cb0f990dc904bb6d1e9e2e46d4194c985d Each file has 1 to 3 trivial casts added and all involve things whose known range ensures the change is ok (boolean, address-size, and other known things).. Changes fix new-ish warnings from MSVC. modified: src/bin/dwarfdump/dd_uri.c modified: src/lib/libdwarf/dwarf_debugaddr.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_setup_sections.c modified: src/lib/libdwarfp/dwarf_pro_log_extra_flag_strings.c modified: test/test_dwarfstring.c modified: test/test_errmsglist.c modified: test/test_linkedtopath.c 2024-08-10: David Anderson commit 3c8422df4d775a4d5ed4d7422c35688aeb05ca77 Changed all instances of macro use s follows: true->TRUE false->FALSE and removed the macro defines of true(1) and false(0). It was really strange to have two different names for each idea. The majority of uses were spelled TRUE/FALSE already. The inconsistent usage was present at least as far back as 2016. modified: src/lib/libdwarf/dwarf_arange.c modified: src/lib/libdwarf/dwarf_base_types.h modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_print_lines.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarfp/dwarf_pro_line.h 2024-08-09: David Anderson commit 9f65ccc57a7597c65e881693d8d129c6ab0b68e3 Latest tiny changes. No logic change. modified: ChangeLog 2024-08-09: David Anderson commit 24285c53118e24a620e1004e2025e2c613932b4b Removing trailing whitespace and fixing a couple indent mistakes. modified: dd_trace_abstract_origin_etc.c modified: print_die.c 2024-08-06: David Anderson commit e16794254d24364862bfbf54deeaf9de9326dc99 For the 20000 or so regressiontests do larger diff using cmp as on many systems multiple differences affecting many tests will be painfully slow. Affects tests generating text over 30MB (some individual tests generate 3GB to 5GB of text).. modified: scripts/run-all-tests.sh 2024-08-05: David Anderson commit b6140a57f20ce4b3680f10468aeeb0615d5ef296 Adjusted cmake build to use Ninja instead of Unix Makefiles modified: scripts/buildandreleasetest.sh Now stops early on fail. modified: scripts/run-all-tests.sh New baselines due to output of Refers to: by dwarfdump. modified: test/testobjLE32PE.base modified: test/testuriLE64ELf.base 2024-08-03: David Anderson commit 52650573c771588ece2d027a623951f2a53f34c9 Now with improvements in checking by dwarfdump. modified: ChangeLog 2024-08-03: David Anderson commit 526b8792a274c28a83929dc66c34375b50265415 Now checks and reports on all DIE references, meaning the DWARF reference class. Try dwarfdump -ka or even just dwarfdump -i Before it only checked a subset of references. modified: print_die.c 2024-08-03: David Anderson commit 5ef4ae65ccfec51490f46f9cf6c023544fa7cd60 More references are followed and checked for error/recursion. modified: src/bin/dwarfdump/print_die.c 2024-08-03: David Anderson commit c768b93dfc4f19faa2ef6a33ab4c3b9881bfe4f5 Up to date with recent changes. modified: ChangeLog 2024-08-03: David Anderson commit ec7a5aaf1a9fbcd2780f7d2c7e95cbf5cc8af2ba Latest. modified: libdwarf.pdf 2024-08-03: David Anderson commit 57d39467f624905e6448ef047165cff7643eadc9 Now uses a macro for 0x%08llx clarifying printf on Dwarf_Unsigned. Also removes an accidental trailing space in printed output. Also removes trailing whitespace from the code. modified: checkexamples.c 2024-08-01: David Anderson commit d7c15b0938b0bfdbbdf2f904c37d789bc46ce50b Now up to date. modified: ChangeLog 2024-08-01: David Anderson commit 2ff13502e25275fdec0318747980a2997b44ef1e A mistaken printf %lx in examplev resulted in the printed output looking strange and wrong. Now uses %llx so it prints correctly even on a 32bit system. modified: doc/checkexamples.c 2024-08-01: David Anderson commit aa6512dc9f13ed4a6ff745fa633b3e5263e38798 New month so the month reported changes. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2024-08-01: David Anderson commit da97110fa0ebdc9377c2a2e213d4da09303cb6b1 In one place in code added yesterday an explicit dealloc of a Dwarf_Error was omitted. Found by the usual export NLIZE=y export SUPPRESSDEALLOCTREE=y regressiontest. modified: src/bin/dwarfdump/dd_trace_abstract_origin_etc.c 2024-08-01: David Anderson commit a8a619644df73191bf82e25780d480a5610ddf34 Now we add the target type to DW_AT_type references so we have to update these baselines to match the change in dwarfdump output. modified: test/test-mach-o-32.base modified: test/testobjLE32PE.base modified: test/testuriLE64ELf.base 2024-07-31: David Anderson commit b72853b5468bc46e00f89fe84457eb3d1e4ddaac The code refactoed to print attributes: DW_AT_specification: DW_AT_abstract_origin: DW_AT_type: is now in place and this commit deletes the lines extracted to the new source file. modified: src/bin/dwarfdump/print_die.c 2024-07-31: David Anderson commit 3e5d521cd327af8642ff97eb70a0bf375171a3d6 Factored 300 lines out of print_die.c and added support to print the name (DW_AT_name) of the referred-to attribute (if the referred-to has a DW_AT_name field). new file: src/bin/dwarfdump/dd_trace_abstract_origin_etc.c Added the new souce file modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/meson.build A few functions now are visible throughtout dwarfdump. Needed due to the refactoring. modified: src/bin/dwarfdump/dd_globals.h modified: src/bin/dwarfdump/print_die.c 2024-07-30: David Anderson commit 5aad8984359ea8d5007e3b279747415b101b626d Fixing to match project codingstyle. Remove trailing whitespace. Fix indents. Other minor violations. modified: dwarfdump.c modified: print_die.c modified: print_ranges.c 2024-07-30: David Anderson commit 1f4dae5e7cfb410efbf567de872a3f4aed53573b Removing trailing whitespace. Fixing indents to follow project codingstyle. modified: dwarf_die_deliv.c modified: dwarf_loclists.h modified: dwarf_opaque.h modified: dwarf_ranges.c modified: dwarf_rnglists.h modified: libdwarf.h 2024-07-30: David Anderson commit 1bf563fb648f741a7cbd936f3b989bb9fd9b6b7d Merge: e85227a2 b58af607 Merge branch 'abstract' Using the proper dwarf_global_formref_b(), the original dwarf_global_formref() cannot handle all of DWARF4 2024-07-30: David Anderson commit b58af60787c748cfc3b1d0b1c197c6ca48d8e773 Change the original dwarf_global_formref() to use the current dwarf_global_formref_b() so things reflect the realities of DWARF4. modified: print_die.c modified: print_frames.c 2024-07-31: vtorri commit e85227a2dc39f304e41ed2894c7101f44305adfb build: fix arguments order in calloc calls (#258) 2024-07-30: David Anderson commit 94432777d4719241e877c411f178dc30bccf375e Updated date modified: doc/libdwarf.dox 2024-07-30: David Anderson commit 5865f274adf91ef1ac7464084dd01cd9e0209c03 Improvements to doc of dwarf_get_ranges_baseaddress modified: src/lib/libdwarf/libdwarf.h 2024-07-28: David Anderson commit b17c69f4c4e2ae48c38f65db2c8bd9a05382eb04 Updated the bugs fixed today. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2024-07-28: David Anderson commit 301d1d08f1a48d2d16cd390046b29c91c7e909c6 Up to date. modified: ChangeLog 2024-07-28: David Anderson commit c704bb966f3e62d9d9e7f018f0478c82ecea84b9 Adding git fix id to 70753 and 70763 modified: bugxml/data.txt 2024-07-28: David Anderson commit 1b79d618bf5aab2bda9be495c531b13e94ae056a Initial addition of ossfuzz 70753 and ossfuzz 70763 modified: bugxml/data.txt Fixing ossfuzz 70753 and ossfuzz 70763 by calling an internal version of global_formref_b() so we can avoid infinite recursion. The bug here was introduced two days ago in git id 6b40a0ed378826273080a7b11e7274c2b61d018b modified: src/lib/libdwarf/dwarf_die_deliv.c 2024-07-27: David Anderson commit 10e7b7f4ca5f612169e049efe7173bde55c3ebec Valgrind noticed a situation where in homeify() we could touch a piece of uninitialized memory. Fixed. modified: src/bin/dwarfdump/dwarfdump.c 2024-07-27: David Anderson commit 1719fc4b616eb5eb53ae3b18f3aa274856d4202b Up to date, with new version 0.11.0 modified: ChangeLog 2024-07-27: David Anderson commit fdcbe2c75fd8ccbb5bda03520713a21a00c08b1b Changed release id to 0.11.0 due to new, added, function. modified: CMakeLists.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h modified: tools/makerelease.sh 2024-07-27: David Anderson commit f324fd54b584ce7ae5d011572dd84bd15f48d3af Identifies git fix id now for ossfuzz 70721 DW202407-010 modified: bugxml/data.txt 2024-07-27: David Anderson commit 46fa96f95e043bac9b98ca6f7a9a542dae8f46cd Correcting use-after-free with a specific corrupted DWARF section. ossfuzz 70721 DW202407-010. The bug has been in the source for several years. modified: src/lib/libdwarf/dwarf_die_deliv.c 2024-07-26: David Anderson commit 6b40a0ed378826273080a7b11e7274c2b61d018b Using the new API function modified: doc/checkexamples.c modified: src/bin/dwarfdump/print_die.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_opaque.h Implementing the new API function dwarf_get_ranges_baseaddress() modified: src/lib/libdwarf/dwarf_ranges.c 2024-07-26: David Anderson commit 6c67c2df1408177dd3b3ceba6c9251b136a06504 Adding a new API function: dwarf_get_ranges_baseaddress() This simplfies getting correct cooked addresses for entries from .debug_ranges (which is in DWARF2,3,4); modified: src/lib/libdwarf/libdwarf.h 2024-07-23: David Anderson commit d95ee1f7ddde0bf195109167356157cd1b90746b Up to date with git log modified: ChangeLog 2024-07-23: David Anderson commit 14a9f14d06ce32f3bc156e60740e1ce3d1be25b2 The new code about .debug_ranges had small leaks when the library was told not to record or clean-up most memory allocations. Shown by -fsanitize. Would not affect most users, but for the few that use the feature this fixes the issue. modified: doc/checkexamples.c modified: src/bin/dwarfdump/print_die.c 2024-07-23: David Anderson commit f34c3affa79ed7741345b58cc027050bf4884abc Now up to date with git log. modified: ChangeLog 2024-07-23: David Anderson commit 68f5082d293e81ec869ff83deb701d9e92268fa3 The 'examplev()' function reading and showing .debug_ranges is fully worked out and is now tested in regressiontests. modified: doc/checkexamples.c 2024-07-23: David Anderson commit 7b4e7a71820a2eca6d679d9bd371b4a93fd2f6c5 Cleaned up debugging helper functions (which are #if 0 so not part of the build). modified: src/lib/libdwarf/dwarf_machoread.c 2024-07-22: David Anderson commit c51750363a5eef5c15ee8b2fc2d20f4372df8f6f Fixed a mistake in examplev, .debug_ranges modified: doc/checkexamples.c 2024-07-21: David Anderson commit f04ef392df7ec51265d9ea8994e1e80f6a5ee31f Removed trailing whitespace from one line. modified: src/lib/libdwarf/dwarf_query.c 2024-07-21: David Anderson commit 6fdabfb2b11d72d952633faa493ec66db447938d Added new argument to print_ranges_list_to_extra() so it can print both raw and cooked values. modified: src/bin/dwarfdump/dd_esb_using_functions.h Now calculates and prints Dwarf_Ranges data with raw and cooked values. modified: src/bin/dwarfdump/print_die.c Remove leftover #if 0 debugging blocks of code. modified: src/bin/dwarfdump/print_loclists.c Add extra arg to print_ranges_list_to_extra() appropriately. modified: src/bin/dwarfdump/print_ranges.c 2024-07-21: David Anderson commit 9445464f338dc58dac5847d22770e769ad087e29 Now calulates the cooked value of .debug_ranges and prints both raw and cooked values. modified: doc/checkexamples.c New date, some Dwarf_Ranges doc has been updated in libdwarf. modified: doc/libdwarf.dox 2024-07-21: David Anderson commit da5b269cab0058f313d62c89c15d83e0f1dbef4b An inconsistency in using true vs TRUE and false vs FALSE is still present but at least one place acknowledges both. This should be corrected touse TRUE/FALSE everywhere. modified: src/lib/libdwarf/dwarf_base_types.h 2024-07-21: David Anderson commit ed80e7fd06d43554dcd7bda2f1522b3e24eb57ba Minor corrections of formatting. modified: src/lib/libdwarf/dwarf_query.c 2024-07-21: David Anderson commit 41bab201a0c5e26b56ec2269769ce3f55fac2efa Added clarifying comment paragraphs about Dwarf_Ranges modified: src/lib/libdwarf/libdwarf.h 2024-07-16: David Anderson commit 37dfec2a0d9cacda16d2a27b1a3822ae3f37e635 make git status less noisy. modified: .gitignore 2024-07-14: David Anderson commit b66bf7e1fe2b15943b2bb08ac958880bca6df538 Final on the rnglists ossfuzz issues so far. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2024-07-10: David Anderson commit fff358d23488c6442c65495193758a8ff435c3b6 Up to date with git log. modified: ChangeLog 2024-07-10: David Anderson commit 34d2ee2dd7eba9af38dcac600a3663bb23c5f7ed Three new oss-fuzz issues. 70266 70263 70256 modified: data.txt modified: dwarfbug.html modified: dwarfbug.xml modified: dwarfbuglohi.html 2024-07-10: David Anderson commit 1f3b7ed15a773e89b7d2fddc09efac3144bf3d28 Now with 70246 fixed. modified: ChangeLog 2024-07-10: David Anderson commit 593e794c43006e3fa3805cd070f128d61b5b7a4a New bug entries. modified: bugxml/data.txt 2024-07-10: David Anderson commit d7c4efdcc7952b38a237a36ccedf364018e0fb1c ossfuzz 70246 DW202407-002 fixed. In reading a .debug_rnglists header a corrupt value in the offset-count field lead to a gigantic malloc. This bug is just a week old. We now check for a sane value. modified: src/lib/libdwarf/dwarf_rnglists.c 2024-07-09: David Anderson commit e2ab28a547ed8a53f2c96a825247a7cc8f7e40bb Removing esb_append_printf() which is the last use of *sprintf() modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_macro.c 2024-07-09: David Anderson commit 906a4428a5d92e17948da4249cfccbe8f5ae8005 ossfuzz 70244 fixed. DW202407-001 These were bugs intruduced a couple days ago. The array in Dwarf_Rnglists_Context_s was not being freed in every situation. modified: src/lib/libdwarf/dwarf_rnglists.c 2024-07-09: David Anderson commit 4620365ad3308481928f8d545adb79bdd57c9cc4 Removing esb_append_printf() as it is no longer necessary. modified: src/bin/dwarfdump/dd_esb.c modified: src/bin/dwarfdump/dd_esb.h Replacing with esb_append_printf_i() modified: test/test_esb.c 2024-07-09: David Anderson commit 179c6997ca67f654b78384fddd8135a6ce970851 Updated semantic version to 0.10.2 modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2024-07-09: David Anderson commit c165590fd07e5f6dec79af5855ccd8f779434154 Added blank line after d= semantic version so tools/updatesemanticversion.py works right. modified: tools/makerelease.sh Now updates tools/makerelease.sh too modified: tools/updatesemanticversion.py 2024-07-09: David Anderson commit 69f85bbdc2717cd4b4e1345d522f6919ae459a44 Now with latest changes. modified: ChangeLog 2024-07-09: David Anderson commit e2c8f88ccc962d7a26d8f110687f25f5aebaf902 Fixed trailing whitespace and indents. Remove debugging #if 0. Corrected comment about DWARF4 GNU extension split dwarf. modified: dwarf_die_deliv.c modified: dwarf_fission_to_cu.c Remove debugging #if 0 Fixed trailing whitespace and indents. modified: dwarf_loclists.c Added in merge of DWARF4 GNU extension cc_ranges_base from skeleton to dwo/dwp modified: dwarf_query.c Corrected comment about DWARF4 GNU extension split dwarf. modified: dwarf_ranges.c Remove debugging #if 0 Fixed trailing whitespace and indents. modified: dwarf_rnglists.c 2024-07-08: David Anderson commit 7c67f294febe9af123557b71b933d3656bb38332 Refine the information on rnglists base with cc_rnglists_base_via_at (similar to loclists) modified: src/lib/libdwarf/dwarf_die_deliv.c RNGLISTS now like LOCLISTS and we remove some pointless cpu cycles via the second arg to _dwarf_internal_read_loclists_header _dwarf_internal_read_rnglists_header modified: src/lib/libdwarf/dwarf_fission_to_cu.c Add arg to _dwarf_internal_read_loclists_header so we can save cpu when appropriate. modified: src/lib/libdwarf/dwarf_loc.h Refining _dwarf_internal_read_loclists_header() and similar to _dwarf_internal_read_rnglists_header() to rnglists with both using less cpu cycles. modified: src/lib/libdwarf/dwarf_loclists.c Refined a comment. modified: src/lib/libdwarf/dwarf_loclists.h Added cc_loclists_base_via_at and cc_rnglists_base_via_at modified: src/lib/libdwarf/dwarf_opaque.h Added comment about split dwarf inheritance. modified: src/lib/libdwarf/dwarf_query.c Now freeing the modified Dwarf_Rnglists_Context data and _dwarf_internal_read_rnglists_header() stops using cpu cycles where the result is ignored. modified: src/lib/libdwarf/dwarf_rnglists.c Refined comments on struct Dwarf_Rnglists_Context_s. modified: src/lib/libdwarf/dwarf_rnglists.h Refined an 'if 0' to explain what it is for (debugging).. modified: src/lib/libdwarf/dwarf_tied.c 2024-07-04: David Anderson commit e465de713388149bc474426e3a740e42f93b0f58 Automatic update, generated file. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2024-07-01: David Anderson commit 0af9267f2a25317ec5ed24f71924edef51d89cd2 Minor clarifications. modified: tools/makerelease.sh 2024-07-01: David Anderson commit f5c0795fc5de178658ef9fcdc9b2c095f840a182 Minor changes related to latest release name modified: doc/libdwarf.dox Removed some comments that were a bit annoying and unnecessary. modified: tools/makerelease.sh 2024-07-01: David Anderson commit 45ef8e2763f65c31b27cc38bed197b84dc1441d4 Final for 0.10.1 modified: ChangeLog 2024-07-01: David Anderson commit 69be7811dfc1f369ac6799fed96da4ef62ed75a1 Now with 0.10.1, no 0.10.0 modified: README.md 2024-06-30: David Anderson commit b08aee58b37505b7725e645915e468024e198cd7 Up to date. perhaps ready for 0.10.1 release. modified: ChangeLog 2024-06-30: David Anderson commit 47ef4925a0490aa45148b1b109b29069b7368265 Correcting the labeling of the base offset. -"DW_AT_loclists_base : 0x%" +"loclists base offset : 0x%" -"CU DW_AT_rnglists_base : 0x%" +"rnglists base offset : 0x%" modified: src/bin/dwarfdump/print_die.c 2024-06-30: David Anderson commit 72d856ec539db214c518257105346cf61ad478f2 Added these to the EXTRA_DIST list tools/makerelease.sh \ tools/README \ tools/updatesemanticversion.py \ modified: Makefile.am Revined the script to be easier to work with. modified: tools/makerelease.sh 2024-06-30: David Anderson commit e3f13147ddceec725ce3ca46806f17bf678916ee Up to date with git log modified: ChangeLog 2024-06-30: David Anderson commit 588d757a5048e1c548ab9f9eda7e85744550d64f Correcting some of the emitted text to use the release variable here modified: tools/makerelease.sh 2024-06-29: David Anderson commit 1fe1e0db743c827e6bf3ef50c0220a90c4132130 The ending report of this script was a bit awkward-looking. Now entries listed in a more readable order. modified: scripts/allsimplebuilds.sh 2024-06-29: David Anderson commit deeba56ab11c95307a2e4518a7898a2d45d14966 Ommitted the new doc/CMakeLists.txt entry in doc/Makefile.am so building a release from 0.10.0 will fail in some builds. EXTRA_DIST = \ Doxyfile \ +CMakeLists.txt \ mips_extensions.mm \ mips_extensions.pdf \ modified: doc/Makefile.am 2024-06-27: David Anderson commit cf124de35867f5d18041851922cda301508e1716 Added a Description to the project() command while reformatting the command a little. Without interfering with how the version string appears so tools/updatesemanticversion.py can still update the version when necessary. modified: CMakeLists.txt 2024-06-27: David Anderson commit 595c9edf0e78ccc7c3803fe106ccb45299f947a6 Now up to date, showing the final 0.10.0 git id as well as some small changes in cmake builds so that all three build mechanisms create (on install) a libdwarf.pc with a correct Version: value. Cmake builds used to leave that field blank. modified: ChangeLog 2024-06-27: David Anderson commit 1e6de1c5704a20165f07fefb60e26676aa91c5cf Version changed to 0.10.1 in anticipation of a future release. modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2024-06-27: David Anderson commit 735137e89261c04500b3262da02fc45d0f21550c Cmake was not setting Version: in the output libdwarf.pc. The corrections to the pc.in files required the tiny change to configure.ac and now all build mechanisms set Version: in libdwarf.pc and libdwarfp.pc installed by 'make install' and its equivalents. modified: CMakeLists.txt modified: configure.ac new file: doc/CMakeLists.txt modified: src/bin/dwarfdump/CMakeLists.txt modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/libdwarf.pc.in modified: src/lib/libdwarfp/libdwarfp.pc.in 2024-06-24: David Anderson commit 289d0d3c69436d897fe4555821a0b9fcfa284503 This is the version 0.10.0 realease final commit. Changes to be committed: corrected new release date modified: README.md 2024-06-24: David Anderson commit 8ea3c7831a6485585445e3bd545f568ee3fa4e09 UP to date. modified: ChangeLog 2024-06-24: David Anderson commit 284f9ca49909d08b9e71592b5ad2ddcc7ab9b9ab Release date 24 June added modified: README.md With release date. modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf 2024-06-20: David Anderson commit aa90b4054945c1f1fdd820611b3a3ed9a45f881d All the steps updated to match the individual versions. modified: test.yml 2024-06-20: David Anderson commit 55056243e5a7b098062fcef20e2284c7605446f0 Now v4 not master in checkout. modified: msys2_autotools.yml modified: msys2_cmake.yml modified: msys2_meson.yml 2024-06-20: David Anderson commit af60a31c328ce0b370987d9db45c51be13c1b8a2 Now using action@v0.23.0 modified: mac_cmake.yml modified: mac_meson.yml 2024-06-20: David Anderson commit cd5d7c3e88a6fc853d9067496861317d961641c4 Now using freebsd 14.0 vm under ubuntu vm modified: freebsd_meson.yml 2024-06-20: David Anderson commit 806d7b78f51610c6d0bf16759ff94ed10a78c65c Changing what it runs-on and version of freebsd modified: freebsd_cmake.yml 2024-06-20: David Anderson commit 4323041e38545789e8b5d456c8893c7e38c9192d trying nested freeb under ubuntu modified: freebsd_autotools.yml 2024-06-20: David Anderson commit 8a87cfd3e4d832083713395d24c667e04b5ad471 Now using @v4 and freebsd 14.1 modified: freebsd_autotools.yml modified: freebsd_cmake.yml modified: freebsd_meson.yml 2024-06-19: David Anderson commit c40105af44488a685b9ac7c4ef3e949dc6dea2ed Import mac autotools changes here. Now using v4 and adding libtool to brew install for macos autotools. modified: test.yml 2024-06-19: David Anderson commit c4d545ad3b6f3b50d863c1e6aa90d06ee050ae7c add libtool modified: mac_autotools.yml 2024-06-19: David Anderson commit 44ecdc9a6db9181e2f48b4b79d119249eb7dd670 Adding aclocal suggested by autoreconf step error modified: mac_autotools.yml 2024-06-19: David Anderson commit 6295679a4c9f68e01ae4f9ee8d2a0927a69ac840 Try V4 modified: mac_autotools.yml 2024-06-19: David Anderson commit b46cba509b9c1c2f2ee611b8a9d9b5a43235416f stackoverflow suggests use v4 modified: mac_autotools.yml 2024-06-19: David Anderson commit eaa94a92e37b35f6bfafa9a75df0fa678891f970 syntax fix modified: mac_autotools.yml 2024-06-19: David Anderson commit 36af6b8fdf26a376950ace3d65287d11f8dfa949 Try v4 modified: mac_autotools.yml 2024-06-19: David Anderson commit 6a7dda9cd8df097d01f1c2010308a1fa0e8b43c4 Another try for this action modified: mac_autotools.yml 2024-06-19: David Anderson commit f077d1b9b057621a9bff041ea894d39c04818bb9 Issue with github action. modified: mac_autotools.yml 2024-06-18: David Anderson commit ba6cb0daabdbe67c32feeaed366ad57f9f18c0e8 Up to date and correcting git log entry mentioning 0.19.0 to the correct 0.10.0 modified: ChangeLog 2024-06-18: David Anderson commit 13a9a4d7ebfe3b099a753ea9f2cfd84ccb4ce6b8 This does, or shows how to do, all we do when making a release. Currently set for the release of 0.10.0 new file: tools/makerelease.sh 2024-06-18: David Anderson commit eedcb528ef0f108b7747018073ca5ba37ef689b1 Due to the addition of dwarf_get_locdesc_entry_e() we revise the version for the next release to be (corrected: git log says 0.19.0 which is incorrect) 0.10.0, though this function is not something library users will find necessary (the function enables improved dwarfdump reporting of DWARF5 loclists). modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2024-06-18: David Anderson commit 84917197301f5a8751f2aacde16c791950f94098 The text of CMakeLists.txt version has changed, so needed revising how to update version number. modified: tools/updatesemanticversion.py 2024-06-17: David Anderson commit a5108555e6b9d2c3a00a10036315c89d29a9e72c The mistake was a copy/paste error. MSVC noticed the error. There are no other type issues noted by MSVC. Dwarf_Bool loclists_base_present = llhead->ll_at_loclists_base_present; - Dwarf_Bool loclists_base= + Dwarf_Unsigned loclists_base = llhead->ll_at_loclists_base; modified: src/lib/libdwarf/dwarf_loclists.c 2024-06-16: David Anderson commit 137c06bf9e7f8e112fd2268a9a6a9a367a963dfe Restoring functionality to this. The regression tests run with meson now. modified: scripts/run-all-tests.sh 2024-06-15: David Anderson commit fb711366c687ba48b5a25cb174dafe7b4df7a564 Issue #247, github libdwarf-code. Line 14 is missing a required back-tick. modified: scripts/run-all-tests.sh 2024-06-15: David Anderson commit 841a502a9990db9c6144491d98fa6815122ec142 Bringing up to date. modified: ChangeLog 2024-06-15: David Anderson commit 70b6ecbb1453b1461a6d06422db1ad6217fb55fd Fix indents and eliminate trailing whitespace. Reemove #if 0 ... #endif debugging code. modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_loclists.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfdump/print_rnglists.c 2024-06-15: David Anderson commit acf34ff59715665caf986daf8415b7b9d2f5a1e5 Corrected the gitfixid as there was a use-after-free in new-today code, now fixed. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2024-06-15: David Anderson commit 217d622d8e60760779f7e2483a92ea1170dc2707 Fixing a nasty double free that was caused a few minutes ago. modified: ../../lib/libdwarf/dwarf_loclists.c 2024-06-15: David Anderson commit f141c30cbdb13f5c905b7dece927ee43e57e33e8 New oss fuzz 69639 and 69641 are fixed. Here identfied as DW202406-001 and DW202406-002 modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2024-06-15: David Anderson commit b3d86e3e2d33d2ba1ec7e0064531010553ef056a Remove debug printf (was #if 0 ... #endif) Fixed DW202406-001 ossfuzz 69639 and DW202406-002 ossfuzz 69641 The bug in reading DWARF5 .debug_loclists was in the code for a couple weeks. modified: src/lib/libdwarf/dwarf_loclists.c 2024-06-15: David Anderson commit 86fe1d9cf6cb3d688c92d1004e7a8d76abeeeb48 Added a comment to clarify what the chain free is accessing so a change requiring a different free() is easy to find in the code. modified: src/lib/libdwarf/dwarf_rnglists.c 2024-06-15: David Anderson commit 42bd2b1b4db2dbc6ed866d310ab9b1d1d77eef41 Remove trailing whitespace. modified: src/lib/libdwarf/dwarf_loc.c 2024-06-14: David Anderson commit b6534aab238baf7eb852f88ea3398f8fe6ab5c70 Adding two lines of commentary. modified: dwarf_fission_to_cu.c 2024-06-13: David Anderson commit e5fe01a0899f36652668f3d7fbacc3be417cfc16 Updated, now we have rnglists and loclists handled correctly. There is some #if 0 debug code to remove but all is working. modified: ChangeLog 2024-06-13: David Anderson commit 32d832900ebe2e61ec07e82625a561415be05424 Ensured local alloc freed in oad_xu_loclists_into_cucontext modified: src/lib/libdwarf/dwarf_fission_to_cu.c Now adds a loclists DWARF5 offset table directly into lc_offset_value_array so need not be read again. In case of error assure that local allocations are free-d. modified: src/lib/libdwarf/dwarf_loclists.c 2024-06-12: David Anderson commit 2f4f932b6f420c9783a05e9d964c0a3eb9b288ae Added improved sanity checks reading loclists. Now buildss the lc_offset_value_array on initial scan (for later use). modified: src/lib/libdwarf/dwarf_loclists.c 2024-06-12: David Anderson commit 4380c51d20f62ab1627eccd18723bdd4dfb0a372 Implemented spelling change ld_kind to ld_lkind modified: src/lib/libdwarf/dwarf_loc.c 2024-06-12: David Anderson commit 50c1941419f5b638512b3998e8207182cff4f98d In dwarf_formref() we correct the reading of DW_FORM_loclistx and DW_FORM_rnglistx to read a uleb. Been wrong since 2022 at least.. Another spot reading these had it right all along. modified: src/lib/libdwarf/dwarf_form.c 2024-06-12: David Anderson commit 1522f914695132dccccd368fd2970396b1435a98 Correct a comment to name loclists instead of rnglists. modified: src/bin/dwarfdump/print_loclists.c 2024-06-12: David Anderson commit 76dd670473e3da501a8f9cfb723a054ad631ae2b Some #if 0 debug code here will be removed. adds an argument print_ll_offsets_table() for more detailed printing of loclists. For .debug_loclists we improve the format and information with new detail. modified: src/bin/dwarfdump/print_die.c 2024-06-12: David Anderson commit c81229cb76d865b60aff9c8b5719a282b31de946 Doumented a new Change entry, dwarf_get_locdesc_entry_e() for the convenience of reporting (from dwarfdump). dwarf_get_locdesc_entry_d() continues to be fine to use, you likely don't need to see the extra field reported by dwarf_get_locdesc_entry_e(). modified: doc/libdwarf.dox 2024-06-12: David Anderson commit a8310ce5648774a8253674ddfe631df2884a4772 Renamed ll_kind to ll_lkind as it names a DW_LKIND value Renamed ld_kind to ld_lkind as it names a DW_LKIND value modified: src/lib/libdwarf/dwarf_loc.h Added lc_offset_value_array so the values need not be reread from the section (when the values needed for DW_FORM_loclistx. modified: src/lib/libdwarf/dwarf_loclists.h 2024-06-08: David Anderson commit 121996d449b57b2979a9f1048d50df0163890454 Up to date with loclists rnglists correction. modified: ChangeLog 2024-06-08: David Anderson commit bedc0b778696812bf996574eec50987c7ae0b1e5 Revises the dwarfdump reporting of debug_loclists to clarify the dwarf 5 debug_loclists structure content. The --print-raw-loclists option is more useful now. Revises the dwarfdump reporting of debug_rnglists to clarify the dwarf 5 debug_rnglists structure content. The --print-raw-rnglists option is more useful now. These changes also make it possible (depending on the size of .debug_rnglists/loclists!) to verify DW_FORM_rnglistx DW_FORM_loclistx are valid. modified: src/bin/dwarfdump/dd_globals.h modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_loclists.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfdump/print_rnglists.c 2024-06-08: David Anderson commit e26f4c260d8af1714fe85013dc1a47c3fbcee680 dwarf_get_locdesc_entry_e() added to API, it returns one more field (the byte count of a loclist entry) than dwarf_get_locdesc_entry_d() for the benefit of dwarfdump reporting. Not of general interest. Corrects .debug_loclists handling. modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loc.h modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/libdwarf.h 2024-06-05: David Anderson commit 83b516940cd2ac5e8437ad6fcdea9c2c225a47b4 In certain error cases the revised rnglists code was failing to dwarf_dealloc_error() where necessary. This problem is just a couple days old, was introduced in the rnglists changes.. Found by -fsanitize modified: src/lib/libdwarf/dwarf_rnglists.c 2024-06-05: David Anderson commit cafee35c785f549a716f67ff6bdf942b704ee189 Added required include of new header dwarf_loclists.h modified: src/lib/libdwarf/dwarf_fission_to_cu.c 2024-06-05: David Anderson commit a556f7af38bfd171bc266ef588af0971e97f0047 renoved the declaration of a function used in rnglists that is no longer visible outside dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_opaque.h 2024-06-05: David Anderson commit c725987b4b58f31689e352b91611fa7d9c592bba Removed Dwarf_Loclists_Context_s, it is now in dwarf_loclists.h modified: src/lib/libdwarf/dwarf_loc.h 2024-06-05: David Anderson commit 1c41cf803d3b6c6bf5ae844c3598b5f1fd3ee169 Correcting a typo, restoring project style. modified: src/bin/dwarfdump/print_die.c 2024-06-05: David Anderson commit 8df1e989f3bf55668af09d25dd21347f01fba6d2 Updated the output format of --print-raw-loclists to be more useful and to essentially match the rnglists version. modified: src/bin/dwarfdump/print_loclists.c 2024-06-05: David Anderson commit f16e5b82fa5cb9feb442fdef633579e6f02e2e58 Separated out part of loclists data structs to be a better match with dwarf_rnglists.h And added the new file so configure and cmake know about it. Meson takes care of this itself. modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am new file: src/lib/libdwarf/dwarf_loclists.h 2024-06-04: David Anderson commit b70abb30dc9fdd196be4e159078548eef9cb9050 Corrected calculations related to rnglists array of offsets (were calling entries address size when they are offset size). Corrected handling of the 'implicit DW_AT_ranges_base' that can be emitted if there is just a single table of rnglist RLE sequences. modified: src/lib/libdwarf/dwarf_rnglists.c 2024-06-04: David Anderson commit d03f71b2b38430d0c07e1254cf32b8d6fe27aa84 Added dumper functions for certain structures related to rnglists. They are #if 0 except during debugging. modified: src/lib/libdwarf/dwarf_die_deliv.c 2024-06-04: David Anderson commit 4896e61b4581b03bed5e949be3700099e615da8c Removed trailing whitespace. modified: src/lib/libdwarf/dwarf_tied.c 2024-06-04: David Anderson commit 85c920eb718ff73b7615fa50e14582a4a99b3d7f Removed some lines related to merging skeleton and split, they were wrong. debug_rnglists and debug_rnglists.dwo *_base fields must not be merged. modified: src/lib/libdwarf/dwarf_query.c 2024-06-04: David Anderson commit 9f3cfd466a150d67228db8deea56eab2a0b9570e Reworded comments for clarity. modified: src/lib/libdwarf/dwarf_rnglists.h 2024-06-04: David Anderson commit feafa70fae4c140a407f406c1ad101556b421be6 Reordered cc_rnglists_base; ane cc_rnglists_base_contr_size; fields to make it easier to comprehend. Added one new internal function related to rnglists which function will surely get removed very soon. modified: src/lib/libdwarf/dwarf_opaque.h 2024-06-04: David Anderson commit 4d6077c3d4096f8f8d2ead4c4d9df3bbc6557195 Removed trailing whitespace. modified: src/lib/libdwarf/dwarf_debugaddr.h 2024-06-04: David Anderson commit 40889a3841ad94e7eb61e96681031c0eb3dcfd83 Removed one line of a pair of blank lines. modified: src/lib/libdwarf/dwarf.h 2024-06-04: David Anderson commit 168be5fba32b76ca99293544cf217d98ae970319 A small improvement in formatting: shorter line. modified: src/bin/dwarfdump/print_rnglists.c 2024-06-04: David Anderson commit 20ed45faf857d5d28520eb327a4df29c0d70852c Improved the format of the output from --print-raw-rnglists, making it easier to read and easier to verify as sensible. modified: src/bin/dwarfdump/print_rnglists.c 2024-06-03: David Anderson commit 0f64042ea4763737787f390cbdfc0a85c1580f0a Normal update, vulnerabilities report now dated June. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2024-05-28: David Anderson commit 113726e89a785b3adc682d9ff2b5f95345fb299a With a Split Full object and its skeleton object the loop intended to find the relevant skeleton CU by a signature (Dwarf_Sig8) was stopping its CU loop too soon due to a bug created when the code was written for DWARF 5. So the target CU was never located. The loop is now correct. modified: src/lib/libdwarf/dwarf_tied.c 2024-05-27: David Anderson commit e7eaa054885d17131dc568036bbcf602d9bab4a6 Remove trailing whitespace modified: src/lib/libdwarf/dwarf_debugaddr.c modified: src/lib/libdwarf/dwarf_form.c 2024-05-27: David Anderson commit e1280075db965a10a07952e692153fc0d7716f64 Now up to date from git log modified: ChangeLog 2024-05-27: David Anderson commit 654fbed827a8e70cfe07adafa9380839bfdb8ef7 To avoid a warning about ' PROJECT VERSION not set ' in building with meson, add the following lines (each in its proper place) +config_h.set_quoted('PROJECT_VERSION', meson.project_version()) +pkgconf.set('PROJECT_VERSION', meson.project_version()) modified: meson.build 2024-05-27: David Anderson commit d2b133c3eeb1dd32efd525999ba979b9d677e9ba New code line got warning from MSVC. Fixed. - address_size = dbg->de_debug_addr_address_size; + address_size = (Dwarf_Small)dbg->de_debug_addr_address_size; modified: src/lib/libdwarf/dwarf_debugaddr.c 2024-05-27: David Anderson commit 0e06bf6f333393ee871f91822482d21eb1e00569 So make dist works again. -libdwarf.pc.cmake \ +libdwarf.pc.in \ modified: src/lib/libdwarf/Makefile.am -libdwarfp.pc.cmake \ +libdwarfp.pc.in \ modified: src/lib/libdwarfp/Makefile.am 2024-05-27: David Anderson commit 7513fdec7589339e147bde4dcce60078e62e7826 Changed cmake/config.h.cmake to cmake/config.h.in as that name was recently changed so cmake shared library builds worked properly. modified: Makefile.am 2024-05-27: David Anderson commit 0bdecb161756e8ec58fdb8eb39f680095acfa426 Refined the doxygen comment on dwarf_debug_addr_table(). modified: src/lib/libdwarf/libdwarf.h 2024-05-27: David Anderson commit 31431a6d0aa400773f6b5efe96a331fde1d8490e Updated words on the .debug_addr table when in DWARF4 in the GNU extension format. modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2024-05-27: David Anderson commit 1f54d6bc42f97226bbfd9232f4ae9cad16329a7b Refining the -h output about --print-debug-addr when reporting on DWARF4. modified: src/bin/dwarfdump/dd_command_options.c 2024-05-27: David Anderson commit 731832c08f22a80a706431b0df0014c3c42a08b2 Commentary added on printing .debug_addr where it is the DWARF4 GNU extension of .debug_addr. modified: doc/libdwarf.dox 2024-05-27: David Anderson commit 6d7ca552fe91bb67c0d6cc4a785f0397fb7a0072 Now, for DWARF4 GNU .debug_addr extension we create a table so we can print the raw section sensibly from dwarfdump. modified: dwarf_debugaddr.c modified: dwarf_debugaddr.h 2024-05-27: David Anderson commit 4e2916e4b9920c4c37859e077aeefd843735c986 Initialize the three new fields in Dwarf_Debug_s used for DWARF5 GNU extension .debug_addr printing. modified: dwarf_die_deliv.c 2024-05-27: David Anderson commit b979381e7ec7a34dd89f2e2b3f8ebaea4cda9ea3 Added Dwarf_Half de_debug_addr_version; Dwarf_Half de_debug_addr_offset_size; Dwarf_Half de_debug_addr_address_size; to Dwarf_Debug_s so we can print DWARF4 GNU .debug_addr extension data with no API change. modified: dwarf_opaque.h 2024-05-27: David Anderson commit ac5c78fc5d76c5027857d104bf7c49c961b4b067 Added doxygen comment on dwarf_debug_addr_table() related to the DWARF4 GNU extension version of .debug_addr modified: libdwarf.h 2024-05-21: David Anderson commit a54dbb55b436978efc87f854560d2d2253d79e42 Up to date with latest Changes modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2024-05-21: David Anderson commit 3194780e9d304cd6f42ea4aa72828e27c861ec85 In Recent Changes: noting the cmake soname etc correction so shared-libraries generated have the correct semantic version name. modified: doc/libdwarf.dox 2024-05-21: David Anderson commit c6fe59c5cad197e650170fa87e7ef04a1a3e7135 Merge: af6b8f2c 3c18ecc5 Merge branch 'flagarde-soname' Merging fix for cmake shared install not having correct version or soname. 2024-05-21: David Anderson commit 3c18ecc5c08036cee019ee6ae32efb4f09927cbc Two instances: config.h.cmake -> config.h.in modified: src/bin/dwarfexample/CMakeLists.txt modified: src/bin/dwarfgen/CMakeLists.txt 2024-05-21: flagarde commit d4ecbb934cc057c77fa796d03b896e5d5f0dab97 Add config.h.in 2024-05-21: flagarde commit 8a63be630bd7f4e529fff13efb3a303c12cd9456 Add soversion 2024-05-10: David Anderson commit af6b8f2c380d06c2a6bc592f56592f733047ccab Renaming DW_DLE_PE_SECTION_SIZE_ERROR to DW_DLE_PE_SECTION_SIZE_HEURISTIC_FAIL so any failure of the three such tests are clearly reported. Should never happen. DW_DLE_PE_SECTION_SIZE_ERROR remains valid and applies as a hard object file error found in a specific test (not a heuristic). modified: src/lib/libdwarf/dwarf_errmsg_list.h modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/libdwarf.h 2024-05-10: David Anderson commit ee53f0b6c99fc8cdaa3ae77af0196fb20e16177a Now with latest changes from git log modified: ChangeLog Regenerated modified: doc/libdwarf.pdf 2024-05-10: David Anderson commit 91a1ad4db2b63eeea1a8d7af120a420c751dacd2 Documenting heuristic change in reading PE object files. modified: doc/libdwarf.dox 2024-05-10: David Anderson commit 039569ed7903f132ad891a49a231378c6ea44077 A heuristic sanity check on section VirtualSize was too concervative at s00MB, a PE object file had a section over 200MB in size. Increased the heuristic limit to 1000MB. modified: dwarf_peread.c 2024-05-02: David Anderson commit 42367fc3195c0dd2cab059e15a87ed33f5f96e49 Regenerated with May as the current month. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2024-05-02: David Anderson commit e4aeec03c68e356270c2d1f36cb4ea66a72376ec Regenerated so has latest producer defines. modified: src/lib/libdwarf/dwarf_names.c 2024-05-02: David Anderson commit 8010af428ed7961738badddd9378fd78d25658d9 Just heard of some producer-values: define DW_AT_APPLE_origin 0x3ff0 define DW_LANG_Move 0x0041 /* DWARF6 */ define DW_LANG_Hylo 0x0042 /* DWARF6 */ modified: src/lib/libdwarf/dwarf.h 2024-04-28: David Anderson commit 35223db561852306ed1e7aec9bcfc045fad147d3 Up to date with git log modified: ChangeLog 2024-04-28: David Anderson commit b454fb67f267deae3e45f2685d845f0fd133e5b5 Tiny changes to (perhaps) avoid a couple warnings from an msvc compiler. modified: src/bin/dwarfdump/dd_macrocheck.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2024-04-28: Julia DeMille commit a4465045c373ba8f7c7b4c0a4cf863ecf4999549 Disable default werror=true in Meson manifest (#239) Under MSVC, `/WX` (the equivalent to `-Werror`) will cause the build to crash and burn. This makes it not default to making the build crash and burn. 2024-04-19: David Anderson commit 4436b83de65fdc9df9e011decf2f643fb345b892 up to date with git log modified: ChangeLog 2024-04-19: David Anderson commit 713a4060556e76adf21b47ff705df686767f2ff4 Now produces,on stdout, a new list of the names that have duplicate values (we only retain one for dwarfdump-naming purposes, as via dwarf_get_AT_name() etc). I reviewed the list and found a couple instances we were genering correctly but not choosing the best name where there are multiple. modified: src/bin/gennames/gennames.c Alter the order in a couple places so the right name shows up from gennames.c modified: src/lib/libdwarf/dwarf.h Regenerated modified: src/lib/libdwarf/dwarf_names.c 2024-04-19: David Anderson commit 15adc9cbecefd79d28d7d82bf458cde654ac32c0 Split two lines to avoid violating codingstyle. Left one line too long as it is a web reference so splitting it will make it wrong. modified: doc/checkexamples.c 2024-04-19: David Anderson commit eca6017c7adc41ff7874bac8bc2b293d0677df7d Up to date with git log. modified: ChangeLog 2024-04-19: David Anderson commit c36e70a69a33ecb0db50ce654f0ea5129d1081a0 Fixed the instances violating the project codingstyle. No logic change. modified: src/bin/builduritable/uritablebuild.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/gennames/gennames.c modified: src/bin/tag_attr/tag_attr.c 2024-04-18: David Anderson commit d248b698829560ae5361b9c7ac177b59e1d79f6a Made it consitent with the project codingstyle. No change in functionality or logic. modified: src/bin/dwarfgen/createirepfrombinary.h modified: src/bin/dwarfgen/dg_getopt.h modified: src/bin/dwarfgen/general.h modified: src/bin/dwarfgen/irepattrtodbg.h modified: src/bin/dwarfgen/irepdie.h modified: src/bin/dwarfgen/irepform.h modified: src/bin/dwarfgen/irepframe.h modified: src/bin/dwarfgen/irepline.h modified: src/bin/dwarfgen/irepmacro.h modified: src/bin/dwarfgen/ireppubnames.h 2024-04-18: David Anderson commit 6c761f6df684a5ae3afc864b557cc7f801fd0b5e Changes to follow the project codingstyle. No logic changes. modified: src/bin/dwarfgen/dg_getopt.cc modified: src/bin/dwarfgen/dwarfgen.cc modified: src/bin/dwarfgen/ireppubnames.h modified: src/bin/dwarfgen/irepresentation.h modified: src/bin/dwarfgen/ireptodbg.h modified: src/bin/dwarfgen/strtabdata.h 2024-04-18: David Anderson commit 68374db250043f623b77e666a1329b8d0798446d Changes just follow the project codingstyle. No logic changes. modified: src/lib/libdwarfp/dwarf_pro_section.c modified: src/lib/libdwarfp/dwarf_pro_section.h modified: src/lib/libdwarfp/libdwarfp.h 2024-04-05: David Anderson commit 459c9153fbc3d6a15f52f382480daaad48d06656 This getts errors but useless errors. deleted: scorecards.yml 2024-04-03: David Anderson commit bc88d4f9d521a881214e5899ad4b897e7c86dfe7 Removed #includes, moved them to .c files modified: src/bin/dwarfdump/dd_globals.h All these needed new includes (extracted from dd_globals.h) modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/dd_addrmap.c modified: src/bin/dwarfdump/dd_attr_form.c modified: src/bin/dwarfdump/dd_checkutil.c modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_compiler_info.c modified: src/bin/dwarfdump/dd_dwconf.c modified: src/bin/dwarfdump/dd_glflags.c modified: src/bin/dwarfdump/dd_helpertree.c modified: src/bin/dwarfdump/dd_macrocheck.c modified: src/bin/dwarfdump/dd_makename.c modified: src/bin/dwarfdump/dd_naming.c modified: src/bin/dwarfdump/dd_sanitized.c modified: src/bin/dwarfdump/dd_strstrnocase.c modified: src/bin/dwarfdump/dd_true_section_name.c modified: src/bin/dwarfdump/dd_uri.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_aranges.c modified: src/bin/dwarfdump/print_debug_addr.c modified: src/bin/dwarfdump/print_debug_gnu.c modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfdump/print_debug_sup.c modified: src/bin/dwarfdump/print_debugfission.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/bin/dwarfdump/print_hipc_lopc_attr.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfdump/print_llex_codes.c modified: src/bin/dwarfdump/print_loclists.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfdump/print_macinfo.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_origloclist_codes.c modified: src/bin/dwarfdump/print_pubnames.c modified: src/bin/dwarfdump/print_ranges.c modified: src/bin/dwarfdump/print_rnglists.c modified: src/bin/dwarfdump/print_section_groups.c modified: src/bin/dwarfdump/print_sections.c modified: src/bin/dwarfdump/print_str_offsets.c modified: src/bin/dwarfdump/print_strings.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/tag_common.c modified: src/bin/tag_tree/tag_tree.c modified: test/test_helpertree.c modified: test/test_makename.c modified: test/testuriLE64ELfsource.c 2024-04-03: David Anderson commit ca7f73e36cfea85099a569f12fd204b670db310d Regenerated, now with no #include present in them. modified: dwarfdump/dwarfdump-ta-table.h modified: dwarfdump/dwarfdump-tt-table.h These create the above headers, and no longer insert #includes in the generated headers. modified: tag_attr/tag_attr.c modified: tag_tree/tag_tree.c 2024-04-03: David Anderson commit 803f8f04ebd60b7a3529cd811a7ec5a24dd279c4 Corrected violations of the libdwarf codingstyle. No change in the tests themselves. modified: test_dwarf_leb.c modified: test_errmsglist.c modified: test_getopt.c modified: test_ignoresec.c modified: test_int64_test.c modified: test_linkedtopath.c modified: test_safe_strcpy.c modified: test_sanitized.c modified: test_setupsections.c modified: testuriLE64ELfsource.c 2024-04-03: David Anderson commit 0f97fa50a173df710ea29c584c7388ccc74ddb0b Removed the only #include in dd_esb.h modified: src/bin/dwarfdump/dd_esb.h all these needed FILE declared and many needed printf. So now include stdio.h where needed. modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/dd_checkutil.c modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_dwconf.c modified: src/bin/dwarfdump/dd_esb.c modified: src/bin/dwarfdump/dd_glflags.c modified: src/bin/dwarfdump/dd_macrocheck.c modified: src/bin/dwarfdump/dd_naming.c modified: src/bin/dwarfdump/dd_sanitized.c modified: src/bin/dwarfdump/dd_true_section_name.c modified: src/bin/dwarfdump/dd_uri.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_aranges.c modified: src/bin/dwarfdump/print_debug_addr.c modified: src/bin/dwarfdump/print_debug_gnu.c modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfdump/print_debug_sup.c modified: src/bin/dwarfdump/print_debugfission.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/bin/dwarfdump/print_hipc_lopc_attr.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfdump/print_llex_codes.c modified: src/bin/dwarfdump/print_loclists.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfdump/print_macinfo.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_origloclist_codes.c modified: src/bin/dwarfdump/print_pubnames.c modified: src/bin/dwarfdump/print_ranges.c modified: src/bin/dwarfdump/print_rnglists.c modified: src/bin/dwarfdump/print_sections.c modified: src/bin/dwarfdump/print_str_offsets.c modified: src/bin/dwarfdump/print_strings.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c modified: src/bin/tag_attr/tag_attr.c modified: test/test_esb.c modified: test/test_sanitized.c modified: test/test_setupsections.c Fixed nested comment modified: src/lib/libdwarf/dwarf_macho_loader.h 2024-04-03: David Anderson commit d40eb7fb6eef5186a1f24aa3cc1d4ff9a3f0ea68 Some #if 0'd lines that are not needed have been changed from #include to #xnclude so readers do not get the impression we need those references. modified: src/lib/libdwarf/dwarf_macho_loader.h 2024-04-03: David Anderson commit 16110eabf11844c268b26452a326f2a79d6fbc97 Regenerated by 'make rebuild' modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2024-04-03: David Anderson commit c7135da82b82a995e4bc88636b186f2f0884181e tool/updatesemanticversion.py 0.9.3 to update the version. modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2024-04-03: David Anderson commit 06fce3a250b5181c35d8782d11488e2644411bb8 Removed #include "dwarf_base_types.h" It is not needed here. modified: src/lib/libdwarf/dwarf_util.h 2024-04-03: David Anderson commit 8125c8e6b6b7dd70da135cf16cfb50b4df75e7a6 Removing #include of stdio.h modified: ../../lib/libdwarf/dwarf_line_table_reader_common.h 2024-04-02: David Anderson commit 5e43a5ab73cb00c8a46660b361366a8c9c3c93c9 Adding release xz name modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2024-04-02: David Anderson commit 437eebd9062625263a301610ef3402f81e73ac72 Added release tar name: libdwarf-0.9.2.tar.xz to applicable vulnerabililities. modified: bugxml/data.txt 2024-04-02: David Anderson commit 45c318f152b0cd804cdbdafe99726a62fbf298c0 Ready for release. modified: ChangeLog 2024-04-02: David Anderson commit c8306b7f24655ee8b7b1038ca1ccb188c9ad4374 Finalizing release. modified: README.md modified: doc/libdwarf.dox modified: doc/libdwarf.pdf New month, changing report month. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2024-03-31: David Anderson commit 7db13b474570b3f9eef8f49bf8623694bf92ef3c Clarifications documentation. modified: ChangeLog 2024-03-31: David Anderson commit 91a2f965f4ce97ef4c579e351e5c7b9af3e43a5f Small clarifications related to 'line table registers' modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf 2024-03-31: David Anderson commit 974026f41778c137f036302558742cb1949937bb Now up to date. modified: ChangeLog 2024-03-31: David Anderson commit 486aa3314e4682850eee5d04ccf5a9520689cb71 Now with Changes note about DW_CFA_hi_user (adding this correct spelling). modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2024-03-29: David Anderson commit e18caf454e2d6d0fc8a5d086f8f65162d560a113 Regenerated to show version 0.9.2 and to reflect the correct spelling DW_CFA_hi_user . modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2024-03-29: David Anderson commit e87496e5cb8ded20e89509e7f05f5742da23f2ce DW_CFA_hi_user was misspelled DW_CFA_high_user here (not in the DWARF standard). Now both spellings are in the header. modified: src/lib/libdwarf/dwarf.h 2024-03-29: David Anderson commit cf7814ac772672f8ba401125240802aba4d756a9 Bringing up to date. modified: ChangeLog now pdf up to date. modified: doc/libdwarf.pdf 2024-03-26: David Anderson commit 732710959783712b800d826c6399798668ed3744 Clarifying aspects/detail of the library. modified: doc/jitaccess.dox modified: doc/libdwarf.dox 2024-03-22: David Anderson commit 7a903fb2ab3c3204b1964b60ff62dbdd7d29d19a Merge: da297e99 9944cb55 Merge branch 'judemille-windows-compat-fixes' Added an undef of interface, a microsoft preprocessor symbol (conflicts with libdwrf). In dwarfgen. refinded a _WIN32 defined test to check __MSC_VER too. 2024-03-21: Julia DeMille commit 9944cb551c864435595b34d35c16dc127b0b99a5 Minor fixes for compatibility with MSVC. Signed-off-by: Julia DeMille 2024-03-21: Julia DeMille commit da297e999161c0dbf7be2f1f9d9118e708b072eb make dwarfdump tests work under Meson (#235) the config file needs to be copied over. this adds that. Signed-off-by: Julia DeMille 2024-03-21: Julia DeMille commit d1ec01000c06a5cda3f3e8a902b99b19d18ec2df override find_program/dependency in meson scripts (#234) allows use as a wrap subproject more cleanly Signed-off-by: Julia DeMille 2024-03-21: David Anderson commit 45cbe6320611a2f4080039773b059df587cd8868 Update SECURITY.md Updating release version list 2024-03-19: David Anderson commit 456f89326b6e1d4c98b7755645e1414a7e979b31 Refined the description of DW202403-001 modified: bugxml/data.txt Regenerated modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html Refinded the Changes for 0.9.2 to just list the vulnerabilities. modified: doc/libdwarf.dox 2024-03-19: David Anderson commit c20fdfd2b1b789c31634013321853f3419f8d338 More places fitting the pattern revealed by DW202403-001 now have checks for off-the-end. modified: src/lib/libdwarf/dwarf_line_table_reader_common.h 2024-03-19: David Anderson commit 1561153af3886ae37c205edb2670a71a2518287c Added git fix id for DW202403-001 modified: data.txt 2024-03-19: David Anderson commit 2930f3121ee6b07da405103934c329bbeca0382f Adding DW202403-001 ossfuzz id: 67490 modified: data.txt A carefully corrupted line table header can cause libdwarf to read outside of its allowed areas in a .debug_line section reading the file names part of the header. The failure to check for end-of-section following the very last byte in section has been present for many years. modified: ../src/lib/libdwarf/dwarf_line_table_reader_common.h 2024-03-12: David Anderson commit 18b0db98232fb01e01956998c72fde7f2851c7f2 Removing trailing whitespace modified: doc/checkexamples.c modified: doc/jitaccess.dox modified: src/lib/libdwarf/libdwarf.h And also shortened unnecessarily long lines, doxygen aranges the output perfectly. modified: doc/libdwarf.dox Regenerated modified: doc/libdwarf.pdf 2024-03-12: David Anderson commit 35ce243e85ba535405756a77c7f0d0b9700f310e Changed REPEAT_BRIEF to NO to avoid duplicate reporting of such in the examples. modified: doc/Doxyfile Very small wording changes in the Dwarf_Error overview. modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf 2024-03-12: David Anderson commit 335bd73b5d5574b1ff265a2e2f9ef4c48660aeab Now with cleaned up examples. modified: doc/libdwarf.pdf 2024-03-12: David Anderson commit f19e2f7bce2ed280dafbc63ac684bd0a6c76120f Cleaning up the appearance of the examples. modified: doc/checkexamples.c 2024-03-12: David Anderson commit 0d3b1b32da92f2ec869175ac89fd5c0bb33efc4e Cleaning up doxygen so examples show as intended. Fixed one new compiler warning. modified: doc/checkexamples.c 2024-03-12: David Anderson commit 566db5f7de6b086e60ee46df8f577bbc1854a52a First line corrupted by...me. Fixed. modified: doc/libdwarf.dox 2024-03-11: Keith W. Campbell commit ae236a51d5a12ba3fa841f287585db54b5c52d78 Fix a few typos (#233) Signed-off-by: Keith W. Campbell 2024-03-11: David Anderson commit 8e1f76a10afcd482d627851a6e62dd019d079e3a Last changes to documentation today. modified: doc/checkexamples.c modified: doc/libdwarf.dox modified: doc/libdwarf.pdf modified: src/lib/libdwarf/libdwarf.h 2024-03-11: David Anderson commit 8cc3c87acad24dd77b3ef5fd80a84102dd3973ef Improvements in doxygen comments. modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2024-03-11: David Anderson commit 5ce3e3b4126133fc24ef0a64844511b7ba02b51c In a couple cases check for a NULL passed in to avoid a crash. Caller is not supposed to pass in NULL here. modified: src/lib/libdwarf/dwarf_query.c 2024-03-11: David Anderson commit c5120f435c054f66f20ac8298e9eff556ad89bec Improving the doxygen comments and slight renaming where that clarifies. modified: checkexamples.c 2024-03-10: David Anderson commit 4951e03840a5f1c43186d138a4d6698a1062ca83 Small corrections to doxygen comments. modified: src/lib/libdwarf/libdwarf.h 2024-03-10: David Anderson commit cb434787be4fd9bc239aa1b7cd2e1896567a99cc Corrected typos/spelling errors in doxygen comments. Added doc of a typedef not previously documented. modified: src/lib/libdwarf/libdwarf.h 2024-03-09: David Anderson commit f7fd6a4d433ac67ec1fc2cd5fd494ff20a5c0e50 Small changes/fixes. modified: doc/libdwarf.dox Improved doc of various types and structs. modified: src/lib/libdwarf/libdwarf.h 2024-03-04: David Anderson commit 85511eb7266fd9febefabdc2007e5dfc9cbd2c37 And the last line (#ifndef) was missing. Oh my. Fixed. modified: src/lib/libdwarf/libdwarf.h 2024-03-04: David Anderson commit 68f9a8bde980f3802a0e80ed40260a82739c54ac Previous commit had a really horrible mistake changing a struct. IT was only supposed to have changes in *comments*. Sorry. modified: src/lib/libdwarf/libdwarf.h 2024-03-01: David Anderson commit fb1cf56040690e4472f2812ff311fd71103512e6 Corrections and refinements of the contents of the first page and related corrections/amplifications in libdwarf.h modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h Regenerated modified: doc/libdwarf.pdf 2024-03-01: David Anderson commit 138a6a7e38ab22b02371778547369d460917e1a6 The word 'pointer' was accidentally repeated on a second line. Read oddly in the final document. So deleted the repeat. modified: doc/libdwarf.dox 2024-03-01: David Anderson commit a816ac80eee2c5c50785e8c952758e8ba4c9cf3e Correcting spelling errors in doxygen comments. modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h Regenerated modified: doc/libdwarf.pdf 2024-03-01: David Anderson commit 376fd48cd48df5f093dbb11f2fa119390b17c28b Correcting some spelling errors. modified: libdwarf.dox 2024-03-01: David Anderson commit a6acb2a2bcf6aa45594c34c202887802c194bcd4 Fixing spelling errors. modified: README.md modified: READMEwin-msys2.md 2024-03-01: David Anderson commit 307c9207d67b61918612d79320c3e3469d152dd7 Regenerated without all those blank lines. modified: dwarfbug.xml 2024-03-01: David Anderson commit f45fcc456fa9a06bcd4a900741ec672022eb1c2d Was generating many blank lines in xml output, but no longer does that. modified: bugrecord.py 2024-03-01: David Anderson commit c3bd59a8d76b8379d53674b255fbc96e7f434dde Up to date with git log. modified: ChangeLog 2024-03-01: David Anderson commit cd5b3e0c2a3ae60686314db55f93d820da8a3f77 Now March, so month name changed. And no longer generating trailing space. modified: dwarfbug.html modified: dwarfbuglohi.html 2024-03-01: David Anderson commit 31316b1cbf40f276ba38d7847e25e4f19910ac11 Removing trailing space that was sometimes generated. modified: bugrecord.py 2024-02-29: David Anderson commit 709f6db6503f4a6c5f822152a7190bfc348d1743 Adding commitment to what can be done with corrupted DWARF modified: README.md 2024-02-29: Jeremy Rifkin commit 62838e86639de916da1eba8fae44d50263353027 Remove trailing whitespace from files (#229) * Remove trailing whitespace from files * Remove whitespace from pdfbuild.sh --------- Co-authored-by: David Anderson 2024-02-29: David Anderson commit 74619ee540ca07a82602712ffa2f791ccd6ff03c dwarfbug.xml was missing a crucial field, the DW id. Fixed. modified: bugxml/bugrecord.py modified: bugxml/dwarfbug.xml 2024-02-29: David Anderson commit 4b156bb1dfcba8c1f7162a868fb140b1852a1089 Now showing the cve id for DW202402-002 modified: dwarfbug.html modified: dwarfbug.xml modified: dwarfbuglohi.html 2024-02-29: David Anderson commit 18366de6ca34ba14360bb3ff20f8a4b6f19b26bd DW202402-002 now has a CVE id: CVE-2024-2002 modified: data.txt 2024-02-27: David Anderson commit e71470a37528da766f4b020f79f9095c17bbb414 Strengthing the test against corrupt loclists or rnglists entries. An improvement related to DW202402-003. The concern was to fully harden checks when running on 32bit-pointer OS. modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_rnglists.c 2024-02-23: David Anderson commit c21fb4e8e957677094e7b66e3553e9c9503ceb53 Typo fixed: -README.cmake has details on the available cmake options. +READMEcmake.md has details on the available cmake options. modified: README.md 2024-02-22: David Anderson commit 432bbf526d67859de5f8ed03e89080c90566a67b This sort of works but does not really help with regressiontests on msys2 windows modified: dwarfdump.c 2024-02-21: David Anderson commit d6087deea132e89ac226a923872ab3ba09a04fef Removing unwanted character modified: ChangeLog 2024-02-21: David Anderson commit 8a75104e4052634d3832ef867c2938b8635daacc one character added. modified: ChangeLog 2024-02-20: David Anderson commit ce7f334659a6463a33e7e05c00033b2f7e5e7085 Tiny change required to run github workflow successfully. modified: ChangeLog 2024-02-20: David Anderson commit e0f331250a44fa5586b99d45b6ac9dd99d8d1733 A version of _WIN64 io.h has a #define for lseek. So we #undef that and make the define we want. modified: src/lib/libdwarf/dwarf_seekr.c 2024-02-19: David Anderson commit 38a2dcaa988df2711ad673e4c28626f588bbe078 Regenerated. modified: dwarfbug.html modified: dwarfbug.xml modified: dwarfbuglohi.html 2024-02-19: David Anderson commit a36cd296960d38326bdce76740a974c4d1bdeca1 Corrected a few spelling errors. modified: data.txt 2024-02-19: David Anderson commit 0f5b681bc1e5b554196ce435638fbc6303820a81 Typo: left out letter h . modified: bugxml/data.txt 2024-02-18: David Anderson commit 5b402ffc6445a7a00eef2a61499d42867b83f885 now with latest gitfixid modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2024-02-18: David Anderson commit c879a34a5eb22c853b15a4ef84df3ba2364018f1 updated with latest. modified: ChangeLog 2024-02-18: David Anderson commit e01e2b71de93949c7bc4e00f166b434e9150b66e Update to add reference to dwarf_rnglists.c modified: bugxml/data.txt 2024-02-18: David Anderson commit 5cfbd87dff4fc3c3b595bb92ed886934945b372c Added checks to match those added to dwarf_loclists.c modified: src/lib/libdwarf/dwarf_rnglists.c 2024-02-18: David Anderson commit 03810aefab9cc30a71f5e81f647240e8ac60154d Added comment referring to dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_loclists.c 2024-02-18: David Anderson commit 75c1e8bf984d0190cbb23d84e5fbc081101f35a8 Latest entries. modified: ChangeLog corrected gitfixid: modified: bugxml/data.txt 2024-02-18: David Anderson commit 10bb558d058010c0fc0e4bbe540f023dd8267405 Was too agressive checking a pointer in read_single_lle_entry() (if code is DW_LLE_end_of_list we will not access another byte here). modified: src/lib/libdwarf/dwarf_loclists.c 2024-02-18: David Anderson commit 1aeef71c6828a35411eacb856f456ca9f4fbe7a3 Recording fix of 202402-003 modified: bugxml/data.txt 2024-02-18: David Anderson commit ab20e055624a39e913e12ceb43634dae025f20ac Removing trailing whitespace. modified: src/lib/libdwarf/dwarf_alloc.c 2024-02-18: David Anderson commit 6146dc696616d55ef049308974f89f255a45b1b6 Fixing DW202402-003, reading outside of allowed area in memory due to corrupted object. modified: src/lib/libdwarf/dwarf_loclists.c 2024-02-17: David Anderson commit 6380dc9a5b3eff3e265279e63a1d8651b280ea4f Updated modified: ChangeLog 2024-02-18: Uilian Ries commit f2c565d4301afd8f675efeb2146b862a1ad7aa6c Fix zstd package name (#227) Signed-off-by: Uilian Ries 2024-02-17: David Anderson commit ecd8c3816174db161fb0f429815ea1a717e69d21 Now with fix to DW202402-002, crash in libdwarf on fuzzed object file modified: ChangeLog Minor wording change modified: ChangeLog2023 Updated 202402-002 modified: bugxml/data.txt Regenerated modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2024-02-17: David Anderson commit 404e6b1b14f60c81388d50b4239f81d461b3c3ad Fixing DW202402-002, corrupt object caused various libdwarf crashes with some tailored/fuzzed object files. modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_error.c 2024-02-16: David Anderson commit 0cae09da0aac83b2563fc3a4e140952cc398012a Up to date with git log modified: ChangeLog 2024-02-16: David Anderson commit aa5abd9caba8edf1bcbbc0243a36f0d34d48da59 cmake/FindZSTD.cmake changed to to cmake/Findzstd.cmake to match the preceding updates. modified: src/lib/libdwarf/CMakeLists.txt 2024-02-16: David Anderson commit 1865a08af4995673abed6284a225f3f9f3631f6c Merge: 0982c845 c12e7d71 Merge branch 'uilianries-cmake/find-zstd' Slight renaming of zstd stuff for maximum compatibility. 2024-02-16: David Anderson commit c12e7d71117dda88dfa7f12fd7a41a31519ef7bb Merge: 0982c845 c437f0ad Merge branch 'cmake/find-zstd' of https://github.com/uilianries/libdwarf-code into uilianries-cmake/find-zstd Arranging to findzstd in source when necessary. 2024-02-16: Uilian Ries commit c437f0ada3ab3a04eb80f9be54c27110607da1c5 Update zstd_found Signed-off-by: Uilian Ries 2024-02-16: Uilian Ries commit 6ffd41d39ba8e5db8651a35ac4f975baf786de4c rename zstd target name Signed-off-by: Uilian Ries 2024-02-16: Uilian Ries commit e3651e6ff79313e5975e1a928a3e7a573fd2ea64 Use zstd_FOUND to follow archive name Signed-off-by: Uilian Ries 2024-02-16: Uilian Ries commit b7ffd22b99bbb304d90c47e27092f050103e2f23 Rename find zstd cmake Signed-off-by: Uilian Ries 2024-02-14: David Anderson commit 0982c845243375330641236dfe230b34d7aa77f1 Regenerated With update to DW202402-001. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2024-02-14: David Anderson commit 6231e29cf00526433c77b2027864a3a0ee9d0cf9 Now ChangeLog and DW202402-001 show fixed on 13 February, as there were two places with a missing check against corrupt DWARF. modified: ChangeLog modified: bugxml/data.txt 2024-02-13: David Anderson commit 09eaf3402e9e384281a72ae034f723cd16dda0e4 Up to date with git log modified: ChangeLog 2024-02-13: David Anderson commit f21e2f7687f3dca183026a1fb72ca1f0dcf8befa DW_FORM_block1 was not checking to ensure the pointer pointed inside the section. Similar to the vulnerability in DW202402-001 (oss fuzz 66646) which was about DW_FORM_ref1. Now it checks. modified: src/lib/libdwarf/dwarf_form.c 2024-02-12: David Anderson commit 5c6249045b9edcb4987d2d002cf9691cd98a13ea Up to date now. modified: ChangeLog 2024-02-12: David Anderson commit 7150fc069090261046fb5317beb061730ed89bab Removing trailing whitespace, removing tab-characters. Fixing indents, adjusting a few lines so lines not longer than CODINGSTYLE.md calls for. modified: src/bin/dwarfdump/dd_elf_cputype.h modified: src/bin/dwarfdump/dd_esb.c modified: src/bin/dwarfdump/dd_mac_cputype.h modified: src/bin/dwarfdump/dd_pe_cputype.h modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_ranges.c 2024-02-12: David Anderson commit aa06c5f7f5cb8f6ca49bfc297aa240f6baa65bac Fixing indents and removing trailing whitespace. modified: src/lib/libdwarf/dwarf.h modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_macho_loader.h modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/libdwarf.h 2024-02-12: David Anderson commit 33a0ed092f7d6b69d858182fbf7da8b8709930c4 Removing trailing whitespace and fixing indents. modified: src/lib/libdwarf/dwarf_crc.c modified: src/lib/libdwarf/dwarf_crc32.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_fill_in_attr_form.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_leb.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_macro5.c modified: src/lib/libdwarf/dwarf_object_read_common.c modified: src/lib/libdwarf/dwarf_print_lines.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_seekr.c modified: src/lib/libdwarf/dwarf_string.c modified: src/lib/libdwarf/dwarf_util.c modified: src/lib/libdwarf/dwarf_xu_index.c 2024-02-12: David Anderson commit 20859c035fc6b5f85439b93ae5c3396a9ade8fbb Log up to date now. modified: ChangeLog 2024-02-12: David Anderson commit 94e84e3c13b6d008f2753c364e1db3fb405e65bc New date. Mentions fix to DW202402-001. modified: doc/libdwarf.dox Regenerated modified: doc/libdwarf.pdf Making the dwarf_srcfiles() function argument documentation a bit easier to read with bold text. modified: src/lib/libdwarf/libdwarf.h 2024-02-12: David Anderson commit 121632ddaf4f26f989187b0894c843dc05ee7661 Testing tiny tweak DO NOT USE THIS COMMIT modified: src/lib/libdwarf/libdwarf.h 2024-02-12: David Anderson commit 26f4ec3d41b847d8146d916ebcf60ae0d1be29c5 Reflecting todays' vulnerability update. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2024-02-12: David Anderson commit 34dca30ac2d18936bea6555fb969d7cc4ca73ea5 Merge: bef12c75 38f28b27 Merge branch 'jeremy-rifkin-jr/srcfiles-note' Using bold text to make reading libdwarf.h doxygen comments easier related to DW_AT_call_file 2024-02-12: David Anderson commit 38f28b275e88f33187cecaa2316b1d509063d713 Merge: bef12c75 520e2018 Merge branch 'jr/srcfiles-note' of https://github.com/jeremy-rifkin/libdwarf-code into jeremy-rifkin-jr/srcfiles-note call_file fix. 2024-02-12: David Anderson commit bef12c754df30f7c7929ae6aad310472e16ab69f Documenting ossfuzz 66646 and its fix. modified: bugxml/data.txt 2024-02-12: David Anderson commit 7bc8b4cd85d8b2419aca921df9191f8bd34d585e Added comments explaining why there is no buffer overrun. modified: src/lib/libdwarf/dwarf_elf_load_headers.c Added comments (and changed a couple local variables to long from int) explaining why the two-byte leb number case is safe C with no indeterminate result possible. modified: src/lib/libdwarf/dwarf_leb.c Added a single easily verify able comment explaining why a pointer cannot be NULL. modified: src/lib/libdwarf/dwarf_query.c Renamed an internal function for clarity and added comments explaining why there cannot be a buffer overrun here. modified: src/lib/libdwarf/dwarf_string.c 2024-02-12: David Anderson commit 812f5db1c0fd4369e4c3b6bb8b132c70b6940320 Fixing ossfuzz 66646. A vulnerability when reading an object with a particular corruption in the DWARF. With DW_FORM_ref1 the library was not validating the referenced address before dereferencing. See libdwarf vulnerability list DW202402-001 for the details. This bug has been present in the library for many years. modified: src/lib/libdwarf/dwarf_form.c 2024-02-11: Jeremy commit 520e20185262f96c9580cab157307b0890fc2c66 Make note of DW_AT_call_file in dwarf_srcfiles 2024-02-09: David Anderson commit 6f960447511a3866960cbc14681462f6db75e4b4 In case of memory exhaustion ensure that allocations going out of scope are freed. modified: src/bin/dwarfdump/print_abbrevs.c Instead of a = b use a = std::move(b) where transfer of ownership is going on. Improving efficiency. modified: src/bin/dwarfgen/ireptodbg.cc 2024-02-08: David Anderson commit 676600b9e96e8db8cd5b8415b2da7ab7b2b77771 DO NOT USE THIS COMMIT. It fixes real problems, but is incomplete. Handle realloc correctly. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_abbrevs.c Add comment about what an index i in read_gs_section_group() means. modified: src/lib/libdwarf/dwarf_elf_load_headers.c Extract Dwarf_Error creation to a small function. Add a null test of abl_form for clarity and correctness. modified: src/lib/libdwarf/dwarf_fill_in_attr_form.c Ensure dereference is on (unsigned char *) instead of just (char *) modified: src/lib/libdwarf/dwarf_leb.c Add readable null pointer checks using a helper function to make reading the code easier. modified: src/lib/libdwarf/dwarf_query.c 2024-02-07: David Anderson commit 8cdcc531f310d1c5ae61da469d8056bdd36b77e7 Merge: 0c9b1fb3 32e92533 Merge branch 'jeremy-rifkin-jr/libdwarf-conan-changes' Cmake improvements. 2024-02-07: David Anderson commit 32e9253373e213ce39b282ee7ff248e86352648f Merge: 0c9b1fb3 308b5533 Merge branch 'jr/libdwarf-conan-changes' of https://github.com/jeremy-rifkin/libdwarf-code into jeremy-rifkin-jr/libdwarf-conan-changes cmake fixes 2024-02-06: David Anderson commit 0c9b1fb3b1ca852f116405d82e1b08c8717dac8a Like the previous call/recalloc changes these issues detected by MSVC code analysis. The dwarfdump ones just previous were real bugs. These are real bugs too. Check for a NULL dss_data field so a code-checking system can see its checked without having to actually understand why it cannot be NULL. modified: src/lib/libdwarf/dwarf_gdbindex.c if (ltype != DW_LNCT_size && - ltype != DW_LNCT_size) { + ltype != DW_LNCT_timestamp) { modified: src/lib/libdwarf/dwarf_line.c Added a simple assertion (a comment, not code) for the reader. modified: src/lib/libdwarf/dwarf_string.c Added a check for a null input pointer, return DW_DLV_ERROR if found. modified: src/lib/libdwarf/dwarf_stringsection.c Moved things around so we can check for a null 'latestcontext' before dereferencing it. modified: src/lib/libdwarf/dwarf_tied.c 2024-02-06: David Anderson commit 872d6f6dc2c7540fd1b98f8aeab494ec4723de56 Check for NULL return from calloc() and print ERROR message if NULL. modified: src/bin/dwarfdump/print_die.c Check for NULL return from realloc() and print ERROR message if NULL. modified: src/bin/dwarfdump/print_ranges.c 2024-02-06: David Anderson commit a6a7da1fceca912850984806de49437d90d314f7 Use newlines to ensure no formatting surprise and count this as ERROR for the error count to be shown eventually. modified: src/bin/dwarfdump/dd_command_options.c On realloc check for null return and print an ERROR record if it is an error (but print at most once). modified: src/bin/dwarfdump/dwarfdump.c On calloc() check for null return amd print an ERROR message. Also, on calloc later on check for NULL return and print an ERROR message. modified: src/bin/dwarfdump/print_abbrevs.c 2024-02-06: David Anderson commit 321b001e939dd9c437835f25a728978deaf2812a - Dwarf_Off dw_offset; + /* libdwarf does not require offset to be anything in + particular, and will work fine regardless + (possibly returning DW_DLV_ERROR or DW_DLV_OK). But + valgrind generates a warning passing in the uninitialized + value so let us initialize it to ... something. */ + Dwarf_Off dw_offset = 11; modified: fuzz/fuzz_debug_str.c Additional doc on dwarf_get_str() for completeness. modified: src/lib/libdwarf/libdwarf.h 2024-02-04: Jeremy commit 308b55331b564d4fdbe3bc6856712270e5b2395b One more quick tweak for zstd targets 2024-02-04: Jeremy commit 28e21ea25bbb7dcaa04ef3e52611158680d55042 Oops, copy paste error 2024-02-03: Jeremy commit 2d8b0a15349ca634b212a11f2b2a97b9a85890a3 Small tweak 2024-02-03: Jeremy commit 37929dc77552b4686899f0bd0afb7a9c02501b4a Update patches 2024-02-03: David Anderson commit 35e2f1434f39b7262d49f0a9de4f9cbee5815ff0 Removing many _WIN32 and related ifdefs where they are not needed now, and we deleted many off_t and size_t uses too (meaning now we have dwarf_seekr.c). Adding a comment on each #if 0 to explain what it is (try grep 'if 0' *.c) modified: src/lib/libdwarf/dwarf_arange.c modified: src/lib/libdwarf/dwarf_debugaddr.c modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_fill_in_attr_form.c modified: src/lib/libdwarf/dwarf_find_sigref.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_harmless.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_setup_sections.c modified: src/lib/libdwarf/dwarf_str_offsets.c modified: src/lib/libdwarf/dwarf_string.c modified: src/lib/libdwarf/dwarf_util.c modified: src/lib/libdwarf/dwarf_xu_index.c 2024-02-03: David Anderson commit a0d7b1844515fc7aa2093b48017fa2dc633b92ea open/close moved to dwarf_seekr.c as _dwarf_openr, _dwarf_closer All direct uses converted to the _dwarf form and no-longer-needed references to _WIN32 and off_t removed nearly everywhere. Soon the new #if 0 ---- #endif instances of unneeded stuff will be removed. modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_safe_arithmetic.c modified: src/lib/libdwarf/dwarf_seekr.c modified: src/lib/libdwarf/dwarf_util.c 2024-02-03: David Anderson commit f39def9bfb0630307a42f2b9d53ab3eef9dfbdd0 Fixing ifdef nest modified: src/lib/libdwarf/dwarf_seekr.c 2024-02-03: David Anderson commit f0854c25f1f07dac516f8d8f953f7d72ca5b9fc2 Ifdef nest wrong for _WIN64 lseek define. modified: dwarf_seekr.c 2024-02-03: David Anderson commit 8ae6edad4e9f116e3f7fc6ff4d18c92cd30533c1 Latest, all about dwarf_seakr.c modified: ChangeLog 2024-02-03: David Anderson commit f2790bb57f6e1a2f110cdd35370cf5b959f8f060 For _WIN64 using the built-in integer type __int64. Now builds on Win10. Altered #if 0 by adding /* debugging only */ modified: src/lib/libdwarf/dwarf_seekr.c 2024-02-03: David Anderson commit 9c3081164c48dd50fdc00174e532928e08fa6bab Remove blocks already marked #if 0 modified: src/lib/libdwarf/dwarf_crc32.c Add comment following #if 0 indicating the block is for debugging only. modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_object_detector.c 2024-02-03: David Anderson commit 724fe687fa619909a0a24af2753d76e7c150a678 Splitting lseek() and read() code into dwarf_seekr.c (new file) so other files do not need Windows ifdefs or types. -cmake/libdwarf-config.cmake \ +cmake/libdwarfConfig.cmake.in \ modified: src/lib/libdwarf/Makefile.am Change all types locally to be libdwarf types, no longer need off_t or size_t here. Call dwarf_seekr() and dwarf_reader(). modified: src/lib/libdwarf/dwarf_crc32.c Removing unwanted blank line. modified: src/lib/libdwarf/dwarf_debuglink.c Change the text a #if 0 debug code block so it no longer has 'dadebug' in it. Was Awkward. modified: src/lib/libdwarf/dwarf_generic_init.c Remove WIN ifdefs. Change all types locally to be libdwarf types, no longer need off_t or size_t here. Call dwarf_seekr() and dwarf_reader(). modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_object_read_common.c Change internal prototype to use only libdwarf-types in _dwarf_object_read_random() as that calls dwarf_seekr() dwarf_reader() and we no longer need system types. modified: src/lib/libdwarf/dwarf_object_read_common.h Remove the unwanted (for now) parts of Windows ifdefs. modified: src/lib/libdwarf/dwarf_seekr.c Correct a comment about a certain gcc option. modified: src/lib/libdwarf/dwarf_setup_sections.c 2024-02-03: David Anderson commit f144bdbfcb2348a33986aa94318bf41ce1097fa6 Some cmake files were not listed at a change point. Now they are. modified: ChangeLog 2024-02-02: David Anderson commit d9bbb1299a31a3260a90862ec6af33890d700d4f Moved lseek/read so we can concentrate the changes required for msys2/windows special requirements into one small source. modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/dwarf_opaque.h new file: src/lib/libdwarf/dwarf_seekr.c modified: src/lib/libdwarf/meson.build 2024-02-01: David Anderson commit f4f16262d4bb02c534ca12742aa6ccca37815ae1 New month so the month changes in the first lines. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2024-02-01: David Anderson commit 21bb3067a534dabbdb1afc4bdf9b36f61674e239 Merge: 9cf659f3 95448e8b Merge branch 'jeremy-rifkin-cmake-changes-for-zlib-zstd' Fixing issues with cmake when zstd not there. 2024-02-01: David Anderson commit 95448e8b75c16c0156737d416b4cfc571d3c128c Merge: 9cf659f3 b8cf3548 Merge branch 'cmake-changes-for-zlib-zstd' of https://github.com/jeremy-rifkin/libdwarf-code into jeremy-rifkin-cmake-changes-for-zlib-zstd cmake/zstd issues with build. 2024-01-31: Jeremy commit b8cf3548112fd4cb68e8d4b89c6ce4348bc8745c Quick fix 2024-01-31: David Anderson commit 9cf659f3a607dcc69a911bba2109a07d7941987b up to date with git log modified: ChangeLog 2024-01-31: David Anderson commit 3a4b0d9a740ae5f724b411f07bc079c2fa73b076 Minor clarification documenting linking with libdwarf.a modified: doc/libdwarf.dox 2024-01-31: David Anderson commit 4bb7383ae3ada308c3d44ec11f0c367e467a0c3f Added to documentation of dwarf_crc32() and dwarf_basic_crc32() and dwarf_crc32(). modified: src/lib/libdwarf/libdwarf.h 2024-01-31: David Anderson commit 182e935240f5dac5fd62d42ad13294758cb9824e Fixed so no longer forcing read of uninitialized memory. valgrind noticed the bug. modified: fuzz/fuzz_crc.c Added comments. modified: fuzz/fuzz_crc_32.c 2024-01-31: David Anderson commit 74bccd58f8cf1a0dc60a76e88264d72c110a5069 Now with a test for a null pointer passed in. There is no error return, but instead we simply return 0. modified: src/lib/libdwarf/dwarf_crc.c CMakeLists.txt src/lib/libdwarf/CMakeLists.txt src/lib/libdwarf/cmake/libdwarf-config.cmake src/lib/libdwarf/cmake/libdwarfConfig.cmake.in 2024-01-29: David Anderson commit 688afdc072c59d3a330c708e05c386fca991bb81 Up to date with git log modified: ChangeLog 2024-01-29: David Anderson commit ff535a2c76858f3d9a50fb648fe00d9eaea4b8f7 Added Jan 2024 release date (0.9.1) modified: README.md 2024-01-28: David Anderson commit 6178ba8c12eaa55ae906ef68fb6bf518ef0b8b0d Now all version 0.9.2 (no build or software change yet). modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2024-01-27: David Anderson commit 8de6f6e694a2dcd2222c9f4757d0c44a26a52b9b Dated, marked releasing. modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2024-01-26: David Anderson commit 9a8f0f761120bbbdb1f3f9442ed67b4c84e65c44 More messages use homefy() so regression tests independent of that aspect of the path of relevant strings. modified: src/bin/dwarfdump/dwarfdump.c 2024-01-26: David Anderson commit 992fb90bdec76ee850758e5a2fcec60c69451f1d Updated Changes a little. modified: doc/libdwarf.dox Regenerated modified: doc/libdwarf.pdf 2024-01-26: David Anderson commit 0bae85ef5ac5eac3b5bf21aff32eb607be9db742 Now with latest git log modified: ChangeLog 2024-01-26: David Anderson commit cc343150beab8de77ae28c493ce8a83db152bda3 A compiler used R_386_GOTOFF for a relocation for DWARF data. Now that relocation is handled. modified: src/lib/libdwarf/dwarf_elf_defines.h modified: src/lib/libdwarf/dwarf_elf_rel_detector.c 2024-01-26: David Anderson commit bef1fc97f1da8e0a9e0609c2572fd79179a3b7bb One place in generic_ehdr_from_64() needed a check for e_shnum zero. modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2024-01-26: David Anderson commit 001957b01a4ce47c258a23a6f7eb4acf19632acc Bringing up to date. modified: ChangeLog 2024-01-26: David Anderson commit 872820898d7d3cb237b130efe33f3dc1768499d4 Removed lots of debug message() commands that were just for debugging meson.build. modified: src/lib/libdwarf/meson.build 2024-01-26: David Anderson commit f4219c32811ac50e61c478ccf3d89061843bfac6 Added note about zstd (in common use in Linux before 2020) and libsztd-dev modified: README.md 2024-01-26: David Anderson commit 916fd61c3d8ed3b5a59c8cd79ae2a19e8457f176 Fixed indent mistake (looked odd). modified: meson.build 2024-01-26: David Anderson commit 778be0d1075eb133dc177483197786ea9314c02d We delete four message() meson commands that were for debugging our use of meson. These four are no longer needed. modified: meson.build 2024-01-26: David Anderson commit 7eb45d468c05282be8ef7495136a62834df0e9e9 If e_shoff is zero we immediately declare there is nothing here for DWARF and DW_DLV_NO_ENTRY is returned. Consistent with the generic Elf ABI documentation. No further checking for Elf corruption or anything else is done. modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2024-01-23: David Anderson commit c0cfba34ec80996426b5be2523f6447a2c9b7b39 Revized the new logic on segments/sections for clarity and to catch corrupted object files earlier. modified: src/lib/libdwarf/dwarf_machoread.c 2024-01-23: David Anderson commit f83ca35f17336f8723aebacc167793d71c0f723e We now recognize a Mach-o object file (as opposed to a DSYM) and just treating that slighly differently lets libdwarf show the DWARF content. (Because, unlike DSYM, an object file has both executable code and DWARF data and a slight difference in how certain names appear) modified: src/lib/libdwarf/dwarf_macho_loader.h modified: src/lib/libdwarf/dwarf_machoread.c 2024-01-23: David Anderson commit 3f2098ff28255c186a84899b2cc10678b65a02a9 Reversed the order of two lines to preserve a test result. I don't have any TI binaries and don't expect to, so the TI extension overlapping DW_TAG_lo_user is a beter choice than DW_TAG_TI_far_type to show. modified: src/lib/libdwarf/dwarf.h Regenerated with the updated dwarf.h modified: src/lib/libdwarf/dwarf_names.c 2024-01-23: David Anderson commit adb7f61db003a82fdacfc22f2cdcac70788e75d6 Added in TI DWARF extension codes. modified: src/lib/libdwarf/dwarf.h Regenerated. modified: src/lib/libdwarf/dwarf_names.c 2024-01-22: David Anderson commit 8670c9102cb57bd1dce156be1760bfb91b3f88a0 Notes on avoiding zlib and zstd modified: doc/libdwarf.dox 2024-01-20: David Anderson commit 4f4e51dfb234bad27d9adb9338555e578ca4f340 Documenting the new command to turn off access to decompression libraries for a build of libdwarf. meson To build a libdwarf that does not refer to or link with decompression libraries zstd or zlib, add the meson option "-Ddecompression=false" configure As of version 0.9.1 the configure option "--disable-decompression" tells the build to compile libdwarf and dwarfdump with no reference to the zlib or zstd libraries. cmake To turn off linking with or using zlib or zstd libraries or headers there is an option to cmake add the cmake option DENABLE_DECOMPRESSION=NO. modified: README.md modified: READMEcmake.md 2024-01-20: David Anderson commit dafb9bc45af0b918ff80ab668617f73c9f5778d7 With cmake option -DENABLE_DECOMPRESSION=NO libdwarf will build without any reference to zlib.h or zstd.h or the respective libraries. modified: CMakeLists.txt 2024-01-20: David Anderson commit 82214ba96ba9c6a02c5584fd1dd8803f71760bed Now passing --disable-decompression to configure turns off access to libz and zstd, which is of use to some not expecting to see compressed sections and missing libz or zstd. modified: configure.ac 2024-01-20: David Anderson commit 89604291e005b1b81efee9a11742edb6443cbedb Now we define -Ddecompression=YES as the default and library builders can pass -Ddecompression=NO to the meson command to turn off decompression and avoid any dependency on libz or zstd. Fixed a bug which would result in a compile failure referencing includes for libz.h and zstd.h if one had neither. Doing set10('LIBZ_H',false) in meson has the wrong effect, as LIBZ_H gets defined 0 so #ifdef LIBZ_H finds LIBZ_H is defined. modified: meson.build modified: meson_options.txt modified: src/lib/libdwarf/meson.build 2024-01-20: David Anderson commit 20e6efcbde6ba8fd964cde62c0e4c5b3ee3088b9 ifdefs for zstd.h and zlib.h were written in a non-obvious way. Now in standard libdwarf form for clarity. modified: src/lib/libdwarf/dwarf_init_finish.c 2024-01-10: David Anderson commit ecb8700f99a0e324ae910b4965cbea16f21f7711 up to date with git log: fixing VS warnings modified: ChangeLog 2024-01-10: David Anderson commit 62c214e548b72afa264e26c29ffd6db259f94fce Altered the argument of _dwarf_load_elf_section_is_dwarf() to avoid a warning from VS (should have done this before now...) modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2024-01-10: David Anderson commit 498968ff7ef9cdaadb901dc6183db2a0139318a7 Now with _WIN32 arrange that lseek not generate a warning. modified: src/lib/libdwarf/dwarf_object_read_common.c 2024-01-10: David Anderson commit 31fe00fbc52c3fb66a6c99c4382dceb1d6c3395c Arraned lseek to now avoid warnings from VS (using ifdef _WIN32). modified: src/lib/libdwarf/dwarf_object_detector.c 2024-01-10: David Anderson commit ddd0cdc9c7fa6bab7b164a38e79d4030b53c9665 If a read is too big, do multiple reads. If _WIN32 use extra casts to compile ok with VS. modified: src/lib/libdwarf/dwarf_crc32.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_object_read_common.c 2024-01-09: David Anderson commit b70779dcdf54c15d468e7c91e2a12a6083a0265e Up to date with git log modified: ChangeLog 2024-01-09: David Anderson commit 501bf707bbf045ebaeb97f57d14f148f680f2121 Fixing warnings (VS) about arguments to posix functions. modified: src/lib/libdwarf/dwarf_object_detector.c This did not really fix the two warnings. There is something odd in the declaration of posix read() and lseek() in VS community edition 2022. The warnings complain of off_t to 'unsigned long' and size_t to 'unsigned int' which seems to make no sense.. Linux and posix docs agree on the argument and return types and the variables are appropriately typed. 2024-01-09: David Anderson commit 13cf9ff0ec8593e5bf494c4e33fd0da6b4727888 Now we can read DWARF2 produced by an obsolete compiler from Metrowerks. It uses DW_FORM_ref_addr where it means DW_FORM_addr (DW_AT_low_pc for example). It sets the relocation section type to SHT_RELA correctly and then names the section with .rel (not .rela as it should). It has two .rel.debug_line sections for no reason. libdwarf checks the CU die DW_AT_producer string and notes when a CU was produced by the Metrowerks compiler, recording that internally for use in dealing with attributes and FORMs. modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_opaque.h 2024-01-08: David Anderson commit 71a912250c33bab0179cae60b88bfc9d5457ffb7 Latest DW_LANG names now present. modified: src/lib/libdwarf/dwarf_names.c 2024-01-06: David Anderson commit 60c15ba27c5693193b4c9cd7ef02cca7a05693ed Moved some 2021 changes from 2022 to 2021 modified: ChangeLog2021 modified: ChangeLog2022 2024-01-06: David Anderson commit 560449faedd9c9ce543d1757ae20486a707923a9 Added new DW_LANG codes (see dwarfstd.org) modified: dwarf.h 2024-01-03: David Anderson commit cae2c6ae5363f050f65c7206b308412eed603b28 Merge: 146fa5e7 871cbd9b Merge branch 'AlexDenisov-alexdenisov/add-an-option-to-disable-zlib-zstd' Adding cmake option to avoid looking for compression libraries 2024-01-03: David Anderson commit 871cbd9b832d9a50796767a59590dbe948bcdf20 Merge: 146fa5e7 5f310464 Merge branch 'alexdenisov/add-an-option-to-disable-zlib-zstd' of https://github.com/AlexDenisov/libdwarf-code into AlexDenisov-alexdenisov/add-an-option-to-disable-zlib-zstd Adding option to cmake. So zlib/libzstd ignored (if ignoring is requested) 2024-01-03: AlexDenisov commit 5f310464c583682afdb0f607a864123001f181d8 Add a CMake option to disable libz/libzstd Currently, the only way to disable these is to uninstall one of them from the system, which is not very convenient. 2024-01-01: David Anderson commit 146fa5e72f84c286477380c80a401e78a4d1d28d Now just 2024 modified: ChangeLog 2024-01-01: David Anderson commit b3300492d09687397168b6426584db755c7bd1dd Pure 2023 data new file: ChangeLog2023 2024-01-01: David Anderson commit a180535f2b4a4d0bf02b8ef2d76d639ca8136e9f With initial 2024 entry. modified: ChangeLog auto update with 2024 modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html libdwarf-code-0.11.1/ChangeLog2018000066400000000000000000000074441472336503500164020ustar00rootroot000000000000002018-12-19 David Anderson * configure.ac: Updated version to 20181218. 2018-11-29 David Anderson * configure.ac: Updated version to 20181129. 2018-11-04 David Anderson * configure.ac: Updated version to 20181123. 2018-11-05 David Anderson * configure.ac: Updated version to 20181105. Fixing magic-number dectection for mach-o and pe. 2018-10-23 David Anderson * configure.ac: Updated version to 20181022. 2018-10-20 David Anderson * configure.ac: Updated version to 20181020. 2018-10-15 David Anderson * configure.ac: Updated version to 20181015. * configure: Regenerated. 2018-10-14 David Anderson * configure.ac: Updated version to 20181014. * configure: Regenerated. 2018-09-21 David Anderson * configure.ac: Updated version to 20180920 * Makefile.am: Added tsearch (directory) and configure.cmake to the files put in a 'make dist' distribution so cmake works with a released tar.gz. 2018-09-12 David Anderson * configure.ac: Updated version to 20180912 * configure. Regenerated. Version now 20180912 2018-09-11 David Anderson * configure.ac: Restored the configure option --enable-nonstandardprintf which sets the config.h HAVE_NONSTANDARD_PRINTF_64_FORMAT variable for those needing it. See libdwarf/libdwarf.h.in for its use. * configure. Regenerated. Version now 20180910 2018-09-02 David Anderson * README: noted the example install commands for libelf and zlib work on 18.04 Ubuntu as well as 16.04. * configure.ac: Updated version to 20180901. Corrected a couple of typos in the summary output of configure. * configure: Regenerated. 2018-08-24 David Anderson * README: Moved comments about common build problems to the beginning of the text. Removed trailing whitespace. 2018-08-23 David Anderson * README: Added mention of the aclocal-missing configure/ build problem and the simple action to fix it. 2018-08-21 David Anderson * configure.ac: Version 20180821. --enable-wall did not show up in the output and wound up ignored. * configure: Regenerated. 2018-08-14 David Anderson * configure.ac: Version 20180814. Fixed small Makefile.am omissions in dwarfdump and libdwarf. * configure: Regenerated. 2018-08-09 David Anderson * configure.ac: Version 20180809 * configure: Regenerated. 2018-08-06 David Anderson * configure.ac: Version now 20180808. * Makefile.am: Corrected references to runtest.sh * configure: Regenerated. 2018-08-06 David Anderson * configure.ac: Version now 20180806. 2018-08-05 David Anderson * configure.ac: Version now 20180805. * configure: Regenerated. 2018-08-02 David Anderson * configure.ac: Deleted unneeded variables. Now env vars like CFLAGS work in standard fashion. Updated version to 20180801 * configure: Regenerated 2018-08-02 David Anderson * README: Added and corrected some details of the new configure. 2018-07-31 David Anderson * configure.ac: Fix the .so version number fields to be 1 0 0, not 1 5 0 version is now hand typed in, not generated by current date * Makefile.am: Now reflects renaming of CPLIBDWARFTAR to CPTARTOWEBDIR add runtests.sh to files in distribution * configure: regenerated 2018-07-23 David Anderson * configure.ac: Reintroduced CXX -wno-long-long to avoid spurious warnings from C++ when using --enable-wall. * configure: Regenerated. 2018-07-22 David Anderson * configure.ac: Complete the handling of --enable-sanitize. 2018-07-19 David Anderson * NEWS, README: Updated to match the new configure code. * configure.ac: Now configure is created by autoreconf -vif and the only configure.ac is here in the same directory as this ChangeLog. libdwarf-code-0.11.1/ChangeLog2019000066400000000000000000000260651472336503500164030ustar00rootroot000000000000002019-11-10 David Anderson * configure.ac: Version 20191108. * configure: Regenerated 2019-11-06 David Anderson * configure.ac: Version 20191106. separating cxx_compiler flags from c_compiler_flags as C does not understand -Wno-unused-private-field and we have -Werror set at times. * configure: Regenerated 2019-11-05 David Anderson * configure.ac: Version 20191104 * configure: Regenerated 2019-11-04 David Anderson * Makefile.am: Removed inproper SUBDIRS if clauses. * Makefile.in: Regenerated. * configure.ac: Removed dist-xz frm AM_INIT_AUTOMAKE as we don't use it and MacOS command line tools do not have xz. * configure: Regenerated. 2019-10-23 David Anderson * CMakeLists.txt: Create a separate compile options list DW_FWALLXX from C DW_FWALL. 2019-10-22 David Anderson * configure.ac: Package Version 20191022. * configure: regenerated. * CMakeLists.txt: Package Version 20191022. Revised the settings so PACKAGE_VERSION winds up in string quotes in config.h. * config.h.in.cmake: Revisions so PACKAGE_VERSION winds up in string quotes in config.h. 2019-10-21 David Anderson * configure.ac : Added additional AC_CHECK_HEADERS. Version 20191021 * config.h.in, configure: Regenerated 2019-10-18 David Anderson * CMakeLists.txt: Code the isBigEndian test correctly. * config.h.in.cmake: Code the #cmakedefine for WORDS_BIGENDIAN 2019-10-16 David Anderson * configure.ac: The use of AC_C_BIGENDIAN was incorrect and a revised use works properly so config.h has WORDS_BIGENDIAN when it should. * configure: regenerated. * config.h.in: regenerated. 2019-10-14 David Anderson * CMakeLists.txt: Corrected the cmake version of a couple tests so they work. * configure.ac: Now version 20191014. * configure: Regenerated. 2019-10-02 David Anderson * README.cmake: Updated and improved the comments about ctest. ctest now tests that dwarfdump and libdwarf basically work (as well as testing internal interfaces). 2019-10-02 David Anderson * configure.ac: Now version 20191002 * configure: regenerated. Version 20191002 2019-10-01 David Anderson * configure.ac: Now version 20190929 * configure: regenerated. Version 20190929 2019-09-19 David Anderson * configure.ac: Now version 20190919 * configure: regenerated. Version 20190919 2019-07-05 David Anderson * dwarf_elf_load_headers.c(read_gs_section_group): The check for an invalid gh_entsize of an SHT_GROUP secion was done too late. Now the check is before using the value (avoiding a divide-by-zero error). 2019-06-04 David Anderson * CMakeLists.txt,config.h.in.cmake,configure.ac: No longer reference inttypes.h or HAVE_INTTYPES_H as we do not refer to anything in that C99 include file. * configure: regenerated. Version 20190604 2019-05-29 David Anderson * CMakeLists.txt, configure.ac: Version 20190529 * configure: regenerated. 2019-05-24 David Anderson * CMakeLists.txt: Ensure there is a reasonable definition of uintptr_t even if stdint.h missing. * Makefile.am:Add config.h.in.cmake to the list of files. * Makefile.in:Regenerate * config.h.in: Add HAVE_INTPTR_T and intptr_t. * config.h.in.cmake: Add the 1 to several HAV_* config variables that lacked it. * Add PACKAGE_NAME etc via cmakedefine. * configure.ac: Add AC_TYPE_INTPTR_T, add comments about the *INTPTR_T stuff. * configure: Regenerated. * scripts/buildandreleasetest.sh. Add --nodwarfgen option to enable building with no stdint.h (c++ finds the #define of uintptr_t useless). 2019-05-22 David Anderson * CMakeLists.txt: check_include_file( "sys/elf_386.h" and check_include_file( "stdint.h" both had badly spelled (erronous) target variables. 2019-05-21 David Anderson * CmakeLlists.txt: The generator expression was unnecessary and is no longer used, instead a simple list variable is named DW_FWALL. 2019-05-20 David Anderson * CmakeLlists.txt: Now generates config.h at top binary level. * config.h.in.cmake: New, now the only config.h.in present 2019-05-20 David Anderson * CmakeLists.txt: The checks for elf64_getehdr and elf64_getshdr were written incorrectly. The library options changed to be consistent with standard practice: nonshared->BUILD_NON_SHARED shared->BUILD_SHARED wall->WALL (and the option generator expression corrected) nonstandardprintf->HAVE_NONSTANDARD_PRINTF_64_FORMAT HAVE_CUSTOM_LIBELF (new, not of general interest) dodwarfexample->BUILD_DWARFEXAMPLE dodwarfgen->BUILD_DWARFGEN test->DO_TESTING Version 20190520 * README.cmake: updated to match the new option names, * appveyor.yml: Updated to match cmake new option names. * config.h.in: Adding HAVE_CUSTOM_LIBELF line. * configure.ac: Typo correction and addition of --enable-havecustomlibelf Version 20190520 * scripts/buildandreleasetest.sh. Now reflects the new cmake option names, such as dodwarfgen=ON becoming DWARFGEN=ON. 2019-05-13 David Anderson * CmakeLists.txt: Now -Dwall=ON adds -Werror and reports the warning/error options. * configure.ac: Now version 20190513. --enable-wall now adds -Werror so warnings are considered errors by gcc. * configure: regenerated. * scripts/buildandreleasetest.sh: Now does a full compile with WORDS_BIGENDIAN forced on. Since most testing is little-endian this forces a compile testing that the code actually builds with WORDS_BIGENDIAN 1. 2019-05-07 David Anderson * CMakeLists.txt: Added comment on how the find_package() command works. See cmake documentation. * cmake/FindLibElf.cmake: Added comment mentioning how and where this is referenced. 2019-05-07 David Anderson * CMakeLists.txt: Added CXX to the project languages so dwarfgen will build with cmake. Version 20190507. * Makefile.am: Removed a file name: not needed. * configure: regenerated * configure.ac: Version 20190507 2019-05-05 David Anderson * Makefile.am, dwarfdump/Makefile.am, dwarfexample/Makefile.am, dwarfgen/Makefile.am: cmake and configure needed to agree on the list of files. Specifically configure.ac etc lists just cmake files that exist so it can generate a complete release, while CmakeLists.txt etc will not currently generate a complete release. Regenerated configure.in. 2019-05-05 David Anderson * configure.ac,configure.cmake: Version 20190505 * configure: regenerated 2019-05-02 David Anderson * scripts/buildstandardsource.sh: cmake has serious trouble with semicolons so now this copies the base libdwarf.h.in to generated_libdwarf.in while changing struct Elf to struct _Elf. cmake can do a simple copy. * configure.cmake: Now just copies the right file with Elf or _Elf to libdwarf.h. * scripts/buildstandardsource.sh: Now creates generated_libdwarf.h.in from libdwarf.h.in. using sed. Run by developer, not library users. * scripts/fixlibdwarfelf.sh Now just copies the right file with Elf or _Elf to libdwarf.h (used by configure, not cmake). 2019-05-02 David Anderson * Makefile.in: regenerated. 2019-05-01 David Anderson * CMakeLists.txt: Sets language C * cmake/AutoconfHelper.cmake: deleted, nothing here used any more. * cmake/FindLibElf.cmake: Now does C source test, not c++. * configure.cmake: moved the cmake macro includes to the first lines in the file. Added a JUST_LIBELF variable to correctly test for off64_t Does checking/setting for essentially all the needed HAVE_ etc variables. 2019-05-01 David Anderson * README.cmake: Made more complete. * configure.cmake: Even more setup here. 2019-05-01 David Anderson * CMakeLists.txt: Corrected a mistake in reporting install prefix. * cmake/AutoconfHelper.cmake: Removed unused functions, and for some functions changed to native cmake in configure.cmake. * configure.cmake: Now does a lot more setup here and using cmake (replacing some autoconf-like functions) And this now sets many things for each build directory, reducing the size of */configure.cmake files. 2019-04-30 David Anderson * README.cmake: New, describes use of cmake. * cmake/LibdwarfMacros.cmake: Added a final newline charcter as such is expected. * configure.cmake: Added testing lines. 2019-04-26 David Anderson * README.cmake. New. Describes cmake use and options. * CMakeLists.txt,cmake/FindLibElf.cmake,configure.cmake: Revised to be closer to configure as to what it does. 2019-04-25 David Anderson * configure.ac: Version 20190425. Updated to recognize recent changes. And some #include/define updates for Windows. 2019-04-22 David Anderson * configure.ac: Version 20190422. Now tests for stdint.h and inttypes.h. Uses AC_TYPE_UINTPTR_T so we can avoid a lot of warnings in 32bit and mingw builds. 2019-04-21 David Anderson * configure.ac: Version 20190421. Now --enable-nonstandardprintf (build with some non-standard printf formats allowed) adds -Wno-pedantic-ms-format so gcc will not warn about the non-standard formats. Only affects mingw. Otherwise the -Wno-pedantic-ms-format option (which nothing but mingw has) gets dropped. 2019-04-19 David Anderson * NEWS: Now --disable-libelf just disables linking with libelf. Elf files are read (libdwarf) and printf(dwarfdump). As always. The Elf reader detects corrupted Elf early on. 2019-02-24 David Anderson * configure.ac. Version 20190223. With --disable-libelf most header checking is unnecessary and suppressed. All the checks for int32 and the like removed as we no longer use such types. 2019-02-18 David Anderson * configure.ac: One can build forcing a non-elf build with --disable-libelf . If libelf is missing or will not compile the disable is automatic. Now zlib is separated so -lz is added to the link line with or without libelf. Version is 20190217 * configure.cmake: Now always defines DWARF_WITH_LIBELF so cmake builds continue to work as always. 2019-02-07 David Anderson * configure.ac. Version 20190201. Now allows lack of elf.h libelf.h and if those and zlib.h missing then the link line shows neither -lelf nor -lz (libdwarf and dwarfdump will then support PE and mach-o objects but not elf) 2019-01-15 David Anderson * configure.ac: Version 20190112 2019-01-10 David Anderson * configure.ac: Version 20190110 2019-01-09 David Anderson * configure.ac: Version 20190108 2019-01-05 David Anderson * configure.ac: Version 20190104 2019-01-02 David Anderson * ChangeLog: renamed ChangeLog2018 * configure.ac: Version 20190102 * Makefile.am: Now includes the tsearch files in the dist. libdwarf-code-0.11.1/ChangeLog2020000066400000000000000000000110511472336503500163600ustar00rootroot000000000000002020-12-26 David Anderson * scripts/find_pdfpages.py, scripts/rebuildpdf.sh: These rearrange pdf content so libdwarf2.1.mm reads in a more normal order (table of contents before content). 2020-12-23 David Anderson * configure.ac: Now version 20201223. * configure: Regenerated. * scripts/buildstandardsource.sh: Added a clarifying comment. * scripts/ddbuild.sh: Now builds the sourcefile opstabcount.c for dwarfdump. 2020-11-25 David Anderson * configure.ac: Now version 20201201. * configure: Regenerated. 2020-11-25 David Anderson * configure.ac: Modified to make build endianness visible to dwarfexample 'make check' runtests.sh so make check can pass building on a big-endian host. * Makefile.in: Regenerated. * configure: Regenerated. 2020-11-25 David Anderson * configure.ac: Now version 20201125. * configure: Regenerated. 2020-11-24 David Anderson * CMakeLists.txt: now supports -DDWARF_WITH_LIBELF=OFF (which it was supposed to do...) 2020-11-23 David Anderson * configure.ac: Now version 20201123. * configure: Regenerated. 2020-11-09 David Anderson * configure.ac: Now version 20201100 * configure: Regenerated. 2020-11-05 David Anderson * CMakeLists.txt,configure.ac: Modified so we set both HAVE_ZLIB and HAVE_ZLIB_H as we should have done long ago. * config.h.in,configure: Regenerated. 2020-11-03 David Anderson * configure.ac: Now version 20201103 * configure: Regenerated. 2020-10-20 David Anderson * configure.ac: Now version 20201029 * configure: Regenerated. 2020-10-11 David Anderson * configure.ac: Now version 20201011 * configure: Regenerated. 2020-10-03 David Anderson * Makefile.in,aclocal.m4,ar-lib,compile,configure,depcomp: Running autoreconf on Ubuntu 20.04 caused some small changes. * COPYING: Corrected the references to the BSD copyright to use "two-clause BSD license". 2020-09-26 David Anderson * configure.ac: Now version 20200926 * configure: Regenerated. 2020-09-15 David Anderson * configure.ac: Now version 20200915 Added -fno-omit-frame-pointer to the -fsanitize option set * configure: Regenerated. 2020-09-08 David Anderson * configure.ac: Now version 20200908 * configure: Regenerated. 2020-08-25 David Anderson * configure.ac: Now version 20200825 * configure: Regenerated. 2020-08-22 David Anderson * configure.ac: Now version 20200822 * configure: Regenerated. 2020-08-10 David Anderson * configure.ac: Now version 20200810 * configure: Regenerated. 2020-07-19 David Anderson * configure.ac: Now version 20200719 * configure: Regenerated. 2020-07-14 David Anderson * configure.ac: Now version 20200714 * configure: Regenerated. 2020-07-04 David Anderson * configure.ac: Now version 20200703 * configure: Regenerated. 2020-06-29 David Anderson * configure.ac: Now version 20200629 * configure: Regenerated. 2020-06-17 David Anderson * configure.ac: Now version 20200617 * configure: Regenerated. 2020-06-12 David Anderson * configure.ac: Now version 20200612 * configure: Regenerated. 2020-06-09 David Anderson * configure.ac: Now version 20200601 * configure: Regenerated. 2020-05-19 David Anderson * configure.ac: Now version 20200519 * configure: Regenerated. 2020-05-01 David Anderson * configure.ac: Now version 20200501 * configure: Regenerated. 2020-04-26 David Anderson * configure.ac: Now version 20200426 * configure: Regenerated. 2020-04-13 David Anderson * configure.ac: Now version 20200423 * configure: Regenerated. 2020-04-13 David Anderson * configure.ac: Now version 20200412 * configure: Regenerated. 2020-03-26 David Anderson * configure.ac: Now version 20200327 * configure: Regenerated. 2020-03-15 David Anderson * configure.ac: Now version 20200315 * configure: Regenerated. 2020-03-09 David Anderson * configure.ac: Now version 20200307. * configure: Regenerated. 2020-02-25 David Anderson * configure.ac: now 20200225 * configure: Regenerated. 2020-02-15 David Anderson * configure.ac: Version string now 20200215 as we now deal with libelf-reading-relocation-sections. (nolibelf code already did those as of 20200213 * configure: Regenerated. 2020-02-13 David Anderson * configure.ac: Version string now 20200213 * configure: Regenerated. 2020-01-05 David Anderson * configure.ac: Version string now 20200105 * configure: Regenerated. libdwarf-code-0.11.1/ChangeLog2021000066400000000000000000011012141472336503500163630ustar00rootroot00000000000000 commit 09dc2de3f1de72197b76373fe09a15769972a6f0 Author: David Anderson Date: Fri Dec 31 07:18:36 2021 -0800 Turned off sorting, want the ordering to be as in libdwarf.h modified: doc/Doxyfile Now with doxygen comments initiated. modified: src/lib/libdwarf/libdwarf.h commit 8d60a7e39406733bbed28cb4511cb6cef579118f Author: David Anderson Date: Sun Dec 26 14:54:06 2021 -0800 Small changes. modified: ../src/lib/libdwarf/libdwarf.h commit b7864fc2b51a655863a0a59c5b70128e7b4145bb Author: David Anderson Date: Sun Dec 26 14:18:27 2021 -0800 This is just a start with doxygen. new file: Doxyfile Found some typedefs and a struct here that are no longer used anywere, so removed from libdwarf.h Plus adding doxygen commands. modified: ../src/lib/libdwarf/libdwarf.h 2021-12-29: David Anderson commit 907225d2f3d1785db07e254aeb7389fc36f54ae1 offset = offset; appeared at around lines 1146 and 1205 and recent clang warns about them. Lines deleted. modified: src/bin/dwarfdump/print_frames.c 2021-12-26: David Anderson commit 130db599f5b4843a110527b72db0c6cab917f9bc Removed the 'if 0' code that was once necessary. We do not include dd_dwconf.[ch] in test_canonical.c modified: test/test_canonical.c 2021-12-26: David Anderson commit f7dfb630603ca4baf1e3c3b0b9e10566c306b795 Updated by 'make rebuild' to get the new version: 0.3.3 modified: ../src/bin/dwarfdump/dwarf_names.c modified: ../src/bin/dwarfdump/dwarfdump-af-table.h modified: ../src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: ../src/bin/dwarfdump/dwarfdump-ta-table.h modified: ../src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: ../src/bin/dwarfdump/dwarfdump-tt-table.h modified: ../src/lib/libdwarf/dwarf_names.c 2021-12-26: David Anderson commit fbcdc9ec5b3a88d30e29c25d1c219cf6c8d73741 Now with version 0.3.3 modified: libdwarf.pdf modified: libdwarfp.pdf 2021-12-26: David Anderson commit 194c1e882260a18900c95acb1738a67c2d2c2e7a Updated version to 0.3.3 modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.mm modified: doc/libdwarfp.mm modified: src/lib/libdwarf/libdwarf.h 2021-12-26: David Anderson commit 9d13137e5ebc96e2e06de82e32752db4173fb845 Now reference the new dd_canonical_append.[ch] modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am Separated _dwarf_canonical_append from dd_dwconf.[ch] into dd_canonical_append.[ch] new file: src/bin/dwarfdump/dd_canonical_append.c new file: src/bin/dwarfdump/dd_canonical_append.h Removed _dwarf_canonical_append modified: src/bin/dwarfdump/dd_dwconf.c modified: src/bin/dwarfdump/dd_dwconf.h Now uses dd_canonical_append.c,.h, not dd_dwconf.c,.h modified: test/CMakeLists.txt modified: test/test_canonical.c 2021-12-26: David Anderson commit b7848e06bc4f84a90bbb0377aa320f956afc2d52 Reformatted with black, a python reformatter modified: updatesemanticversion.py 2021-12-24: David Anderson commit f5477b747cd1c650ca933d2d1f17d623cc0cf3fc Trivial typo corrections. modified: libdwarf.mm 2021-12-22: David Anderson commit 89966beb45ef36bc393e184162470db58f8ddcb3 Up todate with git log modified: ChangeLog 2021-12-22: David Anderson A placeholder to start 2022 ChangeLog commit 3ce7a354202027e9403c3fc9681a16982eb47074 2021-12-22: David Anderson commit 3ce7a354202027e9403c3fc9681a16982eb47074 Updated and improved consistency between these two. modified: codingstyle.md modified: src/bin/dwarfdump/CODINGSTYLE 2021-12-22: David Anderson commit c8477173ad85bd58e3d5712d9f33e188aafb1bcb Now all the text tables used to generate .h and .c files are with the C code generating .c and .h. Moved out of the dwarfdump directory. modified: src/bin/attr_form/Makefile.am renamed: src/bin/dwarfdump/attr_formclass.list -> src/bin/attr_form/attr_formclass.list renamed: src/bin/dwarfdump/attr_formclass_ext.list -> src/bin/attr_form/attr_formclass_ext.list modified: src/bin/dwarfdump/Makefile.am modified: src/bin/tag_attr/Makefile.am renamed: src/bin/dwarfdump/tag_attr.list -> src/bin/tag_attr/tag_attr.list renamed: src/bin/dwarfdump/tag_attr_ext.list -> src/bin/tag_attr/tag_attr_ext.list modified: src/bin/tag_tree/Makefile.am renamed: src/bin/dwarfdump/dd_tag_common.c -> src/bin/tag_tree/tag_common.c renamed: src/bin/dwarfdump/tag_tree.list -> src/bin/tag_tree/tag_tree.list renamed: src/bin/dwarfdump/tag_tree_ext.list -> src/bin/tag_tree/tag_tree_ext.list 2021-12-22: David Anderson commit 2c542eaf7d13899d62afed57ec6d0cf88492aebf This is kep in the regressiontests content, we have no need for it here in code. deleted: src/bin/dwarfdump/testdwarfdump.conf 2021-12-21: David Anderson commit e7b9082f29b4edefbb4a2d2853a348b525791973 ChangeLog now brought up to date with source file renaming in dwarfdump. modified: ChangeLog 2021-12-21: David Anderson commit 67ca2c685feddf4c200bb03cfb9292c6d1518b00 This completes, for now, the dwarfdump source file renaming. No function names were changed (aside from tsearch, using #define in dd_tsearch.h) And there is no logic change. modified: Makefile.am modified: configure.ac modified: src/bin/attr_form/Makefile.am modified: src/bin/attr_form/attr_form_build.c new file: src/bin/builduritable/Makefile.am renamed: src/bin/dwarfdump/dd_uritablebuild.c -> src/bin/builduritable/uritablebuild.c renamed: src/bin/dwarfdump/glflags.c -> src/bin/dwarfdump/dd_glflags.c renamed: src/bin/dwarfdump/glflags.h -> src/bin/dwarfdump/dd_glflags.h renamed: src/bin/dwarfdump/globals.h -> src/bin/dwarfdump/dd_globals.h modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/dd_addrmap.c modified: src/bin/dwarfdump/dd_attr_form.c modified: src/bin/dwarfdump/dd_checkutil.c modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_compiler_info.c modified: src/bin/dwarfdump/dd_dwconf.c modified: src/bin/dwarfdump/dd_helpertree.c modified: src/bin/dwarfdump/dd_macrocheck.c modified: src/bin/dwarfdump/dd_makename.c modified: src/bin/dwarfdump/dd_naming.c modified: src/bin/dwarfdump/dd_sanitized.c modified: src/bin/dwarfdump/dd_section_bitmaps.c modified: src/bin/dwarfdump/dd_strstrnocase.c modified: src/bin/dwarfdump/dd_tag_common.c modified: src/bin/dwarfdump/dd_true_section_name.c modified: src/bin/dwarfdump/dd_uri.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_aranges.c modified: src/bin/dwarfdump/print_debug_gnu.c modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfdump/print_debug_sup.c modified: src/bin/dwarfdump/print_debugfission.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/bin/dwarfdump/print_hipc_lopc_attr.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfdump/print_llex_codes.c modified: src/bin/dwarfdump/print_loclists.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfdump/print_macinfo.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_origloclist_codes.c modified: src/bin/dwarfdump/print_pubnames.c modified: src/bin/dwarfdump/print_ranges.c modified: src/bin/dwarfdump/print_rnglists.c modified: src/bin/dwarfdump/print_section_groups.c modified: src/bin/dwarfdump/print_sections.c modified: src/bin/dwarfdump/print_static_funcs.c modified: src/bin/dwarfdump/print_static_vars.c modified: src/bin/dwarfdump/print_str_offsets.c modified: src/bin/dwarfdump/print_strings.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c modified: src/bin/dwarfdump/print_types.c modified: src/bin/dwarfdump/print_weaknames.c modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/Makefile.am modified: src/bin/tag_tree/tag_tree.c modified: test/helpertree_test.c modified: test/makename_test.c modified: test/section_bitmaps_test.c 2021-12-21: David Anderson commit 8ba6d77c77bfcb5646b7d97035c29e93e2e17e96 Renaming for name consistency in dwarfdump. renamed: src/bin/dwarfdump/helpertree.c -> src/bin/dwarfdump/dd_helpertree.c renamed: src/bin/dwarfdump/helpertree.h -> src/bin/dwarfdump/dd_helpertree.h renamed: src/bin/dwarfdump/macrocheck.c -> src/bin/dwarfdump/dd_macrocheck.c renamed: src/bin/dwarfdump/macrocheck.h -> src/bin/dwarfdump/dd_macrocheck.h renamed: src/bin/dwarfdump/opscounttab.c -> src/bin/dwarfdump/dd_opscounttab.c renamed: src/bin/dwarfdump/opscounttab.h -> src/bin/dwarfdump/dd_opscounttab.h Minor changes required as a result: modified: src/bin/buildopstab/Makefile.am modified: src/bin/buildopstab/buildopscounttab.c modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_hipc_lopc_attr.c modified: src/bin/dwarfdump/print_llex_codes.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfdump/print_macinfo.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_origloclist_codes.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/helpertree_test.c 2021-12-21: David Anderson commit bafcb2da90236352f9303dfbc1ffc9bed72f60fe Renamings forcing the other changes . renamed: src/bin/dwarfdump/section_bitmaps.c -> src/bin/dwarfdump/dd_section_bitmaps.c renamed: src/bin/dwarfdump/section_bitmaps.h -> src/bin/dwarfdump/dd_section_bitmaps.h renamed: src/bin/dwarfdump/strstrnocase.c -> src/bin/dwarfdump/dd_strstrnocase.c renamed: src/bin/dwarfdump/tag_common.c -> src/bin/dwarfdump/dd_tag_common.c renamed: src/bin/dwarfdump/tag_common.h -> src/bin/dwarfdump/dd_tag_common.h renamed: src/bin/dwarfdump/true_section_name.c -> src/bin/dwarfdump/dd_true_section_name.c renamed: src/bin/dwarfdump/uritablebuild.c -> src/bin/dwarfdump/dd_uritablebuild.c modified: src/bin/attr_form/Makefile.am modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_hipc_lopc_attr.c modified: src/bin/dwarfdump/print_llex_codes.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfdump/print_origloclist_codes.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/Makefile.am modified: src/bin/tag_tree/tag_tree.c modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/section_bitmaps_test.c 2021-12-21: David Anderson commit f31940c5ad21d9c58a390fb36f9679a9595bb11a File Renaming for naming consistency and clarity. renamed: src/bin/dwarfdump/dwarf_getopt.c -> src/bin/dwarfdump/dd_getopt.c renamed: src/bin/dwarfdump/dwarf_getopt.h -> src/bin/dwarfdump/dd_getopt.h modified: src/bin/dwarfdump/dd_makename.c renamed: src/bin/dwarfdump/dwarf_tsearch.h -> src/bin/dwarfdump/dd_tsearch.h renamed: src/bin/dwarfdump/dwarf_tsearchbal.c -> src/bin/dwarfdump/dd_tsearchbal.c renamed: src/bin/dwarfgen/dwarf_getopt.c -> src/bin/dwarfgen/dg_getopt.c renamed: src/bin/dwarfgen/dwarf_getopt.h -> src/bin/dwarfgen/dg_getopt.h These next two do not belong in libdwarf. deleted: src/lib/libdwarf/dwarf_getopt.c deleted: src/lib/libdwarf/dwarf_getopt.h Renaming things leads to lots of places that need a tiny modification. modified: src/bin/attr_form/Makefile.am modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/attr_formclass_ext.list modified: src/bin/dwarfdump/dd_addrmap.c modified: src/bin/dwarfdump/dd_attr_form.c modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/helpertree.c modified: src/bin/dwarfdump/macrocheck.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfgen/CMakeLists.txt modified: src/bin/dwarfgen/Makefile.am modified: src/bin/dwarfgen/dwarfgen.cc modified: src/bin/gennames/Makefile.am modified: src/bin/gennames/gennames.c modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/Makefile.am modified: src/bin/tag_tree/tag_tree.c modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/dwarf_tsearch.h modified: src/lib/libdwarf/dwarf_tsearchhash.c modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/dwarfdumpLinux.sh modified: test/dwarfdumpMacos.sh modified: test/dwarfdumpPE.sh modified: test/dwarfdumpsetup.sh modified: test/getopttest.c 2021-12-20: David Anderson commit 4e030c5f159849348acfd8328ccdfc69b539c020 modified: src/bin/attr_form/Makefile.am modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/dd_attr_form.c modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_compiler_info.c modified: src/bin/dwarfdump/dd_dwconf.c More renaming and altering use names. renamed: src/bin/dwarfdump/makename.c -> src/bin/dwarfdump/dd_makename.c renamed: src/bin/dwarfdump/makename.h -> src/bin/dwarfdump/dd_makename.h renamed: src/bin/dwarfdump/naming.c -> src/bin/dwarfdump/dd_naming.c renamed: src/bin/dwarfdump/naming.h -> src/bin/dwarfdump/dd_naming.h modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_aranges.c modified: src/bin/dwarfdump/print_debug_gnu.c modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfdump/print_debug_sup.c modified: src/bin/dwarfdump/print_debugfission.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/bin/dwarfdump/print_hipc_lopc_attr.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfdump/print_llex_codes.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfdump/print_macinfo.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_origloclist_codes.c modified: src/bin/dwarfdump/print_pubnames.c modified: src/bin/dwarfdump/print_section_groups.c modified: src/bin/dwarfdump/print_sections.c modified: src/bin/dwarfdump/print_static_funcs.c modified: src/bin/dwarfdump/print_static_vars.c modified: src/bin/dwarfdump/print_str_offsets.c modified: src/bin/dwarfdump/print_strings.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c modified: src/bin/dwarfdump/print_types.c modified: src/bin/dwarfdump/print_weaknames.c modified: src/bin/dwarfdump/tag_common.c modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_tree/Makefile.am modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/makename_test.c 2021-12-20: David Anderson commit 61c5addad4eda58cad5cd5d7100f01f62b25305e A fix because make dist was broken by renaming. modified: src/bin/dwarfdump/Makefile.am 2021-12-20: David Anderson commit d080afc3f86cb254d39b4efd694359b14a0480f6 modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_common.c Another set of file names prefixed with dd_ renamed: src/bin/dwarfdump/defined_types.h -> src/bin/dwarfdump/dd_defined_types.h renamed: src/bin/dwarfdump/dwconf.c -> src/bin/dwarfdump/dd_dwconf.c renamed: src/bin/dwarfdump/dwconf.h -> src/bin/dwarfdump/dd_dwconf.h renamed: src/bin/dwarfdump/dwconf_using_functions.h -> src/bin/dwarfdump/dd_dwconf_using_functions.h modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/glflags.c modified: src/bin/dwarfdump/globals.h modified: src/bin/dwarfdump/print_frames.c modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/test_canonical.c 2021-12-20: David Anderson commit 1fb7c5ac8c433af0768a644797786918717d26fe modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am File renaming for consistency forces the changes. renamed: src/bin/dwarfdump/command_options.c -> src/bin/dwarfdump/dd_command_options.c renamed: src/bin/dwarfdump/command_options.h -> src/bin/dwarfdump/dd_command_options.h renamed: src/bin/dwarfdump/compiler_info.c -> src/bin/dwarfdump/dd_compiler_info.c renamed: src/bin/dwarfdump/compiler_info.h -> src/bin/dwarfdump/dd_compiler_info.h modified: src/bin/dwarfdump/dwarfdump.c 2021-12-20: David Anderson commit 09df54da594e7d7922826c1681c4204c5670cf5e modified: src/bin/attr_form/Makefile.am modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am The renaming for consistency forces the other changes renamed: src/bin/dwarfdump/addrmap.c -> src/bin/dwarfdump/dd_addrmap.c renamed: src/bin/dwarfdump/addrmap.h -> src/bin/dwarfdump/dd_addrmap.h renamed: src/bin/dwarfdump/attr_form.c -> src/bin/dwarfdump/dd_attr_form.c renamed: src/bin/dwarfdump/attr_form.h -> src/bin/dwarfdump/dd_attr_form.h modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c 2021-12-20: David Anderson commit d5dd38fac03ae74422893228d0ec11f6db6cea87 Beginning wholesale renaming of dwarfdump source file] names to begin with dd_ modified: src/bin/attr_form/Makefile.am modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/command_options.c The renaming forces many changes. renamed: src/bin/dwarfdump/checkutil.c -> src/bin/dwarfdump/dd_checkutil.c renamed: src/bin/dwarfdump/checkutil.h -> src/bin/dwarfdump/dd_checkutil.h renamed: src/bin/dwarfdump/common.c -> src/bin/dwarfdump/dd_common.c renamed: src/bin/dwarfdump/common.h -> src/bin/dwarfdump/dd_common.h renamed: src/bin/dwarfdump/esb.c -> src/bin/dwarfdump/dd_esb.c renamed: src/bin/dwarfdump/esb.h -> src/bin/dwarfdump/dd_esb.h renamed: src/bin/dwarfdump/esb_using_functions.h -> src/bin/dwarfdump/dd_esb_using_functions.h modified: src/bin/dwarfdump/dd_sanitized.c modified: src/bin/dwarfdump/dd_uri.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/dwconf.c modified: src/bin/dwarfdump/glflags.c modified: src/bin/dwarfdump/globals.h modified: src/bin/dwarfdump/macrocheck.c modified: src/bin/dwarfdump/naming.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_aranges.c modified: src/bin/dwarfdump/print_debug_gnu.c modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfdump/print_debug_sup.c modified: src/bin/dwarfdump/print_debugfission.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/bin/dwarfdump/print_hipc_lopc_attr.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfdump/print_llex_codes.c modified: src/bin/dwarfdump/print_loclists.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfdump/print_macinfo.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_origloclist_codes.c modified: src/bin/dwarfdump/print_pubnames.c modified: src/bin/dwarfdump/print_ranges.c modified: src/bin/dwarfdump/print_rnglists.c modified: src/bin/dwarfdump/print_sections.c modified: src/bin/dwarfdump/print_static_funcs.c modified: src/bin/dwarfdump/print_static_vars.c modified: src/bin/dwarfdump/print_str_offsets.c modified: src/bin/dwarfdump/print_strings.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c modified: src/bin/dwarfdump/print_types.c modified: src/bin/dwarfdump/print_weaknames.c modified: src/bin/dwarfdump/true_section_name.c modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/Makefile.am modified: src/bin/tag_tree/tag_tree.c modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/testesb.c 2021-12-20: David Anderson commit 31467f0faa0ac37d2b84609fc4e29b8fcb7d73ba copyright year to 2021. modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_util.c 2021-12-20: David Anderson commit 9e59de10790ba8b449eadcf4c8effdfbfed31976 Regenerated with new LLVM content modified: src/bin/dwarfdump/dwarf_names.c modified: src/lib/libdwarf/dwarf_names.c Some new LANG codes. Minor formatting improvements. modified: src/lib/libdwarf/dwarf.h Now handling DW_FORM_LLVM_addrx_offset. modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_util.c 2021-12-19: David Anderson commit 9cd3621d9250ede5ba259695adb336ab1f252029 Corrected commentary on DW_TAG_template* defines. modified: dwarf.h 2021-12-18: David Anderson commit a281874a55a149fd678194348492af5b8d3a13c5 Cobra noticed some possible issues, so here we simplify the logic and add the default: case to switches. modified: src/bin/buildopstab/buildopscounttab.c modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/jitreader.c modified: src/bin/dwarfexample/simplereader.c Removed some if 0 dead code from here. modified: src/bin/dwarfexample/findfuncbypc.c 2021-12-18: David Anderson commit 448e9fbcde0a504324cfdc712036e17b7d309aa7 Removing trailing whitespace and eliminating duplicated blank lines. modified: src/lib/libdwarfp/dwarf_pro_frame.h modified: src/lib/libdwarfp/dwarf_pro_line.h modified: src/lib/libdwarfp/dwarf_pro_opaque.h modified: src/lib/libdwarfp/libdwarfp.h 2021-12-18: David Anderson commit b8efa9f750d381c456de97bd976324da1c0e469c Eliminating an strncpy, initializing local variable. modified: src/bin/dwarfdump/dd_regex.c Moved error handling up a few lines, clarifying the logic, but not changing the logic. modified: src/bin/dwarfdump/print_die.c 2021-12-18: David Anderson commit fb277879ee4cf6155d0776a106cab76948d2f834 latest git log entries now in ChangeLog modified: ChangeLog 2021-12-18: David Anderson commit 7b702f45602b4b7a8513c0f421af5476e54c7448 Minor changes based on observations Cobra made about the source. No change in what libdwarf does. modified: dwarf_debugnames.c modified: dwarf_form.c modified: dwarf_frame.c modified: dwarf_macro.c modified: dwarf_object_detector.c modified: dwarf_peread.c Here, also noticed a pointless local variable and memcpy into and then out of to the real target. Removed the unneeded lines. modified: dwarf_xu_index.c 2021-12-18: David Anderson commit 57ad9b599e4d0f662ca262f0c0804fbc3d325357 More information now. modified: codingstyle.md 2021-12-18: David Anderson commit 8081ae04e0d437c80c8720f6c59ab60813fbb2ad Added commentary. modified: src/lib/libdwarf/dwarf_leb.c Now tests more corner cases where more bits presented than fit in 64bits. Signed and unsigned. modified: test/dwarf_leb_test.c 2021-12-17: David Anderson commit f180f6003164b67613369765a2eaba04b0d83f5a Fixed reference to tsearch directory for the other tsearch versions available. It's now in a separate project. modified: codingstyle.md 2021-12-17: David Anderson commit b1b95f91ab6dc9503401dd9a8272c5459ec2d92d Accidental leftover of a term removed. modified: codingstyle.md 2021-12-17: David Anderson commit 3286355c73ccdfa2ff726b1097a0f3a3ef443ea9 Refined the text to make it look better. modified: codingstyle.md 2021-12-17: David Anderson commit 297cc6c1ee35268f3cf395a116816a78fa9a1cf5 Changed a debug message to just be informative. modified: dwarfgen/CMakeLists.txt Removed leftover debug printf lines. modified: ../lib/libdwarf/dwarf_leb.c 2021-12-17: David Anderson commit 6949228a8f3e7072969135ae7264e08ef06189c3 Now with the dwarf_safe_strcpy.c and dd_safestrcpy.c files listed. modified: src/bin/dwarfdump/CMakeLists.txt modified: src/lib/libdwarf/CMakeLists.txt New test for safe_strcpy to match the configure test set. modified: test/CMakeLists.txt 2021-12-17: David Anderson commit 15b7443b40164e2fcb2d127ed4b28b1060906364 Fixed typos in the test program. modified: test/test_safe_strcpy.c 2021-12-17: David Anderson commit bf7a17372b6f6d1bcf39e290dd14979cd6f2bdce Added new tests that showed errors in decoding leb or sleb with padding. modified: test/dwarf_leb_test.c Corrected leb sleb decoding modified: src/lib/libdwarf/dwarf_leb.c 2021-12-17: David Anderson commit 54eec9c3cf737c644a4b4431e68ccdca38509b42 codingstyle.txt renamed and revised as codingstyle.md modified: Makefile.am 2021-12-17: David Anderson commit 270a178cf523690f77b6221136074b1d84d4939c Now we do not need this. See the codingstyle.md deleted: codingstyle.txt 2021-12-17: David Anderson commit b0202c0c688a4babe8ceb24668a4660625fbf7d5 Moving to md for the comments new file: codingstyle.md 2021-12-15: David Anderson commit 6375d89a48c22c7a9525fecb48bd90b19427ba93 Bringing ChangeLog to have latest git log data. modified: ChangeLog 2021-12-15: David Anderson commit 2161cbe6b3d775dbb51f3a2b1c55000b8c961d34 Now this one correct using _dwarf_safe_strcpy instead of strcat. modified: gennames.c 2021-12-15: David Anderson commit 248f171fa5420deb60e03f3a7623c9596e79f899 Removing all dwarfdump and tests of strcpy and strncpy in favor of dd_safe_strcpy. DO NOT USE THIS COMMIT. modified: src/bin/attr_form/Makefile.am modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/command_options.c modified: src/bin/dwarfdump/compiler_info.c modified: src/bin/dwarfdump/dd_regex.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/dwconf.c modified: src/bin/dwarfdump/glflags.c modified: src/bin/dwarfdump/globals.h modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/gennames/Makefile.am modified: src/bin/gennames/gennames.c modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/Makefile.am modified: src/bin/tag_tree/tag_tree.c modified: test/Makefile.am 2021-12-15: David Anderson commit ed0be6942d79def1b7466369b4ae199346e946a2 Now with dwarf_safe_strcpy.[ch] modified: src/lib/libdwarf/Makefile.am All uses of strcpy and strncpy replaced with calls to _dwarf_safe_strcpy(). Much better fit with what we do in libdwarf. modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_harmless.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_macro5.c modified: src/lib/libdwarf/dwarf_object_read_common.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_peread.c 2021-12-15: David Anderson commit 0456103f5dbe5255b564bdf6d1562ac0ef686bf5 Working version, safely replacing strcpy and strncpy. modified: src/lib/libdwarf/dwarf_safe_strcpy.c modified: src/lib/libdwarf/dwarf_safe_strcpy.h Added access to dwarf_safe_strcpy.[ch] for test_safe_strcpy.c modified: test/Makefile.am Added access to dwarf_safe_strcpy.[h] modified: test/test_errmsglist.c modified: test/test_linkedtopath.c New test for _dwarf_safe_strcpy function new file: test/test_safe_strcpy.c 2021-12-15: David Anderson commit 489fde55cc5a081b3b2229569e1a37d19a582ed1 Not used yet. Soon to be used. new file: dwarf_safe_strcpy.c new file: dwarf_safe_strcpy.h 2021-12-15: David Anderson commit 544971b70a3daf87c313489e3bb69aef4639a8db Refined the comments. modified: dd_safe_strcpy.c 2021-12-15: David Anderson commit a5f8a1d8d9d5367d41c76b423afe733df38653ea Replacing the old safe_strcpy shortly. This is not yet in use. new file: dd_safe_strcpy.c new file: dd_safe_strcpy.h 2021-12-14: David Anderson commit 52c8d9f512abb5c5b5d0b3314eb5b61a64cb67a3 ChangeLog updated from git log modified: ChangeLog 2021-12-14: David Anderson commit 7f84ab9a1df3d70e3e3b400bd697439d5ef0ff13 All instances of strcpy calls have been replaced by _safe_strcpy modified: src/bin/dwarfdump/print_frames.c All instances of strcpy calls have been replaced by _dwarf_safe_strcpy modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_global.h modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_macro5.c modified: src/lib/libdwarf/dwarf_object_read_common.c modified: src/lib/libdwarf/dwarf_opaque.h 2021-12-14: David Anderson commit b1f5486b54093afe31fb221ad20c9c431a9ec05e Now with TRIVIAL_NAMES flag set it uses the latest safe_strcpy() source from dwarfdump No more strcpy here at all. modified: src/bin/dwarfdump/glflags.c 2021-12-14: David Anderson commit fb762a7089906f75ca3201021cbaca86268d5765 Removing trailing whitespace in everything below. Fixing a small number of indentation errors. Removing all use of strcpy() from dwarfdump modified: src/bin/dwarfdump/attr_form.c modified: src/bin/dwarfdump/checkutil.c modified: src/bin/dwarfdump/command_options.c modified: src/bin/dwarfdump/compiler_info.c modified: src/bin/dwarfdump/dd_regex.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/glflags.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_static_vars.c modified: src/bin/dwarfdump/true_section_name.c Just the whitespace/indent fixes modified: src/lib/libdwarf/dwarf.h modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_global.h modified: src/lib/libdwarf/dwarf_harmless.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_object_read_common.h modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_print_lines.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_ranges.c modified: src/lib/libdwarf/dwarf_string.c modified: src/lib/libdwarf/dwarf_tied.c modified: src/lib/libdwarf/libdwarf.h 2021-12-14: David Anderson commit a3daaaf0de40c03ba4bdefbe8e76ddc4b9fd665e Ensuring macro definitions using their args put () arount each use. Add default:break where appropriate. Simplify checks for DW_DLV_ERROR/NO_ENTRY where appropriate. modified: ../../bin/dwarfdump/compiler_info.c modified: ../../bin/dwarfdump/dd_regex.c modified: ../../bin/dwarfdump/dwarfdump.c modified: ../../bin/dwarfdump/print_abbrevs.c modified: ../../bin/dwarfdump/print_die.c modified: ../../bin/dwarfdump/print_hipc_lopc_attr.c modified: ../../bin/dwarfdump/print_static_vars.c modified: ../../bin/dwarfdump/true_section_name.c 2021-12-14: David Anderson commit f1fb333b4329cccd73ae12bbe359f99ac577a8c1 Small changes to harden the code as recommended by cobra. No change in logic, just improving readability. modified: src/bin/dwarfdump/attr_form.c modified: src/bin/dwarfdump/checkutil.c modified: src/bin/dwarfdump/dwarfdump.c 2021-12-14: David Anderson commit 21b156df60a96c1a7a70f279791669b9d5967695 Now updates dwarf_names in both dwarfdump and libdwarf directories. Was a bug not to do that. modified: src/bin/gennames/Makefile.am Regenerated. modified: src/bin/dwarfdump/dwarf_names.c 2021-12-14: David Anderson commit 0ac94309cce195b3bf4810aedf35b572d3874369 Bringing ChangeLog up to date with git log. modified: ChangeLog 2021-12-14: David Anderson commit 1b15d2766506a28e47b59d882086f939cd7ab3d0 Using () around uses of the arguments inside macros with arguments. Fixing cobra complaints with missing else clause where that makes sense. modified: ../../lib/libdwarf/dwarf_elfstructs.h modified: ../../lib/libdwarf/dwarf_global.h modified: ../../lib/libdwarf/dwarf_line.h modified: ../../lib/libdwarf/dwarf_line_table_reader_common.h modified: ../../lib/libdwarf/dwarf_macho_loader.h modified: ../../lib/libdwarf/dwarf_opaque.h modified: ../../lib/libdwarf/dwarf_pe_descr.h modified: ../../lib/libdwarf/dwarf_tied_decls.h modified: ../../lib/libdwarf/dwarf_util.h modified: ../../lib/libdwarf/libdwarf_private.h 2021-12-14: David Anderson commit 4d5566123c687e1f962af0f6ad14c45fc198c48a Correcting macros so arguments have () around argument use inside the macro definition. Added default: break; to switch statements for clarity to the reader. Slight modifications of some DW_DLV_ERROR tests for greater clarity. This eliminates all the .c warnings cobra emits that I think should be eliminated. modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_form_class_names.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_harmless.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_macro5.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_peread.c 2021-12-14: David Anderson commit 6881dc7f9a6bf89ef4a0a1484a6b4193642045f8 Regenerated with the default: break; in each switch(). modified: src/lib/libdwarf/dwarf_names.c 2021-12-14: David Anderson commit ae61bd5195410f00ccc5a9d3828d18144f95a4b5 In all the switch() statements we generate here add a default: break; to avoid cobra warnings and clarify for the reader that the code is intentional as written.. modified: src/bin/gennames/gennames.c 2021-12-13: David Anderson commit 1ff4e2d7c0e79ad0579e73fe7cdec716c9fcf80d Clearing up some things cobra noted. Simplifying by unnesting if where nesting was silly (Involving DW_DLV_ERROR DW_DLV_NO_ENTRY). Ensuring macros have use of the arguments in () Adding default: break; in switch statements without a default. Putting for loop control variable updates in the third part of the for rather than in the body. modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_print_lines.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_ranges.c modified: src/lib/libdwarf/dwarf_str_offsets.c modified: src/lib/libdwarf/dwarf_string.c modified: src/lib/libdwarf/dwarf_tied.c The above plus noted the dereference of extension_size was preceded by testing offset_size in internal_load_rnglists_contexts(). Fixed. modified: src/lib/libdwarf/dwarf_rnglists.c 2021-12-13: David Anderson commit d8595aebd4255189c56299aa1571e71b0eebd798 Minor changes for clarity in the tests for DW_DLV_ERROR, DW_DLV_NO_ENTRY. modified: dwarf_form.c Macros now () around each use of names in the macro argument list modified: dwarf_gdbindex.c 2021-12-13: David Anderson commit 3d6feccf7ca772268495d9dd18d3496ed92898ca Now in the interals of macros we refer to the incoming name in () as is best practice. However, when a macro here calls *another* macro here those references must not have a () wrapper. modified: dwarf_util.h 2021-12-13: David Anderson commit 801575b4b7d7ece387a8294e59c4458254f4f2de Alter the macro definitions so that the arguments have () at the point of use in the macro. A well known best-practice. modified: libdwarf_private.h 2021-12-13: David Anderson commit f44fb8eba6472223d6a7973e8ce9fa1949bc0333 Deleted macro ASNAR definitions, they are not used in this file. modified: src/bin/dwarfdump/print_frames.c 2021-12-12: David Anderson commit c5956804b41f3d54a0980f0959d04b0db5160606 Clarify update to 12 December date and regenerate. modified: libdwarf.mm modified: libdwarf.pdf There is no logic change here. Just changes to avoid common errors. Add empty else {} to clarify intent. modified: src/lib/libdwarf/dwarf_debuglink.c Add default: break; to clarify entent where there was no default specified in a switch() modified: src/lib/libdwarf/dwarf_die_deliv.c Add empty else {} to clarify intent. modified: src/lib/libdwarf/dwarf_dsc.c Add default: break; to clarify entent where there was no default specified in a switch() modified: src/lib/libdwarf/dwarf_elf_rel_detector.c Add () where macro arguments used in the macro go guarantee no surprises. modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_error.h Clarify functions that never return DW_DLV_NO_ENTRY. modified: src/lib/libdwarf/dwarf_form.c Add () where macro arguments used in the macro modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_reading.h modified: src/lib/libdwarf/dwarf_string.c Add default: break; to clarify entent where there was no default specified in a switch() modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h Renamed static dump_bytes.Is #if 0, so not important. modified: src/lib/libdwarf/dwarf_macro5.c Moved the loop initializer out to before loop to clarify intent. modified: src/lib/libdwarf/dwarf_util.c 2021-12-12: David Anderson commit 5538965c68fdf0a4a7f383dceeb6c3670cf0e3f1 Clarify return values of some functions. modified: doc/libdwarf.mm 2021-12-06: David Anderson commit 9f63003df053dacbaa72f799a9690d4047de52ef Bringing up to date from git log modified: ChangeLog Regenerated (with new release id 0.3.2) modified: doc/libdwarf.pdf modified: doc/libdwarfp.pdf Fixed a typo in usage message. modified: doc/pdfbld.sh 2021-12-05: David Anderson commit a1707f52c49b42723c14e6dc222d9d7b43f54a62 Removing reference to a no-longer-present directory. modified: COPYING 2021-12-05: David Anderson commit 919f5bb5d1fc74112ea7131c63cb39e71f2934db Updated, adding Vincent Torri modified: AUTHORS 2021-12-05: David Anderson commit fe4f0b56d60f7602cf691936ac5c8cfed1d600cd Now the comments mention the release in the post 0.3.1 source, that is, 0.3.2. modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2021-12-05: David Anderson commit 62ea8b2e4df05287ce2908ab490904edd0074f6e Fixed some out of date comments to mention latest release, 0.3.1 modified: README modified: README.md 2021-12-05: David Anderson commit 93941b990628af67318d0ad1eb315f2bba6968b0 When an object file is severely corrupt the library would sometimes emit a strange final error DW_DLE_Error (0) following a more normal looking error. Now the strange one is suppressed. modified: src/lib/libdwarf/dwarf_init_finish.c 2021-12-05: David Anderson commit de95d35f8b9c582fc481cb8f0abce413e4b7d58a Update version 0.3.1 -> 0.3.2 modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.mm modified: doc/libdwarfp.mm modified: src/lib/libdwarf/libdwarf.h 2021-12-04: David Anderson commit af059043c3c475362072c70b385fce1306eb05dd Now these have identical content and an updated target version 0.3.1. modified: README modified: README.md Removing a comment line. modified: autogen.sh 2021-11-24: David Anderson commit 5ac807035df091290279097ad6a81c154106ce7e Git log for recent updates prepended. modified: ChangeLog 2021-11-24: David Anderson commit 29a39c12bb818c552b1575b28ebef1a8c4089b04 Now builds a new opscounttab which has the change in the size of the expression stack for each DW_OP. To enable the print_die.c changes. modified: src/bin/buildopstab/buildopscounttab.c modified: src/bin/dwarfdump/opscounttab.c (regenerated) modified: src/bin/dwarfdump/opscounttab.h (new field added) Unless the expression is trivial printing expressions (DW_OP_swap etc) -v -i now adds a line like DW_OPs= 13 maxstackdepth= 4 endingstackdepth= 3 at the end of the list of DW_OP expression operations as a shorthand for the instructions and their use of an expression stack. If there are expression loops It adds loopcount= to the end of the line (counting the instances of a DW_OP_bra or DW_OP_skip in a negative direction). modified: src/bin/dwarfdump/print_die.c The old names of these functions were a bit misleading. They are for all expressions. dwarfdump_print_location_operations -> dwarfdump_print_expression_operations print_location_operations -> print_expression_operations modified: src/bin/dwarfdump/esb_using_functions.h modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_frames.h modified: src/bin/dwarfdump/print_hipc_lopc_attr.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c 2021-11-23: David Anderson commit f3e04e9414fb7ffa10265e2dbca56d2ecb9ada29 Minor tweaks to the vulerabilitie from 2020 modified: bugxml/data.txt 2021-11-22: David Anderson commit 145d3f6af7314dfb6642cd08eb6b0e0ab0bb0524 Now with oss.chromium.org references shown where appropriate. modified: data.txt 2021-11-21: David Anderson commit 9e31d015a40fa1363f9dbf5de1eba8210b72b171 Up to date with git log. modified: ChangeLog 2021-11-21: David Anderson commit 874f6ba514e10ae3df72dfb6b7b549509208d054 Now with gitfixid for ossfuzz41240. modified: bugxml/data.txt 2021-11-21: David Anderson commit a120c808234060c3c9b1872ab9a059aa1ac70b1d This is a fix for the fuzz attack oss-fuzz-41240. Declaring an ERROR if the VirtualSize field value is >= the object file size. modified: src/lib/libdwarf/dwarf_errmsg_list.h modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/libdwarf.h 2021-11-20: David Anderson commit 6aff30a67168cf1d89ddc58eb13dc9c70fa2301e Corrected the dates to all be iso extended form (example: 2020-01-02) modified: data.txt 2021-11-20: David Anderson commit 4efcd47f599233e8254736f66d4fbe05c2435d88 version: 4.18 20 November 2021 0.3.1 This adds some introductory material on Error Handling. modified: doc/libdwarf.mm regenerated modified: doc/libdwarf.pdf 2021-11-20: David Anderson commit 259cb5fa805f2854a507fe6c33453d187fd6b917 oss-fuzz 40802 is now fixed and the fix commit id and fix date are filled in. modified: bugxml/data.txt 2021-11-19: David Anderson commit 6a6567a7c439cbd5fe97001e129ee84c1ac9903d Previous commit...not good. This repairs the damage while keeping the dwarf_object_init_b code in the clearer style. modified: src/lib/libdwarf/dwarf_init_finish.c 2021-11-19: David Anderson commit 19f0864f40b8a3155b2920014e32f40017da7013 Now reflects latest change for oss-fuzz-40802 testcase. modified: ChangeLog 2021-11-19: David Anderson commit adf4dae25b39039f1821b095688c00f3010e1d37 This is intended to fix oss-fuzz-40802 though one cannot be sure till its tested using clang 14.0 to build libdwarf. Heavily revised dwarf_object_init_b() for greater clarity and precision. modified: dwarf_init_finish.c 2021-11-15: David Anderson commit b4ef1850a66940b70596e3db6ca3cbf7da47cd6a The emergency printf (which usually means bad behavior by libdwarf callers) now reports the name and number of the detected error instead of just the error number. On stderr. Except in one emergency case the library returns errors. But sometimes it has no way to do so. modified: dwarf_error.c 2021-11-12: David Anderson commit 9c1d59c8ece7174e63475de65c7bdbe07089569d Adding gitfixid: to oss-fuzz-40801 oss-fuzz-40799 reports. modified: data.txt 2021-11-12: David Anderson commit 1bb2cae0ed9c9dbbb88b84dd5e0506b34a007dc1 Updated from git log modified: ChangeLog Documented git version with fixes to oss-fuzz-40895 oss-fuzz-40896 modified: bugxml/data.txt 2021-11-12: David Anderson commit b7a119dc07c502c1334bcbf8dd04ca0e4d5f6ab6 Start of new bug entries. oss-fuzz-40895 oss-fuzz-40896 modified: ../../../bugxml/data.txt Fixes oss-fuzz-40896 oss-fuzz-40895, which involved corrupted Elf object files. modified: dwarf_die_deliv.c modified: dwarf_elf_load_headers.c modified: dwarf_errmsg_list.h modified: libdwarf.h 2021-11-10: David Anderson commit 00c21b50764440a20545aa89da0f73c5ad365245 Fixed indents, trailing whitespace and other things in the libdwarf codingstyle.txt document. No change in logic or message content. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/esb.c modified: src/bin/dwarfdump/print_aranges.c modified: src/bin/dwarfdump/print_debug_sup.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_static_vars.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/simplereader.c modified: src/bin/dwarfgen/createirepformfrombinary.cc modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/bin/dwarfgen/dwarf_getopt.c modified: src/bin/dwarfgen/dwarfgen.cc modified: src/bin/dwarfgen/irepattrtodbg.cc modified: src/bin/dwarfgen/ireptodbg.cc modified: src/bin/gennames/gennames.c modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/tag_tree.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_locationop_read.c modified: src/lib/libdwarfp/dwarf_pro_alloc.c modified: src/lib/libdwarfp/dwarf_pro_arange.c modified: src/lib/libdwarfp/dwarf_pro_die.c modified: src/lib/libdwarfp/dwarf_pro_dnames.c modified: src/lib/libdwarfp/dwarf_pro_error.c modified: src/lib/libdwarfp/dwarf_pro_forms.c modified: src/lib/libdwarfp/dwarf_pro_frame.c modified: src/lib/libdwarfp/dwarf_pro_init.c modified: src/lib/libdwarfp/dwarf_pro_line.c modified: src/lib/libdwarfp/dwarf_pro_log_extra_flag_strings.c modified: src/lib/libdwarfp/dwarf_pro_macinfo.c modified: src/lib/libdwarfp/dwarf_pro_reloc.c modified: src/lib/libdwarfp/dwarf_pro_reloc_stream.c modified: src/lib/libdwarfp/dwarf_pro_reloc_symbolic.c modified: src/lib/libdwarfp/dwarf_pro_section.c modified: src/lib/libdwarfp/dwarf_pro_types.c 2021-11-10: David Anderson commit 50f94dac7c890c8f7504c407e746585caa522b94 Now in html it counts the records (N) and shows the number (1-N) in each record title. modified: bugrecord.py modified: readbugs.py 2021-11-09: David Anderson commit c361a7eb576dbaad2b5d826d3651433c66f10d3c a duplicated DW20....id and one now is a later id.. modified: data.txt 2021-11-09: David Anderson commit b5d43716e20d54b5308a7aacff846346dee3389a All know data on CVE has been incorporated. modified: data.txt 2021-11-09: David Anderson commit 834c4557ce37074d71ca38494f8ba7952e000fbe More CVE updates from the past. modified: data.txt 2021-11-09: David Anderson commit c4a3315025b3e1e86aed10195be9957adf1e2218 Working through CVE list, adding data here. modified: data.txt 2021-11-08: David Anderson commit 9770b2cc4812857022a8e147bdfe1f102adba382 Polishing the records on oss-fuzz tests. modified: bugxml/data.txt Copyright accidentally slighly mangled. Fixed. modified: src/lib/libdwarf/dwarf_machoread.c 2021-11-08: David Anderson commit cd021a1311572d4f9bb37b0b808685a5ed84bcc3 Working toward complete reporting of the oss-fuzz reports. modified: bugxml/data.txt Corrected a test for a section group section-reference so it catches a section number just one too big. modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2021-11-07: David Anderson commit 732c3509ffaa4b1aa70458c2ad568f55c6ae8e32 Updating info on oss-fuzz-40731. modified: bugxml/data.txt 2021-11-07: David Anderson commit eeec32b6f674efa8eacc72c656fc9a2f44f8e482 Logging fix to oss-fuzz-40729 modified: data.txt 2021-11-07: David Anderson commit 94dece3ce0f030d06da442a103bd6a5301410b25 oss-fuzz 40729. The test object is MachO 64 and corrupted header records were not being detected. Two new error codes added so the error values more meaningful: DW_DLE_MACHO_CORRUPT_COMMAND DW_DLE_MACHO_CORRUPT_SECTIONDETAILS modified: dwarf_errmsg_list.h modified: dwarf_machoread.c modified: libdwarf.h 2021-11-07: David Anderson commit 477aedeebeb0d694dfc44d6bbf20fd58a5facb69 All new git log contents prepended here. modified: ChangeLog 2021-11-07: David Anderson commit 5e636b1e9e20fadd034ed96475833d44c18c5749 Now version 4.17 All example code is now presented in the same formatting style and all examples are allocated figure names and numbers. modified: libdwarf.mm regenerated. modified: libdwarf.pdf 2021-11-06: David Anderson commit 30132d513f7566097bf3a9ccd2e093e3fe076f86 Removed a mistaken new entry. modified: data.txt 2021-11-06: David Anderson commit a8c5534343ba861bcb8416927d49c177f50b7017 Now with a new document section titled "Private vs Public Functions". modified: libdwarf.mm modified: libdwarf.pdf 2021-11-06: David Anderson commit f23c74a0820a65add86256c985561aac11c28852 Refinded the wording on the ret_dbg argument to dwarf_init_path() etc. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf Made calls to dwarf_init_path() etc safer by removing an accidental trap for folks passing in a non-null dbg pointer through ret_dbg argument. modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_init_finish.c 2021-11-06: David Anderson commit 65b3214e5c11f7af11482d6874284f1831c0fd00 Fixing an issue with xml generation. modified: bugxml/bugrecord.py Minor updates modified: bugxml/data.txt 2021-11-06: David Anderson commit f69bd9d47836e670d725d789dd361d33e78ce716 Now Rev 4.16 6 November 2021. Added a new document section "Private vs Public Functions" to make it clear only functions beginning with "dwarf_" are public and callable. If libdwarf built as an archive it is up to callers to not violate this rule. If libdwarf built as a shared object (.so or .dll) the build arranges that only the public functions can be called (using gcc/clang -fvisibility where applicable). modified: doc/libdwarf.mm Regenerated. modified: doc/libdwarf.pdf 2021-11-05: David Anderson commit 98bd6d99d52a0895daf353f6fd25061bc5a1a5a9 Added DW202111-002 modified: data.txt 2021-11-04: David Anderson commit 09ded6dd0c70e9db859529be1a4635e316693ef0 Now finds the semantic version in the .mm files and updates it modified: tools/updatesemanticversion.py Now both have the semantic version. modified: doc/libdwarf.mm modified: doc/libdwarfp.mm Regenerated modified: doc/libdwarf.pdf modified: doc/libdwarfp.pdf 2021-11-04: David Anderson commit 9e3c6a8ec7127a116a19473bf8e30cc0a55ac604 Updated ChangeLog with git data. Completed updating the web bugxml data. modified: ChangeLog modified: bugxml/data.txt 2021-11-04: David Anderson commit b40f7e291216e771185f62292dd6304b5a662926 Enhanced the check for corrupt object file for ossfuzz40663 modified: src/lib/libdwarf/dwarf_machoread.c 2021-11-04: David Anderson commit 3c8151acf0ff408c11d2b4680e73dd5085ba3cdd Adding field fuzzer: to record the id the fuzzer assigned. modified: bugxml/bugrecord.py modified: bugxml/data.template modified: bugxml/data.txt modified: bugxml/readbugs.py 2021-11-04: David Anderson commit 8ac5923bcce9a8b57a4aa8d5820024064b4f9e41 Fixing ClusterFuzz issue 40663 Adding a new error code DW_DLE_MACHO_CORRUPT_HEADER modified: src/lib/libdwarf/dwarf_errmsg_list.h modified: src/lib/libdwarf/libdwarf.h Ensure the errcode from dwarf_init_path_dl gets turned into a Dwarf_Error modified: src/lib/libdwarf/dwarf_generic_init.c Now checks the command count and sizeofcmds for basic sanity, catching badly corrupt objects.. modified: src/lib/libdwarf/dwarf_machoread.c 2021-11-04: David Anderson commit eb6a3535595fcb3529b8690aa5725bafe1293230 Now reports a correct error if in process_one_file() detects an error, cleans up the error, and returns DW_DLV_NO_ENTRY a corrupt mach-o object file was previously not properly reported. modified: dwarfdump.c 2021-11-04: David Anderson commit 71764671216985fe7df2546a73d67566f11e5209 Now emphasizes that dwarf_get_frame_instruction() is fine unless you want frame details for a Heterogenous Debugging object file (and in that case you know you need it). modified: doc/libdwarf.mm modified: doc/libdwarf.pdf Corrected the handling of the new frame instruction DW_CFA_LLVM_def_aspace_cfa_sf. modified: src/bin/dwarfdump/print_frames.c modified: src/lib/libdwarf/dwarf_frame.c 2021-11-03: David Anderson commit 6910ffb1bc3f79f944ec6da14f17ac7377340043 Trivial changes attempting to eliminate groff complaints building the pdf. It reads better, but the complaints are not fixed. modified: libdwarf.mm modified: libdwarf.pdf 2021-11-03: David Anderson commit ec885f887ad2a805630141b2f0c682af26f0e470 Document the new function dwarf_get_frame_instruction_a() (identical to dwarf_get_frame_instruction() except adding one new argument). modified: doc/libdwarf.mm modified: doc/libdwarf.pdf Now with support for DW_CFA_LLVM_def_aspace_cfa[_sf] modified: src/bin/dwarfdump/print_frames.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_names.c modified: src/lib/libdwarf/libdwarf.h 2021-11-03: David Anderson commit 3ea3c44ee1b815e0d7558a57b8d218a78f568882 Regenerated with version 0.3.1 as LLVM adds DW_CFA_LLVM_def_aspace_cfa[_sf] which requires the existence of a new function to get the third value (all previous CFA operators had a maxmum of 2 values). modified: CMakeLists.txt modified: configure.ac modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h 2021-11-03: David Anderson commit 79d6e012d7c4655b05a1670f1392780778e5f633 Now returns the string representing the new DW_CFA_LLVM, though dwarfdump cannot get all three values yet, as the new third value is not visible to dwarfdump. modified: dwarf_frame.c 2021-11-02: David Anderson commit 719af6996fdcf7de8bd2274692cd7582c0c87bec New LLVM DW_OP_LLVM and DW_CFA_LLVM names. modified: dwarf.h Implement the new CFA names. modified: dwarf_frame.c modified: dwarf_frame.h Regeneratd with the new names. modified: dwarf_names.c 2021-11-02: David Anderson commit 90777138b0113693fe1692bea368d7f8b0c81ba8 Now creates opscounttab.c with the new fields modified: src/bin/buildopstab/buildopscounttab.c Regenerated modified: src/bin/dwarfdump/opscounttab.c Added new DW_OP_LLVM ops. modified: src/lib/libdwarf/dwarf.h Handle the new ops. modified: src/lib/libdwarf/dwarf_locationop_read.c Regenerated modified: src/lib/libdwarf/dwarf_names.c 2021-10-23: David Anderson commit 10e2df5169e57624c53eb2e319e24462c5d61471 Adding in latest git log entries. modified: ChangeLog 2021-10-22: David Anderson commit d307e3417041ca9498be6df6d9bbc98fc94fd759 When in .debug_ranges the beginning == ending address, print "(empty range)" at the end of the range line to remind the reader this is not a range, but is a placeholder for a range that was deleted by the compiler or linker when the object was created. See DWARF4 standard page 39, non-normative text. modified: src/bin/dwarfdump/print_die.c 2021-10-18: David Anderson commit ab88ad8cb76ab4e6ab21f30b50771bcbb7ed14e0 If uintptr_t is defined in stdint.h at configure time we need to include stdint.h here for uintptr_t, which was done correctly everywhere else for uintptr_t. modified: dwarf_pro_dnames.c 2021-10-12: David Anderson commit 9e7fce0d22910b6374bea89a2937faa670368c3f Added words about libdwarf.h macros DW_LIBDWARF_VERSION etc in the documentation of dwarf_package_version(). modified: doc/libdwarf.mm modified: doc/libdwarf.pdf 2021-10-12: David Anderson commit 02863428a46d75a098a2b40e47aaeb46db889e89 Simplified the code. Easier to understand. modified: tools/updatesemanticversion.py 2021-10-12: David Anderson commit c2055a025bfdd6568c24a030d8aeef6021ebcae0 Adding in new gitlog entry modified: ChangeLog 2021-10-12: David Anderson commit 15de42b79eba2797cbf283419a537e2727a1adf9 Correcting spelling mistake DW_LIBDWARF_VERSION_MAJOR (not _MACRO) modified: src/lib/libdwarf/libdwarf.h modified: tools/updatesemanticversion.py 2021-10-12: David Anderson commit 15f563a466e83518839f77da3ea3c991f60db40c Now recent updates shown in ChangeLog modified: ChangeLog 2021-10-12: David Anderson commit ed67c88518bc7dc3374d7bd2e8c49c68b8935709 new file: tools/README Now a working update that ensures the various places with semantic versions are all set equivalently. modified: tools/updatesemanticversion.py 2021-10-11: David Anderson commit 957442d1059130b96713b255d3b29ddd90e1a512 Now, for the first time, DW_LIBDWARF_VERSION_MACRO DW_LIBDWARF_VERSION_MINOR DW_LIBDWARF_VERSION_MICRO and DW_LIBDWARF_VERSION are #defined. These have the Semantic version number. At present Macro is 0 minor is 3 Micro is 0 DW_LIBDWARF_VERSION is defined as "0.3.0" These are the version defined in libdwarf.h when one includes it. No earlier libdwarf.h defined any of these. The function dwarf_package_version(), on the other hand, returns a string with the PACKAGE_VERSION visible in configure.ac and CMakeLists.txt at the time the library was compiled modified: src/lib/libdwarf/libdwarf.h 2021-10-11: David Anderson commit 7635c57217080bf38e71216b9aa8491a7afce3be A tool in tools directory to make updating semantic version numbers simple ... for the various places they go. new file: updatesemanticversion.py 2021-10-09: David Anderson commit 536b25173574787f2336ee120c7e3c92a610cbe6 Now shows the original date format (such has "20210528") returned by dwarf_package_version() as well as the semantic-version date format (such as "0.3.0") Still document version 4.12 modified: ../../../doc/libdwarf.mm modified: ../../../doc/libdwarf.pdf 2021-10-09: David Anderson commit fef16930a3de105f25f2370e3fae652934071f99 Now the get_package_version() function documentation shows both semantic-version and date-based (a form used before September 2021) version strings that may be returned. modified: src/lib/libdwarf/libdwarf.h 2021-10-09: David Anderson commit 68084419107ca2c9b6cb062bcce9fbd8b4165067 Clarified and puts more emphasis on the way in which libdwarf tries to restrict the initial letters of public names to a small set. modified: src/lib/libdwarf/CODINGSTYLE 2021-10-09: David Anderson commit 433f3bd86f3b00809767c08fb64d52ccbdc425d5 functions in .debug_names that are not yet implemented have been removed. Now version 4.12. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf 2021-10-03: David Anderson commit 98927ddcaf31387f9df2ad9e747dc2310bfb32a4 trivial updates to match libdwarf.h renamings of the last day or so. Sorry this was not done yesterday. modified: doc/checkexamples.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_ranges.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_find_sigref.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_getopt.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_macro5.c modified: src/lib/libdwarf/dwarf_names.c modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_str_offsets.c modified: src/lib/libdwarf/dwarf_string.c modified: src/lib/libdwarf/dwarf_tsearchhash.c modified: src/lib/libdwarf/dwarf_util.c modified: src/lib/libdwarf/dwarf_xu_index.c modified: src/lib/libdwarf/libdwarf.h 2021-10-03: David Anderson commit 2c1432151073120bec37b80716897cd5a55eb934 Updated with new version in comment modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h 2021-10-02: David Anderson commit 019b1906911b41d5639ec8f2192b95e071933e88 Changelog now has latest git log lines. modified: ChangeLog 2021-10-02: David Anderson commit 85b53096a0ba7f5fbe66d6c73b8e6d8bdb1c6743 All functions in libdwarf.h are now documented. modified: libdwarf.mm modified: libdwarf.pdf 2021-10-02: David Anderson commit a4d0f96f8efffaa017cd0bb40800dde6f0e54233 Deleted dwarf_set_frame_rule_inital_value() as that was a spelling error in the 1990's, and the correct spelling is dwarf_set_frame_rule_initial_value( modified: src/lib/libdwarf/dwarf_frame.c Declarations: Deleted dwarf_get_rnglist_raw_entry_detail() and dwarf_get_loclists_entry_fields() as those functions never existed. modified: src/lib/libdwarf/libdwarf.h 2021-10-02: David Anderson commit d4d333467e6552316f2949377b5088ba1ed2cbb7 Nearly all functions documented. Four left undoc. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf 2021-10-02: David Anderson commit f16252cc9aab96da0687e86aaa0e49dcfd3207bb Several functions documented. About 19 left to document. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf Improved a comment modified: src/lib/libdwarf/libdwarf.h 2021-10-02: David Anderson commit 70225545c82f613679d147ae2f58b162c3d31bf6 Documented more of the public interfaces. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf Now dwarf_formsig8() and dwarf_formsig8_const() return DW_DLV_NO_ENTRY if the data is not the desired FORM. They previously returned DW_DLV_ERROR, which was not helpful. modified: src/lib/libdwarf/dwarf_form.c 2021-10-02: David Anderson commit 8a31576fbceccca6dec16350dbb50bca0931b1bf renaming for dealloc function naming consistency (but various dealloc functions left unchanged) -void dwarf_fde_cie_list_dealloc(Dwarf_Debug /*dbg*/, +void dwarf_dealloc_fde_cie_list(Dwarf_Debug /*dbg*/, -void dwarf_frame_instr_head_dealloc(Dwarf_Frame_Instr_Head); +void dwarf_dealloc_frame_instr_head(Dwarf_Frame_Instr_Head); -void dwarf_ranges_dealloc(Dwarf_Debug /*dbg*/, +void dwarf_dealloc_ranges(Dwarf_Debug /*dbg*/, modified: dwarf_frame.c modified: dwarf_frame2.c modified: dwarf_ranges.c modified: libdwarf.h 2021-10-01: David Anderson commit 8549d4fd75b1feff0a067c72307c8e0ec25ca296 Now the frame instruction example is updated. modified: doc/checkexamples.c Document the frame-related fields and functions. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf Corrected comments to reflect current member fields. modified: src/lib/libdwarf/libdwarf.h 2021-10-01: David Anderson commit 14befdaeed1da49f2801487afe624b0ead5ee0df Corrected the text of a comment. modified: src/lib/libdwarf/dwarf_generic_init.c 2021-10-01: David Anderson commit 901b3e923d1e99d4fd218f7de5f634b51ba6ec78 Correcting examples, frame instructions. modified: checkexamples.c 2021-10-01: David Anderson commit d999f35950b2507653dd5687a6e86108566ad83a Basic updates reflecting recent changes. Version 4.11 modified: doc/libdwarf.mm modified: doc/libdwarf.pdf Regenerated. 2021-10-01: David Anderson commit ee4adfd8ad3044fb0dd5b9dd3db30170b9fd0bf3 Changes for doxygen, just trying out a few doxygen comment arrangements. Has no effect on uses of the file. modified: src/lib/libdwarf/libdwarf.h 2021-09-30: David Anderson commit 5b2b4d09ad818ff9fdbf5b098d9b617c237e86c8 Corrected: debugnames -> dnames modified: doc/libdwarf.mm Changed comments. modified: src/lib/libdwarf/libdwarf.h 2021-09-30: David Anderson commit 11ccd0abe2a2dba92d92f585359d2d22b283a2a4 Coverity scan found two problems, a missing return caused both. added: return adres; modified: src/lib/libdwarf/dwarf_frame.c 2021-09-30: David Anderson commit 0b2193c039074ad483618a58a9f7c1d6f5cab75c Commentary about struct Dwarf_Macro_Details_s and struct Dwarf_Ranges_s. These structs apply to DWARF2,3, and 4 only. modified: libdwarf.h 2021-09-29: David Anderson commit 659c74dff7f0d5879cce40ae9aaf340bc8a3d4a1 Up to date with latest git log data. modified: ChangeLog 2021-09-29: David Anderson commit e7db94d38ad26c254b82273c66214dd0b493861b Now version 0.3.0 with API compatibilities in .debug_frame data and new functions. modified: CMakeLists.txt modified: configure.ac 2021-09-29: David Anderson commit d3ba444c4e4891545552590d9d36c2049197678e API change here for frame (and especially for frame instructions) Extensive use of Dwarf_Block where it adds clarity. Removed bit-reading of frame instructions as thats no longer necessary, the new function dwarf_get_frame_instruction() does that for us. modified: src/bin/dwarfdump/print_frames.c One internal pointer changed from Dwarf_Ptr to Dwarf_Small * for easier use and better type checking. modified: src/bin/dwarfdump/print_frames.h frame1.c is now using the revised and new frame interfaces. modified: src/bin/dwarfexample/frame1.c createirepfrombinary.cc is doing so too now. modified: src/bin/dwarfgen/createirepfrombinary.cc Rearranged DW_CFA_nop DW_CFA_extended so the nop version is what is printed, not the artificial DW_CFA_extended (both are 0). modified: src/lib/libdwarf/dwarf.h DW_DLA_FRAME_OP replaced by DW_DLA_FRAME_INSTR_HEAD and DW_DLA_FRAME_BLOCK has been dropped. modified: src/lib/libdwarf/dwarf_alloc.c Fixed a comment and pointless whitespace. modified: src/lib/libdwarf/dwarf_debugnames.c Added DW_DLE_CFA_INSTRUCTION_ERROR(485) modified: src/lib/libdwarf/dwarf_errmsg_list.h Dropped the Dwarf_Frame_Op support. Now with some internal args Dwarf_Unsigned where Dwarf_Signed made no sense. modified: src/lib/libdwarf/dwarf_frame.c Dwarf_Frame_Instr_s and Dwarf_Frame_Op_List_s (not visible to library callers) created. Now with some args Dwarf_Unsigned where Dwarf_Signed made no sense. modified: src/lib/libdwarf/dwarf_frame.h Now with some args Dwarf_Unsigned where Dwarf_Signed made no sense. modified: src/lib/libdwarf/dwarf_frame2.c Removed a useless blank line. modified: src/lib/libdwarf/dwarf_line_table_reader_common.h Fixed indents, trailing whitespace. modified: src/lib/libdwarf/dwarf_loc.c A Dwarf_Block field is no Dwarf_Byte_Ptr, identical to Dwarf_Small * modified: src/lib/libdwarf/dwarf_loc.h Removed #if 0 #endif short sequences. modified: src/lib/libdwarf/dwarf_macro.c 'make rebuild' altered this so DW_CFA_nop can be returned as a cfa name string. modified: src/lib/libdwarf/dwarf_names.c Removed trailing whitespace. modified: src/lib/libdwarf/dwarf_object_detector.c Removed a #if 0 endif declaration of code never written. modified: src/lib/libdwarf/dwarf_opaque.h Removed Dwarf_Frame_Op_s. It only ever worked for DWARF2. New opaque structs Dwarf_Frame_Instr_Head_s and Dwarf_Frame_Instr_s make possible easy and improved access to .debug_frame/.eh_frame DW_CFA instructions. Removed DW_DLA_FRAME_OP and added DW_DLA_FRAME_INSTR_HEAD. Added DW_DLE_CFA_INSTRUCTION_ERROR. dwarf_get_cie_info_b() and dwarf_get_fde_range() and dwarf_get_fde_instr_bytes(() now use Dwarf_Small * instead of Dwarf_Ptr as thats easier to use and slightly safer for type checking.. Effectively unsigned char * instead of void * dwarf_get_fde_info_for_reg3_b() dwarf_get_fde_info_for_cfa_reg3_b() uses Dwarf_Small * and also Dwarf_Signed arguments changed to Dwarf_Unsigned to accurately represent the meaning. Adds a Dwarf_Block replacing a pointer/length pair of arguments, dwarf_expand_frame_instructions() arguments much changed to allow access to frame instructions that handle *all* frame instructions, not just DWARF2 dwarf_get_frame_instruction() dwarf_frame_instr_head_dealloc() are new to enable correct printing of frame instructions without decoding the instruction bits. making the argumente clearer. modified: src/lib/libdwarf/libdwarf.h 2021-09-19: David Anderson commit 1c3cce658c068a165d57afd4954f504592c390dc Corrected spelling error. modified: README.md 2021-09-19: David Anderson commit 6f90b971b5847d4bf543e9c866e12817af136249 Now has the latest git log data. modified: ChangeLog 2021-09-19: David Anderson commit 6b7fd93356a1a58275f4014437508eda9aa0272c The 'namestable' options have no effect any longer, so they have been deleted. modified: CMakeLists.txt modified: configure.ac 2021-09-19: David Anderson commit 876c1edbbc6b29d9cd5e6a00372e65c82939e82c Updated comments in the Changes section. modified: libdwarf.mm Rev 4.10 modified: libdwarf.pdf Regenerated 2021-09-19: David Anderson commit dfd515afe38c8d48764b34d1040a8720a6e9fb8e Revised the documentation. README.md is available on www.prevanders.net/libdwarfreadme.html modified: README modified: README.md 2021-09-18: David Anderson commit 0db97085c7c15d52c811e1fe43fda9f67e5769b8 modified: ChangeLog As of now, coverityscan finds no problems. 2021-09-18: David Anderson commit dc49ecba7486ac33bd161ec4fb8b14b4cc46ad1d With these changes, coverity scan finds no defects in the libdwarf source. modified: src/bin/dwarfdump/print_debug_sup.c modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/lib/libdwarf/dwarf_debug_sup.c modified: src/lib/libdwarf/dwarf_debuglink.c 2021-09-18: David Anderson commit a7ea4f95c665e11068044bbce0f15765dd535e98 Now making this up to date with git log. modified: ChangeLog At this point the two remaining issues coverity scan detects are CID 238474 memory leak on an error, and it is not clear to me where the leak is. coverity reports all the details but.. the source looks correct. CID 206732 coverity determines that a loop cannot possibly result in a count of 0, though such seems possible. One assumes one is just missing something in each case. Continuing to look. 2021-09-18: David Anderson commit b2c32100d6c3a7abaa10614f401c3c4cab1077e7 more fixes for problems coverity scan detected. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfgen/createirepformfrombinary.cc modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/bin/dwarfgen/irepattrtodbg.cc modified: src/bin/dwarfgen/irepdie.h modified: src/bin/dwarfgen/ireptodbg.cc modified: src/lib/libdwarf/dwarf_init_finish.c 2021-09-17: David Anderson commit 695305f59372312d645e9afd8592dd79a6d0f0d5 Fixes all but a few coverity CIDs. I think. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_static_vars.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_object_detector.c 2021-09-17: David Anderson commit d39fd532ec3ad2cc0f15e3358fd537148b61bed1 Applied corrections for Coverity CID 140104 238474 238481 238483 238485 238486 238487 238493 238494 238503 238509 238510 modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/dwconf.c modified: src/bin/dwarfdump/print_debug_gnu.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_object_detector.c 2021-09-16: David Anderson commit 6539d22b58f1b7859989113f8c6e9c6cd62721db Fixes for coverity scan id: 240132, 240130,240131,238512 238473 238474 238475 238476 238513 modified: src/bin/dwarfdump/globals.h modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarfp/dwarf_pro_section.c 2021-09-16: David Anderson commit 41c5018988fe818d16025bd21dcb46d263a8ae5b Fix coverity CID 238512 modified: dwarf_rnglists.c 2021-09-16: David Anderson commit 4eb3994fa3b31c8831840736b07278ec630351ca Fix coverity CID 240132 240131 240130 modified: src/bin/dwarfdump/print_macro.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarfp/dwarf_pro_forms.c 2021-09-16: David Anderson commit 4e742546b6584f4688f8db66776cd6351ecd007a Small but important incompatibility: dwarf_finish(Dwarf_Debug dbg); removes the useless and misleading Dwarf_Error, which was the second argument. That argument was not used! modified: src/lib/libdwarf/libdwarf.h Addresses 20+ coverity-scan-detected errors and removes the second argument to dwarf_finish(). modified: doc/libdwarf.mm modified: doc/libdwarf.pdf modified: src/bin/dwarfdump/compiler_info.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_aranges.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/jitreader.c modified: src/bin/dwarfexample/simplereader.c modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/bin/tag_tree/tag_tree.c modified: src/lib/libdwarf/dwarf_arange.c modified: src/lib/libdwarf/dwarf_debug_sup.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_xu_index.c modified: src/lib/libdwarfp/dwarf_pro_forms.c modified: src/lib/libdwarfp/dwarf_pro_section.c 2021-09-15: David Anderson commit 578b6d75fe1ed07654fdead76963fc871198c7c7 More fixes to things coverity scan detected. modified: src/bin/buildopstab/buildopscounttab.c modified: src/bin/dwarfdump/esb.c modified: src/bin/dwarfdump/print_aranges.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/gennames/gennames.c modified: src/lib/libdwarf/dwarf_abbrev.c modified: src/lib/libdwarf/dwarf_arange.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_rnglists.c 2021-09-15: David Anderson commit 457d18129ee133a463f083d4be75029677c441ab Coverity scan found 18 issues. This should fix all of them. All but one represented a possible memory leak in an error condition. One is a possible duplicate free. A few instances here of removing unneeded blank lines and fixing too-long lines. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_debugfission.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_pubnames.c modified: src/bin/dwarfexample/jitreader.c modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_print_lines.c modified: src/lib/libdwarf/dwarf_query.c 2021-09-14: David Anderson commit a78495363a6a16a35df005586eddae60df9b1457 Now with recent git log data. modified: ChangeLog 2021-09-14: David Anderson commit 400cf6d49ce2ade160932a1d35f0c0fd6bd404c7 Fixed indents and removed some blank lines. modified: checkexamples.c 2021-09-14: David Anderson commit bbf84c5d3282d60d08b5e9ae7b80ba733a0a2fa5 Added comments pointing out the future removal of Dwarf_Frame_Op. modified: src/bin/dwarfexample/frame1.c modified: src/lib/libdwarf/libdwarf.h 2021-09-14: David Anderson commit c46ec30d52b82a23356be9c065871574f87aa23e Corrected the examples to match current interfaces. modified: doc/checkexamples.c 2021-09-13: David Anderson commit 9474d46e3f10ef9c073d5d04c11934f5dc61a9d4 Each group of blank lines is now a single line. modified: command_options.h dwarf_getopt.h dwconf.h esb.h esb_using_functions.h globals.h helpertree.h macrocheck.h section_bitmaps.h tag_common.h 2021-09-13: David Anderson commit be6b995a732bb2245a38e2430a90e163fa6044b0 modified: dwarf_abbrev.c dwarf_alloc.c dwarf_arange.c dwarf_crc.c dwarf_crc32.c dwarf_debuglink.c dwarf_debugnames.c dwarf_die_deliv.c dwarf_dsc.c dwarf_elf_load_headers.c dwarf_elf_rel_detector.c dwarf_error.c dwarf_find_sigref.c dwarf_fission_to_cu.c dwarf_form.c dwarf_funcs.c dwarf_gdbindex.c dwarf_generic_init.c dwarf_getopt.c dwarf_global.c dwarf_groups.c dwarf_harmless.c dwarf_init_finish.c dwarf_leb.c dwarf_line.c dwarf_loc.c dwarf_locationop_read.c dwarf_loclists.c dwarf_machoread.c dwarf_macro.c dwarf_macro5.c dwarf_object_detector.c dwarf_peread.c dwarf_print_lines.c dwarf_pubtypes.c dwarf_query.c dwarf_ranges.c dwarf_rnglists.c dwarf_str_offsets.c dwarf_string.c dwarf_tied.c dwarf_tsearchhash.c dwarf_types.c dwarf_util.c dwarf_vars.c dwarf_weaks.c dwarf_xu_index.c 2021-09-13: David Anderson commit 1d8b38f2ec29db066db0a3ef2abf1ef7e77648f1 With a tool, reduced each block of blank lines into a single blank line. modified: dwarf_abbrev.h modified: dwarf_arange.h modified: dwarf_base_types.h modified: dwarf_elf_access.h modified: dwarf_elf_defines.h modified: dwarf_elf_rel_detector.h modified: dwarf_elfread.h modified: dwarf_elfstructs.h modified: dwarf_errmsg_list.h modified: dwarf_funcs.h modified: dwarf_gdbindex.h modified: dwarf_getopt.h modified: dwarf_global.h modified: dwarf_harmless.h modified: dwarf_line.h modified: dwarf_line_table_reader_common.h modified: dwarf_loc.h modified: dwarf_macho_loader.h modified: dwarf_machoread.h modified: dwarf_macro.h modified: dwarf_macro5.h modified: dwarf_object_detector.h modified: dwarf_opaque.h modified: dwarf_pe_descr.h modified: dwarf_peread.h modified: dwarf_reloc_386.h modified: dwarf_reloc_arm.h modified: dwarf_rnglists.h modified: dwarf_str_offsets.h modified: dwarf_string.h modified: dwarf_tied_decls.h modified: dwarf_types.h modified: dwarf_util.h modified: dwarf_xu_index.h 2021-09-13: David Anderson commit fac853118888900786220c20d10776adb99749c4 Using a tool, changed each grouping of blank lines into a single blank line. modified: addrmap.c modified: attr_form.c modified: checkutil.c modified: command_options.c modified: compiler_info.c modified: dd_regex.c modified: dd_sanitized.c modified: dd_uri.c modified: dwarf_getopt.c modified: dwarf_tsearchbal.c modified: dwarfdump.c modified: dwconf.c modified: esb.c modified: helpertree.c modified: macrocheck.c modified: naming.c modified: print_abbrevs.c modified: print_aranges.c modified: print_debug_gnu.c modified: print_debug_sup.c modified: print_die.c modified: print_frames.c modified: print_gdbindex.c modified: print_hipc_lopc_attr.c modified: print_lines.c modified: print_llex_codes.c modified: print_loclists.c modified: print_loclists_codes.c modified: print_macro.c modified: print_origloclist_codes.c modified: print_pubnames.c modified: print_rnglists.c modified: print_section_groups.c modified: print_static_funcs.c modified: print_tag_attributes_usage.c modified: uritablebuild.c 2021-09-13: David Anderson commit 0cba1da28412ca57f7b234ab3545761b0f008861 Now with recent updates. modified: ChangeLog 2021-09-13: David Anderson commit e7cb3d7c880d5ec304646eb29356986b1b7d3447 A small tool now notices instances of multiple blank lines and eliminates all but one of them. Also notices something like } } (with the blank line between) and drops that empty pointless blank line. modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame.h modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/libdwarf.h 2021-09-13: David Anderson commit 7fc73b9a8bb1a50a003f9ecf1fc31e4ecd6fe813 All the earlier dwarfgen/ChangeLog20xx were left off by 'make dist' and now they apprear properly. modified: src/bin/dwarfgen/Makefile.am 2021-09-13: David Anderson commit 43bdde11b898abcc8c338a48959728d2f38b6162 -" ", +" ", modified: src/bin/dwarfdump/print_die.c 2021-09-13: David Anderson commit 58920809a408eeac18afb1ca14fa5ba545120ae7 A recent update changed things. make dist was now causing test/dummyexecutable to be rebuilt from test/dummyexecutable.c. That was not intended. So renamed dummyexecutable.c so make cannot make the connection or try to rebuild dummyexecutable. This simple change just makes what is going on slightly clearer with respect to the two object sections involved. modified: src/lib/libdwarf/dwarf_debuglink.c This file should not be in libdwarfp, libdwarfp gets the content from libdwarf source. deleted: src/lib/libdwarfp/dwarf_string.c Added an exit 0 so even if run the script does nothing. As intended! It is really documentation and should not be run. modified: test/buildingdummy.sh renamed: test/dummyexecutable.c -> test/dummysourceignore The makefile reflects the name changes so the files get into the make dist output. modified: test/Makefile.am 2021-09-12: David Anderson commit b70c815780a8658592e76ffdcf5c9f8d8284084a Modified libdwarf-internal function names to have a leading _dwarf_ modified: dwarf_frame.c modified: dwarf_frame.h modified: dwarf_frame2.c Deleted dwarf_frame_get_reg_register() and dwarf_frame_get_reg_expression() as they no longer exist and did not work for recent dwarf. modified: libdwarf.h 2021-09-11: David Anderson commit cb86f35166a71eae445715cca9249a18b133745f Updated with files changed due to recent deletion of some blank lines. modified: ChangeLog 2021-09-11: David Anderson commit cccee303f33b8c4dcccaaae236a5922c467eaa77 Each instance of multiple blank lines reduced to a single blank line. modified: buildopstab/buildopscounttab.c modified: gennames/gennames.c modified: tag_attr/tag_attr.c modified: tag_tree/tag_tree.c 2021-09-11: David Anderson commit c55271af36006f2e7ee4bbe4750f3b417b01e0f1 Each instance of multiple blank lines reduced to a single blank line. modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/jitreader.c modified: src/bin/dwarfexample/simplecrc.c modified: src/bin/dwarfexample/simplereader.c 2021-09-11: David Anderson commit 7a1d69baa69ea4982b6cfc8de55463a57d7a662b Each instance of multiple blank lines reduced to a single blank line. modified: dwarf_leb_test.c modified: dwarf_tied_test.c modified: getnametest.c modified: getopttest.c modified: makename_test.c modified: test_canonical.c modified: test_dwarfstring.c modified: test_errmsglist.c modified: test_extra_flag_strings.c modified: test_linkedtopath.c modified: test_regex.c modified: testesb.c 2021-09-11: David Anderson commit eb499fc7c60aa9e350f311c8df199d22632d7a59 A new script (not part of libdwarf) now turns a sequence of blank lines into a single blank line. Eventually this will be applied everwhere to .c and .h files. modified: src/lib/libdwarf/dwarf.h modified: src/lib/libdwarf/dwarf_die_deliv.h modified: src/lib/libdwarf/dwarf_dsc.h modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/libdwarf.h 2021-09-10: David Anderson commit c91317981ea93a820cc881f12852b770ffc45730 No longer defines DW_OBJ_LSB or DW_OBJ_MSB or the type Dwarf_Endian. No longer defines DW_ENDIAN_BIG DW_ENDIAN_LITTLE Use DW_END_big and DW_END_little from dwarf.h. Using three different name sets was an accident of history. Instead, now using DW_END_big and DW_END_little from dwarf.h (These were introduced in DWARF3.) The ranges of endian fit in a Dwarf_Small. modified: src/lib/libdwarf/libdwarf.h There is no actual compatibility issue for library users as all the uses are in dwarfdump and libdwarf. Plus a single use in jitreader.c The required places updated to use DW_END_big/little: modified: src/bin/dwarfexample/jitreader.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_machoread.h modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/libdwarf.h 2021-09-10: David Anderson commit 83438dbbe4991fb333fd0c6f9924513f4744244e Added the recent git log entries. modified: ChangeLog 2021-09-10: David Anderson commit 85134d41493f7a236f8680a09a44ec8b25000885 Shortening lines, fixing indents, and removing trailing whitespace. modified: src/lib/libdwarf/dwarf_errmsg_list.h modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_memcpy_swap.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_util.h modified: src/lib/libdwarf/libdwarf.h 2021-09-10: David Anderson commit 6bf6fd8f88bb445b4682c439ebab10e62c5d9a2e Dropping #define DW_ENDIAN_BIG and DW_ENDIAN_LITTLE as they just duplicate dwarf.h DW_END_big DW_END_little (with the same integer values). modified: src/lib/libdwarf/libdwarf.h Now documents DW_END_big/little instead of DW_ENDIAN* Removed incorrect doc of DW_ENDIAN_SAME/OPPOSITE, those were never meaningful. modified: doc/libdwarf.mm Now version 4.8 Regenerated. modified: doc/libdwarf.pdf Add include "dwarf.h" and use DW_END_big/little from dwarf.h modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_object_detector.c Delete def of DW_ENDIAN*, no longer used. modified: src/lib/libdwarf/dwarf_object_detector.h 2021-09-10: David Anderson commit 990fe5e78150ffa2a7270312403b83d30669ec9d Use DW_OBJECT_LSB, not DW_ENDIAN_LITTLE! Also fixed trailing whitespace and bad indents. modified: jitreader.c 2021-09-09: David Anderson commit ca7afc32c6e625333c26677cd987b0bc86bc0ce4 Updated version to 0.2.0 to match configure.ac. Using a python script now to avoid forgetting update of one or the other place the version is recorded. modified: CMakeLists.txt 2021-09-07: David Anderson commit 12a3f940b23a5ba815acbc04889ca698cef25ad1 Removed spurious line. modified: ChangeLog 2021-09-07: David Anderson commit 5f860e5945578c0af48ccd8321382aeb187efb7b Updates with gitlog data. modified: ChangeLog Minor commentary changes(hoping for clarity). modified: src/bin/dwarfexample/jitreader.c 2021-09-06: David Anderson commit 3ceff448fe685005a97b001f2c637ac6211f87eb More comments on why this matters. modified: jitreader.c 2021-09-06: David Anderson commit fc20d24541507dd12ce5efcace7443c09202d9a7 Version now 0.2.0 to reflect the *Obj_Access* struct changes. modified: configure.ac modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2021-09-06: David Anderson commit 2403367525e0de88b611e4281689c43a4d6037cb Squashed commit of the following: commit 4d82551c527eeb827992f0bada2c85dac7f3faa0 Author: David Anderson Date: Mon Sep 6 17:30:31 2021 -0700 In updating the handling of SHF_COMPRESSED one line got accidentally lost. So now restored (very slightly differently). modified: dwarf_init_finish.c commit 1a2ae9024d175a909ea19a4a1e421cf2b3dc9b79 Author: David Anderson Date: Mon Sep 6 16:24:04 2021 -0700 Now cmake sees the new jitreader and runs jitreaderdiff.sh to ensure it works. modified: src/bin/dwarfexample/CMakeLists.txt modified: test/CMakeLists.txt commit c32b8ad6574e071fa02a4d2b5e73c0e740f82adf Author: David Anderson Date: Mon Sep 6 15:35:12 2021 -0700 Now prints something of the CU DIE it reads. modified: src/bin/dwarfexample/jitreader.c Updated baseline. modified: test/jitreader.base commit 33a621fa57d023fea1fb7895f07a49b9cb30b7c3 Author: David Anderson Date: Mon Sep 6 14:12:39 2021 -0700 Now shows ZLIB flags if any needed and present. modified: configure.ac Now builds jitreader.c modified: src/bin/dwarfexample/Makefile.am Now runs jitreader.sh to ensure jitreader is working. modified: test/Makefile.am commit f7c1426b5fc1b8ee67bd405d02710f69b5d6b3af Author: David Anderson Date: Mon Sep 6 14:08:54 2021 -0700 Major incompatible change for a very small and unusual use-case. Ordinary libdwarf use or just Now struct Dwarf_Obj_Access_Interface_a_s struct Dwarf_Obj_Access_Methods_a_s struct Dwarf_Obj_Access_Section_a_s have all the fields they should have had all along, but the member names have appropriate 2-letter prefixes to make it easy to quickly find uses of the members. This only affects those applications reading dwarf from memory (meaning, there is no file existing to read). This is typical for just-in-time (jit) compilers. modified: src/lib/libdwarf/libdwarf.h Now we have a worked out example demonstrating the abilility to use data in memory as DWARF infomation. renamed: jitreader.c -> ../src/bin/dwarfexample/jitreader.c The following were modified to match up with the new names, as libdwarf actually uses, internally, the data in the above-named structs. modified: src/lib/libdwarf/dwarf_elfread.c modified: ./src/lib/libdwarf/dwarf_init_finish.c modified: ./src/lib/libdwarf/dwarf_machoread.c modified: ./src/lib/libdwarf/dwarf_opaque.h modified: ./src/lib/libdwarf/dwarf_peread.c New new file: test/jitreader.base new file: test/jitreaderdiff.sh commit 05b85bc60f0ed9b28088604008a3b5efb1103b6c Author: David Anderson Date: Mon Sep 6 10:53:19 2021 -0700 Renamed the test case to provide a better idea as to what the test shows: accessing all of libdwarf where the DWARF information is not in a file at all, or is in a special file format which is not Elf or PE or MacOS. modified: test/Makefile.am new file: test/jitreader.c deleted: test/objaccess.c commit a10fa8fe5172a2b34bfff163499e48ae7884c761 Author: David Anderson Date: Sat Sep 4 16:47:02 2021 -0700 Added filesize to the access function pointer list, making it possible to correctly deal with file sizes Where it was not previously possible in libdwarf. For callers passing a path or reading via an fd all this is invisible. For people wishing to use dwarf_object_init_b() on DWARF which is in memory (possibly something never on disk) or in a special file format this change makes it possible to have libdwarf work properly and safely. struct Dwarf_Obj_Access_Interface_a_s is similar to the previous struct name, but the members of the struct are ai_object and ai_methods, making it easier to grep for the usage. struct Dwarf_Obj_Access_Methods_a_s is similar to the old struct name but it adds a new method om_get_filesize. And all member names prefixed with om_ so the fields can be found with grep easily. And the order of the values in the struct changed slightly. modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/libdwarf.h 2021-09-04: David Anderson commit 5593a44b4182db596fb2da87f563a7992a4f985f buildopscounttab.c and the table it builds, opscounttab.c, had lines longer than the codingstyle calls for. Fixed modified: src/bin/buildopstab/buildopscounttab.c Regenerated. modified: src/bin/dwarfdump/opscounttab.c 2021-09-04: David Anderson commit c316dffb261d411f6fb908951a5bd0f633ffbcd1 Renaming dwarfdump source to have a preceding dd_ which means lots of trivial changes. renamed: src/bin/dwarfdump/sanitized.c -> src/bin/dwarfdump/dd_sanitized.c renamed: src/bin/dwarfdump/sanitized.h -> src/bin/dwarfdump/dd_sanitized.h renamed: src/bin/dwarfdump/uri.c -> src/bin/dwarfdump/dd_uri.c renamed: src/bin/dwarfdump/uri.h -> src/bin/dwarfdump/dd_uri.h modified: src/bin/attr_form/Makefile.am modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_tree/Makefile.am Many files had include of one or the other of the two headers. Fixed the include to have dd_ with a tiny sed script. Not listing all the files here. 2021-09-04: David Anderson commit 6bafd7de063944e69cbeeabf518a6fe59ef6c7d0 Tidying the new source just before 'while (lp >= are)' and ensuring it builds with and without -DDEBUG modified: src/bin/dwarfdump/dd_regex.c The change here has no effect on results, which remain correct. 2021-09-03: David Anderson commit bdf75cf094ed2c6077e89716a1ab3f4c2302fe08 Fixed indents, trailing whitespace. modified: test_regex.c 2021-09-03: David Anderson commit 3d51b25bc52d0091945ad72562e340f438d371ef Remove trailing whitespace. modified: command_options.c Modified to follow the libdwarf coding standard, here meaning all indents are multiple of 4 with no trailing whitespace. modified: dd_regex.c modified: dd_regex.h 2021-09-03: David Anderson commit 4270418b0f6ad3eb201c3953ceeeb17e09d93dcb A small revision to make the code slightly clearer. modified: src/bin/dwarfdump/dd_regex.c 2021-09-03: David Anderson commit ee98aefb1c51e9dc2b654c783217dad765323e2d Now, with --enable-shared the shared library uses gcc -visibility=hidden (if your non-Windows compiler supports it) to reduce the size of the elf .dynsym section. For libdwarf, this reduces the external symbol count from 542 to 373, a 32 percent savings in symbols to be read/relocated in loading libdwarf.so Windows builds already supported Windows facilities with the same effect. modified: configure.ac 2021-09-03: David Anderson commit d1f5ea7a91a8d66e35f1574633bb58fe45d69f83 Renamed all the libdwarfp source file names to start with dwarf_pro_ Not showing the renamings here. Then adjustments were made to get it to build. As listed here. modified: src/lib/libdwarfp/CMakeLists.txt modified: src/lib/libdwarfp/Makefile.am modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/test_extra_flag_strings.c 2021-09-03: David Anderson commit 973fbfdf87fa709fb336d157c4b5aebdb7d26532 dwarfstring.h renamed dwarf_string.h dwarfstring.c renamed dwarf_string.c Now all source files in src/lib/libdwarf have a file name beginning with dwarf_ to make library source recognition easier. modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/dwarf_abbrev.c modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_arange.c modified: src/lib/libdwarf/dwarf_debug_sup.c modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_error.c modified: src/lib/libdwarf/dwarf_find_sigref.c modified: src/lib/libdwarf/dwarf_fission_to_cu.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_locationop_read.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_macro5.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_print_lines.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_ranges.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_str_offsets.c renamed: src/lib/libdwarf/dwarfstring.c -> src/lib/libdwarf/dwarf_string.c renamed: src/lib/libdwarf/dwarfstring.h -> src/lib/libdwarf/dwarf_string.h modified: src/lib/libdwarf/dwarf_util.c modified: src/lib/libdwarf/dwarf_xu_index.c modified: src/lib/libdwarfp/Makefile.am renamed: src/lib/libdwarfp/dwarfstring.c -> src/lib/libdwarfp/dwarf_string.c modified: src/lib/libdwarfp/pro_init.c modified: src/lib/libdwarfp/pro_log_extra_flag_strings.c modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/test_dwarfstring.c modified: test/test_extra_flag_strings.c modified: test/test_linkedtopath.c 2021-09-03: David Anderson commit 69af3e507e90a6689f04a982482c9e4e2d2cfcbc This is renaming of dwgetopt.[hc] and crc32.c to have dwarf_ prefix for anyone seeing libdwarf in a stack trace. modified: src/bin/attr_form/Makefile.am modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/command_options.c renamed: src/bin/dwarfdump/dwgetopt.c -> src/bin/dwarfdump/dwarf_getopt.c renamed: src/bin/dwarfdump/dwgetopt.h -> src/bin/dwarfdump/dwarf_getopt.h modified: src/bin/dwarfgen/CMakeLists.txt modified: src/bin/dwarfgen/Makefile.am renamed: src/bin/dwarfgen/dwgetopt.c -> src/bin/dwarfgen/dwarf_getopt.c renamed: src/bin/dwarfgen/dwgetopt.h -> src/bin/dwarfgen/dwarf_getopt.h modified: src/bin/dwarfgen/dwarfgen.cc modified: src/bin/gennames/Makefile.am modified: src/bin/gennames/gennames.c modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/Makefile.am modified: src/bin/tag_tree/tag_tree.c modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am renamed: src/lib/libdwarf/crc32.c -> src/lib/libdwarf/dwarf_crc.c renamed: src/lib/libdwarf/dwgetopt.c -> src/lib/libdwarf/dwarf_getopt.c renamed: src/lib/libdwarf/dwgetopt.h -> src/lib/libdwarf/dwarf_getopt.h modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/getopttest.c 2021-09-02: David Anderson commit ec5f180a27421cc4ef3cc6f22a962eb6ae961ff7 make rebuild added the new LLVM TAG. modified: src/lib/libdwarf/dwarf_names.c 2021-09-02: David Anderson commit 56ef9f8ae5acd2e87fc139e797605f1ab7e2a98f Added new DW_TAG_LLVM_annotation and resorted TAG entries to be in numeric order. modified: src/lib/libdwarf/dwarf.h 2021-09-02: David Anderson commit ef07a37a68a0c9a85ad90d6538e7abaaa2918901 Modified so it works with 3.10 cmake too. modified: test/CMakeLists.txt 2021-09-02: David Anderson commit eebf2237f2696348cb4e897b9f49e98fc441a361 Latest changes from git log incorporated modified: ChangeLog 2021-09-02: David Anderson commit 7c2a53f2854892f891c1872cf64e56a2bcc8b951 A fully functioning regex that does Posix Basic Regular Expression matching is now built into dwarfdump. modified: src/bin/dwarfdump/dd_regex.c modified: src/bin/dwarfdump/dd_regex.h This does a fairly large set of testcases in make check (and for cmake too). modified: test/test_regex.c 2021-08-31: David Anderson commit 8dc87d5b997f529b80884a6e306687ab402b8463 Minor tweak of the incomplete dd_regex.c code. DO NOT USE -Sregex as it does not yet work. and 'make check' fails its regex changes. modified: src/bin/dwarfdump/dd_regex.c 2021-08-31: David Anderson commit 08fa32841bade1ceea9492b1aea05932d1b7559d Merge: b4fd80f4 0a98801c Merge branch 'master' of https://github.com/davea42/libdwarf-code README.md now has improved MarkDown markings. 2021-08-31: David Anderson commit 0a98801c08ed3d2c6a198205fcc40c0ae1711a0f Merge: 6615a59f 50f7563f Merge pull request #47 from vtorri/vtorri_readme Use markdown features for README.md 2021-08-31: David Anderson commit b4fd80f411d81767c83f5544ed01444a25886d81 DO NOT USE THIS COMMIT. Incomplete. Modified the doc of -Sregex modified: doc/dwarfdump.1 New version, writing t. Not from the internet. modified: src/bin/dwarfdump/dd_regex.c Modified declaration. modified: src/bin/dwarfdump/dd_regex.h Added new tests modified: test/test_regex.c 2021-08-27: David Anderson commit c81ad1b4bd924847770c575677eed3134c8b83ae Version 4.7 27 August 2021. The example code for dwarf_get_location_op_value_d() mixed up the arguments opd vs raw which was quite bad as the compiler could not help anyone find the mistake. Fixed in the document. modified: libdwarf.mm modified: libdwarf.pdf 2021-08-27: David Anderson commit 37fa82942e4b9b66de6358410b1335cfa7fa182d DO NOT USE THIS COMMIT. Works better but full of debug lines. modified: src/bin/dwarfdump/dd_regex.c modified: test/test_regex.c 2021-08-26: David Anderson commit 0be9ce8cac5963f30c547404b785c947e0570b02 DO NOT USE THIS COMMIT. Bug not fixed. modified: dd_regex.c 2021-08-26: David Anderson commit c67defd3a9d8eb62bcdef58e7a5afa1b4d4d0494 DO NOT USE THIS COMMIT. A work in progress. modified: src/bin/dwarfdump/dd_regex.c modified: test/test_regex.c 2021-08-26: Vincent Torri commit 50f7563f9553677382486ee1846f3493bed6ccd8 Use markdown features for README.md modified: README.md 2021-08-21: David Anderson commit 06928e93bac0cedc65ffb9028efaaa54bd7d0a02 DO NOT USE THIS COMMIT. the dd_regex.c is only 7-bit char safe. Otherwise it works well. Added a new test for regex in test/ modified: CMakeLists.txt modified: configure.ac modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/command_options.c modified: src/bin/dwarfdump/dd_regex.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/glflags.c modified: src/bin/dwarfdump/glflags.h modified: src/bin/dwarfdump/globals.h modified: src/bin/dwarfdump/print_die.c modified: test/CMakeLists.txt modified: test/test_regex.c 2021-08-21: David Anderson commit e41891bc7ac83f006c32ad7b88b1fc6c12c066a8 Brings a public domain regex into dwarfdump DO NOT USE THIS COMMIT. It only does 7-bit ascii and still used libc regex if present. modified: src/bin/dwarfdump/dd_regex.c modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/test_regex.c 2021-08-21: David Anderson commit 174ae601217b1f5ebed218acffcf0ab66d9d32ae added hints (comments for coverity scan ) modified: src/lib/libdwarf/dwarf_alloc.c 2021-08-17: David Anderson commit 847264b71dd7a23a9d46629391f23985616596db DO NOT USE THIS COMMIT The source and test are now in the intended form with dwarfdump-like (libdwarf-like) arguments and return values. Basically works, but... corner cases perhaps not working as expected. modified: src/bin/dwarfdump/dd_regex.c modified: src/bin/dwarfdump/dd_regex.h new file: test/test_regex.c 2021-08-17: David Anderson commit 22ff6e700d2bcf8c31ec16c79ba79d1604cb1a0f dwarfdump files now compile with new function declarations. modified: dd_regex.c modified: dd_regex.h 2021-08-17: David Anderson commit 302d672243a0b9a8af8dd1982829d231d18f4a2f DO NOT USE THIS COMMIT. revising interfaces and reformatting lines in progress. modified: dd_regex.c modified: dd_regex.h 2021-08-17: David Anderson commit 931ab9da63a372badda2137fcafc7137ae4a57e3 Initial public domain source of code that does Posix Basic Regular Expressions. So all dwarfdump users have such available for dwarfdump -S (--search-match) options. new file: src/bin/dwarfdump/dd_regex.c new file: src/bin/dwarfdump/dd_regex.h 2021-08-16: David Anderson commit 6615a59f9ce5c5bf6dea7a466887e8cf8de757b3 Merge: 3134aac9 cad88ab6 Merge pull request #46 from vtorri/vtorri_ignore1 ignore libdwarfp.pc and a conf file in test/ 2021-08-15: David Anderson commit 3134aac902ac4e1bedbd7db18808684cc590ef74 Revoking a change I made a few days ago that prevented building shared and non-shared in one run. modified: CMakeLists.txt 2021-08-15: Vincent Torri commit cad88ab653f90dbee9172a3316ca0b107c5935b0 ignore libdwarfp.pc and a conf file in test/ modified: .gitignore 2021-08-15: David Anderson commit 138f2242444eef3a142f9e43b8244d2bed3ff09f Merge: 6ac2df5c d2922d0e Merge pull request #45 from vtorri/vtorri_tsearch3 Revert work about string and tsearch 2021-08-15: Vincent Torri commit d2922d0ecbbc3ebd617c3ce44c3fbc934443c8c0 missing dwarf_tsearch in dwarfdump 2021-08-15: Vincent Torri commit 1e264d34f5f0e94426fc16df9277e28cdc7aa1ef fix paths in tied test 2021-08-15: Vincent Torri commit bd73e7a29a3475c44113a6e78516fbe23a46c32c fix paths in wqtests 2021-08-15: Vincent Torri commit 220e69ff415f316017bb584b197c8f74b20b86da Revert work about string and tsearch modified: Makefile.am modified: configure.ac modified: src/bin/attr_form/Makefile.am modified: src/bin/buildopstab/Makefile.am modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/dwarf_tsearchbal.c modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_tree/Makefile.am deleted: src/lib/dwarfstring/Makefile.am deleted: src/lib/dwarftsearch/Makefile.am modified: src/lib/libdwarf/Makefile.am renamed: src/lib/dwarftsearch/dwarf_tsearch.h -> src/lib/libdwarf/dwarf_tsearch.h renamed: src/lib/dwarftsearch/dwarf_tsearchhash.c -> src/lib/libdwarf/dwarf_tsearchhash.c renamed: src/lib/dwarfstring/dwarfstring.c -> src/lib/libdwarf/dwarfstring.c renamed: src/lib/dwarfstring/dwarfstring.h -> src/lib/libdwarf/dwarfstring.h modified: src/lib/libdwarfp/Makefile.am 2021-08-15: David Anderson commit 6ac2df5c0ef9fb2f04c3ce66e1fe91a3a1c446b0 Merge: 7b4882ec f4e32822 Merge pull request #42 from vtorri/master Fix undefined references in libdwarfp 2021-08-15: Vincent Torri commit f4e32822338ac65e20d26e3ef4a5db6f315e711f Fix undefined references in libdwarfp deleted: src/lib/libdwarfp/memcpy_swap.h modified: src/lib/libdwarfp/Makefile.am modified: src/lib/libdwarfp/pro_init.c 2021-08-14: David Anderson commit 7b4882ecff8d11bdb2a73f5ebb9f737bd7c66655 Merge: 68ba24f5 de4b7f95 Merge pull request #41 from vtorri/master Move dwarftsearch code to its own static library. 2021-08-14: Vincent Torri commit de4b7f95c3754f733bdf380dd9e713e80abfea5b fix dwarf_tsearchhash.c location in tied test 2021-08-14: Vincent Torri commit 2bd8e9d0a00ed119008bdc454ff3e0245387630a fix include search path for macrocheck test 2021-08-14: Vincent Torri commit 70a98028015cf83a85c4beffc4dd47fc94edc2c4 fix include search path for tagattr 2021-08-14: Vincent Torri commit 6a26e1766712d72a2523d5a147b4c68b77688336 fix include search path for tagtree 2021-08-14: Vincent Torri commit 1e2018835970f22ac79fb6e9968d501f210d17dd Move dwarftsearch code to its own static library. deleted: src/bin/dwarfdump/dwarf_tsearch.h new file: src/lib/dwarftsearch/Makefile.am renamed: src/lib/libdwarf/dwarf_tsearch.h -> src/lib/dwarftsearch/dwarf_tsearch.h renamed: src/lib/libdwarf/dwarf_tsearchhash.c -> src/lib/dwarftsearch/dwarf_tsearchhash.c modified: Makefile.am modified: configure.ac modified: src/bin/attr_form/Makefile.am modified: src/bin/dwarfdump/Makefile.am modified: src/lib/dwarfstring/Makefile.am modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarfp/Makefile.am modified: test/Makefile.am 2021-08-14: David Anderson commit 68ba24f5b70c194fb0ebd4c4a16853498707b5f6 Merge: e60419bc 82691c24 Merge pull request #40 from vtorri/vtorri_dwpapi The API macro in libdwarfp must different from the one in libwarf on Windows 2021-08-14: Vincent Torri commit 82691c24956ba9cc283a63b5e216ca927364c65f libdwarfp: the API macro in libdwarfp must different from the one in libwarf on Windows modified: src/lib/libdwarfp/Makefile.am modified: src/lib/libdwarfp/libdwarfp.h 2021-08-14: David Anderson commit e60419bc12d28154b55a3c9722d3e864bb556ec7 Now the _swap_ small private functions are separated from dwarf_util.c and the includes ref the new name. Linux shared libs not buildable with -fvisibility at this point. But the new dwarf_memcpy_swap.c,h help get to a workable sharedbuild. modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_machoread.c new file: src/lib/libdwarf/dwarf_memcpy_swap.c renamed: src/lib/libdwarf/memcpy_swap.h -> src/lib/libdwarf/dwarf_memcpy_swap.h modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_util.c This now has DW_API so -fvisibility=hidden is possible (but not yet ready). modified: src/lib/libdwarfp/libdwarfp.h 2021-08-14: David Anderson commit 0d11fab68b65097c7d6665cacb8b3b70c7c401ab Merge: a68b92e9 8c0c0119 Merge pull request #38 from vtorri/vtorri_dwarfstring Move dwarfstring code to its own static library. 2021-08-14: Vincent Torri commit 8c0c01198aa80e40b0c87333cbbac00b82b62674 fix missing dwarfstring preprocessor flag 2021-08-14: Vincent Torri commit a546e65fe01c071cb5022cc9838797fe988032d9 fix dwarfstring paths 2021-08-14: Vincent Torri commit e1a9952d68c4d0f4d16c364576eedab483c54810 add missing code in test/ 2021-08-14: Vincent Torri commit 27e0383900d4a58f11d3fd57a57a63a8daa2f970 Move dwarfstring code to its own static library. It is used in libdwwarf and libdwarfp. new file: src/lib/dwarfstring/Makefile.am renamed: src/lib/libdwarf/dwarfstring.c -> src/lib/dwarfstring/dwarfstring.c renamed: src/lib/libdwarf/dwarfstring.h -> src/lib/dwarfstring/dwarfstring.h modified: Makefile.am modified: configure.ac modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarfp/Makefile.am 2021-08-13: David Anderson commit a68b92e9da0862fed9720047b28e93d08ee6f22a removes dwarfdump/dwarf_names.c from the build. Leaving libdwarf/dwarf_names.c (which gets built into libdwarf and is generated from dwarf.h). modified: src/bin/attr_form/Makefile.am modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/gennames/Makefile.am modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_tree/Makefile.am 2021-08-13: David Anderson commit b230199ca75e5864bc95dad34ea0ff4e3c135064 Merge: 97415e4a 80a0f395 Merge pull request #37 from vtorri/vtorri_api Add DW_API to explicitly set public symbols 2021-08-13: Vincent Torri commit 80a0f39597bbcf4d978db05a5f52dc11924f49a5 Add DW_API to explicitly set public symbols This allow less collision symbols, detect errors, optimisations during link, etc.. On Windows, here are some numbers : Libraries both compiled with -O2 without DW_API : 584815 bytes with DW_API : 578671 bytes 1.05% gain (size) after stripping : without DW_API : 453120 bytes 506 symbols with DW_API : 446976 bytes 338 symbols 1.35% gain (size) modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/libdwarf.h 2021-08-12: David Anderson commit 97415e4a681dcd4fc64636ab93073764afd325c6 Merge: fe40a21c 65f71b04 Merge pull request #36 from vtorri/vtorri_README configure.ac: throw an error on Windows if a static library is requested 2021-08-12: David Anderson commit fe40a21c0211f35ed44e30acb58b552932545427 If shared-library build requested no archive library is built (used to build both on request). modified: CMakeLists.txt Alterations to build opscounttab.c properly. modified: src/bin/buildopstab/Makefile.am Now does more checking and adds a useful comment in the output opscounttab.c where we have a DW_OP with two spellings (which are extensions, not standard DW_OP instances). Reads dwarf.h to be sure the fast-access table has all the named DW_OP in dwarf.h present in the generated source.. Now includes config.h. data is static not malloc-d. modified: src/bin/buildopstab/buildopscounttab.c Now with the better messages. modified: src/bin/dwarfdump/opscounttab.c The externally-visible table is now _dwarf_opscounttab as it is not supposed to be visible or used outside the library. modified: src/bin/dwarfdump/opscounttab.h dwarf_opscounttab->_dwarf_opscounttab modified: src/bin/dwarfdump/print_die.c 2021-08-12: David Anderson commit 70439c708101b37f5ba010002152bcee9ed23358 Removed #include "opscounttab.h", it is not necessary. modified: src/bin/dwarfdump/print_tag_attributes_usage.c 2021-08-12: Vincent Torri commit 65f71b0445cda470ae9aab40657abc4361547459 README: update documention for Windows with MSYS2 + mingw-w64 modified: README 2021-08-12: Vincent Torri commit 83c0ae15fb96ab5ce30270fd9d215d4438e70539 configure.ac: throw an error modified: configure.ac 2021-08-11: David Anderson commit be443a7357d100b3d5498f2a71163dc44104140b Merge: 1a0ed719 559edece Merge pull request #34 from vtorri/vtorri_cfg Replace C comments in configure.ac with valid comment 2021-08-10: David Anderson commit 1a0ed71976828c64d29429f70f1cfd6aeeccd506 Added DW_API on the set of function declarations modified: src/bin/gennames/gennames.c replace the existing list dwarf_get_AT_name etc with the one gennames.c generates. Added near the beginning of libdwarf.h modified: src/lib/libdwarf/libdwarf.h 2021-08-11: Vincent Torri commit 559edecea67b5c0fb4977889a265d85b062dab03 Replace C comments in configure.ac with valid comment modified: configure.ac 2021-08-10: David Anderson commit c5143f8e5433bdfcfea694770c7616789daf7abb These are no longer #include-d anywhere. The content is always in libdwarf.h deleted: src/bin/dwarfdump/dwarf_names.h deleted: src/lib/libdwarf/dwarf_names.h Removed all references to dwarf_names.h except in a single CLEANFILES Ensured that the compiler warning options are passed to all the test files (there were typos in that Makefile.am) modified: src/bin/buildopstab/Makefile.am modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/gennames/Makefile.am modified: src/lib/libdwarf/Makefile.am modified: test/Makefile.am modified: src/lib/libdwarf/CMakeLists.txt Removed obsolete options and unused variables. We sort the output function names dwarf_names.h by character compares, where lowercase is elevated to uppercase for the comparison, which achieves a better look in the output. The dwarf_names.h is a candidate to replace the list of these protypes in libdwarf.h modified: src/bin/gennames/gennames.c Removed unused argument. Where Argument required but unused (when faking something in libdwarf so the test program will link) marked as UNUSEDARG to silence warning. modified: test/test_linkedtopath.c 2021-08-10: David Anderson commit 0f8edbd7d7fa00dba2d47af49cbd137ddc9fb242 This source is not part of dwarfdump. Moved to its own directory. Slightly changed so we avoid using dwarf_names.h as we get the same data from libdwarf.h The program generates a fresh opcountstab.c for dwarfdump. Used by 'make rebuild' renamed: src/bin/dwarfdump/buildopscounttab.c -> src/bin/buildopstab/buildopscounttab.c Adding in buildopstab as a target directory modified: Makefile.am modified: configure.ac Builds buildopstab and, with 'make rebuild' it recreates opscounttab.c and moves it to src/bin/dwarfdump. new file: src/bin/buildopstab/Makefile.am Now avoids naming dwarf_names.h and buildopscounttab.c modified: src/bin/dwarfdump/Makefile.am These two will disappear shortly. modified: src/bin/dwarfdump/dwarf_names.h modified: src/lib/libdwarf/dwarf_names.h 2021-08-10: David Anderson commit f69f5e1f4631997f5b10a0aaadfa3f2457f6cf9f Now prints the list of function declarations in the desired order and without the extern keyword. modified: src/bin/gennames/gennames.c 2021-08-10: David Anderson commit 53d4a8d5856f3454ba08e4439ecb9c5a2e662db1 Bring this up to date with git log. modified: ChangeLog 2021-08-10: David Anderson commit 06afce1ad73862c7e73b06583ff7d6ae99b3f86e Correcting indents and trailing whitespace. modified: test/test_errmsglist.c 2021-08-10: David Anderson commit f340ef8b3af2057bb66915f7935f67a915751154 Correct indentation and trailing whitespace. modified: src/lib/libdwarf/libdwarf.h 2021-08-10: David Anderson commit d82fd189a8885362b870540357eebd623bf22134 Restore correct ctest -R self for the errmsglist check. Botched it last night. modified: test/CMakeLists.txt modified: test/test_errmsglist.c 2021-08-09: David Anderson commit 422ad97027aabfcd8ebbb83f392ce4612408b71a Removing unnecessary .am settings and removing an obsolete CLEANUP entry. modified: doc/Makefile.am modified: scripts/CLEANUP modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarfp/Makefile.am 2021-08-09: David Anderson commit d7bbc90cfcf42d993669f30d66b40559245aed25 With the new version 0.1.2 regenerated these source files with 'make rebuild', each has comment lines showing the version. modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarf_names.h modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c modified: src/lib/libdwarf/dwarf_names.h 2021-08-09: David Anderson commit 3009dd2ed7884b15db63d57449837ddeec764bd0 More on the renaming of dwarf_skip_leb128 to _dwarf_skip_leb128; the implementation renamed here. modified: src/lib/libdwarf/dwarf_leb.c 2021-08-09: David Anderson commit 89ed114bd51c53c6e9f60d08448e9c4a98717cc8 In 0.1.1 dwarf_skip_leb128 was made public. That was not necessary. All it does (in libdwarf) is let us avoid compiler warnings about unused variables in a few places. It is removed from libdwarf.h It is renamed _dwarf_skip_leb128 in dwarf_opaque.h modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_util.h modified: src/lib/libdwarf/libdwarf.h modified: test/dwarf_leb_test.c 2021-08-09: David Anderson commit 79342e6f7ed03581268d3932ec03b39180cc704e The table of nearly 500 error strings is now a simple array, eliminating nearly 500 relocations from DSO startup. It does take 50K space, whereas the real strings are about 24K. But the relocations are a time waster. Shortened a few default error strings that were overly long --- Reducing the string length static dimension by about 13 bytes each entry compared to previous. modified: src/lib/libdwarf/dwarf_errmsg_list.h modified: src/lib/libdwarf/dwarf_error.c Added new checks to determine the wasted space and check that the new message content is set up properly. The short report it prints is for maintainers who change these things. modified: test/test_errmsglist.c 2021-08-09: David Anderson commit ce659d3b8a0c286e1fcd62957daf03cab223dc03 Now version 0.1.2 modified: CMakeLists.txt modified: configure.ac 2021-08-08: David Anderson commit a9057254877a65896cf6dee4c9071a38e6b933c6 Now avoids an annoying warning by checking whether Makefile exists before trying 'make maintainer-clean' modified: scripts/CLEANUP 2021-08-07: David Anderson commit 81512c3f49491208397f926838d6dbacbf780927 Changes in commentary, including a usage hint. modified: scripts/buildandreleasetest.sh 2021-08-05: David Anderson commit 07affda6b0a89376b4f648d81d742f607e974a16 src/bin/dwarfexample Revert last commit. It was incorrect. modified: Makefile.am Fixed to use WORDS_BIGENDIAN properly for the make check test modified: dwdebuglink.c 2021-08-05: David Anderson commit 5b579984b0c17c304f2c8a49001aa6e37e925ca7 This brings DWARF_BIGENDIAN into the build of dwdebuglink so results match a baseline build littleendian on the 32bit crc. modified: src/bin/dwarfexample/Makefile.am modified: src/bin/dwarfexample/dwdebuglink.c 2021-08-05: David Anderson commit 1bdb598a9a2886c82a5d6c9d89f3e4166897fe82 Mention that pkg-config is needed to build libdwarf as of July 2021 modified: README 2021-08-04: David Anderson commit 88f8563c10fea31fcbcc67e50f0d4e24cf365b60 Updated with latest ChangeLog data modified: ChangeLog 2021-08-04: David Anderson commit f03c6132d7eabc2012cba9e7e6ae22554d9c3bc5 Fixed indent and trailing whitespace. A few lines were needlessly long, move characters to following line. modified: src/bin/dwarfdump/command_options.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_pubnames.c 2021-08-04: David Anderson commit 12b9443c595ffe3ded23830bb689c416f774f23f Remove trailing whitespace and a few indent errors. modified: src/lib/libdwarfp/pro_dnames.c 2021-08-04: David Anderson commit 4b87d2c89bc970ac782305465bd3becba8abb736 Fix indents, remove trailing whitespace. Remove one debug printf. modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_leb.c modified: src/lib/libdwarf/dwarf_query.c 2021-08-04: David Anderson commit b058e47027763a60705892bf0b88e0ca0c602552 These fix warnings about unused variables. DECODE_LEB128_UWORD_LEN_CK->DECODE_LEB128_UWORD_CK as we don't need to have the length, just the value. modified: src/lib/libdwarf/dwarf_dsc.c Here we avoid the need for a local variable we cannot use. Because in some cases we just need to skate by an leb number and update the area pointer, not needing the value in the leb. DECODE_LEB128_UWORD_CK->SKIP_LEB128_CK DECODE_LEB128_SWORD_CK->SKIP_LEB128_CK modified: src/lib/libdwarf/dwarf_abbrev.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_macro.c The new SKIP_LEB128_LEN_CK used too. modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_util.c New macros SKIP_LEB128_LEN_CK and SKIP_LEB128_CK. And some macros get a more explicit error value via _dwarf_error_string(). modified: src/lib/libdwarf/dwarf_util.h NEW LEB FUNCTION: Declare the new function dwarf_skip_leb128 modified: src/lib/libdwarf/libdwarf.h NEW LEB FUNCTION: Implement the new dwarf_skip_leb128 function. Faster than actually getting the value when we don't need the value. Works for signed and unsigned leb. modified: src/lib/libdwarf/dwarf_leb.c Adds tests of leb skipping lengths modified: test/dwarf_leb_test.c 2021-08-04: David Anderson commit 33b13cdf9168d37ab70672033c490663c383fdd4 Ensure that, when building only shared libdwarf, that ctest -R can find libdwarf.so (via LD_LIBRARY_PATH) This is in one particular test of cmake here. modified: scripts/buildandreleasetest.sh 2021-08-03: David Anderson commit 3ed0a883f8c97b790a6720611fb9ce803936bad6 Remove a silly blank line. modified: src/lib/libdwarf/dwarf_frame2.c Avoid reading a fixed-length blob of bytes when we do not need to read, just to increment the pointer. Avoiding a complaint about a set-not-used variable. One instance in each of the following. modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_macro5.c 2021-08-03: David Anderson commit 2354269ef56dcd351c8f97a394d063d17ec1ea28 Two lines of comment appeared twice in a row. Deleted one set. modified: src/lib/libdwarf/dwarf_util.c 2021-08-03: David Anderson commit 8bb89549baff6ec80c2482a5e89679f0bd2593f6 Moved a variable declaration to where it is needed. The read for an implicit const value is needed (for it all to work) but there is nothing we can do with the value here. modified: src/lib/libdwarf/dwarf_abbrev.c 2021-08-03: David Anderson commit f36570168a65644f43bebbdd74634f0a0431a932 It's here for anyone attempting to read the code that deals with the line table header versions, an overview. The file now marked as public domain. modified: src/lib/libdwarf/dw-linetableheader.txt 2021-08-03: David Anderson commit 690efc97ac26ec01533abf2854bf7b2450f023c4 baseline.ltp is not used anywhere, so is now deleted. modified: src/lib/libdwarf/Makefile.am deleted: src/lib/libdwarf/baseline.ltp deleted: src/lib/libdwarfp/baseline.ltp 2021-08-03: David Anderson commit c77e2afa3f3b293fe1e4b23c37585834bfc42570 ChangeLog Updated with latest commit log data 2021-08-03: David Anderson commit 4a1503eb9853384adba6784db3bb6e040ecf1e3c Now prints the .debug_names header(s). modified: src/bin/dwarfdump/print_debug_names.c Improved comment Now --force-empty-dnames option does something meaningful. modified: src/bin/dwarfgen/dwarfgen.cc Now correctly reads .debug_names header data modified: src/lib/libdwarf/dwarf_debugnames.c Corrected: now has dn_abbrev_table_size modified: src/lib/libdwarf/dwarf_debugnames.h Function prototype for dwarf_dnames_sizes() is now correct. modified: src/lib/libdwarf/libdwarf.h Now has a static setup for creating a real .debug_names section (with fake data). Via the dwarf_force_dnames() function (which is only useful for testing). Not yet possible to create section data via calls. modified: src/lib/libdwarfp/pro_dnames.c Aligned member names in Dwarf_P_Dnames_Head_s. modified: src/lib/libdwarfp/pro_dnames.h 2021-07-30: David Anderson commit 517529a3bce248b2e4d7a8a4aebe2e7536ed1eb5 DO NOT USE (yet). Now the 'force dnames' option actually creates legal but arbitrary .debug_names section content for testing. modified: src/lib/libdwarfp/libdwarfp.h modified: src/lib/libdwarfp/pro_dnames.c modified: src/lib/libdwarfp/pro_dnames.h modified: src/lib/libdwarfp/pro_opaque.h modified: src/lib/libdwarfp/pro_section.c 2021-07-30: David Anderson commit 416652c3e97dfed91a2199212e30da9aac2f2ab3 DO NOT USE (yet). Basic correction of use of a debug_names interface use. modified: src/lib/libdwarf/dwarf_debugnames.c 2021-07-30: David Anderson commit 06d4d25a87c4ebdd1a86c3d222660a96bf6ef889 DO NOT USE THIS (yet) basic creation of a .debug_names section with faked data in libdwarfp. modified: src/bin/dwarfgen/dwarfgen.cc modified: src/bin/dwarfgen/ireptodbg.cc 2021-07-30: David Anderson commit a228fb5eab9ffb663fc34fd3957cb61216e41ccc DO NOT USE (yet). Basic printing of .debug_dnames. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_debug_names.c 2021-07-28: David Anderson commit 8884f32b9f302a0d53f2aa4b5fb9c517d445a297 All these build singly-linked lists for temporary use. This new version uses simpler logic that does not involve if-else. See Steve Maguire, Writing Solid Code, Page 126. modified: dwarf_arange.c modified: dwarf_global.c modified: dwarf_line.c modified: dwarf_loclists.c modified: dwarf_query.c modified: dwarf_rnglists.c 2021-07-28: David Anderson commit fc1b3e910bf98aa728c51bd08342a5e02055ef50 if 0 the glflags.gf_debug_names_flag code as it is not correct yet. modified: src/bin/dwarfdump/dwarfdump.c A beginning of some revisions. Ignore this for now. modified: src/bin/dwarfdump/print_debug_names.c Correcting the use of dwarf_global_formref() where the reference can be DW_AT_type and DW_FORM_ref_sig8 so we understand what section is being targeted by an offset. And can check and report the target die TAG and name (if it has a DW_AT_name). modified: src/bin/dwarfdump/print_die.c Just delete a pointless blank line. modified: src/bin/dwarfdump/print_pubnames.c 2021-07-28: David Anderson commit 0c5199d6a6ced9fa466d6c7632337ddf3519b1e6 These two are not ready to be used. Not yet correct. modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_debugnames.h Cleaned up spacing in find_cu_die_base_fields() Added _dwarf_fill_in_abcom_from_context() and _dwarf_fill_in_context_from_abcom so that abbreviations reading is no longer directly tied to .debug_abbrev but can now also be used for the abbreviations table in .debug_names. modified: src/lib/libdwarf/dwarf_die_deliv.c More complete handlilng of is_info for DWARF4 .debug_info/.debug_types. Now we use DW_FORM_ref_sig8 to refer to .debug_types from .debug_info properly. dwarf_global_formref() and dwarf_global_formref_b() exist as the latter is needed for the offset in .debug_types needs to have the is_info =FALSE to check the reference. Other places needed slightly corrected handling of is_info. modified: src/lib/libdwarf/dwarf_form.c Now with a new field, pubnames_context->pu_pub_entries_end_ptr, to provide a sharper 'end of an entries contribution error check' than simply the end of the section. modified: src/lib/libdwarf/dwarf_global.c Added Dwarf_Byte_Ptr pu_pub_entries_end_ptr; for the improved checking. modified: src/lib/libdwarf/dwarf_global.h Now with _dwarf_fill_in_context_from_abcom() and _dwarf_fill_in_abcom_from_context() to isolate abbreviation reading from any specific section. modified: src/lib/libdwarf/dwarf_opaque.h Using _dwarf_fill_in_context_from_abcom() and _dwarf_fill_in_abcom_from_context() to isolate abbreviation reading from any specific section. modified: src/lib/libdwarf/dwarf_query.c Now using internal struct Dwarf_Abbrev_Common_s to isolate abbreviation reading from any specific section. modified: src/lib/libdwarf/dwarf_util.c Declares a revised struct Dwarf_Abbrev_Common_s. modified: src/lib/libdwarf/dwarf_util.h dwarf_formref now adds a Dwarf_Bool *is_info argument so we can fully treat DWARF4 debug_info/debug_names properly. This is a change to dwarf_formref() argument list. Added dwarf_global_formref_b() to return an is_info flag along with the offset (for DWARF4 section .debug_info or .debug_names that offset applies to) Some dwarf_dnames function prototypes changed, but those are not yet correct, ignore them. modified: src/lib/libdwarf/libdwarf.h 2021-07-28: David Anderson commit 81ee54de5c146282fec67dec9375103c1069d61d Uses dwarf_formref/dwarf_global_formref correctly, recognizing the is_info argment for DWARF4 debug_info/debug_types. shortened a couple too-long lines. modified: src/bin/dwarfgen/createirepformfrombinary.cc 2021-07-23: David Anderson commit bbbca00128b70a25ecb7132c90ee494abad5b692 DO NOT USE THIS COMMIT YET. modified: src/lib/libdwarf/dwarf_form.c 2021-07-23: David Anderson commit ad4aebecce0c6a8d4fe23f8d3c509754fd04937d DO NOT USE THIS COMMIT YET. Preparation for unifying abbreviation reading from .debug_abbrev and .debug_names modified: dwarf_die_deliv.c modified: dwarf_query.c modified: dwarf_util.h 2021-07-23: David Anderson commit 399e023a36da18bd8dbd4f14d9ce2bcc8bd5a6c4 DO NOT USE THIS COMMIT YET. Added comment, no guarantee uint32_t defined. modified: CMakeLists.txt Now ensures uint32_t defined, needed for DWARF5 hash. modified: configure.ac 2021-07-19: David Anderson commit 2e126424e347a66ab9d6d81a9b46692fd93b6c87 DO NOT USE THIS COMMIT. Now part way to a new set of .debug_names interfaces. modified: doc/libdwarf.mm modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_debugnames.h modified: src/lib/libdwarf/dwarf_errmsg_list.h modified: src/lib/libdwarf/libdwarf.h 2021-07-15: David Anderson commit 550725b7e0dc9c112a948e8f4b867d5740563519 Updated with latest git commits modified: ChangeLog 2021-07-15: David Anderson commit c7036121fb9d47539953daf704f7dc29a3aef274 Deleted a few new-ish lines related to version number from autogen.sh. We now use PACKAGE_VERSION from config.h for the version string. So libdwarf_version.h header is deleted. modified: autogen.sh deleted: src/lib/libdwarf/libdwarf_version.h modified: src/lib/libdwarf/Makefile.am The PACKAGE_VERSION string has a couple less blank characters than the date string from libdwarf_version.h so regenerating changed the comment line with the version string. modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarf_names.h modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c modified: src/lib/libdwarf/dwarf_names.h Dropping libdwarf_version.h, using PACKAGE_VERSION from config.h modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/common.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/gennames/gennames.c modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/tag_tree.c 2021-07-15: David Anderson commit 12ef9e68b920c228532e7a386cbaa2115edae1fc At three different stages we verify make doc and make rebuild can be done. Helping verify that make dist gets everything needed. modified: scripts/buildandreleasetest.sh 2021-07-15: David Anderson commit 275553cba2646bed4aeeecf2535a1ab42012e994 Neglected bin/attr_form in one place. Mentioned files that no longer exist (oops) modified: Makefile.am Mentioned files that no longer exist (oops) modified: src/bin/dwarfdump/Makefile.am modified: src/lib/libdwarf/Makefile.am 2021-07-15: David Anderson commit 4d812f3ebb3265a2c3a92978bb0ce69208854f9b Mentions the move to Semantic Versioning now. modified: NEWS 2021-07-15: David Anderson commit 1507c2be60847925d177beda356740dbc5321665 This file is no longer used since make rebuild implemented. deleted: scripts/baseconfig.h 2021-07-15: David Anderson commit f2f5a0acaa6c01200b28e31c4d0ab4b6ba616c4b This script is no longer needed or wanted. autogen.sh updates the libdwarf_version.h with the proper version number string instead of a date. deleted: scripts/UPDATEDWARFDUMPVERSION.sh 2021-07-15: David Anderson commit 154a84c5d4bf045d845ad10bf08b21954686f43b Bringing ChangeLog up to date from git log. As a result of this all ChangeLog entries for the project wind up in the base 'code' directory ChangeLog. modified: ChangeLog 2021-07-15: David Anderson commit 93e89df6c68b910780e28113e78535ea3e787eee Instead of a date string in src/lib/libdwarf/libdwarf_version.h we put the current version number extracted from configure.ac at autogen.sh time. This means the 'Generated' messages reflect what matters: the version number triple. When 'make rebuild' is done next all the necessary generated code gets regenerated. This now modifies src/lib/libdwarf/libdwarf_version.h with the latest version number (currently 0.1.1) as VERSION_DATE_STRING modified: autogen.sh modified: src/lib/libdwarf/libdwarf_version.h Now the generated comments say the Generated source version instead of generated date string. modified: src/bin/attr_form/attr_form_build.c modified: src/bin/gennames/gennames.c modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/tag_tree.c In the build tree leave the build-local dwarf_names.c and dwarf_names.h for human inspection until make clean run modified: src/bin/gennames/Makefile.am All these regenerated by make rebuild modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarf_names.h modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c modified: src/lib/libdwarf/dwarf_names.h 2021-07-14: David Anderson commit 76f78f39df252d678232f84f2eb5d910df346c22 These maintainer-only scripts no longer used. Instead use 'make rebuild' deleted: scripts/buildstandardsource.sh deleted: scripts/ddbuild.sh Now all three C source-building programs work. tagattr tagtree and attrform. The have been extracted from dwarfdump and how have their own src/bin/directories. modified: Makefile.am modified: configure.ac new file: src/bin/attr_form/Makefile.am renamed: src/bin/dwarfdump/attr_form_build.c -> src/bin/attr_form/attr_form_build.c modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_tree/Makefile.am 2021-07-14: David Anderson commit 8a7544bb990cf26588fbd41243e2095e564abd5f DO NOT USE THIS COMMIT. It's a step toward getting 'make rebuild' to work. Thereby eliminating three shell scripts under the scripts directory. This is for maintainers only. Eliminating code from dwarfdump that is not compiled into dwarfdump. modified: Makefile.am modified: configure.ac modified: scripts/ddbuild.sh modified: src/bin/dwarfdump/common.c new file: src/bin/tag_attr/Makefile.am renamed: src/bin/dwarfdump/tag_attr.c -> src/bin/tag_attr/tag_attr.c new file: src/bin/tag_tree/Makefile.am renamed: src/bin/dwarfdump/tag_tree.c -> src/bin/tag_tree/tag_tree.c modified: test/Makefile.am 2021-07-14: David Anderson commit d4f1c293e044f0afac1235f4c3ced0d64852b231 Merge: 6f5ff07e 679f74fb Merge pull request #33 from jgcodes2020/choose-msvcrt Allow choosing MSVC runtime on Windows 2021-07-14: David Anderson commit 6f5ff07e2764200aa488186dc4d3edce89391627 in gennames as general information. new file: README.txt 2021-07-14: David Anderson commit 1a415f05fb7e612892cb433f88488b8bd51dd76c Now builds gennames and dwarf_names.h dwarf_names.c with 'make rebuild' New directory src/bin/gennames modified: Makefile.am modified: configure.ac Remove libbuild.sh, it's gone. modified: scripts/buildstandardsource.sh deleted: scripts/libbuild.sh Now make rebuild does what is needed: regenerates dwarf_names.{c,h} new file: src/bin/gennames/Makefile.am renamed: src/lib/libdwarf/gennames.c -> src/bin/gennames/gennames.c 2021-07-14: jgcodes2020 commit 679f74fb727297a269b2d091532fa45db044b850 Reenable new behaviour 2021-07-14: jgcodes2020 commit 19ff9f1d145e2126b80e83f4bc835deff673d050 Backwards compatibility to CMake 3.3 2021-07-14: David Anderson commit 10173ca5dff04ff09bc94a2edaf7d93727852a67 HAVE_OLD_FRAME_CFA_COL and HAVE_SGIDEFS_H have been removed as now-meaningless. This file is not the normal config.h and is not used in user-builds, so ignore it. modified: scripts/baseconfig.h 2021-07-13: David Anderson commit 11a4f671bc4ec41da75261063a5e96bc08e637a7 All the ENUM_AND_BINARY_SEARCH ifdefs and code removed, none was used by libdwarf. We do not use the enum form of names.n and we use the switch() form in names.c, not binary search. modified: src/lib/libdwarf/gennames.c 2021-07-13: David Anderson commit af45dcc13b2576cf4590546d594e1bdf55769f14 No longer have or generate dwarf_names_enum.h or dwarf_names_new.h these are not needed, all compilers generate reasonable C switch() code, and libdwarf is essentially all #define, not enum. modified: src/lib/libdwarf/Makefile.am dwarf_names_enum.h or dwarf_names_new.h #undef out of the code. modified: src/lib/libdwarf/gennames.c Updated version strings. modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarf_names.h modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c modified: src/lib/libdwarf/dwarf_names.h These two now gone. Not needed. deleted: src/lib/libdwarf/dwarf_names_enum.h deleted: src/lib/libdwarf/dwarf_names_new.h Updated with new version string modified: src/lib/libdwarf/libdwarf_version.h 2021-07-13: David Anderson commit 3a9b3ad12cf3352829e193bb433f40a7db1252d2 Remove trailing whitespace. Fix indents not matching libdwarf standard format. modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_rnglists.c 2021-07-13: David Anderson commit 62e58186f9a76af183a5feeb5e6d5268c260d7e8 Instances of unsigned x changed to the full type of unsigned int x for consistency and for clarity of intent. modified: libdwarf.h 2021-07-13: David Anderson commit 08f5577c09e6f459ff8c80d4d11cc335748cd8c9 modified: ChangeLog Small modification to clarify: libdwarf never calls abort() as of now. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf 2021-07-13: David Anderson commit 95edf93c288433a7d13bfe0d35d0481693e968ca Revised wording in error handling descriptions. When libdwarf is unable to report an error (the user provided no Dwarf_Error argument or errhandler function) the library prints a short message on stderr starting with the word 'libdwarf' and adding the error number it was unable to otherwise report. modified: libdwarf.mm modified: libdwarf.pdf 2021-07-13: David Anderson commit c7389aa2bfa3237d299bef199e00baa6a907ee39 Removing the obsolete function declaration of dwarf_lineoff() modified: libdwarf.h 2021-07-13: David Anderson commit aa82e89aadefc51a4ec160cfe4045378ca5fd083 modified: src/bin/dwarfdump/print_die.c Ensured every error case appropriate does dwarf_loc_head_c_dealloc() now to free resources as soon as possible. modified: src/bin/dwarfdump/print_frames.c Corrected spelling in an error message. modified: src/lib/libdwarf/dwarf_die_deliv.c Added specificity to an error message. modified: src/lib/libdwarf/dwarf_loc.c Removed unused library-internal arguments. Added error checks to publicly visible functions to prevent user calls with null pointers from crashing libdwarf. Added magic numbers so the library can recognize garbage or stale pointers, and on free ensure the magic numbers are zeroed. Moved dwarf_loc_head_c_dealloc to dwarf_loclists.c to be near the other dealloc functions for locations lists. modified: src/lib/libdwarf/dwarf_loc.h Added magic number fields lc_magic, ld_magic, and ll_magic. Defined LOCLISTS_MAGIC. modified: src/lib/libdwarf/dwarf_loclists.c Added additional checks of incoming pointers to avoid crashing in case of user errors. Set and cleared the magic number fields as apprpropriate. Corrected the dealloc/free code so it works properly in all cases. modified: src/lib/libdwarf/dwarf_rnglists.c Deleted #if 0 debug printf lines two places. 2021-07-11: David Anderson commit 1d9d4d16c5af77efbb619d7264873393af25564f Now all the arguments to public functions (and local ones) are all used appropriately. We use 'magic number' RNGLISTS_MAGIC so we can detect instances of using uninialized or stale rnglists pointers (the structs are not them selves visible to library callers) modified: src/bin/dwarfdump/print_die.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_rnglists.h modified: src/lib/libdwarf/dwarf_util.c modified: src/lib/libdwarf/dwarf_util.h The declaration of dwarf_dealloc_rnglists_head() as dealloc functions are not supposed to return a value. Fixed. modified: src/lib/libdwarf/libdwarf.h 2021-07-11: David Anderson commit 531151a82b2f7d7037a6bf4bc7e4e4af658bf550 Missing lines about DWARF_LIBS AC_SUBST AC_ARG_VAR modified: configure.ac 2021-07-11: David Anderson commit 46c52c5e42d01bc6963e781e79ead0e1f22830ed Merge: b962165a 95adc788 Merge pull request #32 from vtorri/vtorri_pkgconfig Use pkg-config to detect zlib 2021-07-11: Vincent Torri commit 95adc788ce27b5371ab433821c1e96cbd4677195 Use pkg-config to detect zlib 2021-07-10: David Anderson commit b962165a780ff2185fcc12bd679856e36621a6cb HAVE_SGI_IRIX_OFFSETS HAVE_STRICT_DWARF2_32BIT_OFFSET HAVE_DWARF2_99_EXTENSION are all obsolete and meaningless. Deleted. modified: CMakeLists.txt modified: README.cmake 2021-07-10: David Anderson commit b2c98f61cdaecd3906f7afd4aa3a556806b66a01 Fixed indents and removed trailing whitespace. modified: getnametest.c modified: objaccess.c modified: test_errmsglist.c 2021-07-10: David Anderson commit f32d88fa87ab5e97182fd981e1c7fa359e6feec6 The canonical path function test code removed from dwarfdump/dwconf.c and put into test/test_canonical.c modified: src/bin/dwarfdump/dwconf.c modified: src/bin/dwarfdump/dwconf.h modified: test/CMakeLists.txt modified: test/Makefile.am new file: test/test_canonical.c 2021-07-10: David Anderson commit e79f65a63cb8b912aa66364f703bba6c737f82ba Removed mention of HAVE_ELF_OPEN modified: dwarf_generic_init.c 2021-07-10: David Anderson commit b37934ced44f9ea156876bb60e970f0a33ce0eea Removed mention of HAVE_ELF_OPEN modified: dwarfgen.cc 2021-07-10: David Anderson commit 10c739419153504bbb86c2ab546c827ceb5937e9 Fixed indents and trailing whitespace. modified: attr_form.h modified: dwarf_tsearch.h modified: dwconf.c modified: glflags.h modified: print_aranges.c modified: print_debug_names.c modified: print_die.c modified: print_frames.c modified: print_pubnames.c modified: print_ranges.c 2021-07-10: David Anderson commit 07f73f16cc07abc78d4758bca91f63dfe8faa3dc Removed HAVE_ELF_OPEN macro test. It is not defined anywhere. modified: dwarfdump.c 2021-07-10: David Anderson commit 6885138dedcd65aeabea11946b556d0eb02c47b8 Merge: 6f90bb57 491cdc85 Merge branch 'dn' Merging the rewritten .debug_names handling 2021-07-10: David Anderson commit 491cdc852f99207c5dcf2234b4c31fde58834cc3 The rewrite of .debug_names handling is complete, though the dwarfdump printing is incomplete and none of it has been tested. Needs a test case. modified: src/bin/dwarfdump/print_debug_names.c modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_debugnames.h modified: src/lib/libdwarf/libdwarf.h 2021-07-10: David Anderson commit a6e132626e33883185a03836dfb0d1fa5162f69e DO NOT USE THIS COMMIT. not buildable yet. modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_debugnames.h modified: src/lib/libdwarf/libdwarf.h 2021-07-10: David Anderson commit 6f90bb57c3376492eb3d99822a5c3af0835ba30d Merge: ab96206d 62a3f3f4 Merge pull request #31 from vtorri/master dwarfdump: move dwarfdump.comp detection on Windows outside the loop 2021-07-10: Vincent Torri commit 62a3f3f4304f0263df9af4de1c5dc37ff5e4faca dwarfdump: move dwarfdump.comp detection on Windows outside the loop. Fallback to Unix code if still not found 2021-07-08: David Anderson commit ab96206d2ca377651f68a0a529537b1f1abc61ef Merge: fafaacda de9785c7 Merge branch 'master' of https://github.com/davea42/libdwarf-code modified: README 2021-07-08: David Anderson commit de9785c76d56b962983a11366b1d29e5223fa637 Merge: 2c8637ce d2c73d81 Merge pull request #29 from vtorri/vtorri_README update README: 2021-07-08: David Anderson commit fafaacda08185cd267d100edf6a89403f0328028 Elminating mention of DW_DLC_READ (except to say it and the 'access' argument to dwarf_init*() functions have been removed as not-needed. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf modified: src/lib/libdwarf/NEWS modified: src/lib/libdwarf/README modified: src/lib/libdwarf/dwarf_errmsg_list.h 2021-07-08: Vincent Torri commit d2c73d8168a7f3d65ae3c047072be2eb7d5331f4 update README: * remove trailing white spaces * fix configure option when building only shared library * remove comment about deleted DW_DLC_READ macro 2021-07-08: Vincent Torri commit 46bec1a4abe76f60568afdf95ef9255b298f5edf Merge: da58f9fb 2c8637ce merge 2021-07-07: David Anderson commit 2c8637ce1119dde51396fecaa9858f4e2da5a965 Fixing trailing white, indent errors, and if( for( to standard project source format. modified: dwdebuglink.c modified: findfuncbypc.c modified: frame1.c modified: simplecrc.c modified: simplereader.c 2021-07-07: David Anderson commit 46bc82c35c1d0ce129d3d93eb7df83125cf44ad1 Remove trailing whitespace, fix indents modified: libdwarfp.h modified: pro_die.c modified: pro_incl.h modified: pro_section.c 2021-07-07: David Anderson commit 642ebe6352a8545b1b697629e67eed0ffb954e9c Fix indents and eliminate trailing whitespace. modified: dwarf_debugnames.c modified: dwarf_debugnames.h modified: dwarf_die_deliv.c modified: dwarf_errmsg_list.h modified: dwarf_fission_to_cu.c modified: dwarf_form.c modified: dwarf_frame.c modified: dwarf_generic_init.c modified: dwarf_leb.c modified: dwarf_line.c modified: dwarf_loc.c modified: dwarf_object_detector.c modified: dwarf_query.c modified: libdwarf.h modified: libdwarf_private.h 2021-07-07: David Anderson commit 64210ea43a37f4d372a2c5ace337603582bcd1cb Updated copyright year. In 2 places }dw... For consistency changed to } dw... like the other typedefs here. modified: dwarf_elfstructs.h 2021-07-07: David Anderson commit 8eaa1fb5918330bb4119e85ca7b97fcc7f1062c2 Removed macro ASNAR definition from several files, moved to libdwarf_private.h . Along with SIZEOFT16, SIZEOFT32 SIZEOFT64 . Also SIGN_EXTEND, a less used ASNAR renamed ASNARL removed LEN32BIT and use SIZEOFT32 instead. modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_util.h modified: src/lib/libdwarf/dwarf_xu_index.c modified: src/lib/libdwarf/libdwarf_private.h Delete macro defs SIGN_EXTEND ASNAR, use the ones in libdwarf_private.h modified: src/lib/libdwarfp/pro_forms.c modified: src/lib/libdwarfp/pro_incl.h 2021-07-07: David Anderson commit a6cb694fb0047bfd136e53eab0ab9766c759be80 Removed dw_elfstructs.h from .am modified: src/lib/libdwarf/Makefile.am the content needed is in dwarf_elfstructs..h deleted: src/lib/libdwarf/dw_elfstructs.h 2021-07-07: David Anderson commit 55188d384ba1b9b8d8c921259dd03b48f2f6cb3c Now most C (gcc) warning options are on by default. configure/m4 ensures only options that work for a given compiler will actually be passed to it. modified: configure.ac 2021-07-07: David Anderson commit 144a6878c3d88f5db4f59c5f37db4f030ef61acb Neither libdwarf nor libdwarfp ever abort() now. In case there is no way to report to the caller what the error is (because the caller provided no means to report error messages) libdwarf prints a one-line message to stderr with the error number. For errors libdwarf and libdwarfp always return DW_DLV_ERROR. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf modified: src/lib/libdwarf/NEWS modified: src/lib/libdwarf/dwarf_error.c modified: src/lib/libdwarfp/pro_error.c Sligtly improved the message from simplereader in case of a libdwarf-detected error. modified: src/bin/dwarfexample/simplereader.c 2021-07-07: David Anderson commit c438ede1388ad1ec3af999ad82a7f75523e9062a modified: src/bin/dwarfdump/command_options.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/glflags.h modified: src/bin/dwarfdump/glflags.c Removing OPT_ALLOC_PRINT_SUMS and --print-alloc-sums as they no longer exist. modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_alloc.h Remove the allocation tracking counts retrieval function (an empty function). modified: src/lib/libdwarf/libdwarf.h Slightly modify a comment relating to alloc tracking function dwarf_set_de_alloc_flag(). 2021-07-07: David Anderson commit 05b8460bf1fe616644a2b4ae236e9adbef47c754 modified: doc/libdwarf.mm modified: doc/libdwarf.pdf (regenerated) Added some explanation of the dwarf_set_de_alloc_flag() function. 2021-07-07: David Anderson commit e6d6c423bd04e2514ead2f92a468973dff7a43e5 Macros that were defined in multiple c source files in libdwarfp are now in this header. For example: ASN_OUT modified: src/lib/libdwarfp/pro_incl.h Removed these macro defines from .c modified: src/lib/libdwarfp/pro_forms.c modified: src/lib/libdwarfp/pro_frame.c modified: src/lib/libdwarfp/pro_reloc_symbolic.c modified: src/lib/libdwarfp/pro_section.c Moved the #include of pro_incl.h to a more appropriate place farther down the include list. modified: test/test_extra_flag_strings.c 2021-07-06: David Anderson commit 316f64a44d61e8808330d0a3f1fdfc84405d3d9d modified: src/lib/libdwarf/libdwarf.h In a few cases of missing comment delimiters, I fixed like this example: - Dwarf_Unsigned * indextable_overall_length, + Dwarf_Unsigned * /*indextable_overall_length*/, 2021-07-06: David Anderson commit aa224a3cae53e30f2c032b85880ad5d288a182b5 Additional explanation of the .debug_names section content and renaming certain arguments (not the types) for clarity. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf Using the new, better dwarf_dealloc_debugnames(dnhead) function modified: src/bin/dwarfdump/print_debug_names.c renamed dwarf_debug_names.c,h to dwarf_debugnames.c, modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/dwarf_alloc.c renamed: src/lib/libdwarf/dwarf_debug_names.c -> src/lib/libdwarf/dwarf_debugnames.c renamed: src/lib/libdwarf/dwarf_debug_names.h -> src/lib/libdwarf/dwarf_debugnames.h modified: src/lib/libdwarf/libdwarf.h 2021-07-05: Vincent Torri commit da58f9fb830fce2fa844f90bd3de6de9361d0247 configure.ac: remove useless output and regroup common C flags in a variable 2021-07-04: David Anderson commit e0f6a8209295d952d0437cbdaec71ff9464b991d Now all the functions for getting strings for DW_TAG_subprogram and DW_AT_type etc etc are named properly and concisely. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf 2021-07-04: David Anderson commit c67bf916d8fc011b3e30e737c071c20e16132c5a A static function had a name starting with dwarf and now it is renamed starting with _dwarf for consistency with library internal functions. modified: src/lib/libdwarf/dwarf_die_deliv.c 2021-07-04: David Anderson commit 062524d30cb614398c5696714f587605335ef59d Remove descriptions of functions that are not in libdwarf now. modified: doc/libdwarf.mm Rename one argument identifier for clarity. modified: src/lib/libdwarf/libdwarf.h 2021-07-03: David Anderson commit 446bebcaba6623665c80eae4d9376f6185c7827b Added commentary. modified: src/lib/libdwarf/dwarf_query.c Deleted dwarf_get_path_source_type(), there never was an implementation of...whatever this was supposed to do. modified: src/lib/libdwarf/libdwarf.h 2021-07-03: David Anderson commit 3a1d8ca472600fc49c58573cc477bc309b51ddb5 added to the description of dwarf_dietype_offset(). modified: libdwarf.mm modified: libdwarf.pdf 2021-07-03: David Anderson commit 8b011901ca37ffebfe9bd55d4f79388de47e5ac4 Explained the arguments in a bit more detail. modified: ../src/lib/libdwarf/dwarf_crc32.c Deleted a function that has not been used for a long time. modified: ../src/lib/libdwarf/dwarf_init_finish.c 2021-07-03: David Anderson commit 1f879710839f6eabb08b5437dd302fd9ab1dc00c Documented dwar_set_stringcheck(), a function that might help some, but... it turns off some object file correctness checks. Dangerous. modified: libdwarf.mm modified: libdwarf.pdf 2021-07-03: David Anderson commit 639c57bdb5fd8ca0a5a6540921ee8f83db2a77aa Removed obsolete words about code that is now gone. modified: src/bin/dwarfdump/testdwarfdump.conf Repaired dwarf_bitoffset() by adding a new argument so the caller can know if the return is DW_AT_data_bit_offset or DW_AT_bit_offset. modified: src/lib/libdwarf/dwarf_query.c Fixed commentary and updated the dwarf_bitoffset() prototype. modified: src/lib/libdwarf/libdwarf.h 2021-07-03: David Anderson commit 4cdf8b0b6bf56f0f2852f2a6eab64abb427ba05f Removed blocks of obsolete words. Removed many function-name repetitions where the function name was obvious from context. modified: ../../../doc/libdwarf.mm modified: ../../../doc/libdwarf.pdf 2021-07-02: David Anderson commit 5b00e1d96498b2255d71293fa33eb3338184fa04 Deleted a check of the DW_DLE values from libbuild.sh. Now the test done by 'make check'. modified: scripts/libbuild.sh Removed the old checking source, put it in test renamed: src/lib/libdwarf/dwarf_test_errmsg_list.c -> test/test_errmsglist.c remove reference to dwarf_test_errmsg_list.c modified: src/lib/libdwarf/Makefile.am Implemented test runs for test_errmsglist.c Now at make check having 20 tests if all things built. modified: test/CMakeLists.txt modified: test/Makefile.am 2021-07-02: David Anderson commit 16c107a690c5e55100a59239ebf1435a469f662e Delete all the tsearch/* directory stuff, that is now on github as the project davea42 tsearch-code modified: Makefile.am Remove UNUSEDARG and delete an unused libdwarf-internal argument. modified: src/lib/libdwarf/dwarf_fission_to_cu.c Add site-specific text to the error message that is generated when an allocation fails. modified: src/lib/libdwarf/dwarf_gdbindex.c Add include of libdwarf_private.h so it builds again. It is not part of libdwarf, it is a support program for libdwarf. modified: src/lib/libdwarf/gennames.c Correct the references in MAINTAINERCLEANFILES and format part of the table to look nicer. modified: test/Makefile.am 2021-07-01: David Anderson commit 12bd38295872e4a82268498d8bf643870af5d2bb Removed unused arguments from print_gdb_index() and dwarf_gdbindex_cuvector_instance_expand_value() modified: src/bin/dwarfdump/print_gdbindex.c Removed unused argument from dwarf_gdbindex_header() and dwarf_gdbindex_cuvector_instance_expand_value(). Added argument checks to the latter. modified: src/lib/libdwarf/dwarf_gdbindex.c Removed unused argument from dwarf_gdbindex_header() Removed unused argument from dwarf_gdbindex_cuvector_inner_attributes() modified: src/lib/libdwarf/libdwarf.h 2021-07-01: David Anderson commit 7f9442b87b4836e10cd179213e55bf449049818e dwarf_init_path() and dwarf_init_path_dl() had 3 extra arguments which had no purpose. These extras have been removed. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/simplereader.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/libdwarf.h 2021-07-01: David Anderson commit c8ce50b008834057604016054603dbbc867566a9 Removing references to HAVE_OLD_FRAME_CFA_COL HAVE_GLOBAL_ALLOC_SUMS as these are not used. modified: cmake/config.h.cmake modified: src/lib/libdwarf/dwarf_alloc.c 2021-07-01: David Anderson commit 1eee95b14f6284d7c9287b40a194ce981f8f67a3 Minor changes to comments for consistency. (use "git push" to publish your local commits) 2021-07-01: David Anderson commit aeb77517b95d3584f9973418f49c8df153d7e8ce Minor fixes. modified: doc/libdwarf.mm 2021-07-01: David Anderson commit cede7a11e42794960967a5b241c00fb0cb7c41b0 Removed obsolete comments. modified: doc/libdwarf.mm Removed a bogus comment and in a couple cases change a 5-space separation to 1-space. modified: src/lib/libdwarf/libdwarf.h 2021-07-01: David Anderson commit 1bd354921414c82791b18de36045c70c85b982c9 Rev 4.6. Removed several duplicated descriptions in the 'globals' section types and now refers back to the globals set for the details. modified: libdwarf.mm modified: libdwarf.pdf Changed a comment. modified: ../src/lib/libdwarf/dwarf_generic_init.c Defined dwarf_get_line_section_name() for a slight added consistency. modified: ../src/lib/libdwarf/dwarf_line.c modified: ../src/lib/libdwarf/libdwarf.h 2021-07-01: David Anderson commit 4d849a60352904817d6c2cd86ec02bc23819f487 Dramatically reduced the text about the various pubnames, pubtypes, weakname, and varnames functions by referring all back to globals detailed documentation. In the library all of these are implemented with a shared group of functions so they all operate similarly. modified: libdwarf.mm Regenerated. modified: libdwarf.pdf 2021-06-30: David Anderson commit 63153717c5016a5dd3074bfdbce70436e41589e9 Various Accelerated Access sections had omissions and errors. modified: doc/libdwarf.mm regenerated. modified: doc/libdwarf.pdf Fixed minor commentary mistakes. modified: src/lib/libdwarf/dwarf_arange.c Deleted dwarf_get_loclist_entry() an obsolete function declaration. The function itself was deleted already. modified: src/lib/libdwarf/libdwarf.h 2021-06-30: David Anderson commit 833b9c15df071fcdbd7b24a55ec1564f0bb136c5 dwarf_uncompress_integer_block() deleted as obsolete. Use dwarf_uncompress_integer_block_a() instead. This is a SunMicrosystems-only block of numbers, may not be in use anywhere. modified: libdwarf.h 2021-06-30: David Anderson commit 87ffaa04df07fa0c0655f22859933510b39b1e74 Rearranged so certain sets of functions now appear next to each other. dwarf_weak* dwarf_func* etc. modified: src/lib/libdwarf/libdwarf.h 2021-06-29: David Anderson commit 8c775946d1a92c674a78bbd010c2e497bcc63aca this included libdwarf things. no longer used. deleted: ../src/lib/libdwarf/dwarf_incl.h Improving the text a little. modified: ../doc/libdwarf.mm modified: ../doc/libdwarf.pdf dwarf_incl.h deleted Now the includes are one-level. modified: ../src/lib/libdwarf/CMakeLists.txt modified: ../src/lib/libdwarf/Makefile.am modified: ../src/lib/libdwarf/dwarf_abbrev.c modified: ../src/lib/libdwarf/dwarf_alloc.c modified: ../src/lib/libdwarf/dwarf_arange.c modified: ../src/lib/libdwarf/dwarf_crc32.c modified: ../src/lib/libdwarf/dwarf_debug_names.c modified: ../src/lib/libdwarf/dwarf_debug_sup.c modified: ../src/lib/libdwarf/dwarf_debuglink.c modified: ../src/lib/libdwarf/dwarf_die_deliv.c modified: ../src/lib/libdwarf/dwarf_dsc.c modified: ../src/lib/libdwarf/dwarf_error.c modified: ../src/lib/libdwarf/dwarf_find_sigref.c modified: ../src/lib/libdwarf/dwarf_fission_to_cu.c modified: ../src/lib/libdwarf/dwarf_form.c modified: ../src/lib/libdwarf/dwarf_frame.c modified: ../src/lib/libdwarf/dwarf_frame2.c modified: ../src/lib/libdwarf/dwarf_funcs.c modified: ../src/lib/libdwarf/dwarf_gdbindex.c modified: ../src/lib/libdwarf/dwarf_generic_init.c modified: ../src/lib/libdwarf/dwarf_global.c modified: ../src/lib/libdwarf/dwarf_gnu_index.c modified: ../src/lib/libdwarf/dwarf_groups.c modified: ../src/lib/libdwarf/dwarf_harmless.c modified: ../src/lib/libdwarf/dwarf_init_finish.c modified: ../src/lib/libdwarf/dwarf_leb.c modified: ../src/lib/libdwarf/dwarf_line.c modified: ../src/lib/libdwarf/dwarf_loc.c modified: ../src/lib/libdwarf/dwarf_locationop_read.c modified: ../src/lib/libdwarf/dwarf_loclists.c modified: ../src/lib/libdwarf/dwarf_macro.c modified: ../src/lib/libdwarf/dwarf_macro5.c modified: ../src/lib/libdwarf/dwarf_print_lines.c modified: ../src/lib/libdwarf/dwarf_pubtypes.c modified: ../src/lib/libdwarf/dwarf_query.c modified: ../src/lib/libdwarf/dwarf_ranges.c modified: ../src/lib/libdwarf/dwarf_rnglists.c modified: ../src/lib/libdwarf/dwarf_str_offsets.c modified: ../src/lib/libdwarf/dwarf_stringsection.c modified: ../src/lib/libdwarf/dwarf_test_errmsg_list.c modified: ../src/lib/libdwarf/dwarf_tied.c modified: ../src/lib/libdwarf/dwarf_types.c modified: ../src/lib/libdwarf/dwarf_util.c modified: ../src/lib/libdwarf/dwarf_vars.c modified: ../src/lib/libdwarf/dwarf_weaks.c modified: ../src/lib/libdwarf/dwarf_xu_index.c modified: dwarf_leb_test.c modified: dwarf_tied_test.c modified: objaccess.c modified: test_linkedtopath.c 2021-06-29: David Anderson commit 244a4773b2556e694209a83523c7ddf134c095cf Removed mention of dwarf_seterrhand() and dwarf_seterrarg() as neither was ever implemented. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf 2021-06-29: David Anderson commit 2453359ca6bb156849b8de4400c17a30a49ebf10 modified: configure.ac Delete reference to --enable-oldframecol, HAVE_OLD_FRAME_CFA_COL. Delete reference to --enable-global-alloc-sums, HAVE_GLOBAL_ALLOC_SUMS These are obsolete. modified: src/lib/libdwarf/dwarf_init_finish.c Remove lines dealing with HAVE_OLD_FRAME_CFA_COL. modified: src/lib/libdwarf/libdwarf.h Move dwarf_object_finish() up a few lines to be right next to dwarf_object_init_b() as it should have been all along. Removed dwarf_seterrarg() and dwarf_seterrhand() as they were never implemented. modified: test/Makefile.am and modified: test/CMakeLists.txt Add two new tests test_getnametest and test_objectaccess modified: test/getnametest.c modified: test/objaccess.c These are the source that are the new tests. Self-testing. 2021-06-29: David Anderson commit 895ee2fc7317a9a88d60b79b001314a4c67c834d modified: src/lib/libdwarf/dwarf_util.c Deleted the obsolete function dwarf_add_file_path() Deleted the obsolete function dwarf_srclines_files_count(), use dwarf_srclines_files_indexes() instead. modified: src/lib/libdwarf/dwarf_line.c Delete the obsolete function dwarf_srclines_two_level() Deleted the obsolete function dwarf_srclines_files_count(), use dwarf_srclines_files_indexes() instead. modified: src/lib/libdwarf/libdwarf.h Corrected a comment. Delete the obsolete function dwarf_srclines_two_level() Delete the obsolete function dwarf_add_file_path() Delete the obsolete function dwarf_srclines_files_count(), use dwarf_srclines_files_indexes() instead. modified: test/CMakeLists.txt Added the selftestnames test to get coverage of some functions in libdwarf/names.c modified: test/Makefile.am To get coverage of some functions in libdwarf/names.c new file: test/getnametest.c To get coverage of some functions in libdwarf/names.c 2021-06-28: David Anderson commit 49393fbe647a31290b170cf73fa4953e24e947c4 modified: src/lib/libdwarf/libdwarf.h Update commentary, removing reference to obsolete register/frame interfaces. 2021-06-28: David Anderson commit 91c4bbf0e453db284f5cbea221c860ec53f378cb modified: src/lib/libdwarf/libdwarf.h These two are obsolete, their code is already gone from libdwarf. dwarf_get_location_op_value_c() dwarf_highpc() dwarf_print_memory_stats() is really useless, the implementation is...an empty function. dwarf_get_abbrev_count() was never safe to use. And nobody actually needs to know the count of abbrevs in the entire .debug_abbrev section. modified: src/lib/libdwarf/dwarf_abbrev.c delete the unsafe function dwarf_get_abbrev_count() modified: src/lib/libdwarf/dwarf_alloc.c Delete the useless dwarf_print_memory_stats() function. modified: src/lib/libdwarf/dwarf_loc.c Delete the obsolete dwarf_get_location_op_value_c() modified: src/lib/libdwarf/dwarf_query.c Delete the obsolete function dwarf_highpc() modified: src/bin/dwarfdump/print_frames.c Now leb decode calls go to the public decode functions in libdwarf. The local versions are deleted. modified: src/bin/dwarfexample/simplereader.c drop use of dwarf_highpc() as it is obsolete and just use dwarf_highpc_b(). 2021-06-27: David Anderson commit 9fc91adc32273ca44858d451fcfe0b3d8a6ee7ab malloc_check.{h,c} were useful in 2005 but are no longer needed. modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am deleted: src/lib/libdwarf/malloc_check.c deleted: src/lib/libdwarf/malloc_check.h 2021-06-26: David Anderson commit 3b9cbd2b50773a9e70abd8e66102b641128cd25c Deleted the unused dwarf_dealloc_compressed_block() and the unused argument from _dwarf_p_dealloc. modified: libdwarfp.h modified: pro_alloc.c modified: pro_alloc.h modified: pro_die.c modified: pro_forms.c modified: pro_macinfo.c modified: pro_reloc_stream.c modified: pro_reloc_symbolic.c 2021-06-26: David Anderson commit 083733569ba3fac3b560a312e6ccf91c04f5826b All these changes are removing blank lines that do not aid readability, and turning groups of 2 or more blank lines into 1 blank line. modified: libdwarfp.h Deleted function prototype that was and is unused. modified: pro_alloc.h modified: pro_arange.h modified: pro_die.h modified: pro_dnames.h modified: pro_error.h modified: pro_expr.h modified: pro_frame.h modified: pro_incl.h modified: pro_line.h modified: pro_macinfo.h modified: pro_opaque.h modified: pro_reloc.h modified: pro_reloc_stream.h modified: pro_reloc_symbolic.h modified: pro_section.h modified: pro_types.h modified: pro_util.h 2021-06-26: David Anderson commit 57ff993f5ccc4163d59cdff87e99aefa84579e52 Minor changes. Deleted an unused macro. Changed true/false macros to TRUE/FALSE for consistency with libdwarf usage. Changed CURRENT_VERSION_STAMP to VERSION_STAMP2 as that is what was meant originally. modified: pro_forms.c modified: pro_line.c modified: pro_opaque.h modified: pro_section.c modified: pro_types.c 2021-06-26: David Anderson commit fa033b5b970a341dffb23b29e5d1fa7f8cf501aa Neither of these files are actually used in libdwarfp, so removing them. deleted: crc32.c deleted: dwarf_base_types.h 2021-06-25: David Anderson commit 1455bd31e4d2c7ad9af8908e346d356b96471ecc The tsearch directory is not part of libdwarf so it's been moved to a separate git repository. Soon it should be public on github. deleted: tsearch/ChangeLog deleted: tsearch/ChangeLog2014 deleted: tsearch/ChangeLog2015 deleted: tsearch/ChangeLog2016 deleted: tsearch/ChangeLog2017 deleted: tsearch/ChangeLog2018 deleted: tsearch/ChangeLog2019 deleted: tsearch/ChangeLog2020 deleted: tsearch/ESSAY.txt deleted: tsearch/Makefile deleted: tsearch/README deleted: tsearch/RUNTEST deleted: tsearch/config.h deleted: tsearch/dwarf_incl.h deleted: tsearch/dwarf_tsearch.c deleted: tsearch/dwarf_tsearch.h deleted: tsearch/dwarf_tsearchbal.c deleted: tsearch/dwarf_tsearchbin.c deleted: tsearch/dwarf_tsearchepp.c deleted: tsearch/dwarf_tsearchhash.c deleted: tsearch/dwarf_tsearchred.c deleted: tsearch/scripts/TEST.sh deleted: tsearch/scripts/badsample deleted: tsearch/scripts/comparator.py deleted: tsearch/scripts/comparatorsample deleted: tsearch/scripts/concatlines.py deleted: tsearch/scripts/concatlinesample deleted: tsearch/scripts/secondsample deleted: tsearch/scripts/testin deleted: tsearch/tsearch.c deleted: tsearch/tsearch_tester.c deleted: tsearch/tsearchlibtimes.csv deleted: tsearch/tsearchlibtimes.ods 2021-06-25: David Anderson commit 494a7119d057b4f6068d0df7663eb07692ed26da Now has all 4 public leb source. encode/decode and unsigned/signed. All in this one short source file makes testing of encode/decode really simple modified: src/lib/libdwarf/dwarf_leb.c Use the public decode leb calls. modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_util.c remove definition of ENCODE_SPACE_NEEDED, move to libdwarfp modified: src/lib/libdwarf/dwarf_util.h Remove reference to libdwarf/dwarf_encode_nm.c and .h as these were deleted. Instead we call the encode functions in libdwarf itself. modified: src/lib/libdwarfp/CMakeLists.txt definition of ENCODE_SPACE_NEEDED here now. modified: src/lib/libdwarfp/pro_opaque.h Simplify selfleb test build. modified: test/CMakeLists.txt modified: test/Makefile.am Use the public leb encode/decode functions now. modified: test/dwarf_leb_test.c 2021-06-24: David Anderson commit 5cd3040bd2003279406db147a9b96bdef6461589 Delete dwarf_encode_nm.c and dwarf_encode_nm.h. That code is now in dwarf_util.c deleted: src/lib/libdwarf/dwarf_encode_nm.c deleted: src/lib/libdwarf/dwarf_encode_nm.h modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am dwarf_encode_leb128 and dwarf_encode_signed_leb128 are now the complete implementations for encoding leb. modified: src/lib/libdwarf/dwarf_util.c Define ENCODE_SPACE_NEEDED for leb encoding. modified: src/lib/libdwarf/dwarf_util.h Remove build of libdwarf/dwarf_encode_nm.c, that file is gone. Rely on libdwarf dwarf_util.c to provide the needed functions modified: src/lib/libdwarfp/Makefile.am Call the public dwarf_encode_signed_leb128 and dwarf_encode_leb128 instead of libdwarfp local versions. modified: src/lib/libdwarfp/pro_expr.c modified: src/lib/libdwarfp/pro_forms.c modified: src/lib/libdwarfp/pro_frame.c modified: src/lib/libdwarfp/pro_line.c modified: src/lib/libdwarfp/pro_macinfo.c modified: src/lib/libdwarfp/pro_section.c 2021-06-23: David Anderson commit f8826f61ca8ac8f3ba5528c0378eb814df621732 The dwarf_init*() functions had an 'access' argument that has meant nothing. For a few hours it was defined as zero. (since the DW_DLC defines in libdwarf have been removed). Now that useless argument has been deleted entirely, reducing the number of arguments to those functions by one. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/simplereader.c modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/libdwarf.h 2021-06-23: David Anderson commit 760418a6a28f0a4715a825a65647a96a54829b70 Fixed the suggested grep command. modified: checkexamples.c 2021-06-23: David Anderson commit 602cc4276e66cf3beb1d71a7c7e0e0fcd0a2ab11 Now has void examp... to match libdwarf.mm to ease checking. modified: checkexamples.c 2021-06-23: David Anderson commit 1faaeea00ad55d3802749b3512e35d770cca71bf Removed obsolete example. modified: checkexamples.c Fixed obsolete example using checkexamples.c code. modified: libdwarf.mm Regenerated modified: libdwarf.pdf 2021-06-23: David Anderson commit 080a7eb2052b2b9c2414294f1466073604e0dc61 Prevent -c (plain -c with no trailing letters) from doing anything: it really always was problematical. Ensure gf_use_old_dwarf_loclist false. That refers to obsolete API functions. modified: src/bin/dwarfdump/command_options.c Delete the call to print_locs() as it was only usable for DWARF2,3, and could never be guaranteed to work due to the way the standard was written.. modified: src/bin/dwarfdump/dwarfdump.c Remove the only Dwarf_Locdesc struct reference. modified: src/bin/dwarfdump/esb_using_functions.h Remove the prototype of print_locs() modified: src/bin/dwarfdump/globals.h remove Dwarf_Locdesc arguments/variables. delete the lines of code for use with the old loclist representation. All location code now handles DWARF2,3,4,5 and the old DWARF2,3,4-only versions gone. modified: src/bin/dwarfdump/print_die.c Remove a pointer arg related to Dwarf_Locdesc modified: src/bin/dwarfdump/print_frames.c Remove checkexamples from the EXTRA_DIST list modified: src/lib/libdwarf/Makefile.am We no longer want DW_DLA_LOC or DW_DLA_LOCDESC or DW_DLA_LOC_BLOCK so those no longer allocated. modified: src/lib/libdwarf/dwarf_alloc.c Delete dwarf_get_loclist_entry() entirely, it only worked for DWARF2, DWARF3, really. modified: src/lib/libdwarf/dwarf_loc.c Delete struct Dwarf_Loc,Dwarf_Locdesc as with the above changes they are no longer used. modified: src/lib/libdwarf/libdwarf.h 2021-06-23: David Anderson commit 9333fac9bea19c8487d7f86f6b97ac97bf75a3db New file here. modified: doc/Makefile.am checkexamples is examples for libdwarf.mm to verify they are syntactically ok in the .mm renamed: src/lib/libdwarf/checkexamples.c -> doc/checkexamples.c Update for deleted print_locs.c modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am We no longer need this file. No longer in .am or CMakeLists.txt deleted: src/bin/dwarfdump/print_locs.c 2021-06-23: David Anderson commit a154c319029aa977d4fa6aa13b7800810bdd07c1 Delete Dwarf_Loclists_Entry as it is never used anywhere. modified: src/lib/libdwarf/libdwarf.h 2021-06-23: David Anderson commit b56ef5568d1e3d9cea600d9a18dc074d2ae830ff The structs and functions deleted here only worked for DWARF2, were obsolete by DWARF3. delete dwarf_get_fde_info_for_all_regs() delete Dwarf_Regtable_Entry struct delete Dwarf_Regtable struct modified: src/lib/libdwarf/libdwarf.h delete dwarf_get_fde_info_for_all_regs as obsolete. modified: src/lib/libdwarf/dwarf_frame.c 2021-06-23: David Anderson commit 190fed6a846a233ae6582107e310b925f6b29c7d All instances of typedef struct { ... } foo; now show a struct foo_s as the struct name, consistent with the rest of libdwarf. modified: libdwarf.h 2021-06-22: David Anderson commit c1f7d40bcffefef4712699138c61a65faedaf63d Delete dwarf_srclines_dealloc(), obsolete modified: doc/libdwarf.mm Revise description of --file-line5= as we no longer test or use obsolete functions. Ensure that --file-line5= only requests s2l and singldw5 (dwarfdump enum values) so we just call the desired functions. modified: src/bin/dwarfdump/command_options.c Refactor some check code into a new local check_last_line_of_table() to shorten a long function. delete the code for lines enum values org and orig2l. modified: src/bin/dwarfdump/print_lines.c Now use dwarf_srclines_b() and dwarf_srclines_from_linecontext() instead of the old way. modified: src/bin/dwarfgen/createirepfrombinary.cc Delete dwarf_srclines as obsolete. Delete dwarf_srclines_files_data as obsolete. Delete dwarf_srclines_dealloc as obsolete. modified: libdwarf/dwarf_line.c Add struct name instead of having a typedef name for some structs defined in libdwarf.h for easier reading. Delete dwarf_srclines() Delete dwarf_srclines_dealloc() Delete dwarf_srclines_files_data() modified: src/lib/libdwarf/libdwarf.h 2021-06-22: David Anderson commit d87bae362a4f587d13a66f2174bed9b0545eb86c Now uses the correct dwarf_lineoff_b() function. dwarf_offdie_b() is better documented. Deleted dwarf_offdie() from the document. Deleted dwarf_lineoff() from the document. modified: doc/libdwarf.mm Now calls dwarf_get_locdesc_entry_d() instead of _c version. modified: src/bin/dwarfdump/print_frames.c Delete dwarf_lineoff() code as obsolete, use _b version. modified: src/lib/libdwarf/dwarf_line.c: Delete dwarf_get_locdesc_entry_c (use _d version). modified: src/lib/libdwarf/dwarf_loc.c Delete the obsolete dwarf_check_lineheader(),use _b version. modified:src/lib/libdwarf/dwarf_print_lines.c Delete obsolete functions dwarf_offdie dwarf_lineoff dwarf_get_locdesc_entry_c dwarf_check_lineheader modified: src/lib/libdwarf/libdwarf.h 2021-06-22: David Anderson commit 96ee1bfbf1071b0eba4cb4135f1c90d05c3e2ee5 Making protype appearance more regular, with the initial argument next to the return int and the function name. A few arg names were not in /* */ so fixed. modified: libdwarf.h 2021-06-22: David Anderson commit eb9daebb03794bb8033c748ec75c2f0dd27762b8 With the help of configure --version and 'cut' a bunch of python code is now a single line of shell command. modified: scripts/buildandreleasetest.sh 2021-06-22: David Anderson commit 41585bebdd91cf3ba7c3631a5aa2c842bbff33cc Remove all mention of HAVE_CUSTOM_LIBELF as that is not available. We don't use libelf any more! modified: CMakeLists.txt modified: configure.ac modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfexample/dwdebuglink.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/libdwarf.h 2021-06-22: David Anderson commit 88bf7c78814c5a27392a62dab9ab3ce6a949ea01 Now the DEBUG_INFO macros have the same value in glflags.h and pro_opaque.h. It's not essential, but looks better. In pro_opaque.h the values matter as they must match locations in a C array. So we changed the values (and in two cases names) in glflags.h to match. Each set of defines has a nearby comment mentioning the other set. modified: src/bin/dwarfdump/glflags.h modified: src/bin/dwarfdump/print_static_funcs.c modified: src/bin/dwarfdump/print_static_vars.c modified: src/lib/libdwarfp/pro_opaque.h 2021-06-22: David Anderson commit 2707b73a737ec2d3a338898d9332663c3fe93b9e Moved the DWARF_DBG_ERROR macro definition to dwarf_error.h and removed the definitions in the .c files modified: src/lib/libdwarf/dwarf_error.h modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_init_finish.c 2021-06-22: David Anderson commit 5d1f6c7ccdfca0c65760af3651ecdec3656a1cf3 Moved enum Dwarf_Rel_Type struct Dwarf_P_Marker_s struct Dwarf_Relocation_Data_s struct Dwarf_P_String_Attr_s to libdwarfp.h where they belong. Deleted DW_DLC_READ DW_DLC_WRITE DW_DLC_RDWR as useless. Pass 0 instead of DW_DLC_READ as that always worked. modified: libdwarf.h Added the structs taken from libdwarf.h modified: libdwarfp.h Use 0 instead of DW_DLC_READ (DW_DLC_READ was obsolete two decades ago). modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/simplereader.c modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/bin/dwarfgen/dwarfgen.cc Removed a few lines to libdwarfp/README, added a couple lines mentioning autogen.sh modified: src/lib/libdwarf/README Remove the 'access' argument from internal initialization functions as it is never used. modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_peread.c Now has a useful comment. modified: src/lib/libdwarfp/README Document that one uses 0 instead of DW_DLC_READ when calling dwarf_init functions. modified: doc/libdwarf.mm Rev 4.4 modified: doc/libdwarf.pdf Regenerated 2021-06-21: David Anderson commit 8de094bbf4007cff0d355ee7b786c29725a22fe5 It was using sed and grep -o to extract the v_maj etc to make the complete version number, but -o is not a standard option. It did nothing on FreeBSD 12. Now there is is a python 3 script that does the entire job and we test the exit code so in case of failure it all stops and the python error message (to stderr) can be noticed easily. modified: scripts/buildandreleasetest.sh 2021-06-21: David Anderson commit 3ad2d897fb005ff05f04b3acc39298b1d76df520 Removing an unused variable. modified: bugxml/bugrecord.py 2021-06-20: David Anderson commit d3a9a6325c2172f67c6bd82c59fac32d6dca782f modified: dwarf_frame.h Modified dw_stpcpy to fully check there is no memory corruption, return DW_DLV_OK if successful, and use it rather than strcpy everywhere. modified: dwarf_object_detector.c Remove obsolete comments. Delete _dwarf_print_lines() as unused now. modified: dwarf_print_lines.c Removed: _dwarf_fde_section_offset() _dwarf_cie_section_offset() dwarf_get_ranges() dwarf_object_detector_path() Fixed dwarf_object_detector_path_b() and dwarf_object_detector_path_dSYM() as the arg list here did not have the arg names commented-out. Now commented out to protect against corruption by macros. modified: libdwarf.h 2021-06-20: David Anderson commit e09e89c8b4019b938a1a4daf740d4073ad458f25 Both now call dwarf_object_detector_path_b(). modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfexample/dwdebuglink.c 2021-06-20: David Anderson commit 3cd12cad5b025fce07fea0aafa7e3a6fca2e9786 Adding/correcting the doc of dwarf_object_detecor_path_b() and dwarf_object_detector_dSYM(). modified: doc/libdwarf.mm modified: doc/libdwarf.pdf 2021-06-19: David Anderson commit 06663f3b0b4de01759dbd96f4dd0bb16473f9dce The following obsolete functions have been deleted from the API (meaning from libdwarf.h): -int dwarf_loclist_n(Dwarf_Attribute -int dwarf_loclist(Dwarf_Attribute -int dwarf_loclist_from_expr(Dwarf_D -int dwarf_loclist_from_expr_a(Dwarf_ -int dwarf_loclist_from_expr_b(Dwarf_ -int dwarf_get_cu_die_offset_given_cu -int dwarf_get_abbrev_entry(Dwarf_Ab -int dwarf_get_rnglists_entry_fields( modified: doc/libdwarf.mm modified: doc/libdwarf.pdf modified: src/lib/libdwarf/libdwarf.h These files removed their implementation code for the deleted functions. modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/lib/libdwarf/dwarf_abbrev.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_rnglists.c 2021-06-19: David Anderson commit de214c3debdcb54b19597d2727194fdec2195b21 Removing: -int dwarf_get_cie_info(Dwarf_Cie /*cie*/, -int dwarf_get_fde_info_for_reg(Dwarf_Fde /*fde*/, -int dwarf_get_fde_info_for_reg3(Dwarf_Fde /*fde*/, -int dwarf_get_fde_info_for_cfa_reg3(Dwarf_Fde /*fde*/, -int dwarf_get_arange_info( as these are old versions no one should use. Newer versions end in _a or _b or the like. modified: src/lib/libdwarf/dwarf_arange.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/libdwarf.h 2021-06-19: David Anderson commit d671d25522f10633238f47cc6babe32883743168 Using the correct newer interfaces instead of old deprecated libdwarf functions. modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfgen/createirepfrombinary.cc 2021-06-19: David Anderson commit 6e1e07207040d2d987ec2facaf4ac7acaf5e7097 dwarfdump.conf abi specifications mips-irix mips-irix2 deleted as they just allowed testing of now-deleted libdwarf functions. Using mips instead on mips DWARF. modified: src/bin/dwarfdump/dwarfdump.conf Removing interface category 2, it's obsolete. modified: src/bin/dwarfdump/dwconf.c modified: src/bin/dwarfdump/dwconf.h Using the new interface, should have been using it for a long time. modified: src/bin/dwarfdump/print_frames.c 2021-06-19: David Anderson commit f2551862783957f1ecda5250e542fbf6eab5f5ec Removed obsolete descriptions. -int dwarf_get_cie_info(Dwarf_Cie /*cie*/, -int dwarf_get_fde_info_for_reg(Dwarf_Fde /*fde*/, -int dwarf_get_fde_info_for_reg3(Dwarf_Fde /*fde*/, -int dwarf_get_fde_info_for_cfa_reg3(Dwarf_Fde /*fde*/, -int dwarf_get_arange_info( Current functions end in _a or _b and have been in the library for years. Source code changes in the next commit. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf 2021-06-19: David Anderson commit 6fc426db8b39dc7b2606b65eebab167069f401c7 Removed mention of the obsolete dwarf_init() dwarf_elf_init() dwarf_elf_init_b() functions. They are obsolete and removed. modified: libdwarf.mm modified: libdwarf.pdf 2021-06-18: David Anderson commit 0251c755e5273e5f6351c06d0b6d5b8cc80fd942 These were using obsolete libdwarf interfaces. Updated to match the preferred interfaces. modified: src/bin/dwarfdump/globals.h modified: src/bin/dwarfdump/print_aranges.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_pubnames.c modified: src/bin/dwarfdump/print_ranges.c The following obsolete interfaces deleted: int dwarf_init(int /*fd*/, int dwarf_get_ranges(Dwarf_Debug dbg, int dwarf_get_ranges_a(Dwarf_Debug /*dbg*/, modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_global.c 2021-06-18: David Anderson commit 84a87f237497bb3658df6b9c254930b3d67556db The hard-to-use function dwarf_uncompress_integer_block() has long had dwarf_uncompress_integer_block_a() as the better form. dwarf_uncompress_integer_block() is hereby deleted. It's unclear if anyone is using this Sun Sparc compiler feature from 2007 or so. modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/libdwarf.h 2021-06-18: David Anderson commit f53086d965d970178bbadd90db1b92bcc15c541e Only install libdwarfp.pdf if we have libdwarfp. modified: Makefile.am 2021-06-18: David Anderson commit 9170f91f521d7f9cf8609f2902e43020bd29ad69 Removed documentation of obsoleted functions. modified: doc/libdwarf.mm modified: doc/libdwarf.pdf Update to use the correct libdwarf functions instead of long-obsolete versions. modified: src/bin/dwarfdump/print_ranges.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_ranges.c modified: src/lib/libdwarf/libdwarf.h No longer used. deleted: src/lib/libdwarf/dwarf_original_elf_init.c 2021-06-18: David Anderson commit 3259b469af43dab5c6700e5e482f238e22f22e3d The API functions dwarf_elf_init dwarf_elf_init_b are removed. libdwarf does not use libelf now so these cannot be used. We stop building dwarf_original_elf_init.c as its code (it used struct Elf) is unused. modified: src/bin/dwarfdump/dwarfdump.c modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/libdwarf.h 2021-06-18: David Anderson commit a07223ffb0b4c9aa5e35f42a39d3a21e16192f40 It's embarassing, but these all were calling obsolete old API functions. Now they call the current API functions with the current _x letter pair (varies by function) modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/glflags.h modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_sections.c modified: src/bin/dwarfgen/createirepfrombinary.cc 2021-06-18: David Anderson commit a24a1d48c829060ebf1a0567654271203dc82e2c The source for these obsolete API interfaces has now been deleted in favor of newer interfaces that have been in place for 2+ years. int dwarf_object_init(Dwarf_Obj_Access_Interface* /*obj*/, int dwarf_next_cu_header_b(Dwarf_Debug /*dbg*/, int dwarf_next_cu_header_c(Dwarf_Debug /*dbg*/, int dwarf_next_cu_header(Dwarf_Debug /*dbg*/, int dwarf_siblingof(Dwarf_Debug /*dbg*/, int dwarf_get_section_max_offsets(Dwarf_Debug /*dbg*/, int dwarf_get_section_max_offsets_b(Dwarf_Debug /*dbg*/, int dwarf_get_section_max_offsets_c(Dwarf_Debug /*dbg*/, modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_init_finish.c 2021-06-18: David Anderson commit 2e0dcab2575fd3a4c7a7d62293791951e623c0ed We are dropping these old functions from the API. Each has a replacement with a _ (a or whatever is next in each case) in the name, a replacement that has been in place for two years+ (sometimes much longer) as the recommended function to call. int dwarf_object_init(Dwarf_Obj_Access_Interface* /*obj*/, int dwarf_next_cu_header_b(Dwarf_Debug /*dbg*/, int dwarf_next_cu_header_c(Dwarf_Debug /*dbg*/, int dwarf_next_cu_header(Dwarf_Debug /*dbg*/, int dwarf_siblingof(Dwarf_Debug /*dbg*/, int dwarf_get_section_max_offsets(Dwarf_Debug /*dbg*/, int dwarf_get_section_max_offsets_b(Dwarf_Debug /*dbg*/, int dwarf_get_section_max_offsets_c(Dwarf_Debug /*dbg*/, modified: doc/libdwarf.mm modified: src/lib/libdwarf/libdwarf.h 2021-06-17: David Anderson commit d275fcdfd415959fb4ae789c8d3eda90af449b1c Cleaning up Rev 4.2 to catch ends of italicized words and to delete some obsolete wording. modified: libdwarfp.mm modified: libdwarfp.pdf 2021-06-17: David Anderson commit be9f31942a8d3b485cdc4a9831bac570c2456f26 Now at version 4.2 modified: libdwarf.pdf Now at version 4.2, old API functions removed. modified: libdwarfp.pdf 2021-06-17: David Anderson commit 626782318d0a95196192d03040452c114aa6504d Removing obsolete versions of API functions from the API Dwarf_P_Die dwarf_new_die( Dwarf_Unsigned dwarf_add_die_to_debug( Dwarf_Unsigned dwarf_add_die_marker( Dwarf_P_Expr dwarf_new_expr(Dwarf_P_Debug /*dbg*/, Dwarf_Unsigned dwarf_add_expr_gen( Dwarf_Unsigned dwarf_add_expr_addr( Dwarf_Unsigned dwarf_add_expr_addr_b( Dwarf_Unsigned dwarf_expr_current_offset( Dwarf_Addr dwarf_expr_into_block( Dwarf_Unsigned dwarf_add_arange(Dwarf_P_Debug /*dbg*/, Dwarf_Unsigned dwarf_add_arange_b( Dwarf_Unsigned dwarf_add_pubname( Dwarf_Unsigned dwarf_add_pubtype( Dwarf_Unsigned dwarf_add_funcname( Dwarf_Unsigned dwarf_add_typename( Dwarf_Unsigned dwarf_add_varname( Dwarf_Unsigned dwarf_add_weakname( modified: doc/libdwarfp.mm modified: src/lib/libdwarfp/libdwarfp.h modified: src/lib/libdwarfp/pro_arange.c modified: src/lib/libdwarfp/pro_die.c modified: src/lib/libdwarfp/pro_expr.c modified: src/lib/libdwarfp/pro_funcs.c modified: src/lib/libdwarfp/pro_pubnames.c modified: src/lib/libdwarfp/pro_types.c modified: src/lib/libdwarfp/pro_vars.c modified: src/lib/libdwarfp/pro_weaks.c 2021-06-17: David Anderson commit 918d4510151298fdd984db30290585143973873c Was using a couple old libdwarfp.h interfaces, now uses the correct functions. modified: src/bin/dwarfgen/ireptodbg.cc 2021-06-17: David Anderson commit 223449c56847b67a4c83c082f1746e06b72bf22d Removed another set of obsolete versions of producer functions. Dwarf_P_Attribute dwarf_add_AT_const_value_unsignedint( Dwarf_P_Attribute dwarf_add_AT_name(Dwarf_P_Die /*die*/, Dwarf_P_Attribute dwarf_add_AT_with_ref_sig8( Dwarf_Unsigned dwarf_add_directory_decl(Dwarf_P_Debug /*dbg*/, Dwarf_Unsigned dwarf_add_file_decl(Dwarf_P_Debug /*dbg*/, Dwarf_Unsigned dwarf_add_line_entry_b(Dwarf_P_Debug /*dbg*/, Dwarf_Unsigned dwarf_add_line_entry(Dwarf_P_Debug /*dbg*/, Dwarf_Unsigned dwarf_lne_set_address(Dwarf_P_Debug /*dbg*/, Dwarf_Unsigned dwarf_lne_end_sequence(Dwarf_P_Debug /*dbg*/, Dwarf_Unsigned dwarf_add_frame_cie(Dwarf_P_Debug /*dbg*/, Dwarf_Unsigned dwarf_add_frame_fde( Dwarf_Unsigned dwarf_add_frame_fde_b( Dwarf_Unsigned dwarf_add_frame_info_b( Dwarf_Unsigned dwarf_add_frame_info( Dwarf_P_Fde dwarf_add_fde_inst( Dwarf_P_Fde dwarf_new_fde(Dwarf_P_Debug /*dbg*/, Dwarf_P_Fde dwarf_fde_cfa_offset( modified: doc/libdwarfp.mm modified: src/lib/libdwarfp/libdwarfp.h modified: src/lib/libdwarfp/pro_die.c modified: src/lib/libdwarfp/pro_forms.c modified: src/lib/libdwarfp/pro_frame.c modified: src/lib/libdwarfp/pro_line.c 2021-06-17: David Anderson commit 737ccafd3a58479fc7813bf91d71d744abf83666 Rearrange the ifdefs on _WIN32,_MSC_VER, and HAVE_UNISTD_H so they work better on Windows. modified: src/bin/dwarfgen/createirepfrombinary.cc 2021-06-17: David Anderson commit 12e3a5416f8a0e99ba1065ef709d74ec3d6b65bf Rearrange the ifdefs on _WIN32,_MSC_VER, and HAVE_UNISTD_H so they work better on Windows. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/simplereader.c 2021-06-17: David Anderson commit 648b12e7f38d810d4c6c488d4e86cf0fe228b09b Rearrange the ifdefs on _WIN32,_MSC_VER, and HAVE_UNISTD_H so they work better on Windows. modified: src/lib/libdwarf/dwarf_crc32.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_object_read_common.c modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_util.c 2021-06-17: David Anderson commit 7d6b98ed0ac95ab7165223dc3fa708d591a7b70e the following obsolete functions have been removed because the returned type was overloaded with a negative integer on error. Ugly casts required to check the return value. Dwarf_P_Attribute dwarf_add_AT_unsigned_const(Dwarf_P_Debug /*dbg*/, Dwarf_P_Attribute dwarf_add_AT_signed_const(Dwarf_P_Debug /*dbg*/, Dwarf_P_Attribute dwarf_add_AT_reference(Dwarf_P_Debug /*dbg*/, Dwarf_P_Attribute dwarf_add_AT_reference_b(Dwarf_P_Debug /*dbg*/, Dwarf_P_Attribute dwarf_add_AT_dataref( Dwarf_P_Attribute dwarf_add_AT_const_value_string( Dwarf_P_Attribute dwarf_add_AT_location_expr(Dwarf_P_Debug /*dbg*/, Dwarf_P_Attribute dwarf_add_AT_string(Dwarf_P_Debug /*dbg*/, Dwarf_P_Attribute dwarf_add_AT_flag(Dwarf_P_Debug /*dbg*/, Dwarf_P_Attribute dwarf_add_AT_producer(Dwarf_P_Die /*ownerdie*/, Dwarf_P_Attribute dwarf_add_AT_any_value_sleb( Dwarf_P_Attribute dwarf_add_AT_const_value_signedint( Dwarf_P_Attribute dwarf_add_AT_any_value_uleb( Dwarf_P_Attribute dwarf_add_AT_comp_dir(Dwarf_P_Die /*ownerdie*/, modified: doc/libdwarfp.mm modified: src/lib/libdwarfp/libdwarfp.h modified: src/lib/libdwarfp/pro_die.c modified: src/lib/libdwarfp/pro_forms.c modified: src/lib/libdwarfp/pro_section.c 2021-06-17: David Anderson commit d8cfb65183f9f7eaa03fb2b10b1353c745cf6cf4 Added a remark about dwarf_formudata() modified: doc/libdwarf.mm 2021-06-17: David Anderson commit be30390462d1a5d7afc03339f37af3494ea59be2 Removed some message() lines that were just for understanding what was going on. modified: src/lib/libdwarfp/CMakeLists.txt 2021-06-17: David Anderson commit 0a821aef2a0b16281640889e204512621ef3c93b More careful to note if a constant is signed by DW_FORM_sdata modified: src/bin/dwarfgen/createirepformfrombinary.cc Added comments related to signed/unsigned FORMs. modified: src/bin/dwarfgen/irepattrtodbg.cc 2021-06-17: David Anderson commit c3b6a9f8cca086c144898f0452bd079a936428de Adding comments with dwarf_formudata() modified: src/lib/libdwarf/dwarf_form.c 2021-06-16: David Anderson commit 4df3e549f21f3e232c50d58dfbe820fb93f252ab Previous change to dwarf_formudata() was really broken. Now fixed. modified: src/lib/libdwarf/dwarf_form.c 2021-06-16: David Anderson commit fe94c50a303e1fd7abbebb84eb751176013046b5 The DW_DLE_NEGATIVE_SIZE define was duplicated. Now just one present. modified: libdwarf.h 2021-06-16: David Anderson commit 457bfb8b2744e855c45f4737373fba7ccd47e6fa Removed doc of the interfaces mentioned below, modified: doc/libdwarfp.mm Was actually using two obsolete API functions. Now using the new ones. modified: src/bin/dwarfgen/dwarfgen.cc Removed the following functions as being obsolete,replaced over the last few years by better interface designs. -Dwarf_Signed dwarf_transform_to_disk_form(Dwarf_P_Debug /*dbg*/, -Dwarf_Ptr dwarf_get_section_bytes(Dwarf_P_Debug /*dbg*/, -Dwarf_Signed dwarf_get_die_markers( -Dwarf_Unsigned dwarf_producer_finish(Dwarf_P_Debug /*dbg*/, -Dwarf_P_Attribute dwarf_add_AT_targ_address(Dwarf_P_Debug /*dbg*/, -Dwarf_P_Attribute dwarf_add_AT_targ_address_b(Dwarf_P_Debug /*dbg*/, -Dwarf_P_Attribute dwarf_add_AT_block(Dwarf_P_Debug /*dbg*/, -Dwarf_P_Attribute dwarf_add_AT_ref_address(Dwarf_P_Debug /*dbg*/, -Dwarf_Unsigned dwarf_get_die_marker( -Dwarf_P_Die dwarf_die_link( . modified: src/lib/libdwarfp/libdwarfp.h modified: src/lib/libdwarfp/pro_die.c modified: src/lib/libdwarfp/pro_finish.c modified: src/lib/libdwarfp/pro_forms.c modified: src/lib/libdwarfp/pro_section.c 2021-06-16: David Anderson commit 4a28729f40d437967adde7d775619b6a7c5e434e added arm64 build modified: .travis.yml 2021-06-16: David Anderson commit 8a8d5b29db0c9a67f3b466820da38271ee2d13eb The renamings of these sources in libdwarf (function and source) remove the pro_ and substitute dwarf_ These are not public functions, but they are called by public encode functions in libdwarf.h renamed: src/lib/libdwarf/pro_encode_nm.c -> src/lib/libdwarf/dwarf_encode_nm.c renamed: src/lib/libdwarf/pro_encode_nm.h -> src/lib/libdwarf/dwarf_encode_nm.h modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/dwarf_util.c modified: src/lib/libdwarfp/CMakeLists.txt modified: src/lib/libdwarfp/Makefile.am modified: src/lib/libdwarfp/pro_debug_sup.c modified: src/lib/libdwarfp/pro_expr.c modified: src/lib/libdwarfp/pro_forms.c modified: src/lib/libdwarfp/pro_frame.c modified: src/lib/libdwarfp/pro_init.c modified: src/lib/libdwarfp/pro_line.c modified: src/lib/libdwarfp/pro_macinfo.c modified: src/lib/libdwarfp/pro_section.c modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/dwarf_leb_test.c 2021-06-16: David Anderson commit d0eecfa928f1abfa4211d64b0ae1d6e55de81299 Adding Requires: libdwarf and removing a -ldwarf modified: libdwarfp.pc.in 2021-06-15: David Anderson commit 8e7c2fbc9ab07b9e96c20b9d45d0eaf4061992f7 Only install libdwarfp.pc if --enable-dwarfgen (which builds libdwarfp) modified: Makefile.am 2021-06-15: David Anderson commit a6d8638c2089c42a6d00e375859b84feea309132 dwarf_formudata() now returns any constant including non-negative signed constant values. Negative signed constant values must be accessed via dwarf_formsdata() as always. modified: src/lib/libdwarf/dwarf_debug_names.c modified: src/lib/libdwarf/dwarf_errmsg_list.h modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/libdwarf.h 2021-06-15: David Anderson commit f7d4c3bb6776a0e731f12002a9721257eb4d5e8a modified: doc/libdwarf.mm ver 4.2 Now dwarf_formudata() returns any non-negative value regardless of form. For actual negative values it is still up to callers to notice the returned error and call dwarf_formsdata(). modified: doc/libdwarf.pdf regenerated modified: doc/libdwarfp.mm ver 4.1 modified: doc/libdwarfp.pdf regenerated 2021-06-15: David Anderson commit 479b985e1f11253a21d5bbfb835b0769234478de Now cmake make and ctest -R self work, and dwarfgen and libdwarfp build. First commit where the producer library is a separate library: libdwarfp.a or libdwarfp-0.1.1.so modified: CMakeLists.txt modified: src/bin/dwarfgen/CMakeLists.txt modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarfp/CMakeLists.txt modified: test/CMakeLists.txt modified: test/test_extra_flag_strings.c 2021-06-15: David Anderson commit 0494e16bbd4f8a177785594779c10d2d6b7da44b Now libdwarf and libdwarfp build properly, a couple issues created earlier before split creating libdwarfp are now resolved so all build and make install and make dist ok when using configure. modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarfp/Makefile.am modified: src/lib/libdwarfp/pro_incl.h 2021-06-14: David Anderson commit cbf7ec55ef1dfa1fab963c8dcc2ab59c8d79de5c Now we can build libdwarfp with dwarfgen successfully. A minor omission means it's not perfect. No cmake support for the separation of libdwarf from libdwarfp yet. modified: Makefile.am modified: README modified: configure.ac new file: libdwarfp.pc.in modified: src/bin/dwarfgen/Makefile.am new file: src/bin/dwarfgen/dwgetopt.c new file: src/bin/dwarfgen/dwgetopt.h modified: src/lib/libdwarf/COPYING modified: src/lib/libdwarf/LIBDWARFCOPYRIGHT deleted: src/lib/libdwarfp/CODINGSTYLE modified: src/lib/libdwarfp/COPYING modified: src/lib/libdwarfp/Makefile.am deleted: src/lib/libdwarfp/cmake/libdwarf-config.cmake new file: src/lib/libdwarfp/cmake/libdwarfp-config.cmake modified: test/Makefile.am 2021-06-13: David Anderson commit 75f639c56c2b286d83947bd57266823afb39c329 Now we can build libdwarf with no producer code. modified: src/lib/libdwarf/Makefile.am renamed: src/lib/libdwarfp/pro_encode_nm.c -> src/lib/libdwarf/pro_encode_nm.c renamed: src/lib/libdwarfp/pro_encode_nm.h -> src/lib/libdwarf/pro_encode_nm.h modified: test/Makefile.am 2021-06-13: David Anderson commit e96b9448450b40ad87efb02d547c11af49aa7efc DO NOT USE THIS COMMIT. It is a first step to building libdwarfp separately. modified: ../../../Makefile.am modified: Makefile.am new file: ../libdwarfp/CMakeLists.txt new file: ../libdwarfp/CODINGSTYLE new file: ../libdwarfp/COPYING new file: ../libdwarfp/ChangeLog new file: ../libdwarfp/Makefile.am new file: ../libdwarfp/NEWS new file: ../libdwarfp/README new file: ../libdwarfp/baseline.ltp new file: ../libdwarfp/cmake/libdwarf-config.cmake new file: ../libdwarfp/crc32.c new file: ../libdwarfp/dwarf_base_types.h new file: ../libdwarfp/dwarfstring.c renamed: libdwarfp.h -> ../libdwarfp/libdwarfp.h new file: ../libdwarfp/memcpy_swap.h renamed: pro_alloc.c -> ../libdwarfp/pro_alloc.c renamed: pro_alloc.h -> ../libdwarfp/pro_alloc.h renamed: pro_arange.c -> ../libdwarfp/pro_arange.c renamed: pro_arange.h -> ../libdwarfp/pro_arange.h renamed: pro_debug_sup.c -> ../libdwarfp/pro_debug_sup.c renamed: pro_die.c -> ../libdwarfp/pro_die.c renamed: pro_die.h -> ../libdwarfp/pro_die.h renamed: pro_dnames.c -> ../libdwarfp/pro_dnames.c renamed: pro_dnames.h -> ../libdwarfp/pro_dnames.h renamed: pro_encode_nm.c -> ../libdwarfp/pro_encode_nm.c renamed: pro_encode_nm.h -> ../libdwarfp/pro_encode_nm.h renamed: pro_error.c -> ../libdwarfp/pro_error.c renamed: pro_error.h -> ../libdwarfp/pro_error.h renamed: pro_expr.c -> ../libdwarfp/pro_expr.c renamed: pro_expr.h -> ../libdwarfp/pro_expr.h renamed: pro_finish.c -> ../libdwarfp/pro_finish.c renamed: pro_forms.c -> ../libdwarfp/pro_forms.c renamed: pro_frame.c -> ../libdwarfp/pro_frame.c renamed: pro_frame.h -> ../libdwarfp/pro_frame.h renamed: pro_funcs.c -> ../libdwarfp/pro_funcs.c renamed: pro_incl.h -> ../libdwarfp/pro_incl.h renamed: pro_init.c -> ../libdwarfp/pro_init.c renamed: pro_line.c -> ../libdwarfp/pro_line.c renamed: pro_line.h -> ../libdwarfp/pro_line.h renamed: pro_log_extra_flag_strings.c -> ../libdwarfp/pro_log_extra_flag_strings.c renamed: pro_macinfo.c -> ../libdwarfp/pro_macinfo.c renamed: pro_macinfo.h -> ../libdwarfp/pro_macinfo.h renamed: pro_opaque.h -> ../libdwarfp/pro_opaque.h renamed: pro_pubnames.c -> ../libdwarfp/pro_pubnames.c renamed: pro_reloc.c -> ../libdwarfp/pro_reloc.c renamed: pro_reloc.h -> ../libdwarfp/pro_reloc.h renamed: pro_reloc_stream.c -> ../libdwarfp/pro_reloc_stream.c renamed: pro_reloc_stream.h -> ../libdwarfp/pro_reloc_stream.h renamed: pro_reloc_symbolic.c -> ../libdwarfp/pro_reloc_symbolic.c renamed: pro_reloc_symbolic.h -> ../libdwarfp/pro_reloc_symbolic.h renamed: pro_section.c -> ../libdwarfp/pro_section.c renamed: pro_section.h -> ../libdwarfp/pro_section.h renamed: pro_types.c -> ../libdwarfp/pro_types.c renamed: pro_types.h -> ../libdwarfp/pro_types.h renamed: pro_util.h -> ../libdwarfp/pro_util.h renamed: pro_vars.c -> ../libdwarfp/pro_vars.c renamed: pro_weaks.c -> ../libdwarfp/pro_weaks.c 2021-06-13: David Anderson commit 1803fc67faa3cb85597a91539943dd0692bbdb0f Now does instead of "libdwarf.h" modified: src/lib/libdwarf/libdwarfp.h 2021-06-13: David Anderson commit 3bfc355d0d4f858d24c74df4514a7c59c99fd831 Now #includes libdwarf.h modified: src/lib/libdwarf/libdwarfp.h These all now include libdwarfp.h and get libdwarf.h automatically. modified: src/lib/libdwarf/pro_alloc.c modified: src/lib/libdwarf/pro_arange.c modified: src/lib/libdwarf/pro_debug_sup.c modified: src/lib/libdwarf/pro_die.c modified: src/lib/libdwarf/pro_dnames.c modified: src/lib/libdwarf/pro_encode_nm.c modified: src/lib/libdwarf/pro_error.c modified: src/lib/libdwarf/pro_expr.c modified: src/lib/libdwarf/pro_finish.c modified: src/lib/libdwarf/pro_forms.c modified: src/lib/libdwarf/pro_frame.c modified: src/lib/libdwarf/pro_funcs.c modified: src/lib/libdwarf/pro_init.c modified: src/lib/libdwarf/pro_line.c modified: src/lib/libdwarf/pro_log_extra_flag_strings.c modified: src/lib/libdwarf/pro_macinfo.c modified: src/lib/libdwarf/pro_pubnames.c modified: src/lib/libdwarf/pro_reloc.c modified: src/lib/libdwarf/pro_reloc_stream.c modified: src/lib/libdwarf/pro_reloc_symbolic.c modified: src/lib/libdwarf/pro_section.c modified: src/lib/libdwarf/pro_types.c modified: src/lib/libdwarf/pro_vars.c modified: src/lib/libdwarf/pro_weaks.c modified: test/test_extra_flag_strings.c 2021-06-13: David Anderson commit 9fe860fcf9518291068e95dc6b769dbaefa55649 Now MAINTAINERCLEANFILES always has Makefile.in modified: Makefile.am modified: doc/Makefile.am modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfexample/Makefile.am modified: src/bin/dwarfgen/Makefile.am modified: src/lib/libdwarf/Makefile.am 2021-06-13: David Anderson commit 9648fc6b2f1497e16edac8dd7a8f2ac8f20a16bf Split libdwarf.h into two. Now all the producer interfaces are in libdwarfp.h libdwarf.h is always included before libdwarfp.h where libdwarfp.h is required. modified: configure.ac modified: src/bin/dwarfgen/createirepformfrombinary.cc modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/bin/dwarfgen/dwarfgen.cc modified: src/bin/dwarfgen/irepattrtodbg.cc modified: src/bin/dwarfgen/ireptodbg.cc modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/libdwarf.h new file: src/lib/libdwarf/libdwarfp.h modified: src/lib/libdwarf/pro_alloc.c modified: src/lib/libdwarf/pro_arange.c modified: src/lib/libdwarf/pro_debug_sup.c modified: src/lib/libdwarf/pro_die.c modified: src/lib/libdwarf/pro_dnames.c modified: src/lib/libdwarf/pro_encode_nm.c modified: src/lib/libdwarf/pro_error.c modified: src/lib/libdwarf/pro_expr.c modified: src/lib/libdwarf/pro_finish.c modified: src/lib/libdwarf/pro_forms.c modified: src/lib/libdwarf/pro_frame.c modified: src/lib/libdwarf/pro_funcs.c modified: src/lib/libdwarf/pro_init.c modified: src/lib/libdwarf/pro_line.c modified: src/lib/libdwarf/pro_log_extra_flag_strings.c modified: src/lib/libdwarf/pro_macinfo.c modified: src/lib/libdwarf/pro_pubnames.c modified: src/lib/libdwarf/pro_reloc.c modified: src/lib/libdwarf/pro_reloc_stream.c modified: src/lib/libdwarf/pro_reloc_symbolic.c modified: src/lib/libdwarf/pro_section.c modified: src/lib/libdwarf/pro_types.c modified: src/lib/libdwarf/pro_vars.c modified: src/lib/libdwarf/pro_weaks.c modified: test/test_extra_flag_strings.c 2021-06-13: David Anderson commit 4ec720e371a1658096cba8f4c3f49d7f785bf11d Mention the version of automake reporting spurious warnings. modified: README 2021-06-13: David Anderson commit f65607c30daf993a1a3caed84d6f41d4a12b7542 Corrected the wording to match current behavior. modified: README modified: README.cmake modified: README.md 2021-06-12: David Anderson commit c9d7b3dffabc23ad332f67571b228fd2231c65ff Removing references to libelf. modified: src/lib/libdwarf/libdwarf.h 2021-06-12: David Anderson commit 2fbca3d326d8e4f11e450835d0c66abdd98b9fca Refined the comments. modified: README.md 2021-06-12: David Anderson commit 505cfd1a00e1b5b1b41db5b9c47fd7298907a5f9 Fix to make this work modified: scripts/run-all-tests.sh 2021-06-12: David Anderson commit 8a11ac0afc1fcd7924ff27cd314f563f0fb482c7 Now make dist generates xz instead of gz to save space. modified: configure.ac Removing some incorrect CLEANFILES and related. modified: doc/Makefile.am modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfexample/Makefile.am modified: src/bin/dwarfgen/Makefile.am modified: src/lib/libdwarf/Makefile.am 2021-06-12: David Anderson commit 1ef2ff5bba02fb6f0dfe5700a5cc05f2db57f9c0 Ensure HAVE_ELF64_GETSHDR and HAVE_ELF64_GETEHDR set by configure as dwarfgen needs those (dwarfgen really does use libelf --- to write out a .o). modified: CMakeLists.txt modified: configure.ac 2021-06-11: David Anderson commit 0ac9007f9f80d67f6c7ddfe36bd0cc81bf85f28f Now honor the new locations of source code in the new source directory setup. modified: ../../../scripts/UPDATEDWARFDUMPVERSION.sh modified: ../../../scripts/buildandreleasetest.sh modified: ../../../scripts/buildstandardsource.sh modified: ../../../scripts/ddbuild.sh modified: ../../../scripts/libbuild.sh modified: ../../../scripts/run-all-tests.sh 2021-06-11: David Anderson commit 06c3dc2153df16045edae20594055d8005b2c0b3 Always look for Windows full path initial characters. modified: dwarf_line.c 2021-06-10: David Anderson commit 250a71dad58d18901628ad1fc5c24df3b1b76b65 Make these as similar as possible. modified: test/debuglinktest-a.sh modified: test/debuglinktest-b.sh 2021-06-10: David Anderson commit 52ac57e924156fde903d68605d89db0db4e9b1fb Removed bogus stuff and fixed so the dwarfdump-using commands see a dwarfdump.conf So the tests pass. modified: test/CMakeLists.txt 2021-06-10: David Anderson commit f44f75ecf0252366eef65c522a9b89ebeaa41869 Two words ran together in a message. Now separated by a single space. modified: src/bin/dwarfdump/dwconf.c 2021-06-10: David Anderson commit 546f740ad4d52dd9bf0cdbf66243fcb83fa4896d Remove HAVE_NONSTANDARD_PRINTF_64_FORMAT HAVE_WINDOWS_PATH and --enable-windowspath and --enable-nonstandardprintf modified: CMakeLists.txt modified: README.cmake modified: cmake/config.h.cmake modified: configure.ac modified: scripts/baseconfig.h modified: src/lib/libdwarf/dwarf_debuglink.c _dwarf_file_name_is_full_path() is global private func modified: src/lib/libdwarf/dwarf_line.c Now gets the new version number from configure.ac modified: scripts/buildandreleasetest.sh Delete a comment line modified: src/bin/dwarfdump/CMakeLists.txt Add -I$(top_srcdir)/src/bin/dwarfdump modified: src/bin/dwarfdump/Makefile.am Add default loc /usr/share/dwarfdump/dwarfdump.conf in looking for dwarfdump.conf Eliminate CONFPREFIX test, it is always there. modified: src/bin/dwarfdump/command_options.c Still not right. modified: test/CMakeLists.txt Added an echo to match up with test/debuglinktest-a.sh better. modified: test/debuglinktest-b.sh 2021-06-10: David Anderson commit 8941868ea163b6061c54b5e1f1fd8c6380346da4 Added a period where it had been missed. About line 2531. modified: doc/libdwarf.mm 2021-06-09: David Anderson commit 48bfa237dcf410a4d90aa0094fa6c2f1e723699f Used latest dwarf_init, not older one. modified: src/bin/dwarfexample/simplereader.c 2021-06-09: David Anderson commit 195fa85c42ccd0bc5191b1e9e12f24cd5ceae870 Now configure and cmake run the same 17 tests when testing, all pass. modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/debuglinktest-a.sh modified: test/debuglinktest-b.sh modified: test/test_dwarfstring.c modified: test/test_extra_flag_strings.c 2021-06-09: David Anderson commit 55cf3eeb1bbf46b25f391135e47529ec4d2282f0 Simplifying the doc am files modified: Makefile.am modified: configure.ac modified: doc/Makefile.am 2021-06-09: David Anderson commit 1d520af7b8c7f8a9ac3c289a659c2ee8399be12f typo fixed. modified: ChangesToLibdwarf.odt 2021-06-09: David Anderson commit bb67fa61429774c27baf1d4d711399a2b8354d4c modified: ChangesToLibdwarf.odt updated. modified: ChangesToLibdwarf.pdf libdwarf2.1.(mm ,pdf) -> libdwarf.(mm,pdf) revision 3.27 -> 4.1and libdwarf2p.1{mm,pdf} -> libdwarfp.{mm,pdf} revision 1.53 > 2.1 modified: Makefile.am renamed: libdwarf2.1.mm -> libdwarf.mm new file: libdwarf.pdf deleted: libdwarf2.1.pdf renamed: libdwarf2p.1.mm -> libdwarfp.mm renamed: libdwarf2p.1.pdf -> libdwarfp.pdf modified: pdfbld.sh 2021-06-09: David Anderson commit 5e23cc6959ee58c465c7b51573634c9e37042d65 the last change introduced a nasty typo: left off a */ modified: src/lib/libdwarf/libdwarf.h 2021-06-08: David Anderson commit 6315faaecd5fa9fed1c9ede11752051bba5df00c Corrected doc of dwarf_srclines_b() modified: doc/libdwarf2.1.mm Fixed commentary about dwarf_srclines_b() modified: src/lib/libdwarf/libdwarf.h 2021-06-08: David Anderson commit f5939ed251fe58866330ecadbfe0a18a5b37b416 Just remove one small documentation bug and regenerated. modified: doc/libdwarf2.1.pdf No change, just regenerated. modified: doc/libdwarf2p.1.pdf 2021-06-08: David Anderson commit aec87e963a53ea7ae19eac6d3201288d104ffc55 Now 'make doc' and 'make install' work fully. modified: Makefile.am modified: src/bin/dwarfdump/Makefile.am 2021-06-08: David Anderson commit 9b742d8219bf9ff85c904fd1593d7945ae33fec3 Fix mistake in documentation of dwarf_srclines_dealloc_b() modified: libdwarf2.1.mm 2021-06-08: David Anderson commit fa9ceb8d2efda0afc83bc3afb657ea8c55f7f619 commentary modified: README.cmake Now with doc: target. modified: doc/Makefile.am Now libdwarf.h put where it should with make install modified: src/lib/libdwarf/CMakeLists.txt 2021-06-08: David Anderson commit 88eb1805d05a0a380ffb2e39df0f4f2015a06f25 Minor change modified: doc/ChangesToLibdwarf.odt 2021-06-08: David Anderson commit 4e3edca6c22cbcbd48171fffa976fa3f2ed32ef5 More complete cleanup, though it would be rarely used. modified: scripts/CLEANUP 2021-06-08: David Anderson commit e919fe7a095d318ab74c7ce6b444cd48d52c2fdf Now run cmake tests if -DDO_TESTING=ON modified: CMakeLists.txt modified: test/CMakeLists.txt Fix the test scripts so they work consistently, and fix the one baseline where the wrong dwarfdump options were used before. modified: test/dwarfdumpMacos.sh modified: test/dwarfdumpPE.sh modified: test/dwarfdumpsetup.sh modified: test/test-mach-o-32.base 2021-06-08: David Anderson commit 072e3559d1065dc8e6117045bfa0ce2650610583 Documenting changes (not in full detail) new file: doc/ChangesToLibdwarf.odt new file: doc/ChangesToLibdwarf.pdf Fixing as --elf and --reloc options are gone. modified: doc/dwarfdump.1 2021-06-07: David Anderson commit c446e7e72c6bc9cd5c8dd67c52db2704616cfb96 Most of cmake works, but not ctest modified: README.cmake 2021-06-07: David Anderson commit b72a8c0a2580d63daa9fb76c773cb5f715aa2e9b Just updating README files a little. modified: README modified: README.cmake 2021-06-07: David Anderson commit edc5271694779675626b1a6d6ba06bc761b4fb0b Now if --enable-dwarfgen make install will install dwarfgen.1 and otherwise it will not. modified: configure.ac modified: doc/Makefile.am 2021-06-07: David Anderson commit cf3010079efbd34c6ffb0fe3d4c6aad362a0c585 Now can build the pdfs. The build is ONLY done in a build tree and should never be automatic. Only build if you've changed a .mm . Build by cd doc && make buildconsumerpdf or cd doc && make buildproducerpdf The Makefile copies the pdf built to the source tree. modified: doc/Makefile.am modified: doc/libdwarf2.1.pdf modified: doc/libdwarf2p.1.pdf modified: doc/pdfbld.sh 2021-06-06: David Anderson commit eafe9c0b0ece32cca12482cee1126ddfbe747a11 Move UNUSEDARG to after identifier. modified: dwarf_peread.c modified: dwarf_query.c modified: dwarf_ranges.c modified: dwarf_rnglists.c modified: dwarf_tsearchhash.c 2021-06-06: David Anderson commit fb3fa42ac0def16fdff5fadaf0af92e31dd3ad60 Moved UNUSEDARG to after identifier modified: dwarf_abbrev.c modified: dwarf_alloc.c modified: dwarf_dsc.c modified: dwarf_elf_load_headers.c modified: dwarf_elfread.c modified: dwarf_fission_to_cu.c modified: dwarf_form.c modified: dwarf_frame.c modified: dwarf_frame2.c modified: dwarf_gdbindex.c 2021-06-06: David Anderson commit 81344b9c961b6afaf6635e2b23271672e0a5a9ee eliminating the last AUTOMAKE_OPTIONS modified: Makefile.am 2021-06-06: David Anderson commit b9cb74402ef5bcceec1768b44e4c73372fedb912 In dwarfdump all the UNUSEDARG follow the identifier, as is the most common pracice. modified: src/bin/dwarfdump/attr_form.c modified: src/bin/dwarfdump/common.c modified: src/bin/dwarfdump/dwarf_tsearchbal.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/macrocheck.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_debug_gnu.c 2021-06-06: David Anderson commit 78cc4edb9245c7ac41b6faff930c83b962d84357 now UNUSEDARG after the identifier instead of before the type. modified: src/bin/dwarfdump/attr_form_build.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfdump/print_loclists.c modified: src/bin/dwarfdump/print_macinfo.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_origloclist_codes.c modified: src/bin/dwarfdump/print_ranges.c modified: src/bin/dwarfdump/print_rnglists.c modified: src/bin/dwarfdump/print_section_groups.c modified: src/bin/dwarfdump/tag_attr.c modified: src/bin/dwarfdump/tag_tree.c 2021-06-06: David Anderson commit c39c97fc38ae84e2a9eab1f23c706b62b03c869d Now UNUSEDARG defines are from libdwarf_private.h and they areused *after* the identifier (as is usually done). modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfgen/createirepformfrombinary.cc modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/bin/dwarfgen/dwarfgen.cc modified: src/bin/dwarfgen/irepattrtodbg.cc modified: src/bin/dwarfgen/ireptodbg.cc 2021-06-06: David Anderson commit be4457dff5426df98696102fec55cfd4bff9ee6f Moved UNUSEDARG to the more usual location after the ideentifier modified: dwarf_tied_test.c modified: testesb.c 2021-06-06: David Anderson commit 01e31558057bec25d19fe0845a4716d8a4dd0c18 Remove a commented-out AUTOMAKE_OPTIONS. modified: .gitignore 2021-06-06: David Anderson commit 383fcfb275ce121a7035e2edac150298d307ccf3 Now when make dist done the tar.gz contains all the files it should. Nothing missing. modified: Makefile.am modified: doc/Makefile.am modified: scripts/libbuild.sh modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfexample/Makefile.am modified: src/bin/dwarfgen/Makefile.am modified: src/lib/libdwarf/Makefile.am modified: test/Makefile.am 2021-06-06: David Anderson commit 4f664c92320396f67fb163d653d1cc75756dc350 This was never used or made public. Dropping it. deleted: src/lib/libdwarf/dwarf_stubs.c 2021-06-06: David Anderson commit 3c6e6118b04321fe578e3d6a50ed51a718164d93 This file is no longer used by libdwarf. deleted: dwarf_elf_access.c 2021-06-06: David Anderson commit aa9bee0fb08a171cf332f9293bf37f889bc6d763 These files were intended to be temporary. So deleting. deleted: cuandunit.txt deleted: debug-cu-tu-indexes-layout.odg 2021-06-06: David Anderson commit 1a1c9efad801deabd3a58db6406ed9bdfbbfe5e9 now removes the autotools cache too. modified: scripts/CLEANUP 2021-06-06: David Anderson commit 88a1739031ab80b376ce4922182c4722ca8bc8f7 Removed an errant chkres invocation. modified: test/dwarfdumpMacos.sh 2021-06-06: David Anderson commit 85f3340026ed8caf54dc3655f71b062a8b73831b Was not entirely checking status correctly. modified: test/debuglinktest-a.sh modified: test/debuglinktest-b.sh 2021-06-06: David Anderson commit 0d3b5458e6273fa6304a7e3de4e2827e1a3d2f27 Refs the real tests. The names were not meaningful. Better names now. renamed: test/runtestsexample.sh -> test/debuglinktest-a.sh renamed: test/runtestsexample-b.sh -> test/debuglinktest-b.sh modified: test/Makefile.am This was obsolete, the self-testing program set in test/Makefile.am deleted: test/testdebuglink.sh 2021-06-06: David Anderson commit 661c4b96bde7f0783571fed9ba4d93c1c1aa3f1b Now add back in the dwarfexample build. modified: .travis.yml 2021-06-06: David Anderson commit 328516fbfbc42041aad98324bba359a6964f4b80 showing the actual dwarfdump command now. modified: dwarfdumpLinux.sh modified: dwarfdumpMacos.sh modified: dwarfdumpPE.sh Now ensures the local directory as a dwarfdump.conf (avoiding a warning that messes up the diff) modified: dwarfdumpsetup.sh 2021-06-06: David Anderson commit f4dc8c84e9a01ff6c215e9b20c545ca8a33639b7 Remove TEST= from here, it is in the test directory. modified: src/lib/libdwarf/Makefile.am Supply a dwarfdump.conf to dwarfdump. modified: test/dwarfdumpsetup.sh 2021-06-06: David Anderson commit 9fa2090d626aa7902f5edad6c86c8f2d705a3523 Removed "AUTOMAKE_OPTIONS=" modified: doc/Makefile.am Was not exiting with correct status in all cases. If diff fails now shows actual diff. modified: test/dwarfdumpLinux.sh modified: test/dwarfdumpMacos.sh modified: test/dwarfdumpPE.sh modified: test/dwarfdumpsetup.sh 2021-06-06: David Anderson commit 7a45da78b5dc16476cb8fd0af9b06bbadd8e0df8 Try ignoring warnings abouts subdir-objects. modified: test/Makefile.am 2021-06-06: David Anderson commit 497a7c515181bbcf9ef66577a510366916871938 Removing --enable-dwarfexample as the output with it present is odd on travis. modified: .travis.yml 2021-06-06: David Anderson commit fcaf317462aba4e6187b6391ea2841adf86fa878 AUTOMAKE_OPTIONS = subdir-objects is now in both of these. If leftout of either autoreconf seems to object. modified: Makefile.am modified: test/Makefile.am 2021-06-06: David Anderson commit 08f77a680558d0acb4b2c7b63766f28705ab2854 added blank line to trigger build. I hope. modified: .travis.yml 2021-06-06: David Anderson commit f43a3fc00a39cdd8f46d68bd8790978b25dc17ee now make maintainer-clean cleans up a little bit it was missing. modified: Makefile.am modified: doc/Makefile.am modified: src/lib/libdwarf/Makefile.am modified: test/Makefile.am 2021-06-06: David Anderson commit 3627c6dae4bc6a01436f9b47bb98e0d821d36247 fixing omissions modified: scripts/CLEANUP 2021-06-06: David Anderson commit 6b65227b6891323c517c40f7efd18ff4eb2c08f4 These are to help make travis-ci work. modified: .gitignore modified: .travis.yml modified: test/Makefile.am 2021-06-06: David Anderson commit af91d83ba59392f9e625dd741680c9a124840e32 These all mentioned HAVE_NONSTANDARD_PRINTF_64_FORMAT and they no longer do that. modified: README modified: README.cmake modified: tsearch/dwarf_tsearchbal.c modified: tsearch/dwarf_tsearchbin.c modified: tsearch/dwarf_tsearchepp.c modified: tsearch/dwarf_tsearchhash.c modified: tsearch/dwarf_tsearchred.c 2021-06-05: David Anderson commit fef228d0a838ab9b2a3da9a6250ab74a0a73d054 Added include of libdwarf_private.h modified: dwgetopt.c 2021-06-05: David Anderson commit d7709325384b0f3a89cca71f2ab7517e73ec6a7e This failed. Mistakes crept in. modified: test/dwarfdumpLinux.sh Deleted a variety of useless lines in the scripts, Holdovers from the past. modified: test/dwarfdumpMacos.sh modified: test/dwarfdumpPE.sh modified: test/dwarfdumpsetup.sh modified: test/runtestsexample-b.sh modified: test/runtestsexample.sh 2021-06-05: David Anderson commit 83df3959b59abe44e2420f9640674b0d29e8ac8e An occasional use helper script. modified: scripts/CLEANUP All uses of HAVE_NONSTANDARD_PRINTF_64_FORMAT have been changed to just check _WIN32 modified: src/bin/dwarfdump/dwarf_tsearchbal.c modified: src/bin/dwarfdump/esb.c modified: src/lib/libdwarf/dwarfstring.c modified: src/lib/libdwarf/libdwarf_private.h 2021-06-05: David Anderson commit 331cf30c3456bebb933c0ff575f096045660db40 Deleted lines setting things that are never used here. modified: dwarfdumpsetup.sh 2021-06-05: David Anderson commit cae4ff4be5b1835823595c178c3bfce59af6f19b Removed an obsolete reference to a deleted script. To have 'make dist' work again. modified: test/Makefile.am 2021-06-05: David Anderson commit 8d0214959f337ebd8bd5f546e8deadfc6bb25e94 The ifdef DWARF_WITH_LIBELF code has been removed. Overall I suppose maybe a bit under 300 lines shorter? modified: src/bin/dwarfdump/command_options.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/globals.h modified: src/lib/libdwarf/dwarf_elfread.c 2021-06-05: David Anderson commit e94407b6e9417e11d35af45767ca3749b4bb1a51 modified: test/Makefile.am Now each test is done seperately. new file: test/dwarfdumpLinux.sh new file: test/dwarfdumpMacos.sh new file: test/dwarfdumpPE.sh This is the common prefix to run the above 3 tests. new file: test/dwarfdumpsetup.sh Gone deleted: test/runtestdd.sh deleted: test/runtests.sh 2021-06-05: David Anderson commit 998e5e079eb44f4eeccbe82cfad93b8fa8e40553 libdwarf: many many files defined TRUE FALSE now only libdwarf_private.h defines these. 2021-06-05: David Anderson commit 0a367212450eaeb9242b391f19b02bac3b32cf93 Two tests in one script are now one test each. modified: Makefile.am new file: runtestsexample-b.sh modified: runtestsexample.sh 2021-06-05: David Anderson commit 5ee336288440ec59840786c0a9521a74b82ae21b Now detects and links against libelf only when it is present AND we are building libgen. DWARF_LIBS will be -lz or empty DWARFGEN_LIBS will be -lelf or empty (and if empty we're not building dwarfgen as we don't want to or else because libelf itself or its headers are missing) modified: configure.ac Adding library of DWARFGEN_LIBS reference for the link. modified: src/bin/dwarfgen/Makefile.am 2021-06-05: David Anderson commit 3d94c71a5c1f9f937e834e2d1a3818a99d526eee Unnecessary, but possibly useful at times: modified: scripts/CLEANUP Correcting (for the new directorysetup) dealing with in-tree make check. modified: test/runtestsexample.sh 2021-06-05: David Anderson commit ac1245256ea3b9c850d77e58ad8cc7c694577bcd Now more correct. modified: .travis.yml 2021-06-05: David Anderson commit ec103b9ef7f371a632d28d09be2b000540555ce1 Modified a comment. We do not test dwarfgen here, and do not intend to test it here. modified: test/Makefile.am 2021-06-05: David Anderson commit 1080fe77500eb842ed6336c4906b1d3aa370eadb modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfexample/Makefile.am modified: src/bin/dwarfgen/Makefile.am Remove subdir-options line, not needed. 2021-06-05: David Anderson commit 2caa22ffa90f1dc93eecfbde58e61103a9e75790 Remove references to missing files and fix issues where files were moved. Now make dist completes and looks fairly complete. modified: Makefile.am modified: README.md modified: doc/Makefile.am modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/globals.h modified: src/lib/libdwarf/Makefile.am modified: test/Makefile.am 2021-06-05: David Anderson commit ea9c81786863a2f0a0c6e2e1eac73eb999309b18 Vincent T helped. modified: .travis.yml These are no longer needed or used. deleted: src/bin/dwarfdump/print_reloc.c deleted: src/bin/dwarfdump/print_reloc.h deleted: src/bin/dwarfdump/print_reloc_decls.h deleted: src/bin/dwarfdump/print_reloc_test.c Belongs in test/ renamed: src/bin/dwarfdump/README.testcases -> test/README.testcases 2021-06-04: David Anderson commit 40481e87063c8f4cb0cbce420ef44f2f73933c34 Typo fixed modified: .travis.yml 2021-06-04: David Anderson commit 62702d5dd1ade413a698c6213f277a76b19577a4 Fix typo modified: .travis.yml 2021-06-04: David Anderson commit 5c03b4df27becf8e7bf127e18c1b5dd1eb92af57 Experimental, probably wrong. travis-ci new file: .travis.yml 2021-06-04: David Anderson commit d0002df8fc98ecc002b60e7476f0ffae44a0e494 Removes repeated #define of UNUSEDARG an removes a suddenly pointless header: warningcontrol.h modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/common.c modified: src/bin/dwarfdump/dwarf_tsearchbal.c modified: src/bin/dwarfdump/globals.h deleted: src/bin/dwarfdump/warningcontrol.h modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_tsearchhash.c modified: src/lib/libdwarf/dwarfstring.c modified: test/Makefile.am modified: test/testesb.c 2021-06-04: David Anderson commit 0977bb4ae643558cedfd11e8813b2cb684ad417d Merge: b9785e4d 466eaace Merge pull request #23 from vtorri/vtorri_windows_h Vtorri windows h 2021-06-04: David Anderson commit b9785e4d1e38234e261df9a97482f0aab1c98135 Merge: aafe188d e0dccaeb Merge branch 'master' of https://github.com/davea42/libdwarf-code Merge needed due to my mistake. 2021-06-04: David Anderson commit aafe188d1b8a2d50c4bdd1d8890980f0f5c65f84 asif for windows. modified: configure.ac 2021-06-04: David Anderson commit e0dccaeb2f4b2a068d7801441c95732fc9521ea4 Merge: 5d62dbd1 3b2f73fd Merge pull request #22 from vtorri/vtorri_libtool libtool: do not check DLL libtool method on Windows 2021-06-04: David Anderson commit 5d62dbd1e09afae3ec3ce2c49c28842749a7b38f Now has the few defines from libdwarfdefs.h. modified: src/lib/libdwarf/libdwarf_private.h No longer needed. The includes of libdwarfdefs.h have been changed to include libdwarf_private.h instead. deleted: src/lib/libdwarf/libdwarfdefs.h Many c files in libdwarf. One in test. 2021-06-04: David Anderson commit a190e0ceeb3d1d966f039967818abf128168bca2 A couple botches here. Deleted local getcwd as not used. Fixed the #include nest for windows. modified: test/test_linkedtopath.c 2021-06-04: David Anderson commit fa3bd8f5febce4482f08835803d812513102f42b Fixed so reaches to libdwarf_private.h in libdwarf directory. modified: src/bin/dwarfdump/CMakeLists.txt Not needed now. deleted: src/bin/dwarfdump/libdwarf_private.h deleted: src/bin/dwarfexample/libdwarf_private.h deleted: src/bin/dwarfgen/libdwarf_private.h 2021-06-04: David Anderson commit 362dcbd7d1af02c5928f2b4f39b4917196169a42 Updated comments. modified: README.cmake modified: README.md Now cmake works to build things (the tests not yet ready in cmake) modified: src/bin/dwarfgen/CMakeLists.txt modified: src/lib/libdwarf/CMakeLists.txt 2021-06-04: David Anderson commit c49e3d929c585c99f2707fd2c6a63a21308426bf Now a build works. modified: CMakeLists.txt modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfexample/CMakeLists.txt modified: src/bin/dwarfgen/CMakeLists.txt modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/dwarf_elf_access.c Testing is not yet connected modified: test/CMakeLists.txt 2021-06-04: David Anderson commit 5a010db2d076e60c23e0b547cc133eccfa40b5f7 Not functional yet. new file: test/CMakeLists.txt 2021-06-04: David Anderson commit c768b0759d26b4966b65f45c08dee99dff43dd69 Updated about current state. modified: README.md 2021-06-04: David Anderson commit 6848816d83520d6e45261cf1f17b5a8634765e08 Revised comments to make it clear these are not to be run by hand. Just run scripts/buildstandardsource.sh which runs these. modified: scripts/ddbuild.sh modified: scripts/libbuild.sh 2021-06-04: David Anderson commit 4c8041dd2d44e093688c8906e07609876d99b8e2 This file is no longer needed. deleted: scripts/fixlibdwarfelf.sh 2021-06-04: David Anderson commit 75bf35e2e3509a0ac57d35eb57845ff734a11243 Now undefs things that the scripts/buildstandardsource.sh has no need for. modified: scripts/baseconfig.h Regenerated with latest version string. modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarf_names.h modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c modified: src/lib/libdwarf/dwarf_names.h modified: src/lib/libdwarf/dwarf_names_enum.h modified: src/lib/libdwarf/dwarf_names_new.h 2021-06-04: David Anderson commit 1d89e2eb09aba68e72f22b083ae75f8d0177c533 New version. For testing scripts. modified: src/lib/libdwarf/libdwarf_version.h 2021-06-04: David Anderson commit 7b1bc661162bc589d385cbe3518eacceece242a4 A file we no longer need. deleted: scripts/FIX-CONFIGURE-TIMES 2021-06-04: David Anderson commit c71eb8b513cf4b970cce53aa72d52598451ce50a scripts/buildstandardsource.sh is now mostly working, and a couple of files we do not want are deleted. deleted: scripts/UPD.awk modified: scripts/UPDATEDWARFDUMPVERSION.sh modified: scripts/buildstandardsource.sh modified: scripts/ddbuild.sh modified: scripts/libbuild.sh modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarf_names.h modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c modified: src/lib/libdwarf/dwarf_names.h modified: src/lib/libdwarf/dwarf_names_enum.h modified: src/lib/libdwarf/dwarf_names_new.h deleted: src/lib/libdwarf/generated_libdwarf.h.in modified: src/lib/libdwarf/gennames.c modified: src/lib/libdwarf/libdwarf_version.h 2021-06-04: Vincent Torri commit 466eaacef3dd7157fea3e412de11d87d1f159bd5 Windows: remove useless windows.h test 2021-06-04: Vincent Torri commit 3b2f73fd686c5d3548d244eafdaaea2a7faa0a74 libtool: do not check DLL libtool method on Windows 2021-06-03: David Anderson commit ee6ea9b8b7d21412a0ee0eed41e871ad16630279 dwarfgen: dwarfgen.1 is no longer in this directory, so removed from the Makefile. modified: Makefile.am 2021-06-03: David Anderson commit 694590bab1113ec5f85b219a304852dfbdd31694 Fixed typo in trivial local header. modified: src/bin/dwarfdump/libdwarf_private.h modified: src/bin/dwarfexample/libdwarf_private.h modified: src/bin/dwarfgen/libdwarf_private.h modified: src/lib/libdwarf/libdwarf_private.h 2021-06-03: David Anderson commit 12a9371442394a4275d775985e49bdf82a259e33 Just in case dwarfgen wants to use it. new file: dwarfgen/libdwarf_private.h 2021-06-03: David Anderson commit 2ce5c5793a99445f393a563b32b9cf61ab598f36 The trivial handful of trivial lld etc format defines is public domain so anyone can use it. modified: dwarfdump/libdwarf_private.h modified: dwarfexample/libdwarf_private.h modified: ../lib/libdwarf/libdwarf_private.h 2021-06-03: David Anderson commit 38921b9d3b39eb3be8ec3e870207e2d9a4ba7c8f Now we also build dwarfexample modified: src/bin/dwarfexample/Makefile.am Does the tests and now counts each, so PASS: 12 modified: test/Makefile.am These needed #include libdwarf_private.h modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/simplereader.c Move all the test data out of dwarfexample and into test. renamed: src/bin/dwarfexample/buildingdummy.sh -> test/buildingdummy.sh renamed: src/bin/dwarfexample/debuglink.base -> test/debuglink.base renamed: src/bin/dwarfexample/debuglink2.base -> test/debuglink2.base renamed: src/bin/dwarfexample/dummyexecutable -> test/dummyexecutable renamed: src/bin/dwarfexample/dummyexecutable.c -> test/dummyexecutable.c renamed: src/bin/dwarfexample/dummyexecutable.debug -> test/dummyexecutable.debug Moved dwarfexample tests and fixed the test scripts. modified: test/runtestdd.sh renamed: src/bin/dwarfexample/runtests.sh -> test/runtestsexample.sh Fix, I hope, windows make check this way. modified: test/test_linkedtopath.c 2021-06-03: David Anderson commit 1d6044be08fde7e73edc03710768a94827c6018e Removed duplicate *dwarf.h installs. modified: src/lib/libdwarf/Makefile.am Removed space after backslash modified: test/Makefile.am 2021-06-03: David Anderson commit 4f3546bb4d3479efc52ca96bac83dc2ce968b454 Ignoring some more configure generated files modified: .gitignore 2021-06-02: David Anderson commit 0bd0793e657d3a0fa67edfe558185175cf35e0c8 Now make check works for dwarfdump and libdwarf sanity checks. modified: test/Makefile.am modified: test/runtestdd.sh modified: test/test_extra_flag_strings.c 2021-06-02: David Anderson commit 3cda50644e3b9dd985c7dcb45196faf69eae6af1 modified: src/bin/dwarfdump/Makefile.am modified: test/Makefile.am All the test code for make check etc, is moved to the test directory. Including the exe dSYM objects. This is much smaller than when in dwarfdump. Most of the checks run individually. The ones in runtestdd are hard to run without a script. renamed: src/bin/dwarfdump/runtests.sh -> test/runtestdd.sh Not used. To be removed. modified: test/runtests.sh 2021-06-02: David Anderson commit e38c53007585625a04ea262230f02b9c22f27dfa Some of the tests moved to test/ modified: Makefile.am modified: src/lib/libdwarf/Makefile.am modified: test/Makefile.am 2021-06-02: David Anderson commit 03899d475bf9aab665ad3201d0dbaffe398f12f8 Now with libdwarf.pc.in modified: configure.ac new file: libdwarf.pc.in modified: src/lib/libdwarf/Makefile.am 2021-06-02: David Anderson commit ad1506430a371bd3572d74dc8b9530cda68cedb2 moving tests from libdwarf to the test dir. 2021-06-02: David Anderson commit cc05b24fdbb08cffd7d70fdd02e2049e3cadcde1 modified: Makefile.am modified: configure.ac and also various Makefile.am to recognize moved source. And restore reading elf.h (not using libelf) which had been....broken, briefly. 2021-06-02: David Anderson commit 0ff16afe1b7083c91769aa7f66f089cbc87ee8b7 Rearranged source tree so it is src/bin/{dwarfgen,dwarfexample,dwarfdump} src/lib/libdwarf 2021-06-01: David Anderson commit d50db523746fdfaafd82a2319163f9baa1e07213 Added MAINTANERCLEANFILES rule modified: test/Makefile.am 2021-06-01: David Anderson commit 4346fd64161f24601bcb50f43b6b65e497b8e88c Forgot to add this. Its not very useful yet. new file: doc/Makefile.am 2021-06-01: David Anderson commit 3d2d1e6c92001ab61359d014dd5e949b3887853a We can build libdwarf an dwarfdump with configure. modified: Makefile.am modified: README modified: README.md deleted: ar-lib modified: configure.ac modified: lib/libdwarf/dwarf_elf_access.c modified: lib/libdwarf/dwarf_elf_defines.h modified: lib/libdwarf/dwarf_generic_init.c modified: lib/libdwarf/dwarf_original_elf_init.c modified: lib/libdwarf/pro_reloc_stream.c deleted: m4/libtool.m4 deleted: m4/ltoptions.m4 deleted: m4/ltsugar.m4 deleted: m4/ltversion.m4 deleted: m4/lt~obsolete.m4 modified: src/dwarfdump/Makefile.am modified: src/dwarfdump/command_options.c modified: src/dwarfdump/dwarfdump.c modified: src/dwarfdump/globals.h modified: src/dwarfdump/print_reloc.c 2021-06-01: David Anderson commit 457b867e8da0c9286eaeb2a93116c1a65c8de9ec Now libdwarf builds (static libdwarf.la) The libelf support in dwarf_original_elf_init.c and dwarf_elf_access.h returns ERROR now. dwarf_incl.h includes libdwarf_private.h modified: Makefile.am modified: dwarf_elf_access.h modified: dwarf_incl.h modified: dwarf_line.c modified: dwarf_original_elf_init.c modified: dwarf_print_lines.c modified: libdwarf_private.h 2021-06-01: David Anderson commit 9fbf7d1f76ba753144d5a6b6445203a2a7850988 Trying to get libdwarf to build. modified: Makefile.am modified: autogen.sh modified: configure.ac modified: lib/libdwarf/Makefile.am autotools expect the name 'test' renamed: tests/Makefile.am -> test/Makefile.am 2021-06-01: David Anderson commit 23580d2c403a384a3e6c91ee6cbcfbb8849b8b89 Now we use libdwarf_private.h for the DW_PR lines. And reference libdwarf.h (no libelf or elf.h, so simpler ) modified: Makefile.am modified: dwarf_line.c modified: dwarf_print_lines.c 2021-06-01: David Anderson commit 1131651913b37a0f94613f3abe92b451fcf72bde More accurate naming. renamed: lib/libdwarf/libdwarf_internal.h -> lib/libdwarf/libdwarf_private.h renamed: src/dwarfdump/libdwarf_internal.h -> src/dwarfdump/libdwarf_private.h renamed: src/dwarfexample/libdwarf_internal.h -> src/dwarfexample/libdwarf_private.h 2021-06-01: David Anderson commit 0e697093db642aff0cc6e93f7ee5c9a1c937e687 A placeholder to run make check new file: tests/Makefile.am 2021-06-01: David Anderson commit 26a5e23aa16d7d37de0041f05cf65a0d97b0c464 Removed the DW_PR stuff from libdwarf and put into libdwarf_internal (which is copied to dwarfdump and dwarfexample) modified: ../../lib/libdwarf/Makefile.am renamed: ../../lib/libdwarf/libdwarf.h.in -> ../../lib/libdwarf/libdwarf.h new file: ../../lib/libdwarf/libdwarf_internal.h new file: ../dwarfdump/libdwarf_internal.h new file: ../dwarfexample/libdwarf_internal.h 2021-06-01: David Anderson commit 1c4e7b94596188ef3b93ee3def39634271e78331 removing autotools-generated files. deleted: lib/libdwarf/Makefile.in deleted: src/dwarfdump/Makefile.in deleted: src/dwarfexample/Makefile.in deleted: src/dwarfgen/Makefile.in 2021-06-01: David Anderson commit 10d4ff81f520b4561a3f0e3ae0a0e2b7be01e405 Move libdwarf to lib/libdwarf 2021-06-01: David Anderson commit 631cf401eabe06f0434292f37da74325df164871 new file: autogen.sh 2021-06-01: David Anderson commit 312206de97cfe6191054d1b51e6d4cc2039b6c06 removed libelf and elf.h elf refs modified: configure.ac dwarfdump now src/dwarfdump dwarfgen now src/dwarfgen dwarfexample now src/dwarfexample 2021-06-01: David Anderson commit c02c1c2430034e639fe180fece008fb433719a58 Another autotools-generated file removed. deleted: aclocal.m4 2021-06-01: David Anderson commit f57115127daffc46b4d98322c75121d9f456f309 Removing the files autotools create and moving files to a better place. deleted: Makefile.in renamed: config.h.in.cmake -> cmake/config.h.cmake deleted: compile deleted: config.guess deleted: config.h.in deleted: config.sub deleted: configure deleted: depcomp renamed: dwarfdump/dwarfdump.1 -> doc/dwarfdump.1 renamed: dwarfgen/dwarfgen.1 -> doc/dwarfgen.1 deleted: install-sh deleted: ltmain.sh deleted: missing deleted: test-driver dadebug ending report 2021-05-31: David Anderson * CMakeLists.txt,configure.ac: version string is 0.1.0 * README mentions the new location of documentation: the doc directory, which we added just now. 2021-05-28: David Anderson * CMakeLists.txt:Version string now 20210528 * Makefile.am: Added scripts ChangeLogs for 2019, 2020. Removed scripts items that were deleted from the source (no longer needed) * Makefile.in: Regenerated. * README.md: Removes reference to deleted script, references 'make dist' instead. * configure.ac: Version 20210528 * configure: regenerated 2021-05-20: David Anderson * CMakeLists.txt, configure.ac: Now version 20210520 * configure: Regenerated. 2021-05-17: David Anderson * CMakeLists.txt: Removed test that has been irrelevant for quite a while (and had a serious misspelling too). * config.h.in.cmake: Added two missing header file checks and the associated cmakedefine lines. Removed cmakedefine NO_MINUS_C_MINUS_O as it only applies to configure (not to cmake). 2021-05-17: David Anderson * README: Removed obsolete reference to libelf source. 2021-05-14: David Anderson * bugxml/bugrecord.py, bugxml/readbugs.py: Reformatted to standard python style. 2021-05-14: David Anderson * CMakeLists.txt: Updateing version to match configure.ac and adding comment to keep these files in sync. * configure.ac: Added comment to keep the version here and in CMakeLists.txt in sync. No other change. 2021-05-12: David Anderson * CMakeLists.txt: Fixing a disastrous error removing creation of libdwarf.h from the build. The mistake was made in a commit 24 November 2020. Now ctest -R passes again, with or without libelf. 2021-03-05: David Anderson * configure.ac: Now version 20210305. * configure: Regenerated. 2021-02-14: David Anderson 2021-02-19: David Anderson * scripts/ddbuild.sh: needed a -DSKIP_AF_CHECK to allow building a helper program that emits C source for dwarfdump. 2021-02-15: David Anderson * configure.ac: Now version 20210214. * configure: Regenerated. 2021-02-14: David Anderson * scripts/ddbuild.sh: Now also builds a table for initializing standard attr/form tables for checking attr/form combinations. 2021-01-19: David Anderson * scripts/conddef.py,scripts/find_pdfpages.py, scripts/funcfinderhdr.py,scripts/funcfindermm.py, scripts/funcfindersrcs.py,scripts/haveinclude.py: All now are fairly close to following the Python PEP 8 style guide.` libdwarf-code-0.11.1/ChangeLog2022000066400000000000000000010211721472336503500163700ustar00rootroot00000000000000 2022-12-31: David Anderson commit 1aa419e3c8c4e32397532a9ffc03bb89a7d99d53 Improved error messages for empty or really short files dwarfdump is asked to look at. modified: dwarfdump.c 2022-12-29: David Anderson commit 2e2eae77fdf848c4af3c1e0340716ee1ad44791b Now up to date with git log modified: ChangeLog 2022-12-29: David Anderson commit b6af42015d91df10dca09f4f8607076e0e248d89 Alter the postioning of calls to print_version_details to make the output more consistent overall. modified: src/bin/dwarfdump/dd_command_options.c Removing a print_version_details() call as it's now done in dd_command_options.c modified: src/bin/dwarfdump/dwarfdump.c Adding checks of a few API calls (when using -ka) that were previously not called from dwarfdump. modified: src/bin/dwarfdump/print_frames.c 2022-12-29: David Anderson commit e63643d5f24cfbf2203d185b432ef4b56b1edc07 Clarifying doxygen comments. modified: src/lib/libdwarf/libdwarf.h 2022-12-27: David Anderson commit 312ac6f05dc573dbdf7c686c586de6ffdf1784b5 Fix silly typo, fixing a comment. modified: src/lib/libdwarf/dwarf_memcpy_swap.h 2022-12-27: David Anderson commit a5df21f0eb961e1280c4c09a0c4828ad6c76f41c Documenting access to the word copy function libdwarf uses to deal with endian differences between an object being read and the the running system library doing the reading. modified: doc/libdwarf.dox modified: doc/libdwarf.pdf modified: src/lib/libdwarf/dwarf_memcpy_swap.h modified: src/lib/libdwarf/libdwarf.h 2022-12-27: David Anderson commit cb506fb532653167cd631adfa530de3efa86df1c Bringing up to date with git log modified: ChangeLog 2022-12-27: David Anderson commit 99081b97a0c3cc2e312ea5f15d0fe47699bc86f0 Removed a useless function The remaining functions are executed in testing. modified: dwarf_crc.c modified: dwarf_crc32.c Removed the now-unused non-API _dwarf_crc32() modified: dwarf_opaque.h Added doxygen comments about the crc functions. modified: libdwarf.h 2022-12-26: David Anderson commit b966a1964b0711f7791383a01d3473250507cfee Fix indents and remove trailing whitespace. modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_crc32.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_dsc.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_groups.c modified: src/lib/libdwarf/dwarf_query.c 2022-12-26: David Anderson commit 8825b8280394deb8df28514164317317a9a424cb Fix indents and remove trailing whitespace. modified: dwarfdump.c modified: print_die.c modified: print_pubnames.c 2022-12-26: David Anderson commit 6ce0f705f8931e095e4334ebe33ec1f220042367 Now with latest date. modified: doc/libdwarf.pdf Add new calls (with -ka) testing additional library API functions. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_die.c Add new calls (with -ka) testing additional library API functions. Refactor to pull checking code out of the main line. For clarity. modified: src/bin/dwarfdump/print_pubnames.c if 0 out a local unusable function modified: src/lib/libdwarf/dwarf_arange.c Clarify some comments and spacing. modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_opaque.h 2022-12-26: David Anderson commit 8c03d27394d69f06271dc5298cc7956c77e4ca53 updating date in the document. modified: doc/libdwarf.dox 2022-12-23: David Anderson commit 169a8639254511ecbbd0d5ae15406e36a576e8e5 Remove trailing whitespace and correct indents. modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_hipc_lopc_attr.c 2022-12-23: David Anderson commit 24197dd18e8682a1fb8859b797062e777fafa0aa Removing trailing whitespace modified: src/lib/libdwarf/dwarf_base_types.h modified: src/lib/libdwarf/dwarf_global.h modified: src/lib/libdwarf/dwarf_string.h modified: src/lib/libdwarf/libdwarf.h 2022-12-23: David Anderson commit a4bf108310059bc04306de7aa11b788041e31c6e Corrected error cases in dwarf_offset_list by adding free_dwarf_offsets_chain() in those cases. modified: src/lib/libdwarf/dwarf_query.c Minor change in format, no change in content. modified: src/lib/libdwarf/dwarf_string.h 2022-12-23: David Anderson commit 382fc73ca8146c7aa364fc2f7e90b77e7dfde688 Changes in dwarfstring_constructors, one of them a fix. modified: src/lib/libdwarf/dwarf_line.c 2022-12-23: David Anderson commit b46cbc3e7134bdb3c7ebb8c9d3b74ca17102248a Now using dwarfstring_constructor* better and added comments in places about those.. Corrected a dwarfstring_destructor(&incdir) to dwarfstring_reset(&incdir) in create_fullest_file_path error case. modified: src/lib/libdwarf/dwarf_print_lines.c 2022-12-23: David Anderson commit 801a5e278bb753ea9df68abab953e603bb425e83 Add casts to avoid compiler warnings. modified: src/lib/libdwarf/dwarf_global.c 2022-12-23: David Anderson commit a4a10e6c1e77d5a054b3200201638e461bff69fd Removed unreachable code to avoid compiler warning. modified: src/lib/libdwarf/dwarf_generic_init.c 2022-12-23: David Anderson commit b35972b2c7910585bc0515ec289871e8ee390ca6 Adding cast to target type to avoid compiler warnings. modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_gdbindex.h 2022-12-23: David Anderson commit 554e754d588941023f1f1bf7f57548ccbfbde907 Some modifications of local data types to avoid compiler warnings. Correction of error handling in find_sig8_target_as_global_offset() to avoid leak of a Dwarf_Error. modified: src/lib/libdwarf/dwarf_form.c 2022-12-23: David Anderson commit 5519cdc5582ffdeadac865f6bb8de15a60ab798d Adding casts to avoid compiler warnings. Correcting a return tykpe which has long been wrong: DW_DLV_NO_ENTRY changed to DW_DLV_OK modified: src/lib/libdwarf/dwarf_fission_to_cu.c 2022-12-23: David Anderson commit c3f3babcd7c0ba6620e19b11d7079fa53e10b7e8 Added an if (resdwo == DW_DLV_NO_ENTRY) for clarity. Updated a dwarfstring constructor to use a local char array instead of all malloc. modified: src/lib/libdwarf/dwarf_die_deliv.c 2022-12-23: David Anderson commit e4c58a7ab39a8f28d938dfc2e6f89e61ea27eae9 Fix a number of minor errors and add casts where needed to avoid compiler warnings. modified: src/bin/dwarfdump/print_die.c 2022-12-20: David Anderson commit 98e7e804427e979ba4140b1725553dbfa0f4e3b7 Using casts to ensure no compiler warnings on assigning a big unsigned to a smaller unsigned type. modified: src/lib/libdwarf/dwarf_debug_sup.c A simple and clead way to ininialize local structs. modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2022-12-20: David Anderson commit cc347303b0a019f3e352303e866a305a3c2e0c48 Now up to date with ChangeLog modified: ChangeLog 2022-12-20: David Anderson commit 04f3722747e3991fced621cef60fd91654ef2e2d Now allows DW_LANG codes including the latest. modified: src/bin/dwarfdump/print_die.c Updated DW_LANG codes with known items, the with a bit of help. modified: src/lib/libdwarf/dwarf.h make rebuild regenerated these with the new DW_LAN codes. modified: src/bin/dwarfdump/dwarf_names.c modified: src/lib/libdwarf/dwarf_names.c 2022-12-20: David Anderson commit a7d3d5eb322d462729df089415ca761df729f054 Implemented the changed API of dwarf_dietype_offset() modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_query.c Update doxygen on dwarf_dietype_offset() modified: src/lib/libdwarf/libdwarf.h 2022-12-20: David Anderson commit 7d146dcf5c4c3e51b992b97a81145276f11f85a5 Now (with -ka or --check-functions) checks 8 more libdwarf functions for correct operation. modified: src/bin/dwarfdump/print_die.c 2022-12-20: David Anderson commit c95e8ea6bcf391f8e6f034dc848399fbef424731 dwarf_dietype_offset() now has an incompatible change. Before the change it could not work properly if .debug_info referred to .debug_types via a DW_FORM_ref_sig8 (DWARF4). modified: doc/libdwarf.dox 2022-12-20: David Anderson commit 649b0716f1a336b09efcd06deb43c363435c7742 Checking additional functions for correct operation. modified: print_abbrevs.c modified: print_die.c 2022-12-19: David Anderson commit 137985198b36899b5ff703acf9359d81967017ae Ensure the check_function_result summary numbers print out when the summary counts are requested. modified: src/bin/dwarfdump/dd_compiler_info.c Improved the wording of a failed check on abbreviations. modified: src/bin/dwarfdump/print_abbrevs.c Added full check of the values returned by dwarf_offset_list() Refactored blocks of checking-code into new static functions to make the important code easier to read. modified: src/bin/dwarfdump/print_die.c Refactored into static functions some checking code to make the printing code easier to follow. modified: src/bin/dwarfdump/print_hipc_lopc_attr.c 2022-12-19: David Anderson commit fbbd626cd21b2fcbbbe150b40deaaa7a1778b9d0 Deleted an obsolete comment line. modified: src/lib/libdwarf/dwarf_query.c 2022-12-19: David Anderson commit e11da35379e23b7c7a989da4eb0b196e34986451 Updating presentation of a few function interfaces (no change in content) and improved some doxygen comments. modified: src/lib/libdwarf/libdwarf.h 2022-12-19: David Anderson commit 28c33ca700c82d6086e759fcd52312b569ed3119 Added a new example for dwarf_hithpc_b and added (void)parent_index; (etc) to avoid a compiler warning. modified: doc/checkexamples.c 2022-12-18: David Anderson commit c3d319584df050ea46c35dd97ca84871d2c239ad Corrected a doxygen comment. modified: doc/checkexamples.c corrected --check-functions option to enable checks of previously unchecked libdwarf calls. modified: src/bin/dwarfdump/dd_command_options.c Implemented checks of the dwarf_offset_list() function. Refactored the print_die_and_children_internal function: checking code is pushed to nearby static functions so the overall logic is clearer. modified: src/bin/dwarfdump/print_die.c Clarified documentation of dwarf_offset_list(). modified: src/lib/libdwarf/libdwarf.h 2022-12-17: David Anderson commit f335fada3a1ed97dc4df9d5593d25a9af88a19c1 Renamed glflags DIE_global_offset to DIE_section_offset to be specific about its meaning. modified: dd_glflags.c modified: dd_glflags.h modified: dwarfdump.c modified: print_aranges.c modified: print_die.c modified: print_frames.c modified: print_ranges.c 2022-12-17: David Anderson commit 3f0c2b6cf67462b71daa9401220b196d29425851 Making a new --check-functions option and a place to record such. No meaningful implementation yet. modified: dd_command_options.c modified: dd_glflags.c modified: dd_glflags.h Comment changes. modified: print_die.c 2022-12-17: David Anderson commit 3668a15c80a00f6914a623c64a69f947b49419bf Removed some duplicated paragraphs about section groups. Reformatted a number of paragraphs for the convenience of the editor. modified: libdwarf.dox 2022-12-17: David Anderson commit 94b4892b8adbab9316af03301b629d08acf30d8b Bringing up to date with git log. modified: ChangeLog 2022-12-17: David Anderson commit 17ed6be737a6b9082be1f7014d68c9494e509898 Changing function defs that did not follow codingstyle. Now int xxx(yyy...) per library standard. modified: dwarf_frame.c modified: dwarf_line.c Correcting doxygen comment typos. modified: libdwarf.h 2022-12-14: David Anderson commit 33fa9c10e06829754432547c15ad5a91a28eb119 I think this will fix two more warnings. modified: dwarf_debugnames.c 2022-12-14: David Anderson commit 144fc3396c06dc0a9f487468e6b127fe9ba2fc60 Adjusting a type and casting to avoid compiler warnings about some type conversions. modified: dwarf_dsc.c modified: dwarf_elfread.c modified: dwarf_fill_in_attr_form.c 2022-12-14: David Anderson commit 087b5e44360609f53951a30d0f6700346607977d Fixing type and adding casts to avoid warnings from a compiler. modified: dwarf_elf_load_headers.c modified: dwarf_elfread.h 2022-12-14: David Anderson commit b2865d4b2be65e2d512088f015ada43ea82a0f6a Fixing three issues of the output-type of READ_UNALIGNED macro modified: dwarf_debugnames.c 2022-12-13: David Anderson commit f24c5387c6aac43d1fbb6f0199ff5f0ea7ce51e7 removing all instandes of UNUSEDARG and using (void)name; in the function body instead so compilers that do not have the gcc unusedarg feature can compile things without warnings. modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/dd_attr_form.c modified: src/bin/dwarfdump/dd_esb_using_functions.h modified: src/bin/dwarfdump/dd_macrocheck.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/showsectiongroups.c modified: src/bin/dwarfexample/simplereader.c modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/bin/dwarfgen/dwarfgen.cc modified: src/bin/dwarfgen/irepattrtodbg.cc modified: src/bin/dwarfgen/irepdie.h modified: src/bin/dwarfgen/irepform.h modified: src/bin/dwarfgen/ireptodbg.cc modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/tag_tree.c modified: src/lib/libdwarf/dwarf_base_types.h modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_dsc.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.h modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_groups.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_loc.h modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_macro5.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_ranges.c modified: src/lib/libdwarf/dwarf_xu_index.c modified: src/lib/libdwarf/libdwarf.h modified: src/lib/libdwarf/libdwarf_private.h Here, in addition, we remove a nested-include of libdwarf.h and make all includes single-level. modified: src/lib/libdwarfp/dwarf_pro_alloc.c modified: src/lib/libdwarfp/dwarf_pro_arange.c modified: src/lib/libdwarfp/dwarf_pro_debug_sup.c modified: src/lib/libdwarfp/dwarf_pro_die.c modified: src/lib/libdwarfp/dwarf_pro_dnames.c modified: src/lib/libdwarfp/dwarf_pro_error.c modified: src/lib/libdwarfp/dwarf_pro_expr.c modified: src/lib/libdwarfp/dwarf_pro_finish.c modified: src/lib/libdwarfp/dwarf_pro_frame.c modified: src/lib/libdwarfp/dwarf_pro_funcs.c modified: src/lib/libdwarfp/dwarf_pro_init.c modified: src/lib/libdwarfp/dwarf_pro_log_extra_flag_strings.c modified: src/lib/libdwarfp/dwarf_pro_macinfo.c modified: src/lib/libdwarfp/dwarf_pro_opaque.h modified: src/lib/libdwarfp/dwarf_pro_pubnames.c modified: src/lib/libdwarfp/dwarf_pro_reloc.c modified: src/lib/libdwarfp/dwarf_pro_reloc_stream.c modified: src/lib/libdwarfp/dwarf_pro_reloc_symbolic.c modified: src/lib/libdwarfp/dwarf_pro_section.c modified: src/lib/libdwarfp/dwarf_pro_types.c modified: src/lib/libdwarfp/dwarf_pro_vars.c modified: src/lib/libdwarfp/dwarf_pro_weaks.c modified: src/lib/libdwarfp/libdwarfp.h 2022-12-13: David Anderson commit 38a55205d492c11178c7ed31c29c74bee6577d2b To make this test pass with the renaming. modified: test/Makefile.am modified: test/README.testcases modified: test/test_dwarfdumpLinux.sh modified: test/testuriLE64ELf.base renamed: test/testuriLE64ELf.sourcecode -> test/testuriLE64ELfsource.c 2022-12-13: David Anderson commit 80930c4de0ac12124a80337f300d4ed5640a045a Another attemt to prevent test/ testcase being rebuilt. renamed: testuriLE64ELf.c -> testuriLE64ELf.sourcecode 2022-12-13: David Anderson commit 88434de76e9966e6ec43d08a0767cfcaf4e3ac44 removing UNUSEDARG in favor of (void)name; sort of thing. modified: Makefile.am modified: README.testcases modified: test_dwarf_tied.c modified: test_dwarfdump.py modified: test_esb.c modified: test_extra_flag_strings.c modified: test_linkedtopath.c Changed the name to deter (I hope) the compiler from recompiling when running tests. This object must not be recreated. renamed: testuriLE64ELf.obj -> testuriLE64ELf.testme 2022-12-12: David Anderson commit 7affdd2b7b20a620be28c3de3f9582978568d626 Ensure testuriLE64ELf.c shows up in a release, modified: test/Makefile.am 2022-12-12: David Anderson commit 98a8840b2b292d91c427a596a2f5b6d85a8eab08 Source to build testuriLE64ELf.obj. The correct cc command is a comment in this file. new file: testuriLE64ELf.c The generated object, to be read, not executed. modified: testuriLE64ELf.obj 2022-12-12: David Anderson commit 839a134ea6d8e4e77a96702b5533c4a6f7e5d399 Improving doxygen wording modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h Regenerated. modified: doc/libdwarf.pdf 2022-12-12: vtorri commit 4520c3ce53e7ffb9b9466d69bc50135678d1df92 fix some warnings with Visual Studio (#142) * fix some warnings with Visual Studio Remove some stupid warnings with Visual Studio about deprecated signatures modified: meson.build Fix some types with Visual Studio modified: src/lib/libdwarf/dwarf_crc32.c modified: src/lib/libdwarf/dwarf_debuglink.c Run some tests only if sh shell is found (mainly with msys2 on Windows) modified: test/meson.build * fix typo Co-authored-by: Vincent Torri Co-authored-by: David Anderson 2022-12-12: David Anderson commit 662eefb2d1888aeac0420c95625a6064f4be37a8 Merge: 693baa16 10b2231a Merge branch 'master' of https://github.com/davea42/libdwarf-code Due to a workflow update, not code. 2022-12-12: David Anderson commit 693baa1668960511701ce23429e80e438e41adc1 Update to get latest git log data modified: ChangeLog 2022-12-12: David Anderson commit 37bb274fb9724e7e81db2a66a9266ff21cad60e8 Now setting address_size: to improve test coverage in dwarfdump and libdwrf. modified: src/bin/dwarfdump/dwarfdump.conf Now using the correct type in the macro READ_UNLIGNED_CK to avoid compiler warnings. modified: src/lib/libdwarf/dwarf_debugaddr.c 2022-12-12: David Anderson commit 3d06c94f016edfe0e987f43d1e3344e41bafa9bc Now with the correct datatype in an argument to initialize the hash table default size to a useful value. modified: src/lib/libdwarf/dwarf_alloc.c 2022-12-08: David Anderson commit 4961fee9343c816e058c9da1f6789d9d90e39dc2 Coverity Scan noted a bug: assigning *error when error could be NULL. Fixed. modified: src/lib/libdwarf/dwarf_die_deliv.c 2022-12-08: David Anderson commit cb3ffd809659ce7eabe45474c01372c8e2b27f1f make rebuild regenerated these source files with version 0.6.0 modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2022-12-08: David Anderson commit f721e4014795541ea5a68e1dc21d1d22e64038ce Used tools/updatesemanticversion.py 0.6.0 to update all the places the version appears in the source modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2022-12-08: David Anderson commit 027e169211bcf71384bd9a0f04466551934ecc4a Fixing trailing whitespace. modified: src/bin/dwarfdump/dd_globals.h modified: src/lib/libdwarf/dwarf_global.c Fixing trailing whitespace and adding the dwarf_globals_dealloc() where I forgot to insert it. modified: src/bin/dwarfdump/print_pubnames.c 2022-12-08: David Anderson commit 99ab17c5a9edad3f32cc786acd8d3fe02ace3391 Now using the new interfaces. modified: doc/checkexamples.c Now describes the changed API applicable to calling dwarf_get_pubtypes() (and therefore using Dwarf_Type). modified: doc/libdwarf.dox 2022-12-08: David Anderson commit 78814d95c2494b9b063fa5a8960890d89a9c1765 We now allow for missing python3 and sh for Windows Visual Studio users. modified: test/meson.build 2022-12-07: David Anderson commit e817d984ec486ff17e1e9f0544ae542ebb038e56 debugging message (normally ifdef out) now say debugging: instead of the meaningless dadebug. modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_tsearchhash.c modified: src/lib/libdwarf/dwarf_util.c Zero the pointer and counter whose address the caller provided to ensure no segfaults due to caller being a bit careless. modified: src/lib/libdwarf/dwarf_global.c 2022-12-07: David Anderson commit 7d369fc0eed520d01be2973b187561cfa940be25 Fixed a comment on print_error_maybe_continue. modified: src/bin/dwarfdump/dwarfdump.c Fixed an error message and ensured an ERROR output is counted as that. modified: src/bin/dwarfdump/print_frames.c Corrected the typenames and stdsecname arrays to have the correct contents. Made the behavior on error a bit easier to understand when looking at printed output. modified: src/bin/dwarfdump/print_pubnames.c 2022-12-07: David Anderson commit c896c08aefcc0c1f1cc9b3be34cffaf7f6d907ef Alterations for reading .debug_pubtypes were incorrect. Now fixed. modified: src/bin/dwarfgen/createirepfrombinary.cc 2022-12-07: David Anderson commit 22fdb8cf229177edaab6c9bca583eaa54c8e838d When sh or python3 cannot be found to run scripts in the tests those tests are simple not attempted. make test failure was a problem for a Windows Visual Studio user. modified: test/meson.build 2022-12-06: David Anderson commit 5744cb9cd44299d1415eb7a07d6bc55a659baffe No longer need 4 source files in dwarfdump. modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/meson.build Function no longer needed here. modified: src/bin/dwarfdump/dd_globals.h Now uses the new pubnames-style functions, and only needs one sourcefile to do all.. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_pubnames.c Now correct for pubtypes reading. modified: src/bin/dwarfgen/createirepfrombinary.cc 2022-12-06: David Anderson commit 278fe12b7caf4a88acb627db7cc2a6c5f4a216d3 Corrected new bug leading to crash. modified: src/lib/libdwarf/dwarf_global.c Removed unwanted defines. modified: src/lib/libdwarf/libdwarf.h 2022-12-06: David Anderson commit 3199b6a42e1902b16b5edf24f3732d9ae078665f First try at compatibility statement. modified: doc/libdwarf.dox These files no longer needed. deleted: src/bin/dwarfdump/print_static_funcs.c deleted: src/bin/dwarfdump/print_static_vars.c deleted: src/bin/dwarfdump/print_types.c deleted: src/bin/dwarfdump/print_weaknames.c 2022-12-06: David Anderson commit 1433bca543788d027bed1359fb79aaca6f15a1fd A working version of the new pubtypes etc interfaces. modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_global.h With #defines simplifying use of debug_pubtypes modified: src/lib/libdwarf/libdwarf.h 2022-12-05: David Anderson commit dfde62d0ab951970d2121e6348fb02862c03d914 New simpler 0.6.0 source for access to pubnames-like DWARF sections. modified: CMakeLists.txt modified: Makefile.am modified: dwarf_alloc.c deleted: dwarf_funcs.c deleted: dwarf_funcs.h modified: dwarf_global.c deleted: dwarf_pubtypes.c deleted: dwarf_types.c deleted: dwarf_types.h deleted: dwarf_vars.c deleted: dwarf_vars.h deleted: dwarf_weaks.c deleted: dwarf_weaks.h modified: libdwarf.h modified: meson.build 2022-12-05: David Anderson commit e020568521917d1641174b465003311e47f3c8a1 whitespace corrections, indent corrections. modified: src/bin/dwarfdump/dd_checkutil.c modified: src/bin/dwarfdump/dd_tsearchbal.c 2022-12-05: David Anderson commit 5321e211d4dd426bb49e04ba731c3ab97c155aba Removing trailing whitespace. modified: dwarf_global.c modified: dwarf_loclists.c modified: libdwarf.h 2022-12-05: David Anderson commit e86a2fc3b31806e5c34f5d841cabfc73f562b39d Improved the reporting from --trace=0 Added comments where only short options mentioned to show also the long option. modified: src/bin/dwarfdump/dd_command_options.c Minor comment clarification. modified: src/bin/dwarfdump/print_ranges.c Comment clarifications. Some accidental duplicate checking (not a recent mistake) is now enclosed in #if 0 #endif modified: src/lib/libdwarf/dwarf_global.c Completed a set of doxygen @see mentions close to dwarf_dealloc_error. modified: src/lib/libdwarf/libdwarf.h 2022-12-05: David Anderson commit 4093a0f2bc70889f3b37b60e3e8179f5214fe011 Fixed a typo in the most recent Changes item. modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2022-12-02: David Anderson commit b51b0efb18ffcfadfae615f9e6dc0b243d7967a1 Updated from git log modified: ChangeLog 2022-12-02: David Anderson commit 20915dba4e49be38109820e7e9b6ff2001b8ba7e Fixed to say CODINGSTYLE.md and adding CONTRIBUTIONS.md modified: Makefile.am updates the dealloc comments for dwarf_load_loclists() and dwarf_load_rnglists(). modified: src/lib/libdwarf/libdwarf.h 2022-12-02: David Anderson commit da32f0e282fb1129ef10332245c4f0ffb832837c Mention fix to libdwarf dwarf_load_rnglists and dwarf_load_loclists. modified: doc/libdwarf.dox Removing a blank line of no value. modified: src/lib/libdwarf/dwarf_alloc.c Correcting a memory leak in dwarf_load_rnglists and dwarf_load_loclists. These are functions which are designed for dwarfdump to use, it is unlikely any other code calls them. modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_rnglists.c 2022-12-01: David Anderson commit 1913eabdeefaf3d62182a327bfafae3574d4be32 Now 'if 0' functions not used anywhere. Not public functions (though one is named like a public function!) modified: dwarf_elf_load_headers.c 2022-12-01: David Anderson commit 1f462173f1c905954733c5228d80b1fe64124a5f Removed unused and unusable code. modified: src/bin/dwarfdump/dd_checkutil.c Removed pointless argument from PrintBucketGroup(). modified: src/bin/dwarfdump/dd_checkutil.h Removed lots of code relating to unusable options: -o (was used for printing Elf relocation records) modified: src/bin/dwarfdump/dd_command_options.c Removing unneeded arg from PrintBucketGroup() call. modified: src/bin/dwarfdump/dwarfdump.c Removing unneeded arg from PrintBucketGroup() call. Removed very old #if 0 set of lines. modified: src/bin/dwarfdump/print_die.c Removed code once used to process archives. We do not process those now. modified: src/bin/dwarfdump/print_tag_attributes_usage.c 2022-12-01: David Anderson commit 43bef7874680fabe426f3fcd101e5d7d9e162394 Added a comment. modified: src/bin/dwarfdump/dwarfdump.c Altered argument in one place so called function will return a value. More complete coverage. modified: src/lib/libdwarf/dwarf_die_deliv.c 2022-12-01: David Anderson commit eca433525439234fbc7a5d37e12476532d4478cf ifdef BUILD_TDUMP on all the functions related to dumping trees as neither dwarfdump nor libdwarf call the dwarf_tdump functions. modified: src/bin/dwarfdump/dd_tsearchbal.c modified: src/lib/libdwarf/dwarf_tsearchhash.c 2022-12-01: David Anderson commit 07e16fa515f779dc17a83fcd7d15eb5778ae5ef1 These files & functions implement some checking. Verifying addresses in .debug_info or .debug_line are at least in bounds of some code section. The dwarfdump options --trace=1 --trace=3 show the table info for debugging this aspect of checking in dwarfdump. The printed tables no longer print pointers as values, but contain an index value (assigned unique to each struct) so regression tests can pass. The pointer value was never very useful anyway. modified: dd_checkutil.c modified: dd_checkutil.h 2022-11-30: David Anderson commit ec18b95e687907999ec8fb5b0f2ceba2a40ce632 Renamed DUMP_VISITED_INFO to KIND_VISITED_INFO DUMP_RANGES_INFO DUMP_LINKONCE_INFO similarly renamed. modified: src/bin/dwarfdump/dd_checkutil.c modified: src/bin/dwarfdump/dd_glflags.h Removed def of KIND_VISITED_INFO etc since dd_glflags.h has such names spelled right. modified: src/bin/dwarfdump/dwarfdump.c 2022-11-30: David Anderson commit a1dcff70b2216ea137b74e7c18a811ad529d786d Documented what this does, and removed assert() and improved the printf output so one knows what the data is about (the KIND shows one of DUMP_RANGES_INFO DUMP_LINKONCE_INFO or DUMP_VISITED_INFO ). Removed unused DUMP_LOCATION_SECTION_INFO DUMP_RANGES_SECTION_INFO. modified: src/bin/dwarfdump/dd_checkutil.c Added a kind field to struct bucket for improved reporting. modified: src/bin/dwarfdump/dd_checkutil.h Improved and clarified the usage_debug_text That applies with --trace=0 (which prints the text and stops). modified: src/bin/dwarfdump/dd_command_options.c deleted unused DUMP_LOCATION_SECTION_INFO DUMP_RANGES_SECTION_INFO modified: src/bin/dwarfdump/dd_glflags.h References KIND_RANGES_INFO, KIND_LINKONCE_INFO , KIND_VISITED_INFO which are identical to DUMP_RANGES_INFO, DUMP_LINKONCE_INFO,DUMP_VISITED_INFO. modified: src/bin/dwarfdump/dwarfdump.c Fixed a comment about Linkonce modified: src/bin/dwarfdump/print_die.c 2022-11-30: David Anderson commit e8bc2c519c123dd5335027ee0ad7be8f55d62492 Up to date with git log modified: ChangeLog 2022-11-29: David Anderson commit 360db21d9c637095bd86b7772d2475c4eff882ab Missed a few test_section_bitmaps lines. Now they are all gone. Not needed since what they tested is no longer in dwarfdump. modified: test/Makefile.am 2022-11-29: David Anderson commit ac85e66759a7ccb063062859fe128046b461c4c5 We no longer test section_bitmaps because those no longer exist in dwarfdump. They applied to dwarfdump options starting with -E and -o and those no longer exist. modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/meson.build deleted: test/test_section_bitmaps.c Adjust the calls to print_macrocheck_statistics to match the elimination of an unused error argument. modified: test/test_macrocheck.c 2022-11-29: David Anderson commit fbed0246a8eb66c6c32ad350cd220e2795911ba6 dwarfdump: Removed code supporting options beginning with -E and -o. These have not been supported or mentioned since version 0.1.0. That is, we are removing dead code, about 250 lines of it.. modified: dd_command_options.c 2022-11-28: David Anderson commit fb8d037a3c04817da871fe9097c492f1772d02c7 dwarfdump: All the section_bitmaps stuff was used when we used libelf. So references to the .c and .h are removed. modified: CMakeLists.txt modified: Makefile.am modified: dd_command_options.c modified: meson.build These files and their data and function have been useless for a while. deleted: dd_section_bitmaps.c deleted: dd_section_bitmaps.h 2022-11-24: David Anderson commit 0c4f405857f21851c08c2e6bdd114aefd6d91466 This eliminates the last of the UNUSEDARG that were not required. The few remaining instances are necessary. modified: src/bin/dwarfdump/dd_esb_using_functions.h modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/bin/dwarfdump/print_lines.c 2022-11-24: David Anderson commit 5d78e46847e31571af57a7a1023772b6c2f3609a Removed arguments that were UNUSEDARG modified: dd_esb_using_functions.h modified: dd_globals.h modified: dwarfdump.c modified: print_die.c modified: print_frames.c modified: print_hipc_lopc_attr.c modified: print_macinfo.c modified: print_origloclist_codes.c modified: print_section_groups.c 2022-11-24: David Anderson commit 4377014eaeee79560b0afa1b5e39efd77fc58e46 with latest from git log modified: ChangeLog 2022-11-24: David Anderson commit 34696154a06ab99790e77369630bea7ef01082f9 Regenerated with new version modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2022-11-24: David Anderson commit f0a9b27f0d55891275aa7d5a8f07cbe3def3952d Version now 0.5.1 modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2022-11-23: David Anderson commit f4772a99c2c5839cd6ee1268e4697e9f28eb97b5 Removed arguments with ARGSUNUSED which cascades to other warning/error and unused local variables. modified: dd_globals.h modified: dwarfdump.c modified: print_abbrevs.c modified: print_aranges.c modified: print_die.c modified: print_frames.c modified: print_gdbindex.c modified: print_hipc_lopc_attr.c modified: print_lines.c modified: print_llex_codes.c modified: print_loclists_codes.c modified: print_macro.c modified: print_origloclist_codes.c modified: print_pubnames.c modified: print_ranges.c 2022-11-23: David Anderson commit 89dae20cee9fb8b1fe82a73b438f6ea148d377a8 Remove superfluous UNUSEDARG instances/arguments. modified: dd_macrocheck.c modified: dd_macrocheck.h modified: dwarfdump.c modified: print_abbrevs.c modified: print_die.c 2022-11-23: David Anderson commit 269e820ed6714294067092129c776e28c234abff Removed UNUSEDARG in several places, simplifying arument lists as appropriate. modified: src/bin/dwarfdump/dd_macrocheck.c modified: src/bin/dwarfdump/dd_macrocheck.h modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_macro.c 2022-11-23: David Anderson commit df79b41d9cdb68e32095408e021cfcf6bffd7dc1 Corrected a typo. modified: README modified: README.md 2022-11-23: David Anderson commit deba882a47651d9d5b35c5e4902a3c479082c43a Removes arguments declared as UNUSEDARG. modified: dd_globals.h modified: dwarfdump.c modified: print_abbrevs.c modified: print_debug_gnu.c modified: print_die.c modified: print_loclists.c modified: print_ranges.c modified: print_rnglists.c modified: print_section_groups.c 2022-11-23: David Anderson commit cc11773830e8f1e6b84946c8ef2b37bcebbc6686 Deleted unused arguments from dwarfdump_print_expression_operations() function prototype modified: dd_esb_using_functions.h Deleted unused arguments from dwarfdump_print_expression_operations() modified: print_frames.c Also added code to print DW_OP_implicit_value values as strings when they are clearly formatted as nullterminated ASCII strings. Also removed an arbitrary limit on the bytes shown for W_OP_implicit_value. modified: print_die.c 2022-11-23: David Anderson commit c92165ff6abb3d835c81047b28f7975aadb3c3c5 Added a few words about 0.5.0 and --print-debug-addr modified: README modified: README.md 2022-11-23: David Anderson commit 6e52f0e231760e21f7986b548b453f8e18206726 To make it clear these test objects are not to be executed the .text section of each now set to all zero bits. This has no effect on libdwarf or dwarfdump, which ignore .text. modified: test/testobjLE32PE.exe modified: test/testuriLE64ELf.obj 2022-11-23: David Anderson commit 4b66348e1086f5648ff8be2af1b7f14095625d90 Fixed another typo modified: README modified: README.md 2022-11-23: David Anderson commit 3cd45751291d25caf3e775390996dff356acf4b9 Corrected modification date modified: README modified: README.md 2022-11-23: David Anderson commit 394a2d9aadeef62b0f06d6941640caf419436334 Noting 0.5.0 is released. modified: README modified: README.md 2022-11-23: David Anderson commit aea4a46a0db0f0298290294eab70dfa89ffe92ba Showing 0.5.0 release date modified: README modified: README.md 2022-11-23: David Anderson commit dc4133c09d402e67921409be24ad03e1bdec8ee8 new file: CONTRIBUTING.md 2022-11-22: David Anderson commit 1d610ddee444560fe0060d2424f6166c78418bd3 Added more on Maguire book. modified: CODINGSTYLE.md 2022-11-22: David Anderson commit 2038d1669ccad622fef6ebfa4b57b403e8feb870 This is the only style document. renamed: codingstyle.md -> CODINGSTYLE.md This is now an empty placeholder. See the above file. modified: src/lib/libdwarf/CODINGSTYLE 2022-11-21: David Anderson commit a627852aa31eff33482198c12b1d060b328b1ee1 Disabling run on push, run on time modified: scorecards.yml 2022-11-21: David Anderson commit 8408965682c778185584f5e32fe2173c53354e53 Merge: 9ef7bb2a 13280d74 Merge branch 'master' of https://github.com/davea42/libdwarf-code work flow security code scan 2022-11-21: David Anderson commit 13280d74c7b7f1bd2ddbb50fb01a5afa8d9e05cc Create scorecards.yml 2022-11-21: David Anderson commit 9ef7bb2a0f2aa6472a57369526f4b3a80c7cd4d4 Release date 0.5.0 22 Nov 2022 modified: doc/libdwarf.dox Regenerated modified: doc/libdwarf.pdf 2022-11-21: David Anderson commit 06933217ef2f950de0e3a3340afe2e95fd16f8a9 now up to date with git log. modified: ChangeLog 2022-11-20: David Anderson commit 6d7ee5d0ee447004733c6e5b0a6d7d1417e65535 Reintroducing working macos-meson modified: test.yml 2022-11-20: David Anderson commit e6f59cddf3f8e19597686d72704e405ebba23c01 Added commentary about the breakage fix modified: mac_meson.yml 2022-11-20: David Anderson commit ffe12688a4b7ddd860feedf580068fef4b99091c A suggested fix from brew folks. They say this is due to github installing non-Homebrew software in the Homebrew install directory. They also suggest trying find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete modified: mac_meson.yml 2022-11-19: David Anderson commit c1145ccc9dbc0f8054211b4d89bc0ffa7b6736ee For testing this case new file: mac_meson.yml Removed the unusable mac_meson case modified: test.yml 2022-11-19: David Anderson commit 4257d78972e888d6bbdb462c1ce6ea7d6009797a Not working. deleted one bogus line. modified: test.yml 2022-11-19: David Anderson commit 0b0144ccf569b89b74192476d44daaaebc7d4033 Still no joy. brew install meson fails. modified: test.yml 2022-11-19: David Anderson commit 6deb22cc1ba5d4ce45e7b2cedb069cb1451ccd15 More changes for macos, see https://stackoverflow.com/questions/26647412/homebrew-could-not-symlink-usr-local-bin-is-not-writable modified: test.yml 2022-11-19: David Anderson commit 7684181e391a1fe3fa684f7dca83bbac188836e6 Slight mod of macos meson workflow. modified: test.yml 2022-11-19: David Anderson commit d769f9e79cb3a9e36360ed7ae09320df43f23930 Updating macos-meson per https://github.com/Homebrew/homebrew-core/issues/30652 to try to get the brew command to work. modified: test.yml 2022-11-19: David Anderson commit 5bc19a75665aa2c3e159a24065137d8347a0d9f6 Assigning a variable to itself got a warning and fail from freebsd compiler. Removed the poinless assign. modified: dwarf_util.c 2022-11-19: David Anderson commit a87544c075732b04624dc3f0cd86ea65ce8405c3 freebsd vm: altered install list for autotools to be in same package order as the working freebsdvms. modified: test.yml 2022-11-19: David Anderson commit 18240f9b724f438b52d8742827b2f1d9bc058f64 Moved one line, macos-meson modified: test.yml 2022-11-19: David Anderson commit 7ba82fbf6c238839504fb15e74cd048bc2ed1ba9 Strange macos autotools failure. Attempting fix. modified: test.yml 2022-11-18: David Anderson commit 5f00152b9592bae10f2f031b1327e5cdd1d66178 Small addition to the Changes for 0.5.0 (about performance improvement). modified: doc/libdwarf.dox These two each had one spot where on error there could be a small memory leakage detected by CoverityScan. Fixed. modified: src/bin/dwarfexample/findfuncbypc.c modified: src/lib/libdwarf/dwarf_util.c 2022-11-18: David Anderson commit bcf912a6cbbe1bda3e6675f1f3c1f1293358bf75 Removing dead code. Removing DW_DLA_ABBREV_LIST (it is not used now). Removing DW_DLA_HASH_TABLE, it is not used now. Removing DW_DLA_HASH_TABLE_ENTRY, it is not used now. None of these three were ever usable by library callers, they were internal-use-only. Free the orphaned hash table on allocatiing a new bigger one. modified: src/lib/libdwarf/dwarf_alloc.c Deleted typedef struct Dwarf_Hash_Table_Entry_s *Dwarf_Hash_Table_Entras the (internal-use-only) struct is no longer used. modified: src/lib/libdwarf/dwarf_base_types.h Now using calloc(to allocate a Dwarf_Hash_Table. And free() to eliminate it. Using dwarf_dealloc_die() instead of the original harder-to-use dwarf_dealloc(). modified: src/lib/libdwarf/dwarf_die_deliv.c Simplified declartion of abl_next struct field. modified: src/lib/libdwarf/dwarf_die_deliv.h Added #includes to reflect the changes today. modified: src/lib/libdwarf/dwarf_fill_in_attr_form.c Added the new acess to DW_FORM_implicit_const value. Changed the singly-linked-list creation to the modern form (faster form). Moved the dwarf_attribute() list creation down to where it is really needed. modified: src/lib/libdwarf/dwarf_query.c New debug printf routines (bracketed with #if 0/endif) Substantial revision of the Dwarf_Hash_Table implementation for faster and reliable use. modified: src/lib/libdwarf/dwarf_util.c Removed truct Dwarf_Hash_Table_Entry_s as no longer used. updated _dwarf_free_abbrev_hash_table_contents() argument list to accommodate the changes today. modified: src/lib/libdwarf/dwarf_util.h 2022-11-18: David Anderson commit 1b3428ba5a40023bcf0af635f153ae2089c14df8 Added words about the 0.5.0 performance improvement. modified: doc/libdwarf.dox 2022-11-18: David Anderson commit 7f615829757dcbe8a26a879c99098394fed0da49 Add dealloc calls appropriately so latest coverity scan does not see defects. modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c 2022-11-18: David Anderson commit f99e7f276229b5f21005c1ae08be34abbe1337c4 Add cleanup calls in case of error to avoid coverity scan defect warnings. modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/jitreader.c 2022-11-18: David Anderson commit cd3bcbc08821d23b66f3b38543fab61bf69d5a69 Add a dwarf_dealloc of a list, was missing in an error case. modified: src/bin/dwarfgen/createirepfrombinary.cc 2022-11-15: David Anderson commit 5aa8060e3b34f77ac87f96676b175837cc02a755 Now doxygen 1.9. Minor text changes. modified: doc/libdwarf.pdf 2022-11-15: David Anderson commit 416d6106b71d42d6492b0e60b7d8d43b010dacb7 Up to date with git log. modified: ChangeLog 2022-11-15: David Anderson commit 5b88db3565334b4b3dc2c619196a3307e8011155 Remove trailing whitespace, fix indents. modified: dwarf_alloc.c modified: dwarf_util.c modified: dwarf_util.h 2022-11-15: David Anderson commit 8291eec777c9abd22eb5d1dd6ca82ac3888dfdf1 All is implementing faster abbrev reading. Removing old abbrev struct, function, calls. Mostly now reading abbrev section content just once on any given abbrev. modified: dwarf_die_deliv.c modified: dwarf_query.c ifdef TESTINGHASHTAB lets us (on request) see the overview of some hashing tables. modified: dwarf_tsearchhash.c New treatment of the hash/modulus table for abbrev lookups. Faster and easier to understand. modified: dwarf_util.c 2022-11-15: David Anderson commit e3d14ee95296d4892fd33c2d2c704c27039d954f New fields for improved abbrev reading. Nothing here is visible to library users. modified: dwarf_die_deliv.h 2022-11-15: David Anderson commit eb2e2fe15e35462ecd20da5bffa6b622efae1db3 Small internal changes allowing improved abbrev reading. modified: dwarf_abbrev.c Adding ifdef conditional code only used during evaluation of hash tables. modified: dwarf_alloc.c 2022-11-15: David Anderson commit aa84dfec82ee21585ee93158d8ad477b843ff0c2 Header/struct changes to support more efficient abbrev reading. modified: dwarf_abbrev.h modified: dwarf_opaque.h modified: dwarf_util.h 2022-11-15: David Anderson commit 8d0d91428be882d0ec4c9013bbd31ace0069916d All to build this new source file and function for reading .debug_abbrev much more efficiently overall: Avoiding many thousands of calls to unpack abbrev uleb values. modified: CMakeLists.txt modified: Makefile.am new file: dwarf_fill_in_attr_form.c modified: meson.build 2022-11-06: David Anderson commit d727e8551dc98e7fafc65b6cb2e71ffc0400f956 Minor wording changes. modified: README modified: README.md 2022-11-05: David Anderson commit 9359f7fd22bc7fb185c2dd47a4aef790a6c9f3ad Updated with latest git log. modified: ChangeLog 2022-11-05: David Anderson commit 2f3fc038a2428055930a9a22d06c50ce7e0aefef Expanded doxygen comment on a .debug_addr table access function. Not a function with general utility, and it says so. modified: src/lib/libdwarf/libdwarf.h 2022-11-05: David Anderson commit c4d15634ae3ec411c9c923f317d074f30c167f9d Deleted dead code related to the segmented-address size field. Noticed by Coverity Scan. modified: src/lib/libdwarf/dwarf_arange.c 2022-11-05: David Anderson commit 4dc385ca4355067a7926a5d4e1606401221fe292 An argument swap caused incorrect association with descriptive text. The swap noticed by Coverity Scan. modified: src/bin/dwarfdump/print_debug_addr.c 2022-11-05: David Anderson commit d8bc15a60d35d2b6d221c7e3605e7a4e62da445b New functions for reading .debug_addr independently now documented in Changes. modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2022-11-05: David Anderson commit 7ca0abec646f48d4b97e76e17009aa37c6deab8f Implements the print_debug_addr() function and prints the .debug_addr section content (if any) without reference to any other section. new file: src/bin/dwarfdump/print_debug_addr.c 2022-11-05: David Anderson commit 1ad6ae32b0b6252d6b6a0f93ba9e72678b649734 The functions implementing reading of section .debug_addr section on its own without reference to any other section. new file: dwarf_debugaddr.c new file: dwarf_debugaddr.h 2022-11-05: David Anderson commit 29d5f1aadcfaa05cb4e409b3dc0c0dc8d67fe300 If a non-zero segment_size selector is found issue an error (such are not supported). modified: dwarf_arange.c Expanded doxygen comments on the debug_addr table function. modified: libdwarf.h 2022-11-04: David Anderson commit c0a7f18cba9a6f528f24d55f157186b02fe0c64e All this enables reading .debug_addr as a separate section and printing it. Added print_debug_addr.c to the source list. modified: src/bin/dwarfdump/CMakeLists.txt Added print_debug_addr.c to the source list. modified: src/bin/dwarfdump/Makefile.am Added a flag: gf_debug_addr_flag and the function and table entries to support --print-debug-addr. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_glflags.c modified: src/bin/dwarfdump/dd_glflags.h Added extern int print_debug_addr() to print the section. modified: src/bin/dwarfdump/dd_globals.h Added code calling print_debug_addr(). modified: src/bin/dwarfdump/dwarfdump.c Added print_debug_addr.c to the source list. modified: src/bin/dwarfdump/meson.build Added dwarf_debugaddr.c and dwarf_debug_addr.h t their respective lists. modified: src/lib/libdwarf/CMakeLists.txt Added dwarf_debugaddr.c and dwarf_debug_addr.h t the file list. modified: src/lib/libdwarf/Makefile.am Added new DW_DLA_DEBUG_ADDR type support. modified: src/lib/libdwarf/dwarf_alloc.c Increased ALLOC_AREA_INDEX_TABLE_MAX to 66 due to new type. modified: src/lib/libdwarf/dwarf_alloc.h Since we never really supported segments, if a non-zero segment size input we get an error. modified: src/lib/libdwarf/dwarf_arange.c Added DW_DLE_DEBUG_ADDR_ERROR for good error reporting in dwarf_debugaddr.c modified: src/lib/libdwarf/dwarf_errmsg_list.h Added DW_DLE_DEBUG_ADDR_ERROR Added dwarf_debug_addr_table() and dwarf_debug_addr_by_index() and dwarf_dealloc_debug_addr_table() to support reading .debug_addr on its own. modified: src/lib/libdwarf/libdwarf.h Added dwarf_debugaddr.c to the source list. modified: src/lib/libdwarf/meson.build 2022-11-01: David Anderson commit c2c9879644454a5d15a252bf469adb6db1fe4dcb Update from git log modified: ChangeLog 2022-11-01: David Anderson commit aaad3fab651a0a174f620e5cfbe93147c94a18da Trim trailing spaces and fix an indent mistake. modified: dd_sanitized.c 2022-11-01: David Anderson commit ceb31db1421d48f8c85ade94cf5247f124d38b82 These changes reduce time spend in reallocation of a larger hash search table. In setting up Dwarf_Debug set the hash search initial size to a number more likely to be useful than 0. Starting at zero results in excessive table rebuilds on expansion. Using a new argument to _dwarf_get_debug() to do that. modified: dwarf_alloc.c New arg to _dwarf_get_debug function prototype. modified: dwarf_alloc.h Now passes file size to _dwarf_get_debug() modified: dwarf_init_finish.c Eliminate some of the intermediate expansions, so bigger expansions done less often. modified: dwarf_tsearchhash.c 2022-11-01: David Anderson commit 350a19cde227d150bfe4895bfad20496f0b35d49 Remove trailing whitespace. modified: dwarf_leb.c modified: libdwarf.h 2022-10-29: David Anderson commit c2a35a312da09ce2af1bdaaaf0504d9cb1107aae Hand unrolled first 2 bytes in _dwarf_skip_128() to match dwarf_decode_leb128(). Saves time as shown by callgrind (not a lot). modified: dwarf_leb.c 2022-10-28: David Anderson commit 1bd9c4797304ac50c4bfaf15d69f82eaceb1e195 Up to date with git log. modified: ChangeLog 2022-10-28: David Anderson commit 6baaf8d4c3db5cef06bac769fa438ca607d87372 Using the new table. The table is similar to a ctype table. Created by src/bin/builduritable/uritablebuild.c modified: src/bin/dwarfdump/dd_sanitized.c Now with some added timing code (not normally used). modified: test/test_sanitized.c 2022-10-28: David Anderson commit a39399135953102ff961cbc990870d3e5799e7eb Now also builds the character table for dd_sanitized in addition to a ctype table. The tables generated are not automatically used, though things could be rearranged to make that happen. For now hand insertion in case of changes is the approach. modified: src/bin/builduritable/uritablebuild.c Now with the character table and more efficient processing using that table. modified: src/bin/dwarfdump/dd_sanitized.c Now all run the test_sanitized tests. modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/meson.build New testcase for sanitized() new file: test/test_sanitized.c 2022-10-22: David Anderson commit 88170f967499be09a88a29b8dc6a36c1ec7422b6 Added comments to examplecuhdr() mentioning that the full descent of the DIE tree is not always necessary, depending on the goals of the calling program. modified: doc/checkexamples.c 2022-10-21: David Anderson commit 38912ce851efad99515f01427612829835f60485 Added some documentation on the new example Example walking CUs modified: doc/checkexamples.c Regenerated. modified: doc/libdwarf.pdf 2022-10-21: David Anderson commit be103a959c1633d49aa3e7c3a801ce85035919e3 Noe ensures libdwarf.dox in the distribution. modified: doc/Makefile.am Added new example on reading through DIEs searching for ... something ... and allowing a stop after every CU .. modified: doc/checkexamples.c Added references to the new example. modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf Fixed doxygen commends on groups of functions. modified: src/lib/libdwarf/libdwarf.h 2022-10-21: David Anderson commit 63129695a2c96253828950a69e0454ac539feb40 Added new example and fixed some indents and trailing whitespace. modified: doc/checkexamples.c 2022-10-17: David Anderson commit 0f4e1e9d67915f4f69c171b3f76584904bc9cfbc Brings ChangeLog up to date with git log. modified: ChangeLog 2022-10-17: David Anderson commit 37e6ba9559a743ebf88e9fdb94b12455d1019094 Fixed an indent mistake. modified: src/lib/libdwarf/dwarf_line.c 2022-10-17: David Anderson commit 129d6fa0b5cb935b3915aa88b0867c4e2bab3530 Remove trailing whitespace. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_lines.c 2022-10-17: David Anderson commit 06c9b536ff50199dc798f7d1faa34cffb632baf8 In a relocatable object .debug_names needs to be relocated, otherwise we get an error from reading with libdwarf. Now it is relocated when appropriate. modified: src/lib/libdwarf/dwarf_elfread.c 2022-10-13: David Anderson commit 43a23049a6a7392c46e4339a9e1ee7b6a73bb32b With latest git log information. modified: ChangeLog 2022-10-13: David Anderson commit a6a8be137502b750f63b57eee89aba4e0e1bf9ce Updated by 'make rebuild'. version 0.5.0 modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2022-10-13: David Anderson commit f2b12b4b7ad5e5183145577756491bdfd43bfec4 Removed mention of three dates things changed in dwarfdump use. Those dates were a year (and more) in the past and no longer important. modified: dwarfdump.1 2022-10-12: David Anderson commit 272b1a14ced493c56fa0ee154982dfbc139f613d Changed the appearance of PRINT_CU_INFO and DWARF_CHECK_ERROR_PRINT_CU function definitions to match general practice in the overall project. modified: src/bin/dwarfdump/dwarfdump.c renamed record_line_error() to print_common_line_error() to match what it actually does. Removed (via #if 0) a couple lines doing a bogus DWARF_CHECK_ERROR2() This removes a strange incomplete/useless error message in case of a damaged .debug_line line table. modified: src/bin/dwarfdump/print_lines.c Added comments reminding the reader what DWARF_CHECK_ERROR_PRINT_CU() does as a side effect. modified: src/bin/dwarfdump/print_macro.c 2022-10-12: David Anderson commit 62e34e9f9f8d5701c42a7fedfe2f74203cb0f532 Change the default line table file number back to 1 for dwarf5, per the std. modified: src/lib/libdwarf/dwarf_line.c 2022-10-09: David Anderson commit 602111edf64e1c92e7784da695188a508517e0d4 Up to date with git log modified: ChangeLog 2022-10-09: David Anderson commit 52ab751da109d4f188dc4258bb8bb5b23d7ccd91 Mentions the 0.5.0 changes. Arranges that _ (underbar) in non-code blocks shows up as underbar. modified: README modified: README.md 2022-10-09: David Anderson commit 9b1863596623ecb416c4e84c5b845547b75c9bac Bringing up to date with previous changes. modified: ChangeLog Fixing bad indents and removing trailing whitespace modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfdump/print_pubnames.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_global.h modified: src/lib/libdwarf/dwarf_string.h modified: src/lib/libdwarf/libdwarf.h Removing three blank lines at the end of the file. modified: src/lib/libdwarf/dwarf_alloc.h 2022-10-08: David Anderson commit ad68dc9ded311765383bbc4d4ed51c9bf5eabe3a Something very odd happened a few minutes ago. Compiler complained, fixed, and now it complains so changed back to what it was. modified: print_debug_names.c 2022-10-08: David Anderson commit 1fc0940905024c1959af60a406c73538a9b73898 Merge: a57daf22 f6f99de5 Merge branch 'master' of https://github.com/davea42/libdwarf-code 2022-10-08: David Anderson commit a57daf229124d6c251fdb6263737453b434253f0 Fixed bug in error call. *error needed. modified: src/bin/dwarfdump/print_debug_names.c 2022-10-08: David Anderson commit 98262df16271e7fd2e6869f73eaf2453b4014288 Added example with raw reading of .debug_names. A small hint of how one could do things oneself. modified: doc/checkexamples.c 2022-10-08: David Anderson commit c9173e03edb6c50a82549ab19bc0014201b8ed39 updated to git log. Latest small changes now pass Coverity Scan with 0 defects. modified: ChangeLog 2022-10-08: David Anderson commit f6f99de5ed971424acdaad1b75e89770da798313 updated to git log. Latest small changes now pass Coverity Scan with 0 defects. modified: ChangeLog 2022-10-08: David Anderson commit ec415e3e1c8ac798de28ba5c99b85a377fb3d7f6 Now all these use the slighly modified library-internal function for reading pubnnames-like section.s modified: src/lib/libdwarf/dwarf_funcs.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_pubtypes.c modified: src/lib/libdwarf/dwarf_types.c modified: src/lib/libdwarf/dwarf_vars.c modified: src/lib/libdwarf/dwarf_weaks.c 2022-10-08: David Anderson commit 9c79fbb70e6728441a0913451487b43bd08d5105 Another instance of the res/cres typo fixed. modified: src/bin/dwarfdump/print_debug_names.c 2022-10-08: David Anderson commit c20b1ddf3dd2694086a1981ec7dbeb8ffbab7229 Fixed a typo in the introduction. modified: doc/libdwarf.dox 2022-10-08: David Anderson commit ac2e6b9313a2c9798a686896fc3cc105e53bbc94 One test of a result int tested the wrong result int, one from a different call.. res->cres modified: src/bin/dwarfdump/print_debug_names.c 2022-10-07: David Anderson commit 8ccf3e0f65a4b819a363f56639cbc14877388bac Up to date with git log modified: ChangeLog 2022-10-07: David Anderson commit f0c944a68a9ec0dfa562adf324417d1517e5bbad Refinement of the Changes text. modified: doc/libdwarf.dox 2022-10-07: David Anderson commit e58f3f6d51329860b11b6af3418a107aee73356a Updated version from 0.4.3 (never released) to 0.5.0 (not released) modified: CMakeLists.txt modified: README modified: README.md modified: configure.ac modified: doc/libdwarf.pdf modified: meson.build Improvments in doxygen comments. modified: src/lib/libdwarf/libdwarf.h modified: doc/libdwarf.dox 2022-10-06: David Anderson commit fc081e4d2e89466bd0be103dc9ef5b8b6ff470b3 Now when printing the DW_IDX operations it checks that the calculated DIE global offset is a real entry in .debug_info. modified: src/bin/dwarfdump/print_debug_names.c When doing local check for a working dwarf_offdie_b based on a global DIE offset from dwarf_dnames... prints to report an error but is silent about the check on success. modified: src/bin/dwarfdump/print_pubnames.c 2022-10-06: David Anderson commit 4a7855d5257f3d99ba702dd89df65366c52b22ae Correcting the code reading .debug_names modified: src/lib/libdwarf/dwarf_global.c Improving description of dwarf_dnames_cu_table() modified: src/lib/libdwarf/libdwarf.h 2022-10-05: David Anderson commit cd1c1b303a677454328d40aa4250742e0771f36a For readability add a newline befor the "tu" list. modified: src/bin/dwarfdump/print_debug_names.c Move a test to *after* one of its values is computed. So we can print a cu list or tu list from the section. modified: src/lib/libdwarf/dwarf_debugnames.c Add in the other standard DW_IDX types (though for _dwarf_internal_get_debug_names_globals() we will not use their values, if present. modified: src/lib/libdwarf/dwarf_global.c 2022-10-04: David Anderson commit 064cc87652bccaf8732b62f392e518f1ee8277be Up to date with git log. modified: ChangeLog 2022-10-04: David Anderson commit 3a74c246dc43d19d050c842e7486b3ec907b4c55 Minor tweaks to the presentation of pubnames-style records. For single entry, print '1 entry' otherwise print the number and 'entries' src/bin/dwarfdump/ modified: print_pubnames.c 2022-10-04: David Anderson commit c8531de88ae5f65d0d13141bd011b57c062d4ba7 Altered declaration of get_true_section_name() modified: dd_esb_using_functions.h Now get_true_section_name returns DW_DLV_OK or DW_DLV_NO_ENTRY so we can determine for sure if a section mentioned is present in the object. modified: dd_true_section_name.c Major revision of the format from .debug_pubnames etc sections and now Dwarf_Globals shows .debug_names. The section print names the either or both of .debug_names or .debug_pubnames when appropriate. modified: print_pubnames.c 2022-10-04: David Anderson commit b9342523ffff0e227ab86972e2b6f6b2e341edf2 Add dwarf_global_tag_number() when reading .debug_names. modified: src/lib/libdwarf/dwarf_global.c Fix some of the Dwarf_Global dw_global arg doxygen. Add dwarf_global_tag_number() and its doxygen. modified: src/lib/libdwarf/libdwarf.h 2022-10-03: David Anderson commit e9f478c15d6916eff239faac0bc5941640464241 Correcting words about .debug_names section CU indexing. Now dwarf_get_globals() gets global offsets for .debug_pubnames and .debug_names (or both if both in an object file). modified: doc/libdwarf.dox Moved an include up to satisfy ordering constraint modified: src/lib/libdwarf/dwarf_debuglink.c Corrected dwarf_dnames_cu_table() to use zero-base indexing. If bucket_array not filled in just return DW_DLV_NO_ENTRY. modified: src/lib/libdwarf/dwarf_debugnames.c dwarf_get_globals() Now acesses .debug_pubnames first and then dwarf_names to get its list of global data/func names. Some refactoring to avoid duplicate coding. modified: src/lib/libdwarf/dwarf_global.c New data recorded given the two sections that can contribute to dwarf_get_globals. modified: src/lib/libdwarf/dwarf_global.h Adding two zero args in the call to the library-internal function that gets all the data in this format. modified: src/lib/libdwarf/dwarf_funcs.c modified: src/lib/libdwarf/dwarf_pubtypes.c modified: src/lib/libdwarf/dwarf_types.c modified: src/lib/libdwarf/dwarf_vars.c modified: src/lib/libdwarf/dwarf_weaks.c Fixed documentation on .debug_names CU indexing (is zero based, not 1 base). Documented dwarf_get_globals gets more than it used to. modified: src/lib/libdwarf/libdwarf.h 2022-10-03: David Anderson commit 7c39204f588f5839f9519c6b5fb55d489fa95f10 Corrected cu table indexing to start at 0. modified: src/bin/dwarfdump/print_debug_names.c Removed 7 lines of code not actually used or needed here. modified: src/bin/dwarfdump/print_pubnames.c 2022-09-30: David Anderson commit f146f5f6c63bc247ec4ccb07c0ed060ae734c2dc In doxygen comments fixed: geting -> getting modified: doc/checkexamples.c 2022-09-24: David Anderson commit 3681c26ac60c84adb6da8a1ac8d6173368c792ee Minor change. Now mentions 0.4.3 (not released) modified: README modified: README.md 2022-09-24: David Anderson commit 0144a8a50fe9df2f8c11bbe2448cc0297b42d6b3 Minor wording changes. modified: README modified: README.md 2022-09-19: David Anderson commit c9e6fa7824ff296da95162bac5133321b829c24c Updated date modified: doc/libdwarf.dox Regenerated modified: doc/libdwarf.pdf Modified the module names that appear in documentation. To clarify the purpose of each group of functions/types. modified: src/lib/libdwarf/libdwarf.h 2022-09-18: David Anderson commit 041a71a6a73af5b50b62b7bb480cc9b65adc5b91 Fixed indents and removed trailing whitespace. modified: src/bin/dwarfdump/dd_esb.c modified: src/bin/dwarfdump/dd_uri.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_macro.c 2022-09-18: David Anderson commit c400b0342295b3fa0b7fbd5c21b85aebd58cc668 Fixed indents and removed trailing whitespace. src/lib/libdwarf: modified: dwarf_alloc.c modified: dwarf_die_deliv.c modified: dwarf_error.c modified: dwarf_init_finish.c 2022-09-17: David Anderson commit ae227a6da772227ff5a7b1de2caf10e42e9dcb1d Fixing mistakes in the new zstd compression. Would only compile if zlib present before this fix. now compiles with either or both or neither of zlib and zstd. Have no example objects using zstd to test against -- at this time. modified: dwarf_init_finish.c 2022-09-16: David Anderson commit 1492145fb41f35031afdddc3e205077b84578a75 Now up to date with git log modified: ChangeLog 2022-09-16: David Anderson commit ca28cdbfdcb0ed4403971a3f1394e2f80c148f70 Minor clarification of email address. modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf Made the @brief more consistent, Return not Returns. Other small clarifications. Spelling DIE, not die, when referring to the generic Debugging Information Entry. Similarly cie and fde when referring to a generic idea of such. modified: src/lib/libdwarf/libdwarf.h 2022-09-15: David Anderson commit e14073e6fc7da9c1ad603fb2cad680d76752c28d Just adding a space in one command. modified: CMakeLists.txt 2022-09-15: David Anderson commit ac82452f202b94b71bf45f3a383cf1115271fc79 Added 0.4.3 note modified: README modified: README.md 2022-09-15: David Anderson commit 9c59817790d9cff5bd493fb2c7c6b2c24a285588 Now reports if zstd is available (in which case it will be necessary to link in that library) modified: configure.ac 2022-09-15: David Anderson commit 9106a52e7ac4e04c1f693a2a73d6380ea9a02cfe In case of an error with the 'type' in an SHF_COMPESSED compress data struct, the report mentions the value in the corrupted field. modified: src/lib/libdwarf/dwarf_init_finish.c 2022-09-14: David Anderson commit e829c387e8316006a487d155553a126e206222a6 Added commentary explaining why dwarfstring_constructor_static() is a good thing to use, sometimes. modified: dwarf_string.h 2022-09-13: David Anderson commit a1e70ed83ea80d7de968e127b239cf9710d2a824 Changes mentioning 0.4.2 and libzstd (0.4.3) modified: README modified: README.md 2022-09-13: David Anderson commit 75ca4be54ace1c02c9534dbffcdc76b73be559e2 Now supports libz and/or libzstd if these are available. modified: src/lib/libdwarf/dwarf_init_finish.c 2022-09-13: David Anderson commit 3a678f22449dbb58f3ef5c701e988945190600e6 Version now 0.4.3. No Changes from 0.4.2 other than allowing/handling libzstd for object section compression. modified: doc/libdwarf.dox 2022-09-13: David Anderson commit 407d1006dceccccf926bc49a77d26ceffdb23856 Set release to 0.4.3 for a future release. Now checks for and builds with libzstd in addtion to libz. modified: CMakeLists.txt modified: configure.ac modified: meson.build modified: src/bin/dwarfdump/CMakeLists.txt modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/meson.build 2022-09-11: David Anderson commit 1bc320995f3ca58c6e49d76f89a443048480863b Now up to date with git log. modified: ChangeLog 2022-09-11: David Anderson commit 73b5193322832def08aa88447825def649fb52e8 The printf here do not mention the executable name now. We don't need the name of dwarfdump anyway, and this keeps the baselines simple, not having to realize dwarfdump.O is the same ( in the sense of comparing baseline text) as dwarfdump. See libdwarf-regressiontests for the tests involved. modified: src/bin/dwarfdump/dd_getopt.c 2022-09-09: David Anderson commit b22dc679c8a46e4bb39cee7b5d558a09b60023ec Now up to date with gitlog again. modified: ChangeLog 2022-09-09: David Anderson commit a8b18ce826134d005cedfbf90ac13a72d351419f Merge: 14bfea01 dadc41b3 Merge branch 'master' of https://github.com/davea42/libdwarf-code 2022-09-09: David Anderson commit 14bfea01cb5f190c5bb06e11160217f026fc0586 Recent change to fix leak had a mistake caught by Coverity Scan. Fixed. modified: src/bin/dwarfexample/simplereader.c 2022-09-09: David Anderson commit 472a9a00fb816ee06c18b7788ca32658520dfb62 Minor text about new fix to libdwarf. modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2022-09-09: David Anderson commit 5611a8748a63fa279071a5f89ef51d6248886556 the fix moments ago to dwarf_alloc.c was the fix to ossfuzz issue 51183 If strdup fails, write an error message. modified: src/bin/dwarfdump/print_macro.c 2022-09-09: David Anderson commit dadc41b3757fd705ae283c3070220e21c497ae4a If strdup fails, write an error message. modified: src/bin/dwarfdump/print_macro.c 2022-09-09: David Anderson commit 651aac848a452cfb06826f7533b89f829a7c1cb0 If tfind succeeds no need to strdup. And if strdup fails preceding tsearch, write an error message. modified: src/bin/dwarfdump/dd_makename.c 2022-09-09: David Anderson commit bbbf57693319c6898c5a700744ed67d65d5864ed Added a comment: ok if strdup returns 0 in this one spot. modified: src/bin/dwarfdump/dd_addrmap.c 2022-09-09: David Anderson commit eb538f6e8bb4f557b2dba89d21e8b4f8a1855c1d Added + FINDSEC(&dbg->de_gnu_debuglink, + our_pointer, section_name_out, + sec_start_ptr_out, sec_len_out, sec_end_ptr_out); + FINDSEC(&dbg->de_note_gnu_buildid, + our_pointer, section_name_out, + sec_start_ptr_out, sec_len_out, sec_end_ptr_out); which should have been there before. modified: src/lib/libdwarf/dwarf_util.c 2022-09-09: David Anderson commit fcc44f961a1e94903abcd4301250050aa6ddbc46 Added: + malloc_section_free(&dbg->de_gnu_debuglink); + malloc_section_free(&dbg->de_note_gnu_buildid); which are absolutely required! modified: src/lib/libdwarf/dwarf_alloc.c 2022-09-09: David Anderson commit 1e3dcb3e656468fab80a51b6a08f69cfc3b08505 Final for 0.4.2, one thinks. modified: doc/libdwarf.pdf 2022-09-09: David Anderson commit 809ddcfb589b1f8f9a0283a66d3f259aa700aa97 Up to date with git log. modified: ChangeLog 2022-09-09: David Anderson commit 8c219b670b2d1622bbb26608aed345ecae2cce3a Documenting and ensuring that when DW_DLV_ERROR is returned from a dwarf_init* or dwarf_object_init call the examples and documentation call dwarf_dealloc_error(). modified: doc/checkexamples.c modified: doc/libdwarf.dox modified: doc/libdwarf.pdf modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/jitreader.c modified: src/bin/dwarfexample/simplereader.c modified: src/lib/libdwarf/libdwarf.h 2022-09-09: David Anderson commit 1bcef65cd6c17566b871365f4561013509c4ec79 Minor leak on an error case fixed (dwarfgen exits just after the error detected). modified: src/bin/dwarfgen/createirepfrombinary.cc 2022-09-08: David Anderson commit 6d699b501ac67054afaf064da492a67fcd01f113 Added include of dd_minimal.h modified: test/test_getopt.c 2022-09-08: David Anderson commit c826e7e3b2174f16e113a654c5c9b4f251b33b91 Changed stderr output to stdout. Added ERROR in each. added to dwarfdump count of major errors. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_compiler_info.c modified: src/bin/dwarfdump/dd_getopt.c On malloc fail added ERROR output, with a sttic flag so each such appears only once. modified: src/bin/dwarfdump/dd_makename.c Fixed the idempotency names to DD_MINIMAL_H modified: src/bin/dwarfdump/dd_minimal.h Added ERROR in message string and added to count of major errors. modified: src/bin/dwarfdump/dd_naming.c modified: src/bin/dwarfdump/dd_tsearchbal.c modified: src/bin/dwarfdump/dd_uri.c modified: src/bin/dwarfdump/dwarfdump.c 2022-09-08: David Anderson commit 248944aacb09ce4704fecec31e09c7870568ec39 Added def of dd_minimal_count_global_error() so we can ignore that function. It is for counting global errors in dwarfdump so we provied a do-nothing replacement here. modified: src/bin/gennames/gennames.c 2022-09-08: David Anderson commit 677bb1ac37dc86785d57cb54c470a2c14944dca8 Added definition of dd_minimal_count_global_error(void) so we can ignore that function here, dwarfdump is not involved. modified: test/test_getopt.c 2022-09-08: David Anderson commit 66442f5be7bdc62f0ebbb224f09c1ceb2106d67d Added a single line comment on the intent of a function. modified: src/bin/attr_form/attr_form_build.c 2022-09-08: David Anderson commit 4a9c16d842ecb215c3b454182f1ee0338a7d2850 Removed duplicated call of a function resetting global flags. modified: src/bin/dwarfdump/dwarfdump.c 2022-09-08: David Anderson commit a8bf66e29e0360259db779385c0c742eeda92653 Modified Windows only code to avoid passing NULL to open() modified: src/bin/dwarfdump/dd_dwconf.c 2022-09-08: David Anderson commit fc865bc2a1524774cf5f5586cd96f6436785e00d When we create an ERROR string here ensure it gets counted in the dwarfdump ERROR count. modified: src/bin/dwarfdump/dd_esb.c 2022-09-08: David Anderson commit 23728d30dfd28cc46314f3b65fb2b34f45ad26df Coverity Scan defect 238524Notes a resource leak at exit(). Added a _dwarf_dealloc_error() call. modified: src/bin/dwarfgen/createirepfrombinary.cc 2022-09-08: David Anderson commit 3d3496588f2fdbbd94d78a01593dd925699df234 Coverity Scan 277697 thinks a deref of de_cu_context_list_end (value NULL) is possible. Though it is not possible I add a NULL check.Add a check for null in insert_into_cu_context_list. And return an error if null. Also,add a return int to flag to the (library-internal) caller if there was an error. modified: src/lib/libdwarf/dwarf_die_deliv.c 2022-09-08: David Anderson commit 4eb102e3ac8b89f236fc666ac189cadc3f2b5148 Remove a recent ill-advised line of code. modified: src/lib/libdwarf/dwarf_generic_init.c 2022-09-08: David Anderson commit d77a5bc41c92b1bdad920f00db91a09ef7b03dad Remove an ill advised recent line of code. modified: src/lib/libdwarf/dwarf_init_finish.c 2022-09-08: David Anderson commit 220975cb9c9d09265412f6bf042a24211c51b1d9 CoverityScan defects 277696 277695 note a duplicate close of local int debuglink_fd and a call to close with argument -1. modified: src/lib/libdwarf/dwarf_object_detector.c 2022-09-07: David Anderson commit f5d5ac617f49858746683356960dbf55d9eee2ae Now properly handles Dwarf_Error which was not in any Dwarf_Debug. Fixing a leak provoked by corrupt object file. modified: src/lib/libdwarf/dwarf_alloc.c 2022-09-07: David Anderson commit ce24576552791fdae7ed7109aa08621016062e43 At each exit() ensure basic destructors called. modified: src/bin/dwarfdump/dd_command_options.c 2022-09-07: David Anderson commit 908a4389d22bf3a81a24d077d9bae77c3bcfa882 Revisions to avoid exit() while ensuring an ERROR is printed and counted as an error in dwarfdump's final counts. modified: src/bin/dwarfdump/dd_esb.c Now records the dd_esb.c errors in the count and calls reset_global_flags() so that there are no leaks from flags when cleaning up. modified: src/bin/dwarfdump/dwarfdump.c 2022-09-07: David Anderson commit 0b847231e3719ff3ba037589f8fc73382c028f14 Adding dd_minimal.h to the headers lists. (meson figures that out for itself, nothing to change in meson.build) modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am 2022-09-07: David Anderson commit 42c281c5d9661351b76a98be0b1c8b919b81fd9c Amplified the comment explaining why this new header exists. modified: src/bin/dwarfdump/dd_minimal.h 2022-09-07: David Anderson commit 289edb30d4e4181939075a953783c85b24e2efc3 Added the same include "dd_minimal.h" void dd_minimal_count_global_error(void) {} here as we use dd_esb.c here and do not need the global count. modified: src/bin/attr_form/attr_form_build.c modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/tag_tree.c 2022-09-07: David Anderson commit 02c8fbaf1ddd00c63cae483932ed898c919062db Added include "dd_minimal.h" void dd_minimal_count_global_error(void) {} as dd_esb.c requires that function to exist and the function has no meaning in these files. modified: test/test_canonical.c modified: test/test_esb.c modified: test/test_macrocheck.c modified: test/test_makename.c 2022-09-07: David Anderson commit 7e53e2733795d5c648e03e59700cd5a1f968af08 Function declared here used by dd_esb.c to notify dwarfdump.c that an error message was printed by dd_esb.c new file: src/bin/dwarfdump/dd_minimal.h Added comment following a #endif modified: src/lib/libdwarf/libdwarf_private.h 2022-09-05: David Anderson commit d73830f81b879b2a07eaea9572d00118b24fe85a Declare global_destructors() so dd_command_options can call it on exit(). modified: src/bin/dwarfdump/dd_globals.h Now every exit() first calls global_destructors() to free up data related to glflags fields. Avoids a leak. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dwarfdump.c 2022-09-05: David Anderson commit 90eee21528c6a38488756528d9dbba16aea666e0 Use exit() from main() instead of return. Easier to track when one does ot know which exit() was inoked. modified: src/bin/dwarfdump/dwarfdump.c Ensure that at least _dwarf_flush_static_error_list() gets called on dwarf_finish(), even if the Dwarf_Debug passed in is NULL. In case of a badly corrupted object this lets us avoid a 'possible leak' as valgrind calls it. modified: src/lib/libdwarf/dwarf_generic_init.c 2022-09-05: David Anderson commit 58d5b1b829fd667136eeb7bcf64cfaa6d4258ce2 Brought up to date with git log. modified: ChangeLog commit 6f96e446567b2fe943365b7168b53a4b3b26ab7c DEBUG renamed as DEBUG_ALLOC (DEBUG_ALLOC should not normally be defined) modified: src/lib/libdwarf/dwarf_alloc.c 2022-09-05: David Anderson commit 15211129be3e7ce4c434bb0eca7e5b6336f4ee68 Added include libdwarf_private.h as an aid to testing behaviour when malloc space exhausted (Faking exhaustion via a tiny amount of code NOT in the source tree). modified: src/bin/dwarfdump/dd_addrmap.c modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_compiler_info.c modified: src/bin/dwarfdump/dd_esb.c modified: src/bin/dwarfdump/dd_helpertree.c modified: src/bin/dwarfdump/dwarfdump.c Added a fixed=size static array (with 5 entries) so in the very rare case of an error not attributable to a Dwarf_Debug it is recorded and can be freed later. Caused by memory exhaustion (alloc fail) or by an object file with a very serious corruption making it impossible to open in libdwarf. See _dwarf_flush_static_error_list() modified: src/lib/libdwarf/dwarf_alloc.c Adding the static_err list function declarations (two of them) modified: src/lib/libdwarf/dwarf_alloc.h Initializing a local pointer to 0. Fixing DEBUG messages that had copy-paste errors. modified: src/lib/libdwarf/dwarf_error.c Added call to _dwarf_flush_static_error_list() modified: src/lib/libdwarf/dwarf_init_finish.c 2022-09-04: David Anderson commit ff1e8be91ba2ca13a50ee999c012691cdd8b0910 Small changes to ensure that if memory runs out (even if 'runs out' for the first malloc/calloc call and remains unavailable dwarfdump does something reasonable, reports an error, and just stops. With no leakage. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_dwconf.c modified: src/bin/dwarfdump/dd_makename.c modified: src/bin/dwarfdump/dd_naming.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_harmless.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_opaque.h 2022-09-04: David Anderson commit 99ddb681f6d67484e42ba7d13a338b544b27a346 The changes for malloc checking. new file: dif20220904-malloc The differences that need to to to master new file: dif20220904-malloc-for-master 2022-09-03: David Anderson commit acd5ca8f2a46b8a9833b98f9c53c1f254e114408 All these and more folded into test.yml deleted: ci_freebsd_autotools.yml deleted: ci_linux_autotools.yml deleted: ci_linux_cmake.yml deleted: ci_linux_meson.yml deleted: ci_macos_autotools.yml deleted: ci_msys2_autotools.yml deleted: ci_msys2_cmake.yml deleted: ci_msys2_meson.yml 2022-09-03: David Anderson commit bab18372d4add9498f3063daa683f4aef366311e cmake -G needs Ninja (capital letter) not ninja modified: test.yml 2022-09-03: David Anderson commit 30c570b1d9a7fb3036027915650f2896b2645278 Adding final macos build modified: test.yml 2022-09-03: David Anderson commit f0d6e0510874f52e501d6f5e247a7699d339f346 Merge: cd70ec3f 14738b59 Merge branch 'master' of https://github.com/davea42/libdwarf-code Minor conflict github and local on a test macos yml. Resolved. 2022-09-03: David Anderson commit cd70ec3f8045e7afca2256710088d9e12b024976 Now tests meson macos modified: ci_macos_autotools.yml 2022-09-03: David Anderson commit 14738b59d202288d27b2e3abf099cbc575730174 Update ci_macos_autotools.yml Fixed typo 2022-09-03: David Anderson commit 27bad56e45c9cf4b19ffc4fb36ef355bc28b8d40 Now tests cmake mac build modified: ci_macos_autotools.yml 2022-09-03: David Anderson commit 035037285bce33443066cb268dcb277fff05f19f Changed the badge wording slightly. modified: README modified: README.md 2022-09-03: David Anderson commit 38d3e07382ebb2e43b36eb66a6cbe90afceb291d Now just one badge representing builds on 4 platforms and configure/cmake/meson on each platform. modified: README modified: README.md 2022-09-03: David Anderson commit 02b03b7da78d1789023d4bc134199297d150c7ce Clang discovered a mistake in a usage message set of strings. It did not affect correctness, but it did provoke a clang 13.0.0 warning so the build stopped. modified: src/bin/attr_form/attr_form_build.c 2022-09-03: David Anderson commit b0784a81000fe592fafd97c77f82971ddb036e44 To avoid warnings from a new compiler (warnings seen now for the first time) we remove some C with undefined meaning such as headdepth = head->llink - (struct ts_entry *)0; See ISO C 1990 section 6.3.6. We add a specific field to count the balanced tree depth instead of using strange pointer arithmetic on llink. No need for pointer arithmetic at all. There is a better way to do this using a HEAD separate struct and a pointer-to an rlink field as that would reduce struct size here, but we are postponing that for now. modified: src/bin/dwarfdump/dd_tsearchbal.c 2022-09-01: David Anderson commit f7015bda84749ef4f9b4746bbb3834087adba8cd Another set-but-not-used variable. Deleted now. modified: dwarf_machoread.c 2022-09-01: David Anderson commit 0dadb043b5a3553ff0b2daa08391bda8ab2bb66e ninja check -> ninja test modified: test.yml 2022-09-01: David Anderson commit 5783429f4556d166273d3b965d1fbb6c56a296b8 Local variable blockoffset was set and incremented but never used. Clang warned. Removed now. modified: src/lib/libdwarf/dwarf_gnu_index.c 2022-09-01: David Anderson commit f205172c01d5fdc1060e377f7c80b271e86cecac Fixed freebsd meson typos modified: test.yml 2022-09-01: David Anderson commit 36ac11b71e8d27402bee1ca435b5b8e1d6012757 Added freebsd cmake and meson tests modified: test.yml 2022-09-01: David Anderson commit 23bbdf69fb2238705ddbcf4f09b4aee90d2f3239 Accidental dup of 2 tests. Fixed. modified: test.yml 2022-09-01: David Anderson commit 449394e1c3cf6a1f40d56358807ec7d831ed56bd Adding autotools of freebsd amd macos modified: test.yml 2022-09-01: David Anderson commit 203f9cd662635f286a6d0ed443a007426a5a16af Adding freebsd and macos (so far autotools only) modified: test.yml 2022-09-01: David Anderson commit 8d374c9fd35c472c528df534282a7557d2fb4b29 Added all msys2 tests modified: test.yml 2022-09-01: David Anderson commit 47b69a860b6c13a7f50d0ef33a9fdf6229aa2752 Update test.yml deleted accident ~ as last line 2022-09-01: David Anderson commit 22446d1247ad5dcc0a51f7be605293e829492297 Omitted a required colon. Fixed. modified: test.yml 2022-09-01: David Anderson commit a5f9b6c048683419cbe4dd25eadd816e08801272 Now up to date with commit log modified: ChangeLog 2022-09-01: David Anderson commit 2bdc1b8630cc8b66d298a2ee7bffd7d869ae65ae Adding -suppress-de-alloc-tree to the dwarfdump -h output. modified: src/bin/dwarfdump/dd_command_options.c 2022-09-01: David Anderson commit 0b1abc536477eb2566f5dc7fbf4596b124194385 A new workflow, soon to run all tests. new file: .github/workflows/test.yml 2022-08-31: David Anderson commit 83d20678854741cce0feaf1b19389e6e35ec97ad Latest frmo gitlog. modified: ChangeLog 2022-08-31: David Anderson commit ea38f1e3517be59437fdc30ca694bb7dd94f0985 Making the documentation references in the last couple lines look better in markdown output while still working ok for github README.md output. modified: README modified: README.md 2022-08-31: David Anderson commit b9363a2eaf6844696e200cd1da14acfd68045f0b spell found a small number of typos. Fixed. modified: doc/libdwarf.dox Regenerated modified: doc/libdwarf.pdf 2022-08-30: David Anderson commit 9495f685a97d91207d221f0f9e6f90d794727ee7 Removed incomplete line. modified: README modified: README.md 2022-08-30: David Anderson commit b87a261170b0ce5dbc059ab1e8c7268e52873bf6 Wording correction, one line. modified: README modified: README.md 2022-08-30: David Anderson commit 54abd870387e0c4cba33dcbdaec53797ff5ecde2 Now with freebsd badge modified: README modified: README.md 2022-08-30: David Anderson commit 2b2801fd1c445c99f689bf29e15213351e987814 added sh to run autogen.sh as it is not marked executable modified: .github/workflows/ci_freebsd_autotools.yml 2022-08-30: David Anderson commit b3afda251be61e6f6243f68f2c55531eeb8c3909 Another try modified: ci_freebsd_autotools.yml 2022-08-30: David Anderson commit b66467c507f9e36d4f513946167e1e124b6994a6 Update ci_freebsd_autotools.yml Hopefully useful change. 2022-08-30: David Anderson commit 1173f024fe4005d700aca6ec7812e6793d089089 Fixing indentation modified: ci_freebsd_autotools.yml 2022-08-30: David Anderson commit 0179979290700347979b86a66c7b1f3ecab1c1d8 Trying freebsd new file: ci_freebsd_autotools.yml 2022-08-30: David Anderson commit d9b03d3e55052a5d665a4fff12867d3124a4b0e0 Minor tweaks to wording. modified: README modified: README.md Small additions to the changes in 0.4.2 wording modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2022-08-30: David Anderson commit 320d34bf7552f7ddff7991d7dd5cd626ed50e917 The latest standard GNU autotools INSTALL script. modified: INSTALL 2022-08-27: David Anderson commit 350b7689a5f6d2b371ce24e17be70c8e7e8a7723 Up to date with git log modified: ChangeLog 2022-08-27: David Anderson commit 04eefdd4c72d19ee04ccfe066c07e07d04f38bec Corrected DW202208-01 text and added gitfixid. modified: bugxml/data.txt 2022-08-27: David Anderson commit 428235e3d132fb62faf7732735fdbb034d6264b4 Fixes DW202208-001. Fuzzed object gets double free in libdwarf. modified: dwarf_frame.c 2022-08-27: David Anderson commit 60303eb80ecc7747bf29776d545e2a5c5a76f6f8 A new vulnerability: DW202208-001 modified: data.txt 2022-08-24: David Anderson commit 271cc04a1bdd1f47d641ab9219fb138aa02839ff Reformatted again. This time with black -l 70 modified: test_dwarfdump.py modified: test_dwdiff.py 2022-08-24: David Anderson commit aeb828a7530a5bad627d05f644f5f897bfa6bc49 Reformatted with black modified: test/test_dwarfdump.py modified: test/test_dwdiff.py modified: test/test_transformpath.py 2022-08-24: David Anderson commit 545c05da89a44ad2dbf359569d9e65b76c082a01 More minor tweaks about msys2 to clarify that most of the msys2 information here applies to configure/autotools and meson, not just cmake. modified: README.cmake 2022-08-24: David Anderson commit 0de39deee9bb049e9bbd613007e03275624a0471 Removed the mention of dos2unix because that is no longer used anywhere on any OS. modified: .github/workflows/ci_linux_autotools.yml 2022-08-24: David Anderson commit 7c16dc8632200c7ab0e213bfa443b700267c9751 Corrected and amplified notes about building on Windows under mingw64 msys2 modified: README modified: README.cmake modified: README.md 2022-08-20: David Anderson commit f641291015fc44d35ad2510ec9dc34ada2620d3f Added a small detail here about the dwarf_debuglink.c latest change. modified: ChangeLog 2022-08-20: David Anderson commit dea658c0e7c12fcabc64c1fdd95b2d530dfecd16 Updated from git log modified: ChangeLog 2022-08-20: David Anderson commit 703a75efddaf310867093e61e171b306e77897db src/lib/libdwarf/dwarf_debuglink.c: coverity defect 276811 comparison same on both sides coverity defect 276810 Explicit null dereference. This code changed August 14 and these bugs were introduced. Now fixed. modified: src/lib/libdwarf/dwarf_debuglink.c Just added a small comment. modified: src/lib/libdwarf/dwarf_string.c 2022-08-18: David Anderson commit 15c54f288f2b09bb2c6af6df0ec0860d833596d4 Revising these to correctly reference the renamed test source files. modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/meson.build modified: test/test_debuglink-a.sh modified: test/test_debuglink-b.sh modified: test/test_dwarfdump.py modified: test/test_dwarfdumpLinux.sh modified: test/test_dwarfdumpMacos.sh modified: test/test_dwarfdumpPE.sh modified: test/test_jitreaderdiff.sh 2022-08-18: David Anderson commit 14838a29c57348704c87ab2ab58cd54a421c96d2 No longer needed. deleted: test/dos2unix.py Renaming all source files (.c .py .sh) to start with test_ for consistency. renamed: test/debuglinktest-a.sh -> test/test_debuglink-a.sh renamed: test/debuglinktest-b.sh -> test/test_debuglink-b.sh renamed: test/dwarf_leb_test.c -> test/test_dwarf_leb.c renamed: test/dwarf_tied_test.c -> test/test_dwarf_tied.c renamed: test/dwarfdumptest.py -> test/test_dwarfdump.py renamed: test/dwarfdumpLinux.sh -> test/test_dwarfdumpLinux.sh renamed: test/dwarfdumpMacos.sh -> test/test_dwarfdumpMacos.sh renamed: test/dwarfdumpPE.sh -> test/test_dwarfdumpPE.sh renamed: test/dwarfdumpsetup.sh -> test/test_dwarfdumpsetup.sh renamed: test/dwdiff.py -> test/test_dwdiff.py renamed: test/testesb.c -> test/test_esb.c renamed: test/getnametest.c -> test/test_getname.c renamed: test/getopttest.c -> test/test_getopt.c renamed: test/helpertree_test.c -> test/test_helpertree.c renamed: test/jitreaderdiff.sh -> test/test_jitreaderdiff.sh renamed: test/makename_test.c -> test/test_makename.c renamed: test/section_bitmaps_test.c -> test/test_section_bitmaps.c renamed: test/transformpath.py -> test/test_transformpath.py 2022-08-17: David Anderson commit 289e94ea5ae3c0ec083d4c3aa3cb6df1b9b6bf44 Updating meson and configure/autotools build information and mentioning README.cmake is where cmake build information resides. modified: README.md Some details memory use added and the document date updated. No API change. modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2022-08-17: David Anderson commit f327372bc5da90e3f2650c93a626db1dc1dd4f69 Updating to match what we know works. modified: README modified: README.cmake modified: README.md 2022-08-17: David Anderson commit a2326e43aaaf499bab7632b910ada2dd5962ebae Latest from git log modified: ../../ChangeLog 2022-08-17: David Anderson commit b24e37ca21eb6a4cf67d3ced0e489f478471eda5 Adding ninja test to the workflow. modified: .github/workflows/ci_msys2_cmake.yml 2022-08-17: David Anderson commit 0cc469fe57ac75b606cd4760f0c33c99b0d9fdf9 Cleaned up scripting errors testing for $? modified: test/jitreaderdiff.sh 2022-08-17: David Anderson commit 3f53ac3a96ebade40744f8226f53e55579e54662 In the cmake case do not attempt the jitreader nor the dwarfdump tests. So far those do not work on WIN32. The autotools and meson buils run those just fine. modified: test/CMakeLists.txt 2022-08-16: David Anderson commit 8d8b6738e72f77a4c1b90e4b35e8fc043b3bc94d At a crucial point $? was not saved to r so the dwdiff.py result value was not tested correctly. Fixed. modified: test/jitreaderdiff.sh 2022-08-16: David Anderson commit f1c8667fd5bed0c5dfd5e224da5544c7fa0cfb52 Unused arguments deleted from a couple static functions. No API change. modified: src/lib/libdwarf/dwarf_tsearchhash.c 2022-08-15: David Anderson commit 938175b113897ede284120521f953d9476651ff9 The dwarfdumpPE,Macos,Elf test set did not work with cmake as msys2 was not able to use the introductory #line to derive the script program to run the python. So now we name python3 and Linux and msys2 work for these tests. modified: test/CMakeLists.txt Added a little bit of testing host_os to drop 'debuglinktest-a.sh' and 'debuglinktest-b.sh' from ninja test as getting the Windows output to match Unix/Linux baseline files to match Windows environmengs is ...not working. modified: test/meson.build 2022-08-15: David Anderson commit 00c79fc290777061042d72d52099539c264b1011 This is for regression testing to attempt to make Windows paths look like Unix paths so we can have a single baseline for all OS's. Note that it's not *really* working right yet so for Windows the two actual tests (debuglink) are not run. The msys2 vs Windows paths combined with what dwdebuglink does with paths makes sort of a mess... modified: test/transformpath.py 2022-08-15: David Anderson commit bc9f1f04c543382b1e11446a1df0774e6ad70f0b Changed temp file names for consistency in file naming. And to correct the -a 'mv' command to update the baseline, which has been wrong for some time... modified: test/debuglinktest-a.sh modified: test/debuglinktest-b.sh 2022-08-15: David Anderson commit 8a4675eb41be8056f9d977069cf68118d1da6e12 These are the new test baselines for debuglink. Just the "=====done with" line changed. modified: test/debuglink.base modified: test/debuglink2.base 2022-08-15: David Anderson commit 7ad43120effcf43d2d524d20a85e2685eff9b306 To ease comparisons against a baseline the "=======done with" output line just lists the file basename. No directories shown. modified: src/bin/dwarfexample/dwdebuglink.c 2022-08-14: David Anderson commit 8cdf8f0fd1d02e3781d76989642971d9e391812a Changes to let the basic checks (make check, ninja test) work properly on Windows (there is no change to the linux debuglink output).. modified: src/lib/libdwarf/dwarf_debuglink.c modified: test/transformpath.py 2022-08-13: David Anderson commit 456736367be280efd5f910448c127687ae7cbe59 delete obsolete comment. modified: src/lib/libdwarf/dwarf_debuglink.c Now uses the new python code for helping allow identity to baselines checking just like test/debuglinktest-a.sh does. Was an oversight this was not done earlier. modified: test/debuglinktest-b.sh 2022-08-13: David Anderson commit bd14b6128ca5ce2b63e465950291d2de28b6a3a9 Eliminated unused arg from print_usage_message() Changed int to Dwarf_Signed so pointer subtraction is handled correctly. modified: bin/attr_form/attr_form_build.c modified: bin/dwarfdump/dd_checkutil.c modified: bin/dwarfdump/dd_command_options.c modified: bin/dwarfdump/dd_common.c modified: bin/dwarfdump/dd_common.h modified: bin/tag_attr/tag_attr.c modified: bin/tag_tree/tag_tree.c Removed NULL_DEVICE_NAME define as it is not used here. modified: lib/libdwarf/dwarf_debuglink.c modified: lib/libdwarf/dwarf_util.c 2022-08-12: David Anderson commit ee6f657efcb025f4333654ca351d9fa500d685d0 Now up to date with git log text. modified: ChangeLog 2022-08-12: David Anderson commit ba778304169ddae8d66fd09e4b6d22a68c1341ba Removed an assign in a test. Clearer code. modified: src/bin/dwarfdump/dd_regex.c Remove trailing blank. modified: src/lib/libdwarf/dwarf_crc32.c modified: src/lib/libdwarf/dwarf_die_deliv.c Split a line, it was above the library codingstyle limit. modified: src/lib/libdwarf/dwarf_debuglink.c 2022-08-12: David Anderson commit 2d12f0c05a01f5b27969290ecdbd5555f43a62ce Changes to eliminate VS warnings. Float constants 0.0 -> 0.0f (etc). modified: dd_attr_form.c Four calloc calls were not followed by a NULL return check. Now they are checked. modified: dd_checkutil.c hasprefix->has_cu_producer_prefix for clarity with removal of an argument. modified: dd_compiler_info.c 2022-08-12: David Anderson commit 37d97e9b344059f881f0e5c778c0597b16b42753 - while ((c = *lp) && isinset(ap+1,c)) + for (c = *lp ; c && isinset(ap+1,c); c = *lp) The old way gets a warning with VS compiler. Good catch. modified: src/bin/dwarfdump/dd_regex.c Again VS C: A previous refactoring left an extra level of {} in the code and created dead code. Removed the extra {} and the dead code. modified: src/lib/libdwarf/dwarf_die_deliv.c 2022-08-11: David Anderson commit 98093f7abf71dfaf91b9b2c61edd0ac82c8d952e A few cases of main having unused argc/argv variables existed with a (void)argv; (void)argv; following the main return to avoid an unused argument warning. Now these use main(void) and those argv/argc mentions have been removed. exit(1) signifying failure is now exit(EXIT_FAILURE) modified: test/dwarf_tied_test.c modified: test/getnametest.c modified: test/getopttest.c modified: test/makename_test.c modified: test/section_bitmaps_test.c modified: test/test_dwarfstring.c modified: test/test_errmsglist.c modified: test/test_extra_flag_strings.c modified: test/test_linkedtopath.c modified: test/test_macrocheck.c modified: test/testesb.c modified: test/testobjLE32PE.test.c 2022-08-11: David Anderson commit 3fceae2002734ebc50bf6a905ff5c613f90bbd34 All uses of exit(1) and exit(FAILED) are now exit(EXIT_FAILURE) [a C89 built-in macro value] modified: src/bin/attr_form/attr_form_build.c modified: src/bin/buildopstab/buildopscounttab.c modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_compiler_info.c modified: src/bin/dwarfdump/dd_defined_types.h modified: src/bin/dwarfdump/dd_dwconf.c modified: src/bin/dwarfdump/dd_regex.c modified: src/bin/dwarfdump/dd_tsearchbal.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/jitreader.c modified: src/bin/dwarfexample/showsectiongroups.c modified: src/bin/dwarfexample/simplecrc.c modified: src/bin/dwarfexample/simplereader.c modified: src/bin/gennames/gennames.c modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/tag_common.c modified: src/bin/tag_tree/tag_tree.c Uses of off_t, ssize_t, and size_t clarified with comments and variable renaming. modified: src/lib/libdwarf/dwarf_crc32.c Fixed uses of const. modified: src/lib/libdwarf/dwarf_debuglink.c Added casts to clarify intent, and to avoid compiler warnings. modified: src/lib/libdwarf/dwarf_debugnames.c Removed a debugging abort() declaration. modified: src/lib/libdwarf/dwarf_die_deliv.c 2022-08-10: vtorri commit d8cff124e44b1a2332b25eede30914928fbc9f8a Remove useless warnings about "non standard function names" from the (#127) Microsoft compiler modified: meson.build Co-authored-by: Vincent Torri 2022-08-10: vtorri commit 9ad1c567fcbabdd0ce18b27341a564f8c3ef0800 define off_t only for microsoft compiler (#126) Co-authored-by: Vincent Torri 2022-08-09: David Anderson commit c4490ffdb50fd3cab852a723170bbf1bc0c1a0ab Hopefully now avoids MS VS warnings. We'll see. modified: src/lib/libdwarf/dwarf_die_deliv.c Removed unused arg from an internal-only function. modified: src/lib/libdwarf/dwarf_opaque.h 2022-08-09: David Anderson commit 33f89fe7fbf4dd6e6f6e09fefc03a785fbedf364 Changes VS does not define ssize_t nor off_t so we add #ifdef and some typedefs under _WIN32 here. modified: src/lib/libdwarf/libdwarf_private.h Changes to allow use of MS VS compiler and avoid its warnings. If narrowing data one must use a cast. modified: src/lib/libdwarf/dwarf_abbrev.c modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_arange.c modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_debuglink.h modified: test/test_linkedtopath.c 2022-08-08: David Anderson commit 969f46d90ae3bea6adfbd707665c4890cfaa0b16 Latest from gitlog modified: ChangeLog 2022-08-08: David Anderson commit 6309d9bab6e1383d593abae3ef340c92f876d707 Added a few words to one entry. modified: ChangeLog Now these refer to 0.4.2, the future release. There are no changes that affect the API. So far. No changes planned at this point. modified: README modified: README.md modified: doc/libdwarf.dox 2022-08-08: David Anderson commit f49d122f8b21c66af6304fbe519f04c4e2502b61 Added a byte to a calloc area and zero that last byte specially after called code initializes the content up to that last byte. Simple and now CoverityScan does not think there is a defect. modified: src/lib/libdwarf/dwarf_peread.c 2022-08-08: David Anderson commit af87fa59f7fd0365af44552154878627d49f035f Renaming so the sanity tests of path length of the relevant libdwarf header directory read sensibly. modified: src/bin/buildopstab/buildopscounttab.c 2022-08-06: David Anderson commit ce46d6f989f94ae944509e638b44fadf96c7d099 Another set of changes to address new compiler warnings where size_t bigger than long. Expect more. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_esb.c modified: src/bin/dwarfdump/dd_getopt.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_macro.c modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_macro5.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_string.c modified: src/lib/libdwarf/dwarf_string.h modified: test/test_errmsglist.c if (want_deleted) changed to if (intent == want_delete) Detected by recent Windows VS compiler. The compiler warning here exposed a real bug. modified: src/lib/libdwarf/dwarf_tsearchhash.c 2022-08-06: David Anderson commit 4f4e57e758ffb35fed6547e381b6aa70d2b32810 Removed trailing whitespace from two lines (in comments). modified: src/lib/libdwarf/libdwarf.h 2022-08-05: David Anderson commit 7e71a28851927ac5a98e3f5bbdb3bb6f31868854 Latest from git log added. modified: ChangeLog 2022-08-05: David Anderson commit a91754a04be281d0d354edea2d61b3f21b973324 Changed unsigned long to size_t as a recent Windows compiler warns about a conversion to long from a wider type. One applauds the compiler writer's advances in making code safer, but it does make for a bit of source adjustment from time to time. modified: src/bin/dwarfdump/dd_safe_strcpy.c modified: src/bin/dwarfdump/dd_safe_strcpy.h modified: src/lib/libdwarf/dwarf_safe_strcpy.c modified: src/lib/libdwarf/dwarf_safe_strcpy.h 2022-07-23: David Anderson commit 72e7670a4a1301a24f388e86fabd57e7d78905ab Updated with last from git log modified: ChangeLog 2022-07-23: David Anderson commit e0fee334ee4822b8619d3c5781ea63ad085c9f07 Entered git fix id for DW202207-001 modified: bugxml/data.txt 2022-07-23: David Anderson commit c632d387e43a36cdecf72e0595521c6f92766349 Bug entry for DW202207-001 modified: bugxml/data.txt 2022-07-23: David Anderson commit 24dff940cc4c71a9c3cb5475aee231b19163a12c Fix for DW202207-001 Corrupted string in .gnu.debuglink could cause a segmentation violation, resulting in DenialOfService. modified: src/lib/libdwarf/dwarf_debuglink.c 2022-07-23: David Anderson commit 436ea0d3fd7bef82679be01af8ce69e3f84e1c62 auto updates 'make rebuild' to name rel 0.4.2 in comments in generated source. modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2022-07-15: David Anderson commit d68c167e90dd03758e8a548d612d38a608dfd5b5 Latest git log entry now in ChangeLog modified: ChangeLog 2022-07-15: David Anderson commit 78005a95d916c84b92f0ca58f75ded3a2e3f91d8 Implemented a better, faster, universal way to deal with R__NONE relocation records. Should have done it this way years ago. modified: lib/libdwarf/dwarf_elfread.c 2022-07-15: David Anderson commit def530e467d6f15bdd87bc96a368a96c4b3f7ac3 Several lines had indentation errors. Fixed. modified: lib/libdwarf/dwarf_global.c 2022-07-15: David Anderson commit aefc12ea2baf55f68c2025874a61728d30864266 Shortened one line past the libdwarf line length limit. modified: dwarf_form.c 2022-07-15: David Anderson commit b90af706cd68fe41b824b15824a3bda44d640818 So we have latest git log data here. modified: ChangeLog 2022-07-14: David Anderson commit e85fbe398ec44ec322b5996e4db70ed66d131d73 Added R_AARCH64_NONE (means no relocation to do) modified: src/lib/libdwarf/dwarf_elf_defines.h Now handles R_AARCH64_NONE modified: src/lib/libdwarf/dwarf_elfread.c 2022-06-25: David Anderson commit 5f721888872503179a43db68ce2263742279a6d8 Now with git log data about 0.4.2. modified: ChangeLog 2022-06-25: David Anderson commit df602748801f45b1b20f2b87b68e4fbd7e4b5d28 Preparation for 0.4.2 changes list (when there are some). modified: doc/libdwarf.dox 2022-06-25: David Anderson commit 83d51778a824b6d1f6fbfcdf79ea8852185175ce These are the places with the version number. All now are 0.4.2 as 0.4.1 has been released. modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2022-06-25: David Anderson commit 92fe20d176ca41cc6b4d16e40d6d3bfd13c4b7b9 Now tarrelease mentions the full .xz file name for the latest new vulnerabilities modified: bugxml/data.txt 2022-06-25: David Anderson commit b5e3e736ed94d2c104adccadf3476b180b5dcd99 Adding release as 0.4.1 for the two 2022 vulnerabilities. modified: bugxml/data.txt 2022-06-16: David Anderson commit 9416aa9452c37b3ac252e709c39b46705916b97e Now updated with latest git log entries. modified: ChangeLog 2022-06-16: David Anderson commit ca014c42a87e6dd0ea63d899e32865b636a0115e Corrections to the example. Was not handling DW_AT_ranges properly. modified: src/bin/dwarfexample/findfuncbypc.c 2022-06-15: David Anderson commit ca31d34a3e7db69f7101ea41b16076d8ae9d6ce5 Now with lastest fix: DW202206-001 from git log. modified: ChangeLog 2022-06-15: David Anderson commit 8b37fd87346fd225a6f2822f07b2a89cc453b910 Now referencing DW202206-001 vulnerability modified: bugxml/data.txt modified: doc/libdwarf.dox 2022-06-15: David Anderson commit 7ef09e1fc9ba07653dd078edb2408631c7969162 Fixes old bug(which could result in Denial of Service) due to a missing check before reading the 8 bytes of a DW_FORM_ref_sig8. DW202206-001 modified: src/lib/libdwarf/dwarf_form.c 2022-06-12: David Anderson commit bc068ac4049261bcd5cc6293aa2c90dc58fbcf8d Now properly runs the test_errmsglist test case. So now all the 'make check' cases pass for configure,cmake,and meson builds. modified: test/meson.build 2022-06-12: David Anderson commit 5a0719397f08efe872978966a7e3fc85238cb5dd For running tests, test the dwarfexample executables only if the build requested dwarfexample. modified: test/meson.build 2022-06-11: David Anderson commit 4da94f40b2e271e0220429cf656484590227ab07 Added a note about the fixed vulnerability, see Recent Changes. modified: doc/libdwarf.dox New date. Regenerated. modified: doc/libdwarf.pdf 2022-06-11: David Anderson commit 8a2e978e1a4d6bbd2b1383f6da0ce18cba67f692 Merge: 585b3052 a313d485 Merge branch 'master' of https://github.com/davea42/libdwarf-code Adding DESTDIR to doc/Makefile.am 2022-06-11: David Anderson commit a313d4854f22d0a1cfa2a529341b9665b311e5c8 Merge: b48330ff 934c0da5 Merge pull request #117 from heirecka/respect-destdir-with-doc Respect DESTDIR when installing docs 2022-06-11: Heiko Becker commit 934c0da583a60757f4e37a1a60f690645629066d Respect DESTDIR when installing docs 2022-06-09: David Anderson commit 585b3052f38a8f681cfc9ed5250f7642c18c09e7 Now gets top_blddir correct for all flavors. modified: debuglinktest-a.sh modified: debuglinktest-b.sh modified: jitreaderdiff.sh Now refers to correct name jitreaderdiff.sh modified: meson.build 2022-06-09: David Anderson commit b48330ff424b23ac2524c5804a7069ad624e0765 Removed 14 lines of code that was intended to help testing on windows, but which actually just made it impossible. modified: src/bin/dwarfexample/dwdebuglink.c Corrected a comment related to Windows paths modified: src/lib/libdwarf/dwarf_debuglink.c Added transformpath.py to the files to be distributed. modified: test/Makefile.am Removed 24 lines and replaced with a single execution of a simple python helper program the test works on msys2 and Linux.. modified: test/debuglinktest-a.sh A pair of lines had trailing whitespace. Fixed. modified: test/transformpath.py 2022-06-09: David Anderson commit cf21af79a07ed5343acca677c83466f295a1695a Named an @section that was missing a name. modified: doc/libdwarf.dox New code helping in tests. new file: test/transformpath.py 2022-06-04: David Anderson commit 72e701141b015e2822c8782cb1a0378f6a09bfaf Removed obsolete lines. modified: test/jitreaderdiff.sh 2022-05-31: David Anderson commit 7da828b6e52638a5769c610c7b7d9da6c0b58cda As requested by the bug submitter, I updated the name field from a github id to an actual name. modified: data.txt 2022-05-30: David Anderson commit 01c464bea73d7884714830bdd0f0ff2b5144c350 Now with the error message update and fix of very old -v bug. modified: ChangeLog 2022-05-30: David Anderson commit 1084a3be38a5e0ecec8b00498efabd9f2723e92d Updated error message related to DW202205-001 and fixed odd logic and it changed -v --print-pubnames output! Which has been incorrct in one field for many years. The field is very not important it's really to help understand the byte layout of .debug_pub[names,types]. So, old bug corrected and new error message made much more understandable. modified: src/lib/libdwarf/dwarf_global.c 2022-05-29: David Anderson commit 9683c08424f21b4188ec1461cb08ce4d2077ce70 Updated with latest git log data. modified: ChangeLog 2022-05-29: David Anderson commit 9e5d19905744676e41eeabb1f3f2f1253a9bea95 Now DW202205-001 has the commit id of the fix. modified: bugxml/data.txt 2022-05-29: David Anderson commit 8151575a6ace77d005ca5bb5d71c1bfdba3f7069 Fixes vulnerability DW202205-001 Reports error instead of crashing the when reading a specially crafted (corrupted) .debug_pubnames or .debug_pubtypes section. modified: src/lib/libdwarf/dwarf_global.c 2022-05-29: David Anderson commit 8e202226e604864b792ade45de8595c8944c0269 First version of DW202205-001. bugxml/ modified: data.txt 2022-05-28: David Anderson commit 88df39e5278b4ed2385fdb22fa83f0e5e3c141c9 The make check test source failed to free a malloc'd string so would get a -fsanitize warning. Fixed. modified: test/testesb.c 2022-05-25: David Anderson commit b5472a8797f939a2f1673bf1b459836f514139b5 Latest log data modified: ChangeLog 2022-05-21: David Anderson commit 2c04dab0fac09c4b0d58b8ab4c1cd1aa54e3cf1d CoverityScan found a leak under a specific error condition. Fixed. modified: src/lib/libdwarf/dwarf_line.c 2022-05-21: David Anderson commit c6fbcc6d904f370e6b760f4e88362f5f5cf58c09 Now with latest git log data. modified: ChangeLog 2022-05-21: David Anderson commit 268f398ca3b16d77b963a4310621375d20ed7a7a To get the leading - to dwarfdump options to show up in Recent Changes changed -v to \-v etc. modified: doc/libdwarf.dox regenerated. modified: doc/libdwarf.pdf 2022-05-21: David Anderson commit 24d2cdec480c300b8c7416d08cde0dd99aaa27ee Improved the documentation of dwarf_suppress_debuglink_crc. modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h Regenerated. modified: doc/libdwarf.pdf 2022-05-21: David Anderson commit a653b2a8954ff1b42622aafc3cc16a950cfdd555 Dated 21 May 2022 for version 0.4.1 Now with a section detailing access to GNU debuglink and debug-id, and Macos dSYM separate-debug objects. modified: doc/libdwarf.dox Regenerated modified: doc/libdwarf.pdf Minor clarifications in doxygen comments to dwarf_init_path(). modified: src/lib/libdwarf/libdwarf.h 2022-05-19: David Anderson commit 117a02907ec18f36f51abf2a0c83bdc8ef3c6386 Latest git log data included. modified: ChangeLog 2022-05-19: David Anderson commit 60fcd08634420f7ac6eabe37794fc499c00bb147 Factored out _dwarf_setup_base_address so we easily handle the case of a compiler using DW_AT_entry_pc ( first defined in DWARF3) as base address when there is no DW_AT_low_pc at the compilation-unit DIE. modified: src/lib/libdwarf/dwarf_die_deliv.c 2022-05-19: David Anderson commit e6d468ae0ba05e610bf4f8969d30700fc2998327 Added comments about cc_low_pc and DW_AT_entry_pc and an Apple compiler. modified: src/lib/libdwarf/dwarf_opaque.h Removed a blank line where there were two such in a row. modified: src/lib/libdwarf/libdwarf.h 2022-05-18: David Anderson commit 60c755d6c78c7c505c33d51a3bb536a15cc65386 bringing changelog up to the minute. modified: ChangeLog 2022-05-18: David Anderson commit 79ec4257064bcb7012f234dae0139556345e54de Removed trailing whitespace. modified: dwdebuglink.c Adjusted incorrect indents. modified: showsectiongroups.c A comment made a line too long. Split into two lines. modified: simplereader.c 2022-05-18: David Anderson commit 3eb71332c0bad63ff42e38450e52847ff8267752 Removed trailing whitespace from two lines. Split one too-long line into two lines. modified: dd_command_options.c 2022-05-17: David Anderson commit a56b9146ead9a1d3308075ffad287fc56ccc9b85 Bringing it up to date with git log modified: ChangeLog 2022-05-17: David Anderson commit 3c60185eb0c11a86d350004dde9f409c94b9094b The sed commands unfortunately used : as a separator, which conflicts with Windows paths. So now we use @ as the sed expression separator. modified: test/debuglinktest-a.sh modified: test/debuglinktest-b.sh 2022-05-17: David Anderson commit a98f554548811be7d7ceb63496974e24bf40c98c Added "" around an error situation with --add-debuglink_path so any space-like characters will be (kind of) revealed. modified: src/bin/dwarfdump/dd_command_options.c 2022-05-17: David Anderson commit 26a87e4d742b60564b3e40154f74f810ed8ae3a6 Clean up a small indent mistake. Has no effect on results. modified: CMakeLists.txt 2022-05-17: David Anderson commit 743b1f88bd7383ccee667ca72937f9cf7dee56e6 Removes -Ddoc as that presently does nothing. Call meson with both build and source directories mentioned ( . and .. ) to avoid relying on meson to figure out either one. modified: .github/workflows/ci_linux_meson.yml modified: .github/workflows/ci_msys2_meson.yml 2022-05-15: David Anderson commit 69d30e988c52661f7d8a1148a8574d8323da6f40 Now these match up with what actually works. modified: README modified: README.cmake modified: README.md 2022-05-15: David Anderson commit 6baad78d26ab48248b1eedabda0a486ebe638c37 Plain -j rejected. For now, leaving off -j. modified: .github/workflows/ci_msys2_cmake.yml 2022-05-15: David Anderson commit 972388e868d5c9a28dac75d2c24cbbb2cf84559a avoids trying to run tests, now uses ninja not make, though that is not an important aspect. modified: .github/workflows/ci_msys2_cmake.yml 2022-05-13: David Anderson commit 1a8fa7c6f561f0b96d216685238ceb943a5994c4 Now adds ninja install step which results inconecting executables to the libdwarf dll. modified: .github/workflows/ci_msys2_meson.yml 2022-05-12: David Anderson commit f164841a2edd20d32437c3e33192d491e69d574f Corrected a () pair to a {} pair, about line 228 modified: test/CMakeLists.txt 2022-05-12: David Anderson commit 7538384df89f38bb25df14cb5e3c5a1c3b96ac84 Corrected the name to follow meson requirements. modified: src/lib/libdwarf/meson.build Removed an unnecessary andin appropriate join_paths() in the tests (added when there were other issues causing confusion). modified: test/meson.build 2022-05-09: David Anderson commit e5f3720dba59100cc4bf0bb32baf3d73bfcd95aa For now only run on a pull request or manual start of a test. modified: .github/workflows/ci_linux_autotools.yml modified: .github/workflows/ci_linux_cmake.yml modified: .github/workflows/ci_linux_meson.yml modified: .github/workflows/ci_macos_autotools.yml modified: .github/workflows/ci_msys2_autotools.yml modified: .github/workflows/ci_msys2_cmake.yml modified: .github/workflows/ci_msys2_meson.yml Now only copy dwarfdump.conf it it has not yet been copied. modified: test/dwarfdumptest.py Trying to get msys2 to function properly with meson. modified: test/meson.build 2022-05-09: David Anderson commit a284f065cd3ab50d96624357cb3db660d2f4ff27 Removed debug output. modified: .github/workflows/ci_msys2_autotools.yml Now mentions msys2 autotools badge. modified: README modified: README.md 2022-05-09: David Anderson commit 43db5311cdce00275c16477e3ceb2fbde1feaeab Removing the 'cat' debug command, things working better. modified: test/dwarfdumpMacos.sh 2022-05-09: David Anderson commit 909674b14a56674050e91afee91746dae392dda2 Removing the temporary exit 0 with proper exit 1 for a fail. modified: dwarfdumpMacos.sh 2022-05-09: David Anderson commit a53f099f0431bbb62ba0b37fc35c99e63efe6713 Now we let dwdiff.py deal with the diff so we do not need any dos2unix at all. modified: dwarfdumpLinux.sh modified: dwarfdumpMacos.sh modified: dwarfdumpPE.sh The initial planned argument was not needed, so dropped it. modified: dwdiff.py 2022-05-09: David Anderson commit e4515648a2f0faa4d3d2f7a3e3213cf12f224be3 Changing to a special setup to find out why msys2 autotools fails one text. modified: .github/workflows/ci_msys2_autotools.yml modified: test/dwarfdumpMacos.sh 2022-05-07: David Anderson commit 6b132c7c71fc512f5837ecebd7191e507b77949b Added --output-on-failure to ctest use. modified: .github/workflows/ci_msys2_cmake.yml 2022-05-07: David Anderson commit 99a0fd9bcdf2d1f6a57a8a6ef45f4dd4160291c2 Making part look a bit nicer, more regular. modified: test/CMakeLists.txt 2022-05-07: David Anderson commit 120c7decf20508b38e0364dcaaac64fe25eb253c Tweaking to get details on failure. modified: .github/workflows/ci_msys2_autotools.yml 2022-05-06: David Anderson commit 4331d42a7f3732f3e3554bdde03ee333b1365cd7 Omitted a declaration. modified: src/bin/dwarfdump/dd_command_options.c The baseline is updated because the debuglink output format changed just slightly for a more consistent appearance. modified: test/debuglink.base modified: test/debuglink2.base modified: test/debuglinktest-a.sh modified: test/debuglinktest-b.sh 2022-05-06: David Anderson commit b8de88bace78f5a41dee61c5ae32776a378925d2 Compiler caught declaration of no-loner-used variable. modified: src/lib/libdwarf/dwarf_debuglink.c Added clarifying zero of a pointer after free. modified: src/lib/libdwarf/dwarf_rnglists.c 2022-05-06: David Anderson commit 91a59fdff538d77122328a00e0eacbd743142952 Clarified a comment about section groups. modified: src/bin/dwarfdump/dwarfdump.c dwarfstring_list_add_new() had lost its final return DW_DLV_OK, (mistake noted by clang) and now it is restored. modified: src/lib/libdwarf/dwarf_debuglink.c 2022-05-06: David Anderson commit 0d19957b9f127bc27e9007248e16e95af9066e57 Improved the description of of --suppress-debuglink-crc and --no-follow-debuglink modified: doc/dwarfdump.1 2022-05-06: David Anderson commit db25b22842cc8687d43e149143e5533f577a3e77 Added the new dwarf_suppress_debuglink_crc() to the Recent Changes section. modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf 2022-05-05: David Anderson commit ecb2acd171f22551b5b75480d38c03ef965e63a4 Now discusses the new option --suppress-debuglink-crc and adds words to the older option --no-follow-debuglink to make the distinction clear. modified: doc/dwarfdump.1 removed debug printf in these two. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_debug_names.c 2022-05-05: David Anderson commit be0fa88d5bb0d39eb9d70986156dfa04a9e2f5dc Removed many debug printf statements. Corrected a bug where debuglink without debug_id would suppress debuglink access. modified: src/lib/libdwarf/dwarf_debuglink.c Added dwarf_suppress_debuglink_crc() (which is public) and _dwarf_get_suppress_debuglink_crc() (which is for library internal use only). Supporting the dwarfdump --suppress-debuglink-crc option now. modified: src/lib/libdwarf/dwarf_object_detector.c Added _dwarf_get_suppress_debuglink_crc() declaration. modified: src/lib/libdwarf/dwarf_opaque.h 2022-05-05: David Anderson commit 4eee9355193f30cbc6e1e3262142e1ad23d40e16 Fixed an indent in a comment. modified: dwarf_line.c 2022-05-05: David Anderson commit b1021e46fd72448d4bc1dfbd72d52eac9755f292 Adding option --suppress-debuglink-crc so users have the option of avoiding a crc calculation when gnu debuglink is in the object file. Useful for someone building and testing a given executable and its .debug multiple times. modified: src/bin/dwarfdump/dd_command_options.c 2022-05-05: David Anderson commit 152318a73c43831d102a247ba6e520ecf95b9681 Adding new public function dwarf_suppress_debuglink_crc allowing callers to avoid having libdwarf do a crc calculation and just assume if one was done that it would match. modified: src/lib/libdwarf/libdwarf.h 2022-05-04: David Anderson commit f936ea937a396ded8f8d29d7e4853dab6a27ef78 DO NOTUSE THIS COMMIT Changes in place to improve GNU debuglink and debug ID section handling. Not complete. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfexample/dwdebuglink.c modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_object_detector.c 2022-05-02: David Anderson commit f3a1ab8b71bdbf8b979982638efce41ac3a7dc6a Revised from previous failing version. new file: .github/workflows/ci_msys2_autotools.yml 2022-05-02: David Anderson commit 9931479609353ca728ca584e4ea69017c2263820 These seem to be broken, so removing: .github/workflows/ deleted: ci_msys2.yml deleted: ci_msys2_autotools.yml 2022-05-01: David Anderson commit b40b84ad094f2374689d0c344d6073cd1343099a Adding use of --disable-dependency-tracking to deal with build failures (only affects some people). modified: README modified: README.md 2022-04-30: David Anderson commit 1458862877d1b8d90534fa7818c398b79d46bcad Fixed typo just introduced. modified: .travis.yml 2022-04-30: David Anderson commit 2971fd319d7f5a6f898d9fa71629436f89d7ed9a added --disable-dependency-checking to see if that lets the build work. modified: .travis.yml 2022-04-30: David Anderson commit bb591b6b55a74f43ba29c2f69f20e457fcfb59cd Removed mention of dos2unix, we no longer really need that standard install program. modified: README modified: README.md 2022-04-30: David Anderson commit a422fef0790868d020e0236dc969253c722cba54 Removing bogus options I added earlier. modified: .github/workflows/ci_msys2_autotools.yml 2022-04-30: David Anderson commit 2e80e291988234e74e8d1d5a21b2c1f06248defb Sorted the content of EXTRA DIFF. modified: test/Makefile.am Now these use simple python scripts for diff and dos2unix. modified: test/debuglinktest-a.sh modified: test/debuglinktest-b.sh modified: test/dos2unix.py modified: test/dwarfdumpLinux.sh modified: test/dwarfdumpMacos.sh modified: test/dwarfdumpPE.sh modified: test/jitreaderdiff.sh 2022-04-30: David Anderson commit 5ed2fb728d5e29b5548dd584c33a010b019543ae Now 0.4.1 modified: README modified: README.md Simple python instead of messy scripting with traditional commands to take care of dos/linux line end differences . new file: test/dos2unix.py new file: test/dwdiff.py 2022-04-30: David Anderson commit a4ac89e738db35659df213ab856d5a74363869da The contents resorted by test name for consistency and easier checking. Nothing was found that was actually wrong. modified: test/Makefile.am 2022-04-29: David Anderson commit 94735fbb5f6195f9e5e02385dcc7c502be4918b8 Still not working. Delete bad line. modified: .travis.yml 2022-04-29: David Anderson commit 64b10ff8f4b465c8d09cbcdabee3f8080b76dc55 Another try with travis. modified: .travis.yml 2022-04-29: David Anderson commit 074776afd21fa5fd51b8d7016664c8c5d983e12c Now using apt-get, not apt. modified: .travis.yml 2022-04-29: David Anderson commit caab423142f6f29214f8fe5d1aed136724bf4241 Added install of dos2unix for certain make check instances. modified: .travis.yml 2022-04-29: David Anderson commit 387908c4fb97cb5ff66d8db30b0ba4c7258b8431 Now adds dwarfexample to run all the checks. modified: .github/workflows/ci_linux_autotools.yml Corrected a bug in TESTS setup. modified: test/Makefile.am 2022-04-29: David Anderson commit bfbdcac78a7805b31bf988b1b5edf902f3761796 Added cat to see the test log. modified: ci_linux_autotools.yml 2022-04-29: David Anderson commit e4a7a265237ffad6bcd51d2ca8a4360a2e0d4380 Uses apt-get, not plain apt now. modified: ci_linux_autotools.yml 2022-04-29: David Anderson commit 959e16658757e08b3e352bc6c13e7d742700d50a Ensuring dos2unix present modified: .github/workflows/ci_linux_autotools.yml Ensuring dos2unix mentioned modified: README modified: README.md 2022-04-29: David Anderson commit 6af6e566ae71b585659484e7be7cbab83dd770fb These are all to make msys2 pass. In that case, for now, we suppress the debuglink tests in make check Add new HAVE_DEBUGLINK so we can turn off the pair of debuglink tests in test/Makefile.am modified: configure.ac modified: test/Makefile.am These changes work toward having the debug link case work under msys2, but these are not quite sufficient. modified: src/bin/dwarfexample/dwdebuglink.c modified: src/lib/libdwarf/dwarf_debuglink.c modified: test/debuglinktest-a.sh modified: test/debuglinktest-b.sh Minor change to run dos2unix for the msys2 case. modified: test/jitreaderdiff.sh 2022-04-28: David Anderson commit d654f00c0beeced4bf09a838c03097e967a28b89 Changed the other --host to be -pc- too. modified: .github/workflows/ci_msys2_autotools.yml 2022-04-28: David Anderson commit 1dadd8683a9a0a99e5eac5499249c0fded87d0ce Adding subdir-objects to the AM_INIT_AUTOMAKE command. modified: configure.ac 2022-04-28: David Anderson commit 1654620960462ea94d4514453a4b95360030cf25 Trying a different --host option. modified: ../../../.github/workflows/ci_msys2_autotools.yml 2022-04-28: David Anderson commit 9446099f47770566afec1fbbb57d4ae92c8ed1b7 Merge: 832b3c23 92bb569e Merge branch 'master' of https://github.com/davea42/libdwarf-code msys2 workflow. 2022-04-28: David Anderson commit 92bb569e9529dd5a9d8c63ec03cfd40648a06826 Merge: 57235d51 4242179e Merge pull request #111 from vtorri/vtorri_ci_msys2_all CI msys2: check all the build systems 2022-04-28: David Anderson commit 832b3c236d2f787589c7f0a7d147044300a4f301 Merge: 210cd279 57235d51 Merge branch 'master' of https://github.com/davea42/libdwarf-code Merge fix of undefined behavior 2022-04-28: David Anderson commit 57235d51e60d3755405d9e85fe71491a69b3956a Merge: b0a4f74b 986d5a7e Merge pull request #114 from klucke/master Fix undefined behavior found when compiled with UBSAN in clang. 2022-04-28: David Anderson commit 210cd2796e12c6581e91e4c91387abe8169a0e4c Deleted references from MAINTAINERCLEANFILES of a couple of files that have not been created here for a long time. modified: test/Makefile.am 2022-04-28: David Anderson commit 2f9b5c534bc4d0e7de8bff4fbe878df81c99a916 Restoring rm -f of test files used during execution of the test. modified: test/dwarfdumpLinux.sh 2022-04-28: Kyle Lucke commit 986d5a7e090b08604b57bebff102dc783829c346 Fix undefined behavior found when compiled with UBSAN in clang. This patch resolves the following undefined behavior error: "runtime error: applying zero offset to null pointer" seen when calling dwarf_srclines_b when compiled with clang's UBSAN libraries. 2022-04-28: Kyle Lucke commit 27ff3a28dd900575e15395a8f101b0a2eaa3bc69 Fix undefined behavior found when compiled with UBSAN in clang. This patch resolves the following undefined behavior error: "runtime error: applying zero offset to null pointer" seen when calling dwarf_srclines_b when compiled with clang's UBSAN libraries. 2022-04-28: David Anderson commit b0a4f74bc1fe940a6a4d7bbb6d6a1513df9485e9 A check for a specific length of debug_id was unwarranted and has been removed. Various lengths are possible. modified: src/lib/libdwarf/dwarf_debuglink.c 2022-04-28: Vincent Torri commit 4242179e6463d28df3e9511ed7da163548b3621b CI msys2: check allthe build systems Also build for 32 and 64 bits 2022-04-27: David Anderson commit 7054e6f56210e5edbe9924dbe2490e682e4c4789 Added -j for make and make check. Use all possible cpu cores to speed up build and check.. modified: .github/workflows/ci_linux_autotools.yml 2022-04-27: David Anderson commit 957278adca179a39db02245e0148b2b5c0d4d16b Merge: e961abff 2fb4fd12 Merge pull request #109 from vtorri/vtorri_ci_msys2_autotools_shared CI msys2 autotools: pass 64 bits host and enable shared. 2022-04-27: David Anderson commit e961abffb153e4e17225c76a0f16853763c4dc84 For meson, also copy to build base dir. modified: test/dwarfdumptest.py 2022-04-27: David Anderson commit 00ac19cd5f344837752c2d5126cbea5659c66470 Remove duplicated 'make check' modified: .github/workflows/ci_macos_autotools.yml Modified a message text about dwarfdump.conf to aid debugging. modified: test/dwarfdumptest.py 2022-04-27: David Anderson commit 991f1d53b392921fd97ca8b6ea3e9cbad4e26658 Enable interactive run of workflows modified: .github/workflows/ci_linux_meson.yml modified: .github/workflows/ci_msys2_autotools.yml modified: .github/workflows/ci_msys2_cmake.yml modified: .github/workflows/ci_msys2_meson.yml Now back to a usable autotools. modified: configure.ac modified: test/Makefile.am 2022-04-27: Vincent Torri commit 2fb4fd1288407eb54e6350af460674c3f103cf76 CI msys2 autotools: pass 64 bits host and enable shared. Allow distcheck to use these options too modified: .github/workflows/ci_msys2_autotools.yml 2022-04-26: David Anderson commit cfdc512e89096478357e7f10ca46b0bf4e72a134 Merge: ed57bfa7 0e47bfae Merge pull request #107 from vtorri/vtorri_ci_msys2_autotools CI: add autotools CI on MSYS2 2022-04-26: David Anderson commit ed57bfa7198a1d6b151e653670750d918cb97185 Minor tweaks. modified: Makefile.am Slightly modified. No real change. modified: test_errmsglist.c 2022-04-27: Vincent Torri commit 0e47bfae69426afa86f02a0e52a20deb0a4bbf88 Merge: aec0280d fd4efe9d Merge remote-tracking branch 'upstream/master' into vtorri_ci_msys2_autotools 2022-04-26: David Anderson commit fd4efe9d947c2e0e443fbcc00f82bf49a94011d2 Made the data output look nicer. Adjusted the test output location for meson. modified: test/dwarfdumptest.py Now runs the dwarfdump sanity tests using test/dwarfdumptest.py modified: test/meson.build 2022-04-26: David Anderson commit c02712b63b52b28ea79a824eca9ffb58d8d56b46 Converted dwarfdump quick test driver to be python. modified: test/CMakeLists.txt Corrected the file name in one print statement (an error case). modified: test/dwarfdumptest.py 2022-04-26: David Anderson commit cdad435e3f933cdc9b59d1735cae8595232e46df Now using check-local to test dwarfdump sanity. modified: test/Makefile.am This does the actual sanity check. Returns 0 as exit code on success, else returns non-zero as exit code. modified: test/dwarfdumptest.py 2022-04-26: David Anderson commit e767827197fa0e7d12dbcb68f37c1df432adf8b3 Working toward improving make check. modified: configure.ac modified: test/Makefile.am modified: test/dwarfdumpLinux.sh modified: test/dwarfdumpsetup.sh modified: test/meson.build 2022-04-26: David Anderson commit b8f3f6a92bec238cb93e7782ff585f4484e968b2 Bringing it up to date. modified: ChangeLog 2022-04-26: David Anderson commit b56e12edf0eb1d7764381cef1a8017d167c48a0b Adding AUTOMAKE_OPTIONS=subdir-objects so mow all .am files have it. Fixes warnings from autoreconf/autogen.sh with no other apparent effect. modified: test/Makefile.am 2022-04-25: David Anderson commit fbbe14b4e0da35e611a274b3f1ce17a15803a388 Adding AUTOMAKE_OPTIONS=subdir-objects to these removed a bunch of warnings at autoreconf time. test/ will get it committed to, soon. modified: Makefile.am modified: doc/Makefile.am modified: src/bin/attr_form/Makefile.am modified: src/bin/buildopstab/Makefile.am modified: src/bin/builduritable/Makefile.am modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfexample/Makefile.am modified: src/bin/dwarfgen/Makefile.am modified: src/bin/gennames/Makefile.am modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_tree/Makefile.am modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarfp/Makefile.am 2022-04-25: David Anderson commit 630fb3d558b5edf906fd7c2ff95191e4fe92c90c A working comparator useful for Elf PE Macos object tests new file: dwarfdumptest.py 2022-04-23: David Anderson commit 5544b90a041b80c839cdabf61949804ec5dc25c9 Latest changes listed. modified: ChangeLog 2022-04-23: David Anderson commit a7ca2b59ae7c6af7d64293c8ce7277f4d393ba81 Fixed typo in debuglink-a test. modified: CMakeLists.txt 2022-04-23: David Anderson commit 8205f892722665531b78d0036f8a16b03e63747b Now reflects the simplified execution of debuglinktest*.sh modified: CMakeLists.txt Now the imput, either an argument or DWTOPSRCDIR env var may be used to set the source directory. Whichever is convenient for the build system involved. modified: debuglinktest-b.sh 2022-04-23: David Anderson commit 83d11ca14ca759d813279cb01d016816d46ab099 Either pass in source dir base as the argument or set env var DWTOPSRCDIR to that same directory path modified: debuglinktest-a.sh 2022-04-23: David Anderson commit 6cab7aee24ad3f88c036fb1ead5f9ff9ebcaa715 Merge: d41a75b3 1add733c Merge pull request #105 from vtorri/vtorri_tests_headers tests: reorganize headers merging now 2022-04-23: Vincent Torri commit 1add733ce12f161eda20d2353943e1c97138043a tests: reorganize headers modified: test/dwarf_leb_test.c modified: test/dwarf_tied_test.c modified: test/getnametest.c modified: test/helpertree_test.c modified: test/makename_test.c modified: test/section_bitmaps_test.c modified: test/test_canonical.c modified: test/test_dwarfstring.c modified: test/test_errmsglist.c modified: test/test_extra_flag_strings.c modified: test/test_linkedtopath.c modified: test/test_regex.c modified: test/test_safe_strcpy.c modified: test/testesb.c 2022-04-22: David Anderson commit d41a75b358fb73a44d0936fd8846b37184a537ce Simplfied and clarified the run oof the dwarfdump check scripts. To run each, a) be in the test build directory b) set the only argument to these script to be the source direcory base OR set env var DWTOPSRCDIR to the source directory base. Doing both is not useful, the argument will override the env var. modified: test/CMakeLists.txt modified: test/dwarfdumpLinux.sh modified: test/dwarfdumpMacos.sh modified: test/dwarfdumpPE.sh modified: test/dwarfdumpsetup.sh 2022-04-22: David Anderson commit 5afc4081af707e4f4619c2437944d2983a9d3054 Removed unused jitreader.sh argument modified: CMakeLists.txt Removed unused code that once referenced the second argument. Explained how this is run in a couple lines of comments. modified: jitreaderdiff.sh 2022-04-22: David Anderson commit fd6bb67a2d7b8e0644123ca0c0463cd664f37f12 In case of error, useful info was left out due to a line being in the wrong place. Fixed. modified: dwarfdumpPE.sh 2022-04-22: David Anderson commit 7f9f252c83f199db80214217dc29c80f0e8e765f In case it fails early report more output in the log. modified: jitreaderdiff.sh 2022-04-22: David Anderson commit 2c2c680bf416730a8bcdf2911ac21444076f0489 Merge: bbd879a4 8cd841d8 Merge branch 'master' of https://github.com/davea42/libdwarf-code meson etc. 2022-04-22: David Anderson commit bbd879a4f341ecb23dabbac16d9cb040e9385b10 Removed comments mentioning DWTOPSRCDIR, the comment is now useless. DWTOPSRCDIR not used. modified: buildopscounttab.c 2022-04-22: David Anderson commit 8cd841d835a6cd94f3d5d8ce76db5400cb295b45 Merge: 94a5cd45 10a87d36 Merge pull request #103 from vtorri/master Add msys2 cmake badge. merging. 2022-04-22: David Anderson commit 94a5cd457b21d1f13906a269a52811845bb7de23 Removed HAVE_WIN32, we do not use that. Removed check for regex.h as we use our own regex, not a system regex. modified: configure.ac 2022-04-22: Vincent Torri commit 10a87d36f28906887b5a72c1c8af4f0a91679a7d Add msys2 cmake badge reorder badges by OS modified: README.md 2022-04-22: David Anderson commit 715a3ea663fd3c20ed18d1c23b325472bd26ec4b Merge: 9cbb1cd2 0fb7534b Merge branch 'master' of https://github.com/davea42/libdwarf-code Merging workflow update 2022-04-22: David Anderson commit 0fb7534b49fc37b89a9d69a96c77515416553f22 Merge: 195abb91 cd61226a Merge pull request #102 from vtorri/vtorri_ci_cmake CI: add msys2 cmake workflow 2022-04-22: David Anderson commit 9cbb1cd2b564d5a31153c6b38cb224ccc6ecf398 Correcting the markdown link to the online html. Was not showing as a link, just as text. modified: README modified: README.md 2022-04-22: Vincent Torri commit cd61226ad5ceba0257fe33f6bccdd205684b6705 tests: fix compilation on some of them on Windows 2022-04-22: Vincent Torri commit 39b1f632cb1ecdb49ac94b60ef11f061b50b7b4e link against zlib if available 2022-04-22: Vincent Torri commit b9dd78e8110eb021217512cd8880bddcfc814dfd on Windows, no compilation for libelf 2022-04-22: Vincent Torri commit f94d32a34ce1a249da8c91aafe7d2ca9018dfa5d on Windows, no static lib should be compiled 2022-04-22: Vincent Torri commit 4d2472d84dd69dcff0e3ffc676ddc3925781a89c CI: add msys2 cmake workflow 2022-04-21: David Anderson commit 195abb918699b528492f9d62b4b97cff2754b94f Bringing it up to date with git log latest. modified: ChangeLog 2022-04-21: David Anderson commit 6e7c0b6edd7c2fadc93115b4102dfb67018277dc The dwarfdump new argument mentioned. modified: doc/libdwarf.dox Simplified the handling of version and arguments reporting, making it on-demand and more complete. modified: src/bin/dwarfdump/dd_common.c modified: src/bin/dwarfdump/dd_common.h An internal argument was changed and an option added. These implement that. modified: src/bin/attr_form/attr_form_build.c modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_glflags.c modified: src/bin/dwarfdump/dd_glflags.h modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/tag_tree.c The tests now reflect the simplified version data which simplifies all these shell scripts. modified: test/dwarfdumpLinux.sh modified: test/dwarfdumpMacos.sh modified: test/dwarfdumpPE.sh modified: test/dwarfdumpsetup.sh 2022-04-21: David Anderson commit 0c42286d00949e13efd2acd88aa573042462cde7 Version is now 0.4.1 and we rebuilt various tables (make rebuild). modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c modified: src/lib/libdwarf/libdwarf.h 2022-04-21: David Anderson commit a54b5ae29ff26e367c442e86c6cb62b5fd0fcbfd Corrected badges. modified: README modified: README.md 2022-04-20: David Anderson commit 53801ddc8ba16661a373aa69d9ae2b324c0037c3 Now the workflows and travis CI setup correctly with tbe improved names. modified: README modified: README.md 2022-04-19: David Anderson commit 34c49734e5246d8f5dae0a05b49d2cdb0bb0da9f Renaming workflows for consistency. modified: README modified: README.md 2022-04-19: David Anderson commit cc03ab56be4a75e12aa319d70ab7fa301f1daa05 modified: ci_linux_autotools.yml renamed: ci_msys2.yml -> ci_msys2_meson.yml modified: ../../README.md 2022-04-19: David Anderson commit 8c896f50a5a496e2c7a2a6af1776c58564e3edb4 Renaming for consistency renamed: ci_meson.yml -> ci_linux_meson.yml 2022-04-19: David Anderson commit c4bd8fd5815492e744f1143db8eed8a5b6231c12 workflows/ This is the old name. Not current. deleted: cmake2.yml 2022-04-19: David Anderson commit 722b978dc57855992042ff403c7c252f95d5e569 Badges now working ok. modified: README modified: README.md 2022-04-17: David Anderson commit c634c42cd74cdcb88a3a9824137b6661202c32e6 Added MacOS build modified: README modified: README.md 2022-04-17: David Anderson commit b971f06a46b200ebd85d55dfca01e762dcd1294f Merge: eaaa747e 80d78092 Merge branch 'master' of https://github.com/davea42/libdwarf-code New action, picking up. 2022-04-17: David Anderson commit eaaa747ed536e47fe559eb4d261ded419fee3e7e Now with macos badge, though github has not finished rebuilding its index so it shows 'no status' modified: README modified: README.md Comment changed (on one line). modified: configure.ac 2022-04-17: David Anderson commit 80d780926928927ac4fa1830d394766da39d53ac Merge: 907b04b6 6b8fcee7 Merge pull request #97 from davea42/davea42-patch-1 Create ci_macos_autotools.yml 2022-04-17: David Anderson commit 6b8fcee752701f522755c109006003a0a73c4285 Update ci_macos_autotools.yml 2022-04-17: David Anderson commit ce2656ff00b90363643d4065017cae7a97f05247 Update ci_macos_autotools.yml removed useless lines. 2022-04-17: David Anderson commit 5b8da558de50925ba3d87a2e7c882a77de94e221 Create ci_macos_autotools.yml 2022-04-15: David Anderson commit 907b04b64fec6e8c44e4568fa237f4699a856f06 Adding a note about 'no status' modified: README modified: README.md 2022-04-15: David Anderson commit 57fc6de6af2f887b64356e58417de97e98090d50 Now a link to access the on-line html documentation. modified: README modified: README.md Regenerated, but not anything new. modified: doc/libdwarf.pdf 2022-04-15: David Anderson commit 2515f81184af677a07548fd0f2ed3cc891a981fc Fixed small typographical errors, slightly clarifies some points, and removes a small duplicate paragraph. Date set to 15 April 2022 modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf 2022-04-15: David Anderson commit da931ad30da9d9db7ab56b2a3b09c6584cc82dbb Now references an on-line html version of the libdwarf documentation. modified: README modified: README.md 2022-04-15: David Anderson commit c615da8d70386d516b385ea5b6f2b403cf49c586 Refined the look. Some badges are in trouble, unclear why (at this time). modified: README modified: README.md 2022-04-15: David Anderson commit 8166ff2c7245edcb23635e80db61472ce5db04c8 renamed: c-cpp.yml -> ci_linux_autotools.yml 2022-04-14: David Anderson commit a895356448c7c31647f8acffafa63567c85a175d Merge: 5b6906df e0e1237e Merge pull request #92 from davea42/davea42-patch-1 Create ci_linux_cmake.yml 2022-04-14: David Anderson commit e0e1237e4db05d908506e3c6301a44caaeb78dc0 Create ci_linux_cmake.yml Runs cmake on Ubuntu 2022-04-14: David Anderson commit 5b6906df26e914de525c0622aa558ea4f4c1bc77 Adding workflow_dispatch: for testing modified: c-cpp.yml 2022-04-14: David Anderson commit 9b93e4d50f52ec37d60ee67503e2148561b186a0 allow manual workflow despatch agaiin. modified: cmake2.yml 2022-04-12: David Anderson commit a1ef351230da45761b5f467ca0adced92caf2ddc Removed manual run of github action. modified: .github/workflows/cmake2.yml 2022-04-11: David Anderson commit 6993512b8c1ebb1a52b91def4557d67eba79cfa4 Revised cmake command modified: cmake2.yml 2022-04-11: David Anderson commit 52a6b7ac900964584d37ae59e088c4bca3ebf0f2 So we run the cmake tests and build examples modified: .github/workflows/cmake2.yml 2022-04-11: David Anderson commit 5df0d7743a2961d0044b88a22ff373fafd6ebcfe Added workflow_dispatch: modified: cmake2.yml 2022-04-11: David Anderson commit 6559f8aa7020294f229a54d9f4548a9ea5c8aa0e Added cmake build status (workflow) modified: README modified: README.md 2022-04-11: David Anderson commit cd36480c6823d3c0d38e5de8cb3ae03e1705269f Create cmake2.yml 2022-04-11: David Anderson commit 581f010e85caa474cc057f08b71051e883629c4b Going to try again. deleted: .github/workflows/cmake.yml 2022-04-11: David Anderson commit ba69b87c00e04875a60bc17ddb14354fc3b57c04 cmake CI 2022-04-11: David Anderson commit 9576e7dbfbb28a09bef3dcf8b5a1d431c5eb202d Create cmake.yml Basic cmake use. 2022-04-10: David Anderson commit cd31e8673ad444c01f371146663e2ad59421abda Tiny tweaks to the wording and formatting (avoiding some run-on sentences). modified: README modified: README.md 2022-04-10: David Anderson commit 7606d343de02b5220e213d8c5dc15ff096463593 Regenerated to pick up two word spellings correctd in libdwarf.h doxygen comments. modified: doc/libdwarf.pdf 2022-04-10: David Anderson commit 3226a600b9d3cb81255694bcff582171d060bdc0 There is no change in logic here. Corrected indents and removed trailing whitespace. Removed a couple if #if 0 #endif blocks where were leftovers, useless. modified: src/lib/libdwarf/dwarf_debugnames.c Removed trailing whitespace modified: src/lib/libdwarf/dwarf_debugnames.h 2022-04-10: David Anderson commit 98cda425a07f95050476879509def543e96c93ae Shortened a couple of link id strings (these identifiers are for doxygen, not seen in doxygen output). modified: doc/libdwarf.dox And in addtion to using the new link identifier fixed a couple of words in doxygen comments that were misspelled. modified: src/lib/libdwarf/libdwarf.h 2022-04-07: David Anderson commit e58053b842822bc1a23eefbfd151bee3dcdfac31 Updated with latest tiny changes to doc and internals. modified: ChangeLog 2022-04-07: David Anderson commit 318cb65159534b78905f4425b5dddc2d776b338d Updated the date to today. modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf Corrected typos in doxygen comments. modified: src/lib/libdwarf/libdwarf.h 2022-04-07: David Anderson commit 40712108a19262aecbf920aaaff5497f9106354c Removed 4 lines of dead code noticed by CoverityScan. modified: src/bin/dwarfdump/print_debug_names.c 2022-04-06: David Anderson commit 3e75142a5d8938466e00a942c41a04f69510915d Refining the formatting of the printf output. modified: src/bin/dwarfdump/print_debug_names.c modified: src/lib/libdwarf/dwarf_debugnames.c A comment noting that specialized access functions are missing, but full access to the section is provided. modified: src/lib/libdwarf/libdwarf.h 2022-04-06: David Anderson commit 0965889ac137fae87255b7440854be1a90f02436 Noting that old versions of meson don't work with libdwarf. modified: README modified: README.md 2022-04-06: David Anderson commit 2922a020b7aa3014c3a72a85f4e7d90a529db5f4 The start of a .debug_names example. Incomplete. modified: doc/checkexamples.c Now with current date as libdwarf.h doxygen has .debug_names access functions. modified: doc/libdwarf.dox 2022-04-05: David Anderson commit e8f7ce231679bb632761731ff4fdeff14813d6df Now working properly and with doxygen. modified: src/bin/dwarfdump/print_debug_names.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_debugnames.h modified: src/lib/libdwarf/libdwarf.h 2022-04-05: David Anderson commit 0f9e5e29a0be4e2e7e67384298c7278818a43cd1 We can now print the .debug_pubnames details. Formatting will surely change somewhat. modified: src/bin/dwarfdump/print_debug_names.c Now we read all the fields in .debug_pubnames. For tailored access some additional functions may be desirable. modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_debugnames.h 2022-04-05: David Anderson commit fd4ddb637cfd30eb0d83e673387073499beff248 Uses DWARF_HALF_SIZE instead of the constant 2 for clarity of intent. modified: src/lib/libdwarf/dwarf_form.c 2022-04-04: David Anderson commit 990a9ef4e03e3a1e4ccb10b76d19a11a7de10e0b We can now read and print all the data in .debug_names. Some functions aimed at easier use for some specific purposes will surely be needed soon. The new functions for .debug_names not yet documented. modified: src/lib/libdwarf/dwarf_debugnames.c Some of the formatting will surely need some changes, for best readability. modified: src/bin/dwarfdump/print_debug_names.c 2022-04-04: David Anderson commit 770138eb6290cbc5049854c7c20322bfcd0e516f Fix indents and trailing whitespace. modified: src/lib/libdwarf/dwarf_line.c 2022-04-02: David Anderson commit 2b92f489fe6adcc601b0c9cd6232c8e0595c52a7 DO NOT USE THIS COMMIT: progress toward .debug_names, but not yet working. modified: src/bin/dwarfdump/print_debug_names.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/libdwarf.h 2022-04-01: David Anderson commit e16b3ae1e6f7f0c5c2fa58f5e594d95fc9ca826e Now prints more of .debug_names content. modified: src/bin/dwarfdump/print_debug_names.c 2022-04-01: David Anderson commit aa2ac7df24b84aed427b69aee36d39df5559379b Removed a bit of capitalization, updated date. modified: doc/libdwarf.dox 2022-04-01: David Anderson commit 3553916447e27ce835c73c5dbc29b5f395267012 Updated per recent changes. modified: ChangeLog 2022-04-01: David Anderson commit bf5ef885b48d54371f33194f363821b9b3c0c424 Updated date. modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf Fixed typo in doxygen comment. Versions supported are 2,3,4,5 (3 was left out in one place). modified: src/lib/libdwarf/libdwarf.h 2022-03-30: David Anderson commit 2f8cef7397727e2ab54fb2a36486a7faae3e4410 Removed a couple of obsolete lines. modified: README.cmake Added a comment line to motivate the check for sys/stat.h modified: meson.build The leading ifdef nest now has a tiny bit of indentation so it is easier to understand. modified: src/lib/libdwarf/libdwarf.h 2022-03-30: David Anderson commit 5ca9322094b76f52d0fe084cd56a5ef392f402f5 Updating the date here to today. modified: README modified: README.md 2022-03-29: David Anderson commit 78e155c5c77fc8559833ff69ae34ad9112c0f833 Bringing up to date modified: ChangeLog 2022-03-29: David Anderson commit 88c12410f68668b56c41921bab5cd8dc7a0674ec Mentioning requirements now. modified: README modified: README.md 2022-03-29: David Anderson commit 8fb921a4a3314b6a6b87dcb6b1e7e03d6d20fdc9 Ensure that meson.build and meson_options.txt get put into distributions. modified: Makefile.am modified: doc/Makefile.am modified: src/bin/attr_form/Makefile.am modified: src/bin/buildopstab/Makefile.am modified: src/bin/builduritable/Makefile.am modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfexample/Makefile.am modified: src/bin/dwarfgen/Makefile.am modified: src/bin/gennames/Makefile.am modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_tree/Makefile.am modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarfp/Makefile.am modified: test/Makefile.am 2022-03-29: David Anderson commit d02f1521e3bdf81447f3cc4948582b5aa2eaf08e Freebsd clang requires that %p printf actual argment(s) cast char* or other pointers to void* to avoid a warning/error. Sensible to do for all compilers. modified: test/getopttest.c 2022-03-29: David Anderson commit 7cbda41e827e349b12caab8d50aaf5ab0b6aecaa Removed invalid -Dtest=on and added install command from the meson building test. modified: scripts/buildandreleasetest.sh 2022-03-29: David Anderson commit 4b2588c84bfa12dfcbbaec224617880d16e1cd85 Now references 0.4.0 in examples modified: README.md Added sys/stat.h to header checks so building dwarfgen is possible. modified: meson.build 2022-03-29: David Anderson commit eead5dcbc14d717aeb7c1be37dacc2a3307585e9 Modified a comment. modified: src/bin/dwarfgen/dwarfgen.cc These now ensure private fields are referenceable to ensure we get no error/warnings from compilers checking for inaccessible fields. modified: src/bin/dwarfgen/irepdie.h modified: src/bin/dwarfgen/irepframe.h modified: src/bin/dwarfgen/irepline.h modified: src/bin/dwarfgen/irepmacro.h 2022-03-28: David Anderson commit 9995267e2a9728e961581827b4852d42e05aede0 Now properly handles the .debug_names header augmentation string. modified: src/lib/libdwarf/dwarf_debugnames.c Now some error strings that were identical are sligtly different so one can tell exactly where the error occured. modified: src/lib/libdwarf/dwarf_util.h 2022-03-25: David Anderson commit 7b29e7fd954ab3a69cbd132f841467c9a6e8e3f5 Updated to mention github Issue #90 modified: ChangeLog 2022-03-25: David Anderson commit 8c76113079db823e0517122628c2f0f993a418ca Now with the dwarf_line.c fix for Heap buffer overflow when parsing ELF files #90 in ChangeLog. modified: ChangeLog Regenerated pdf modified: doc/libdwarf.pdf 2022-03-25: David Anderson commit 3a080e2172a618260e2e68ac0b9b470ba09a82af - @date 2022-03-19 v0.4.0 + @date 2022-03-23 v0.4.0 so the corrections can be differentiated from the 03-19 version. modified: doc/libdwarf.dox 2022-03-25: David Anderson commit 8c05e9f66b7ef6ddfe6c79d5c280a7e3b89efd28 In case an include directory index is out of range, now emits a text beginning with /ERROR< so such is easy to locate and suppresses adding DW_AT_comp_dir to the expanded name. See github issue Heap buffer overflow when parsing ELF files #90 See regressiontests/moqigod/buffer-overflow-example-2022 for the fuzzed object containing the error. modified: src/lib/libdwarf/dwarf_line.c 2022-03-23: David Anderson commit 161e7f2da5a7a94c34ccf815344f834d3e9b63c6 Up to date with git changes. modified: ChangeLog 2022-03-23: David Anderson commit 5343316a89928a1bee491f069bd3a80a4efca685 Fixing issues Coverity Scan found. Leak in 'impossible' circumstances and one was dead code. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfgen/createirepformfrombinary.cc 2022-03-23: David Anderson commit 6b07b04ba4f7ff71d5502aa73cb2d6793fe250d0 Fixed indents of a group of doxygen comments. modified: src/lib/libdwarf/libdwarf.h 2022-03-23: David Anderson commit 98c332b5b8d934cfeba9042adcdf267bd0fca9c1 Updated with latest changes. modified: ChangeLog 2022-03-23: David Anderson commit e3012302ca3d7c9918c0e7efa320e7e043d89a1b Fix trailing whitespace. Fix indents. modified: src/bin/dwarfdump/print_debug_names.c 2022-03-23: David Anderson commit 1ad7978552817d2450d2cc9a260f012145b99163 Remove trailing whitespace. Fix indent errors. Fix style errors like if( and for( modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_stringsection.c 2022-03-23: David Anderson commit 1de2a7cff5a84ba8452df86b58f30eb22f3e21fb Removed trailing whitespace. modified: dwarf_debugnames.h modified: libdwarf.h 2022-03-23: David Anderson commit 751355259ffc19e145be68be66e0270898520345 CoverityScan noticed memory leaks of Dwarf_Error in case of extremely unusual DW_DLV_ERROR cases. Wny these were only noticed now...surprising...these are old mistakes. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfgen/createirepformfrombinary.cc 2022-03-20: David Anderson commit 664598681c7812d78edc8bc540fb848b252bebda Updated with latest in git log. modified: ChangeLog 2022-03-20: David Anderson commit 3cc3cc3b8cfa9602e44efd111bb944cfa5ef76e0 Now Dwarf_Debug_s has an initial field of a number, which is set to a hex value as the Dwarf_Debug is being constructed. On deallocation the value is reset to zero. In addition, random Dwarf_Debug pointers are checked to ensure the special value is present, and if not present an error is thrown. modified: src/lib/libdwarf/dwarf_abbrev.c modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_stringsection.c modified: src/lib/libdwarf/dwarf_util.h 2022-03-20: David Anderson commit c6f8fb36e665b6bda1496d24eb253cb68a1624bd Latest version. modified: doc/libdwarf.pdf 2022-03-19: David Anderson commit 3c05b3a5f2397acff1bda4f1f952af31134898e2 Fixing doxygen comments. modified: libdwarf.h 2022-03-19: David Anderson commit f4687afedc5389f71b88ce0e8e3427cc8260333b Updated date modified: doc/libdwarf.dox Now all the @brief doxygen commands begin with a capital letter (for consistency) except for the few where the actual function name is the sole content (dwarf_get_FORM_name() etc) modified: src/lib/libdwarf/libdwarf.h 2022-03-18: David Anderson commit ecc3c6446e2965daaa5eeff6dc4315fbea526a77 Updated with latest modified: ChangeLog 2022-03-18: David Anderson commit aa13c9cc626392ab48af68d3ea5ebfb2e53adc6b Fix a memory leak in the new code. modified: src/lib/libdwarf/dwarf_debugnames.c Correct doxygen comments. modified: src/lib/libdwarf/libdwarf.h A slight alteration of the 'generate a fake .debug_names' code here, but it is not sufficient. We have correct compiler-generated debug_names on hand now so this fake is no longer needed. modified: src/lib/libdwarfp/dwarf_pro_dnames.c 2022-03-18: David Anderson commit df751d240966531f1db04e51752dbc3ec4504505 Brought up to date with gitlog modified: ChangeLog Changed date to today. modified: doc/libdwarf.dox Regenerated today. modified: doc/libdwarf.pdf 2022-03-18: David Anderson commit 34672538aa862c6067998486b17f2968dfb6cf56 Merge: 732cd872 a755934e Merge branch 'dnames' Bringing .debug_names access and printing to a somewhat useful state. 2022-03-18: David Anderson commit a755934ec18cca07f41c800a544179a7ff36522c Adding defgroup title words to a few where it was omitted modified: doc/checkexamples.c Adding to the debug_names 0.4.0 changes modified: doc/libdwarf.dox Correcting doxy for the dnames changes. modified: src/lib/libdwarf/libdwarf.h 2022-03-16: David Anderson commit 732cd8725375bdd9f04eab946e782b696308fb97 Merge: 29602bba 70eefe93 Merge pull request #88 from vtorri/vtorri_selftest Rename SELFTEST with TESTING. Also fix compilation of tests with the 2022-03-15: Vincent Torri commit 70eefe938666f00fe4934ef015c2bd6911ecb534 Rename SELFTEST with TESTING. Also fix compilation of tests with the autotools on Windows modified: src/bin/dwarfdump/dd_esb.c modified: src/bin/dwarfdump/dd_macrocheck.c modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/meson.build 2022-03-14: David Anderson commit 29602bba225bfc204e6e0b4d0d5ce024f6ff24df Merge: 941297f6 1fbfe0aa Merge pull request #87 from vtorri/vtorri_test_macrocheck meson test: add macrocheck test 2022-03-13: David Anderson commit dad2e036ec793e64c149a9905def9da15efe913f Now prints more of .debug_names content. modified: src/bin/dwarfdump/print_debug_names.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_debugnames.h Fixed debug names interfaces and renamed attr_array to idxattr_array to emphasize these are index-attributes, not attributes. modified: src/lib/libdwarf/libdwarf.h 2022-03-13: Vincent Torri commit 1fbfe0aa64b529809d21c0e437757088576354da launch test in meson CI 2022-03-13: Vincent Torri commit e5059232d720cad0ed337a6513979e1dd783276a fix autotools macrocheck test 2022-03-13: Vincent Torri commit aeea0d27613f9d879afa61f110df93ce099bc479 meson test: add macrocheck test new file: test/test_macrocheck.c modified: src/bin/dwarfdump/dd_macrocheck.c modified: test/meson.build 2022-03-12: David Anderson commit 7ce0d16e8473ea12b15bbf4c5c2724c8b37d6935 DO NOT USE THIS COMMIT. Code is present for nearly the entire section, but bugs exist. modified: src/bin/dwarfdump/print_debug_names.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/libdwarf.h 2022-03-12: David Anderson commit e629f12d3bf52395e08f2ccf8e18ce87572aced2 DO NOT USE THIS COMMIT. A work in progress. Most of the reader implemented and compiles. modified: src/bin/dwarfdump/print_debug_names.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_debugnames.h modified: src/lib/libdwarf/libdwarf.h 2022-03-12: David Anderson commit 941297f6e2ef3e09cce8f5fe07fbbe3c1ce144d9 Merge: 6b2d283c 690ac582 Merge branch 'master' of https://github.com/davea42/libdwarf-code Adding to README.md and modifying workflow c-cpp.yml. 2022-03-12: David Anderson commit 690ac582e6899fb64013d29ff3a85b4b0fd41c0e Merge: 6e2ee048 5d25f579 Merge pull request #86 from vtorri/vtorri_badge Add msys2 CI badge in README.md 2022-03-12: Vincent Torri commit 5d25f579a2d808d00ab913856da7cc1f3c0b587d Add msys2 CI badge in README.md modified: .github/workflows/c-cpp.yml modified: README.md 2022-03-11: David Anderson commit 6b2d283ccaf162c8dfe2c2588beda4576f442947 Merge: 789cecbe 6e2ee048 Merge branch 'master' of https://github.com/davea42/libdwarf-code A new workflows yml. 2022-03-11: David Anderson commit 6e2ee04895932aaa462ab8a4e6a022d1595f4cb1 Merge: 97436475 5a112e80 Merge pull request #85 from vtorri/master Add msys2 CI 2022-03-11: Vincent Torri commit 5a112e8098531cffb039a5ff2e50ca1241faca14 Add msys2 CI new file: .github/workflows/ci_msys2.yml 2022-03-10: David Anderson commit 789cecbe636c62c28c5e0ecfb75e5284cbf71e4d DO NOT USE THIS COMMIT. It adds new debug_names output, but is quite incomplete and...maybe ugly so far. modified: src/bin/dwarfdump/print_debug_names.c modified: src/lib/libdwarf/dwarf_debugnames.c 2022-03-10: David Anderson commit 0985e103e0dc409437cc12b5581a3b58f59bb772 Correcting some doxygen comments on reading .debug_names functions. modified: src/lib/libdwarf/libdwarf.h 2022-03-10: David Anderson commit 99aa290646facdd2ad77fc69590c83f4ea593d00 Small fixes to formatting in the introduction and in the list of changes. modified: doc/libdwarf.dox 2022-03-09: David Anderson commit 97436475c0a9dd688f094111b56b09af24972e9c Brings ChangeLog up to date with git log modified: ChangeLog 2022-03-09: David Anderson commit 4180ee7a05973e9e9bfc46dad95e906e57100ee2 Merge: 005f218f 02763e21 Merge pull request #84 from vtorri/master Add meson support for examples 2022-03-09: Vincent Torri commit 02763e2175b027c0e087de8cb4ad269096758762 fix build on linux modified: src/bin/dwarfexample/showsectiongroups.c modified: src/bin/dwarfexample/simplereader.c 2022-03-09: Vincent Torri commit ccf167a9d9501057252a2f11403e4896dc0f9210 Add meson support for examples new file: src/bin/dwarfexample/meson.build modified: .github/workflows/ci_meson.yml modified: meson.build modified: meson_options.txt modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/jitreader.c modified: src/bin/dwarfexample/showsectiongroups.c modified: src/bin/dwarfexample/simplereader.c 2022-03-06: David Anderson commit 005f218f2831b9db965e9216a3076adcd039020a Improved the completness of .debug_names section handling. There is more to do! Not done yet. modified: src/bin/dwarfdump/print_debug_names.c modified: src/lib/libdwarf/dwarf_debugnames.c 2022-03-04: David Anderson commit e58783f80e2ef156a077dfbfddd30c2e76ecb06b Moved reading a bucket array to _dwarf_initialize_bucket_details() while remembering details, making dwarf_dnames_bucket() much simpler. modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_debugnames.h 2022-03-04: David Anderson commit 8c6ead8ee86fe63e3ef19429af7514eafa664fa1 Now prints debug_names 'buckets'. modified: src/bin/dwarfdump/print_debug_names.c modified: src/lib/libdwarf/dwarf_debugnames.c 2022-03-04: David Anderson commit 2f2033ddc346463f102ba8be439032fea13bb4f0 Updated with latest from git log modified: ChangeLog 2022-03-04: David Anderson commit f78b8580cb49573c1a2ca69d623cf00b7b141b23 Revert dwarf_get_location_op_value_d() to dwarf_get_location_op_value_c() as the older version does all that is useful. The three arguments missing from dwarf_get_location_op_value_c() turned out to be useless. The newer (and now removed) dwarf_get_location_op_value_d() was added 2020-06-09. Documenting the change. modified: doc/checkexamples.c modified: doc/libdwarf.dox Implementing the change. modified: src/bin/dwarfdump/print_die.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loc.h modified: src/lib/libdwarf/dwarf_locationop_read.c modified: src/lib/libdwarf/libdwarf.h 2022-03-04: David Anderson commit 29d7fdf0d5620daab5700fdc5a6e9bf08c90bab6 Made the return value comments on dwarf_hasattr() more detailed and specific. modified: src/lib/libdwarf/libdwarf.h 2022-03-04: David Anderson commit ae8b32cde96cd545a256665cae9939f017911c63 dwarf_xu_header_free() renamed to dwarf_dealloc_xu_header(). dwarf_gdbindex_free() renamed to dwarf_dealloc_gdbindex(). dwarf_loc_head_c_dealloc renamed to dwarf_dealloc_loc_head_c(). For consistency with all the other dealloc functions. modified: doc/checkexamples.c modified: doc/libdwarf.dox modified: src/bin/dwarfdump/print_debugfission.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_xu_index.c modified: src/lib/libdwarf/libdwarf.h 2022-03-04: David Anderson commit b2e1497670c89bb7d77c82f92e832b65ab5ad766 Regenerate with version 0.4.0 modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c Update the dwarf_return_empty_pubnames() calls, now omitting the unused Dwarf_Error argument. modified: src/bin/dwarfdump/print_pubnames.c modified: src/bin/dwarfdump/print_static_funcs.c modified: src/bin/dwarfdump/print_static_vars.c modified: src/bin/dwarfdump/print_types.c modified: src/bin/dwarfdump/print_weaknames.c modified: src/lib/libdwarf/dwarf_global.c 2022-03-04: David Anderson commit 5ae8e00a468923a370bdcb3e1532b02c5d17e0e4 Now version 0.4.0 as we change a small number of API items. modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build Change version and also remove unused third (Dwarf_Error) argument from dwarf_return_empty_pubnames() modified: src/lib/libdwarf/libdwarf.h 2022-03-02: David Anderson commit d4f01e3ad8314633940714ef7b6cb0038991f4d6 Now each has version based on 0.3.5 , updated from 0.3.4. modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h Now this updates libdwarf.dox too. modified: tools/updatesemanticversion.py 2022-03-02: David Anderson commit 304e13b0c213e4766a9c866835078e86a0982f14 Now with final changes listed (nothing important) for the 0.3.4 release) modified: ChangeLog 2022-03-02: David Anderson commit fe1de8bed00c492a4e6294c04d0b266c7e5725f3 Two changes for cmake builds of libdwarf on Windows. Issues #82 and #83 on github. One ensures -DLIBDWARF_BUILD is passed to the compiler and one ensures we use DW_FZLIB to add zlib to the list of things to link in (when it exists). modified: src/lib/libdwarf/CMakeLists.txt 2022-02-23: David Anderson commit 8c56a98e99ae367e57b02a5d7f7dab01add878e9 Now says For Release on date line. modified: ../libdwarf.dox Regenerated modified: ../libdwarf.pdf 2022-02-22: David Anderson commit 5a033c458d1aae3539aa37825dabc6a650f493e6 Updated with today's initializer fix. modified: ChangeLog 2022-02-22: David Anderson commit ffecad750da5ebb572680f4b3155bddaac538369 A compiler warned of two local variables with no initializer and with -enable-werror the warnings broke the build. modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_die.c 2022-02-22: David Anderson commit 961a276fab7a8409c0b375055f36c843d6b1f25e To match recent commits modified: ChangeLog 2022-02-22: David Anderson commit 10c455b9a94a7da5ca22df8e7b8ed59ddd5d4506 In a comment remove a -lelf as that is irrelevant now (for this code). modified: simplecrc.c 2022-02-22: David Anderson commit ba03f108e88a7b53014ed1f78a7667039224bb4b Merge: 944bae54 cc08ad1e Merge pull request #80 from vtorri/vtorri_dumpbytes remove dump_bytes() from simplecrc.c and dwarf_object_detector.c 2022-02-22: Vincent Torri commit cc08ad1e5b6b6b00657a48545633efac0d1b0906 remove dump_bytes() from simplecrc.c and dwarf_object_detector.c modified: src/bin/dwarfexample/simplecrc.c modified: src/lib/libdwarf/dwarf_object_detector.c 2022-02-20: David Anderson commit 944bae54e3c123e72457528721258334a1b0e723 Brought this up to date with git log modified: ChangeLog 2022-02-20: David Anderson commit dd967d4e2c700b3f5bdefb8a515e587a66412661 This fixes a coverity scan warning. Removing argv and argc from declaration of main. int main(void) is specifically valid by the C90 standard section 5.1.2.2.1 modified: src/bin/builduritable/uritablebuild.c 2022-02-20: David Anderson commit 2a5f5f80db296999a79e7a4bfe10a914a64c60b8 Now does doxygen before building the pdfs. modified: doc/Makefile.am Removed some test wording. Now ready for release. modified: doc/libdwarf.dox regenerated modified: doc/libdwarf.pdf 2022-02-20: David Anderson commit a1fa90b53277cc5d68d3ac72edd99d8dd758b9c1 Now meson build also does 'ninja test' modified: scripts/buildandreleasetest.sh 2022-02-20: David Anderson commit c032334997410674486504a7f08da1c1620f433a Added words about meson build modified: README modified: README.md 2022-02-20: David Anderson commit 8e534a95aa4dce4d6a55f70f4721fe7f9263071e Merge: 2b31510d 7f427f44 Merge pull request #79 from vtorri/vtorri_ci_meson add continuous integration for meson 2022-02-20: Vincent Torri commit 7f427f445afcc73dab4df1da2f8494d729317d97 add badge for meson ci 2022-02-20: Vincent Torri commit 4ce27aa8efffc4aeb30ef568e136483f56ba1de6 fir ci name 2022-02-20: Vincent Torri commit ee8a159fd00fe8d5ffaff5c822e0e7e764f59a49 fix option value 2022-02-20: Vincent Torri commit 8e1108113cc3fc29117b96bad6a355b85705a8a4 add ci for meson 2022-02-19: David Anderson commit 2b31510d7d7ee448522865da1fd389d61c175842 To match up with test/meson.build modified: test/CMakeLists.txt 2022-02-19: David Anderson commit 7c8c80e7d7c25b531c760736c775dc205f1ab94e Merge: a8c37adb 62a12bb9 Merge pull request #78 from vtorri/vtorri_test_api Fix link of test binaries on Windows 2022-02-19: Vincent Torri commit 62a12bb905a66ad6130a813361441a40423dc0ae Fix link of test binaries on Windows modified: ../test/meson.build 2022-02-19: David Anderson commit a8c37adb12d8b862fc2ccbf87d5e02174241ef39 Not sure this suffices, but at least pointer-to will fit in Dwarf_Unsigned. modified: test/dwarf_tied_test.c 2022-02-19: David Anderson commit d4662df3cf46f3aff1cd90da5fd96a0199767f39 Merge: 7552759f 42d949b4 Merge branch 'master' of https://github.com/davea42/libdwarf-code Removing useless reloc files. 2022-02-19: David Anderson commit 42d949b4a46f07f9d12beb08a8c893c171961de9 Merge: ffb2453f 922b64b8 Merge pull request #76 from vtorri/vtorri_reloc2 Remove useless reloc files 2022-02-19: David Anderson commit 7552759fef90fd04efb7d35b2499e38c424edad2 Due to a small mistake in these scripts make -j8 (or any j greater than 1) would fail with really strange errors. Fixed. modified: dwarfdumpLinux.sh modified: dwarfdumpMacos.sh modified: dwarfdumpPE.sh modified: dwarfdumpsetup.sh 2022-02-19: Vincent Torri commit 922b64b8693498fc0a5cb1c70eabab673e2a87f1 removetest_headersoc.c from Makefile.am too 2022-02-19: Vincent Torri commit 00d03246ab219091d8c89782ec98d0abf269210c Remove useless reloc files deleted: src/lib/libdwarf/dwarf_elf_reloc_386.h deleted: src/lib/libdwarf/dwarf_elf_reloc_aarch64.h deleted: src/lib/libdwarf/dwarf_elf_reloc_arm.h deleted: src/lib/libdwarf/dwarf_elf_reloc_mips.h deleted: src/lib/libdwarf/dwarf_elf_reloc_ppc.h deleted: src/lib/libdwarf/dwarf_elf_reloc_ppc64.h deleted: src/lib/libdwarf/dwarf_elf_reloc_sparc.h deleted: src/lib/libdwarf/dwarf_elf_reloc_x86_64.h deleted: src/lib/libdwarf/dwarf_reloc_386.h deleted: src/lib/libdwarf/dwarf_reloc_arm.h deleted: src/lib/libdwarf/dwarf_reloc_mips.h deleted: src/lib/libdwarf/dwarf_reloc_ppc.h deleted: src/lib/libdwarf/dwarf_reloc_ppc64.h deleted: src/lib/libdwarf/dwarf_reloc_x86_64.h deleted: test/test_headersok.c modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/meson.build 2022-02-19: David Anderson commit 1d9ff1c320880daf79560041e8331760162a3937 Use the short local name for the augmentation_string_size, not the long spelling. Simpler to use the short name consistently instead of mixing the usage. modified: dwarf_debugnames.c 2022-02-19: David Anderson commit ffb2453ff63e9e01c82344f67a522e0176c4b70a Spelling correction modified: doc/libdwarf.dox Added meson build modified: scripts/buildandreleasetest.sh Fixed the NUL byte code, (one line). modified: src/lib/libdwarf/dwarf_debugnames.c Enhanced each test by an (actually superfluous) rm -f. modified: test/dwarfdumpLinux.sh modified: test/dwarfdumpMacos.sh modified: test/dwarfdumpPE.sh 2022-02-18: David Anderson commit e4996685372aa2d1dcf3a8912f06e4766c39d12e Now prints a bit more of the .debug_names section content. modified: src/bin/dwarfdump/print_debug_names.c 2022-02-18: David Anderson commit 6a3ab22a4550927963b42d719a418ebe58a2124a Fixing the tableofcontents command modified: libdwarf.dox Regenerated modified: libdwarf.pdf 2022-02-18: David Anderson commit 78576330a29181572e4b3b8fb0e825c89ac06832 Fixed two warnings. modified: print_debug_names.c 2022-02-18: David Anderson commit c908b27658aa6913cad1a53f16cfadc9236ab062 Fixed unused local var formtu warning. modified: print_debug_names.c 2022-02-17: David Anderson commit 0b9d4d0292def591e2619fc3f6e29becb9fc1c7a Now prints cu/tu table. modified: src/bin/dwarfdump/print_debug_names.c Couple lines of debug inside #if 0 modified: src/lib/libdwarf/dwarf_debugnames.c Fixed a misspelling in a doxygen comment. modified: src/lib/libdwarf/libdwarf.h 2022-02-17: David Anderson commit adb94559b060f37d95ebdec96cc6c74a4303d83b Revised the handling of PE SizeOfRawData and VirtualSize object section fields so it skips processing sections it knows are irrelevant to dwarf. The way VirtualSize is used means it is impossible to write a precise size bound so we added a couple heuristics to prevent corrupted objects from causing crashes. modified: dwarf_peread.c 2022-02-16: David Anderson commit 7b5d7cf0ba6c2118b4d1a51f6ca2b4b8d4195086 Updated with latest git log entries modified: ChangeLog 2022-02-16: David Anderson commit 8c82fb83d9bff92e3222aef0c43db3188215b560 Merge: 4054f253 bbc4aa69 Merge branch 'Snork2-master' Improved error messages modified: pdfbld.sh 2022-02-16: David Anderson commit 4054f253e98a5f3e0e2535bf170e498a94810ed1 Merge: 893ecdb4 f9b9e30e Merge branch 'master' of https://github.com/davea42/libdwarf-code Improving PE size checks 2022-02-16: David Anderson commit f9b9e30e8b395fca84c47a1f3b963fb2041a6772 Merge: b693bf3f c389702a Merge pull request #74 from Snork2/master Replacing Windows PE section size sanity check. 2022-02-16: David Anderson commit bbc4aa69423564f5a5802f7958674e078ecbedaf Merge: 893ecdb4 c389702a Merge branch 'master' of https://github.com/Snork2/libdwarf-code into Snork2-master checking it davea 2022-02-16: David Anderson commit 893ecdb48200c2f8165d5d184dae03800d7517ee Now with latest from git log modified: ChangeLog 2022-02-16: snork2 commit c389702a205e77299a33747655d6f9acec08e962 Replacing Windows PE section size sanity check. Removed in-memory size check, and replaced in with in-file size check. Checking in-memory section size can trigger false positive result with large .bss sections. 2022-02-16: David Anderson commit b693bf3f2826b129cfd41d184744411815f42dd4 File was never distributed, and now is unused. deleted: doc/ChangesToLibdwarf.pdf Now builds libdwarf.pdf from the doxygen data modified: doc/Makefile.am modified: doc/libdwarf.pdf modified: doc/libdwarfp.pdf modified: doc/pdfbld.sh 2022-02-16: David Anderson commit 3538839bb713e483d992f217693d8db44089260b We no longer use libdwarf.mm deleted: doc/libdwarf.mm No longer updates version in libdwarf.mm modified: tools/updatesemanticversion.py 2022-02-15: David Anderson commit c4ace46963d86d3e24d95ac6755563987cd6fb28 Upldate meson modified: README modified: README.md Corrected version modified: meson.build Now correctly updates the version in the meson build. modified: tools/updatesemanticversion.py 2022-02-14: David Anderson commit e76ff528c3927c6a8d7a115a029c694f000e5156 README is identical to README.md modified: README 2022-02-14: David Anderson commit a71d4ccb214ee508a6b9962725ce968ff869cde5 modified: README.md 2022-02-14: David Anderson commit d179cb4b06ff9982f42afb2e436e80bb5508a201 Adding a meson build script (first cut, it will change a bit) modified: README modified: README.md 2022-02-14: David Anderson commit 305cfb2aaa05a48d6a239a30adce4ff452a30854 Small change for doxygen. Not the final word. modified: Makefile.am Tweaked wording a bit. modified: libdwarf.dox regenerated. modified: libdwarf.pdf 2022-02-14: David Anderson commit ecb7db0181ee1d8376cec2a57f510b950c913305 modified: src/lib/libdwarf/dwarf_macro5.c MC_SENTINAL -> MC_SENTINEL Private to this one source file. 2022-02-14: David Anderson commit cfe1198f456fc581cfd442a4ca1db337cc5d35c0 Bringing in January git log, bringing up to date modified: ChangeLog 2022-02-14: David Anderson commit 84d0a968658c3646a542ebec688056e380375378 Mostly making meson build in a random far away directory work properly. CHanged the search for include directories from -I../dwarfdump (etc) to harmless -I'.' and +localinclude = include_directories('../dwarfdump') and - include_directories : config_dir, + include_directories : [config_dir, localinclude], modified: src/bin/attr_form/meson.build modified: src/bin/buildopstab/meson.build modified: src/bin/gennames/meson.build modified: src/bin/tag_attr/meson.build modified: src/bin/tag_tree/meson.build Just added small comment modified: src/lib/libdwarfp/dwarf_pro_log_extra_flag_strings.c Now joins other places and uses "libdwarf.h" in the include stmt. modified: src/lib/libdwarfp/libdwarfp.h modified: test/meson.build Deleted pointless blank line. modified: test/test_linkedtopath.c Now int main(void) as simpler way to have valid main prototype. Deleted if 0 ... endif pair with nothing in it. modified: test/test_regex.c Deleted extra blank lines. modified: test/test_safe_strcpy.c 2022-02-14: David Anderson commit b83bcf6111a2fdade3fcd49f233dcc8a7d055edf Merge: ef5a839d ff79942b Merge pull request #73 from vtorri/master fix tests compilation with meson 2022-02-12: Vincent Torri commit ff79942bfed5a3dfbff75d96c616f2ccb6529754 fix tests compilation with meson modified: test/meson.build modified: test/test_linkedtopath.c modified: test/test_regex.c 2022-02-10: David Anderson commit ef5a839d8d9e258f5a3ba8bf17ad9bbd7956128f Correcteting the example source and adding doxygen comments so it shows up in doxygen output. modified: doc/checkexamples.c Updated date modified: doc/libdwarf.dox Now with all available examples (meaning checkexamples.c code) referenced in doxygen output. modified: src/lib/libdwarf/libdwarf.h 2022-02-10: David Anderson commit 1b225518b5286b90ac7cace55edf887585f7e7d3 Merge: 0a28232a fe5f9f35 Merge branch 'master' of https://github.com/davea42/libdwarf-code Merging meson with added testing. 2022-02-10: David Anderson commit fe5f9f35b9b7f1573472170dfe315e924c099887 Merge: 5ccaf65e 18eff97c Merge pull request #72 from vtorri/master Add initial meson test support 2022-02-10: Vincent Torri commit 18eff97c11ca201f159727f9f21ade2d3f5ddd9b Add initial meson test support new file: test/meson.build modified: meson.build modified: test/dwarf_tied_test.c modified: test/getnametest.c modified: test/getopttest.c modified: test/helpertree_test.c modified: test/makename_test.c modified: test/section_bitmaps_test.c modified: test/test_dwarfstring.c modified: test/test_extra_flag_strings.c modified: test/test_headersok.c modified: test/test_linkedtopath.c modified: test/testesb.c 2022-02-09: David Anderson commit 0a28232a8baab8b965c5ccd0909f33a4c1405bdc Updated date and version number 2022-02-08: David Anderson commit 625220d05cf52bf03b98abc1fdd09772461b48c6 More examples of use, data locations and more. modified: doc/checkexamples.c modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2022-02-08: David Anderson commit 5ccaf65e403a7f220a8471a41e312e2d284089f0 Merge: f3ebe9e5 f92425ea Merge pull request #71 from vtorri/vtorri_doc Add Doxygen support for autotools and meson 2022-02-08: Vincent Torri commit f92425ea51f92fe4112a613844dd8a11059998b3 Add Doxygen support for autotools and meson modified: configure.ac modified: doc/Makefile.am modified: doc/meson.build modified: meson.build modified: meson_options.txt 2022-02-05: David Anderson commit f3ebe9e51d198a5d1eb161d894fa48d6ab6b0f4d Merge: 67ea802c 5be0ddf3 Merge pull request #70 from vtorri/vtorri_man install man pages 2022-02-05: Vincent Torri commit 5be0ddf3770997815aed3961900aec4297ed1f8a install man pages new file: doc/meson.build modified: meson.build 2022-02-04: David Anderson commit 67ea802cdc8e1d448bac4bc8affd569877f01b09 Much improved doc of section groups handling. modified: doc/Doxyfile modified: doc/libdwarf.dox modified: src/bin/dwarfexample/showsectiongroups.c 2022-02-04: David Anderson commit 2fd9d252a60e920451483a1d0ca6f57d35df558b Added words about the new section groups example. dwarfexample/showsectiongroups.c modified: doc/libdwarf.dox A new example making it easy to see section group information in an object file. modified: src/bin/dwarfexample/showsectiongroups.c 2022-02-03: David Anderson commit a61e4036ed64b9686cb73b33510fc5efa9c7da61 Updated date, added version modified: libdwarf.dox 2022-02-03: David Anderson commit ad8d49dcffe8cf217c79eaa5e6413823194d3c8f Mentions src/bin/dwarfexample/showsectiongroups.c modified: doc/libdwarf.dox 2022-02-03: David Anderson commit a9e0ea38e9fcbc69c9472e484905844dcd261e27 Now with section groups documentation. modified: doc/jitaccess.dox modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2022-02-03: David Anderson commit f62b71b0aa3415cd338cb3926ebe25f004cb443f Now lets user choose the target group number. Try showsectiongroups with no arguments. modified: src/bin/dwarfexample/showsectiongroups.c 2022-02-03: David Anderson commit 78cf3249628332b05343d091f54b1c87f1aa15ac Add, in the initial comment, the libdwarf source path. modified: src/bin/dwarfexample/jitreader.c 2022-02-03: David Anderson commit e41e4c2e947c88104c4f63caf04008e1cea15d04 Adding a new example, to show section groups. modified: src/bin/dwarfexample/CMakeLists.txt modified: src/bin/dwarfexample/Makefile.am new file: src/bin/dwarfexample/showsectiongroups.c 2022-02-03: David Anderson commit 131348938d53053a276c42a80630f704e20ab0f5 modified: src/lib/libdwarfp/CMakeLists.txt Somehow dwarf_pro_reloc_stream.c vanished from the source list. Added back in so libdwarfp is complete. 2022-02-03: David Anderson commit c1fb754e6f67755ad546e1e4feacc33d64000ec1 Merge: 97481fc7 7a8dc82f Merge pull request #69 from vtorri/vtorri_libdwarfp reorder and simplify libdwarfp header files 2022-02-03: Vincent Torri commit 7a8dc82f17a2fad20dbbaec07a651ea8008b572e include stdio.h for tests 2022-02-03: Vincent Torri commit 7bcd33f00db6127adbcd057ffc21705c3f3d8ad0 reorder and simplify libdwarfp header files modified: meson.build modified: src/lib/libdwarfp/dwarf_pro_alloc.c modified: src/lib/libdwarfp/dwarf_pro_arange.c modified: src/lib/libdwarfp/dwarf_pro_debug_sup.c modified: src/lib/libdwarfp/dwarf_pro_die.c modified: src/lib/libdwarfp/dwarf_pro_dnames.c modified: src/lib/libdwarfp/dwarf_pro_error.c modified: src/lib/libdwarfp/dwarf_pro_expr.c modified: src/lib/libdwarfp/dwarf_pro_finish.c modified: src/lib/libdwarfp/dwarf_pro_forms.c modified: src/lib/libdwarfp/dwarf_pro_frame.c modified: src/lib/libdwarfp/dwarf_pro_funcs.c modified: src/lib/libdwarfp/dwarf_pro_incl.h modified: src/lib/libdwarfp/dwarf_pro_init.c modified: src/lib/libdwarfp/dwarf_pro_line.c modified: src/lib/libdwarfp/dwarf_pro_log_extra_flag_strings.c modified: src/lib/libdwarfp/dwarf_pro_macinfo.c modified: src/lib/libdwarfp/dwarf_pro_pubnames.c modified: src/lib/libdwarfp/dwarf_pro_reloc.c modified: src/lib/libdwarfp/dwarf_pro_reloc_stream.c modified: src/lib/libdwarfp/dwarf_pro_reloc_symbolic.c modified: src/lib/libdwarfp/dwarf_pro_section.c modified: src/lib/libdwarfp/dwarf_pro_types.c modified: src/lib/libdwarfp/dwarf_pro_vars.c modified: src/lib/libdwarfp/dwarf_pro_weaks.c 2022-02-01: David Anderson commit 97481fc7b01b4065bed4ab1609c7902b7e0db259 New doxygen comments on COMDAT and .dwo section (section groups) modified: doc/libdwarf.dox Possibly...all functions documented in doxygen comments. modified: src/lib/libdwarf/libdwarf.h 2022-01-31: David Anderson commit b0016255666bcec03abcfd9d20312bdaa2d12d6b Bringing up to date with git log modified: ChangeLog 2022-01-31: David Anderson commit fd7bf02c1abd79b61db75496d7f947ae25a0d281 Removed obsolete comments. modified: ../src/lib/libdwarf/dwarf_init_finish.c Adding doxygen comments about getting the real section name. modified: ../src/lib/libdwarf/libdwarf.h 2022-01-31: David Anderson commit 87c1d56b7874b1fa97c29878b6ec1dc495fe2a8b Since de_using_libelf is never set we remove the if and the code applicable to de_using_libelf. modified: src/lib/libdwarf/dwarf_init_finish.c The field de_using_libelf is an obsolete field now. Deleted it. modified: src/lib/libdwarf/dwarf_opaque.h 2022-01-31: David Anderson commit 6fd19c19826c3984e25716d3d9127c9c4bca7104 doxygen documentation of dwarf_get_TAG_name etc. modified: src/lib/libdwarf/libdwarf.h 2022-01-30: David Anderson commit 651388ef33b0e64b1e9a95ce3880afbe50b74cb1 Merge: 3fe530ac 027c5718 Merge pull request #68 from vtorri/vtorri_last_bin Add meson support for the last binaries 2022-01-30: Vincent Torri commit 027c5718a31f298bb047b18ed7817215db55c5e1 Add meson support for the last binaries new file: src/bin/buildopstab/meson.build new file: src/bin/builduritable/meson.build new file: src/bin/gennames/meson.build modified: README.md modified: meson.build modified: src/bin/buildopstab/buildopscounttab.c modified: src/bin/builduritable/uritablebuild.c modified: src/bin/gennames/gennames.c 2022-01-30: David Anderson commit 3fe530ac33702c7ce23e05f87b97e08139f9829a Added dwarfdump.conf to MAINTAINERCLEANFILES as that just makes sense. modified: test/Makefile.am These explicitly copy dwarfdump.conf individually and now, on success they remove it. modified: test/dwarfdumpLinux.sh modified: test/dwarfdumpMacos.sh modified: test/dwarfdumpPE.sh 2022-01-30: David Anderson commit 4b64c1a7bbc602528cd94b7c20a7e8029a3e83f3 A different approach, clean-local: to clean up. modified: test/Makefile.am 2022-01-30: David Anderson commit 7fdceea11756fc147f47339c4bd22c229214ab0a Now cleaning up temp files from the test. modified: test/Makefile.am 2022-01-30: David Anderson commit 51e9d1a26b807d4c3ae16d78065591dd75246c90 A cleanup of dwarfdump.conf leftover after test modified: test/Makefile.am 2022-01-30: David Anderson commit 5c2820332f459962c3ad56486bc5b6092fc3c899 Create c-cpp.yml 2022-01-29: David Anderson commit 24753cb5658c5325d4b31363ac69fe75a65f190f Now the harmless_error functions are explained by doxygen. modified: src/lib/libdwarf/libdwarf.h 2022-01-29: David Anderson commit 1a5ca50f18170f51aa8bf7210b2b14075c148ee4 Doxygen doc of the crc functions debuglink needs. modified: src/lib/libdwarf/libdwarf.h 2022-01-29: David Anderson commit 74cd9167e9242d058d33e009a06965b9bdb68bf8 Correct a comment. modified: src/lib/libdwarf/dwarf_xu_index.c Added doxygen for .debug_tu_index .debug_cu_index. modified: src/lib/libdwarf/libdwarf.h 2022-01-29: David Anderson commit 01ce650766b8846f0f7c691238a41d59ca1dfa75 Updated to reflect latest release. modified: README modified: README.cmake modified: README.md 2022-01-29: David Anderson commit 4c44a4c19e2a7879da1ed6e1eec49c03bca00101 Corrected a variety of spelling errors in comments. modified: src/bin/dwarfdump/ChangeLog2016 modified: src/bin/dwarfdump/dd_sanitized.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfdump/print_llex_codes.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfdump/print_origloclist_codes.c modified: src/bin/dwarfdump/print_static_vars.c 2022-01-29: David Anderson commit 288b3d567e584d8860b335fe12a04120f3e07fea Correct a spelling error in a comment: initalized -> initialized modified: src/lib/libdwarf/dwarf_crc32.c modified: src/lib/libdwarf/dwarf_tsearchhash.c 2022-01-29: David Anderson commit 9ecea55c15ede6264be5eef0413f2881d5cfaae4 Correct spelling errors in comments. modified: src/lib/libdwarf/dwarf_frame.h modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_line.h modified: src/lib/libdwarf/dwarf_ranges.c modified: src/lib/libdwarf/libdwarf_private.h 2022-01-29: David Anderson commit 35dd6258ddf969c86ccdbb5dbdf863484317ea84 Correcting spelling errors in comments. modified: libdwarf.h 2022-01-29: David Anderson commit 029a317dde807cef290aba0048ff572bb556baa2 Corrected a spelling error, now Heterogeneous. modified: dwarf.h 2022-01-29: David Anderson commit deb80914e4648a2ba829d32ba3c419a9ac5e2e1f Corrected three spelling errors. modified: jitaccess.dox modified: libdwarf.dox 2022-01-29: David Anderson commit 96f45a8b5ab09d7596b1363b79ecf45b2062427f Update with latest entries from git log. modified: ChangeLog 2022-01-29: David Anderson commit 1c45ce768634c6135a01de9b37f15edbeec1438d Fix trailing whitespace and some too-long lines. modified: src/lib/libdwarf/dwarf.h modified: src/lib/libdwarf/libdwarf.h 2022-01-29: David Anderson commit 6edc9c60b16f0bb23dd9ac14df0401dfb2d97dff Eliminate trailing white space blank line at end and fix indents. modified: src/bin/buildopstab/buildopscounttab.c modified: src/bin/dwarfdump/dd_canonical_append.c modified: src/bin/dwarfdump/dd_canonical_append.h modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_compiler_info.c modified: src/bin/dwarfdump/dd_dwconf.c modified: src/bin/dwarfdump/dd_opscounttab.h modified: src/bin/dwarfdump/dd_safe_strcpy.c modified: src/bin/dwarfdump/dd_safe_strcpy.h modified: src/bin/dwarfdump/dd_tsearchbal.h modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/gennames/gennames.c 2022-01-29: David Anderson commit 9293a336e1197cb89a33748f2b96bd81e8421f2a Version now 0.3.4 modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2022-01-29: David Anderson commit 6ae38e5f8477aa08ca967688ba8d081708d7c55e Corrected two misspelled words in printf output. modified: src/bin/buildopstab/buildopscounttab.c 2022-01-29: David Anderson commit 963a2d71df17a062d89515849e64e96e36bd9def Merge: 6ee163a0 98bc5cff Merge branch 'master' of https://github.com/davea42/libdwarf-code 2022-01-29: David Anderson commit 98bc5cff1a47f995743b29aab1518ccaf00ab434 Merge: 1e8f3b54 f7d7b866 Merge pull request #66 from vtorri/bin_headers Add meson build for attr_form, tag_attr and tag_tree binaries 2022-01-29: Vincent Torri commit f7d7b8669a1cc8c2ec6e246baf4e876ab9d1bc0a Add meson build for attr_form, tag_attr and tag_tree binaries also clean header files order new file: src/bin/attr_form/meson.build new file: src/bin/tag_attr/meson.build new file: src/bin/tag_tree/meson.build modified: meson.build modified: src/bin/attr_form/attr_form_build.c modified: src/bin/tag_attr/tag_attr.c modified: src/bin/tag_tree/tag_tree.c 2022-01-28: David Anderson commit 6ee163a0946b368a8f7cc0f48a0cb1b15f7af997 Now with semantic version 0.3.4 modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.mm modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h Now updates the semantic version in meson.build too modified: tools/updatesemanticversion.py 2022-01-28: David Anderson commit 20ac4e0526cae7d3ff37c81af4fe6e70480ec7ff Merge: 1e8f3b54 a36d7b4c Merge branch 'doxy' Merging doxyfile updates. No .c updates, just libdwarf.h and doc/* files 2022-01-28: David Anderson commit 1e8f3b54aa7a7a6781072d1fd7c6216b746ed3cf More minor include changes to get make check to work. modified: test/helpertree_test.c modified: test/makename_test.c modified: test/section_bitmaps_test.c 2022-01-28: David Anderson commit d56bd7a112bdec8f5e969743eb20f81bfcbcf2f3 Trivial include change. modified: ../tag_tree/tag_common.c 2022-01-28: David Anderson commit 9fd9731804298bc25b93e4cbaaa7a90b7cd021e3 Fixing a few missing includes, like string.h, and moving include of dd_globals.h modified: attr_form/attr_form_build.c modified: tag_attr/tag_attr.c modified: tag_tree/tag_common.c modified: tag_tree/tag_tree.c 2022-01-28: David Anderson commit 0cabb9873e6482e24a0921cae99c7ff6730475b0 Merge: 3eb217a7 9b50bbd4 Merge pull request #62 from vtorri/master Add meson files to libdwarfp and dwarfgen 2022-01-28: David Anderson commit a36d7b4c280a8e4a3cecb2991201021d698b7715 Now with full documentation of dwarf_object_init_b, and dwarf_object_finish() nearly all of it outside libdwarf.h now. modified: doc/jitaccess.dox modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2022-01-28: Vincent Torri commit 9b50bbd4ec125fb87170b4ae54d6c1acb96979cd Add meson files to libdwarfp and dwarfgen rearrange header files in dwarfdump new file: src/bin/dwarfgen/meson.build new file: src/lib/libdwarfp/meson.build modified: meson.build modified: src/bin/dwarfdump/dd_addrmap.c modified: src/bin/dwarfdump/dd_attr_form.c modified: src/bin/dwarfdump/dd_canonical_append.c modified: src/bin/dwarfdump/dd_checkutil.c modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_common.c modified: src/bin/dwarfdump/dd_compiler_info.c modified: src/bin/dwarfdump/dd_dwconf.c modified: src/bin/dwarfdump/dd_esb.c modified: src/bin/dwarfdump/dd_esb.h modified: src/bin/dwarfdump/dd_getopt.c modified: src/bin/dwarfdump/dd_glflags.c modified: src/bin/dwarfdump/dd_globals.h modified: src/bin/dwarfdump/dd_helpertree.c modified: src/bin/dwarfdump/dd_macrocheck.c modified: src/bin/dwarfdump/dd_makename.c modified: src/bin/dwarfdump/dd_naming.c modified: src/bin/dwarfdump/dd_regex.c modified: src/bin/dwarfdump/dd_safe_strcpy.c modified: src/bin/dwarfdump/dd_sanitized.c modified: src/bin/dwarfdump/dd_section_bitmaps.c modified: src/bin/dwarfdump/dd_strstrnocase.c modified: src/bin/dwarfdump/dd_true_section_name.c modified: src/bin/dwarfdump/dd_tsearchbal.c modified: src/bin/dwarfdump/dd_uri.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/meson.build modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_aranges.c modified: src/bin/dwarfdump/print_debug_gnu.c modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfdump/print_debug_sup.c modified: src/bin/dwarfdump/print_debugfission.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/bin/dwarfdump/print_hipc_lopc_attr.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfdump/print_llex_codes.c modified: src/bin/dwarfdump/print_loclists.c modified: src/bin/dwarfdump/print_loclists_codes.c modified: src/bin/dwarfdump/print_macinfo.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_origloclist_codes.c modified: src/bin/dwarfdump/print_pubnames.c modified: src/bin/dwarfdump/print_ranges.c modified: src/bin/dwarfdump/print_rnglists.c modified: src/bin/dwarfdump/print_section_groups.c modified: src/bin/dwarfdump/print_sections.c modified: src/bin/dwarfdump/print_static_funcs.c modified: src/bin/dwarfdump/print_static_vars.c modified: src/bin/dwarfdump/print_str_offsets.c modified: src/bin/dwarfdump/print_strings.c modified: src/bin/dwarfdump/print_tag_attributes_usage.c modified: src/bin/dwarfdump/print_types.c modified: src/bin/dwarfdump/print_weaknames.c modified: src/bin/dwarfgen/CMakeLists.txt modified: src/bin/dwarfgen/Makefile.am modified: src/lib/libdwarf/libdwarf.h modified: src/lib/libdwarf/meson.build modified: src/lib/libdwarfp/libdwarfp.h 2022-01-27: David Anderson commit 4679fd24f9ac32ed6fbda99f340120287a208833 trivial mod. modified: jitaccess.dox 2022-01-27: David Anderson commit 950191ee32de943a6cd609f315a980e634b184e3 Separating jit DWARF access comments from libdwarf.h and creating jitaccess.dox, a new doxygen page containing it. modified: doc/Doxyfile new file: doc/jitaccess.dox modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2022-01-25: David Anderson commit cfa1d7f378a6777a2c6a54b113ff299160395665 Moving most jitreader/Object_Access to .dox out of libdwarf.h modified: doc/libdwarf.dox Added new doxygen. modified: src/lib/libdwarf/libdwarf.h 2022-01-25: David Anderson commit 12c3720b440fac30e89774ef2dbf0b34cc99b8b9 A couple typos in the comments for doxygen fixed. modified: ../src/lib/libdwarf/libdwarf.h 2022-01-25: David Anderson commit a6b01c5ab7e9aa6f5e0c0e0faeba515e1f99f433 Doxygen comments added for some gdbindex functions. modified: src/lib/libdwarf/libdwarf.h 2022-01-25: David Anderson commit 55af202fe636b3ae69dadf16d0caa5b0607f4dc4 Updated so each has a doxygen @ file and a few overview words doxygen will show. modified: src/lib/libdwarf/dwarf.h modified: src/lib/libdwarf/libdwarf.h 2022-01-25: David Anderson commit e75f70c3002de723aff3952a1156b64b94af11fb Now includes dwarf.h too modified: doc/Doxyfile 2022-01-24: David Anderson commit 3790f5a52ef0bccc0105a723fca8708f3baa5399 Adding links to the gdbindex section format. modified: dwarf_gdbindex.c modified: libdwarf.h 2022-01-24: David Anderson commit 583d12b330db74f172d21e12584531404c70495a doxygen comments added for the .gdb_index section access functions. modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2022-01-24: David Anderson commit 3eb217a7a4461a5df7ed0bdd03aba2bfa1846e72 Updating from current git log. modified: ChangeLog 2022-01-24: David Anderson commit fd4e1fd4f67f55a52b0495a27f4b64ed8a257e6b Added a sort after tar -tf because in Freebsd 13 64bit tar sometimes reports files in a different order. Causing a misleading miscompare. So we sort the output of tar -tf so if the lists are the same we pass. modified: scripts/buildandreleasetest.sh Fixed spelling mistakes in comments. modified: src/lib/libdwarf/libdwarf.h 2022-01-23: David Anderson commit 17e7fb2fffa3e6653781e74881afd1615d08397b Cleaned up examples modified: doc/checkexamples.c Changed date of the document to today modified: doc/libdwarf.dox 2022-01-23: David Anderson commit 44b1189ccf810ab3b092814a7063ddffb7a7a75e Refining the wording about GNU debuglink. modified: doc/checkexamples.c modified: src/lib/libdwarf/libdwarf.h 2022-01-23: David Anderson commit 416d9dac0c3c8bf63c872cc73e180b93490a212d Correcting/updating debuglink doc and example modified: doc/checkexamples.c modified: src/lib/libdwarf/libdwarf.h 2022-01-23: David Anderson commit 9a03c0ec3f471bc5c3a35e2b412fe3819c0ebe5d Fixed some typos in the examples. modified: checkexamples.c 2022-01-23: David Anderson commit 07fdd70942a1ee4187ba5dfdcc7124ef7fe5f2df Now up to date with git log modified: ChangeLog 2022-01-23: David Anderson commit 68f20b4e563a8353ae19d3acf171abd704380e45 the .debug_pubnames and like sections and functions are now documented. Actually documenting just one as the rest, aside from section name and details of the function name have identical arguments and identical effect. modified: doc/checkexamples.c modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2022-01-23: David Anderson commit 124c79a52959d78901f21eb96daff71113ea7356 removing unwanted white space and fixing a couple too-long lines. modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_global.c 2022-01-22: David Anderson commit 9ba99807ad02b9245266ec284e0908d1ae6417bb Now a better example of looking at .debug_aranges. modified: doc/checkexamples.c Now the aranges functions set up with doxygen comments. modified: src/lib/libdwarf/libdwarf.h 2022-01-22: David Anderson commit 5b8b1561ade90ede1e9b692531edfc491132da76 Now an example of use of the str_offsets section linked to the functions. modified: doc/checkexamples.c modified: src/lib/libdwarf/libdwarf.h 2022-01-22: David Anderson commit 958cf1241ee9b97b83ee5a6def48a888dcb4850e Improvements in Frame table description Now mentions the .debug_str_offsets section is one whose internals can be read. modified: doc/libdwarf.dox Doxygen comments for .debug_str_offsets[.dwo] modified: src/lib/libdwarf/libdwarf.h 2022-01-21: David Anderson commit a05d75f8c2503158045b4444ce36f60c135dd400 The special frame registers section was hard to read. made 5 words bold. modified: libdwarf.dox 2022-01-21: David Anderson commit f48f081ced1df09d96cb3d668c1fa8372af2bbf7 doxygen doc on directly reading a .debug_str section. modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2022-01-21: David Anderson commit ec720c5bb4fa4d031771ae51fb69c787b9489882 Doxygen comments added. Details given on the required invariants if changing the defaults. See dwarf_set_frame_rule_table_size () etc. modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2022-01-21: David Anderson commit 4a173bd0535d3e05cffd91916fc31243a3d60c86 Renaming for clarity and consistency. Removing all reference to DW_TSHASHTYPE as it does not apply to balanced search. renamed: dwarfdump/dd_tsearch.h -> dwarfdump/dd_tsearchbal.h Changed all references to the header to the new name. modified: attr_form/attr_form_build.c modified: dwarfdump/CMakeLists.txt modified: dwarfdump/Makefile.am modified: dwarfdump/dd_addrmap.c modified: dwarfdump/dd_attr_form.c modified: dwarfdump/dd_helpertree.c modified: dwarfdump/dd_macrocheck.c modified: dwarfdump/dd_makename.c modified: dwarfdump/dd_tsearchbal.c modified: dwarfdump/meson.build modified: dwarfdump/print_macro.c 2022-01-20: David Anderson commit 2306f2078905fc9b89e7966b281c5d76687cce9e Bring ChangeLog up to date from git log. modified: ChangeLog 2022-01-20: David Anderson commit de3fe09c864cef1262e73e3243c87e651cb7b5fc Removed use of HAVE_STDLIB_H and HAVE_STRING_H and HAVE_STDDEF_H everwhere as these are in c90 and we assume c90. the dwarf_names.c changes are about removing irrelevant (and unusable) DWARF_FRAME names in dwarf.h. DW_FRAME_RA_COL DW_FRAME_STATIC_LINK DW_FRAME_CFA_COL which had to do with SGI/IRIX use and are not used anywhere in libdwarf or libdwarfp. modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfgen/createirepformfrombinary.cc modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/bin/dwarfgen/dg_getopt.c modified: src/bin/dwarfgen/dwarfgen.cc modified: src/bin/dwarfgen/irepattrtodbg.cc modified: src/bin/dwarfgen/ireptodbg.cc modified: src/lib/libdwarf/dwarf_names.c modified: src/lib/libdwarfp/dwarf_pro_alloc.c modified: src/lib/libdwarfp/dwarf_pro_arange.c modified: src/lib/libdwarfp/dwarf_pro_debug_sup.c modified: src/lib/libdwarfp/dwarf_pro_die.c modified: src/lib/libdwarfp/dwarf_pro_dnames.c modified: src/lib/libdwarfp/dwarf_pro_error.c modified: src/lib/libdwarfp/dwarf_pro_finish.c modified: src/lib/libdwarfp/dwarf_pro_forms.c modified: src/lib/libdwarfp/dwarf_pro_frame.c modified: src/lib/libdwarfp/dwarf_pro_funcs.c modified: src/lib/libdwarfp/dwarf_pro_init.c modified: src/lib/libdwarfp/dwarf_pro_line.c modified: src/lib/libdwarfp/dwarf_pro_macinfo.c modified: src/lib/libdwarfp/dwarf_pro_pubnames.c modified: src/lib/libdwarfp/dwarf_pro_reloc.c modified: src/lib/libdwarfp/dwarf_pro_reloc_stream.c modified: src/lib/libdwarfp/dwarf_pro_reloc_symbolic.c modified: src/lib/libdwarfp/dwarf_pro_section.c modified: src/lib/libdwarfp/dwarf_pro_types.c modified: src/lib/libdwarfp/dwarf_pro_vars.c modified: src/lib/libdwarfp/dwarf_pro_weaks.c 2022-01-20: David Anderson commit 43bbf81f2af827ce7b7504658e4438de055c4528 Trivial issues with configure. modified: configure.ac Lots of places still had #ifdef HAVE_STDLIB_H which was a problem for cmake. And we do not need HAVE_STDLIB_H or HAVE_STRING_H or HAVE_STDDEF_H any longer, they are standard C90. modified: CMakeLists.txt modified: cmake/config.h.cmake modified: src/bin/dwarfdump/dd_addrmap.c modified: src/bin/dwarfdump/dd_canonical_append.c modified: src/bin/dwarfdump/dd_checkutil.c modified: src/bin/dwarfdump/dd_esb.c modified: src/bin/dwarfdump/dd_getopt.c modified: src/bin/dwarfdump/dd_globals.h modified: src/bin/dwarfdump/dd_helpertree.c modified: src/bin/dwarfdump/dd_tsearchbal.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/simplereader.c modified: src/lib/libdwarfp/dwarf_pro_log_extra_flag_strings.c modified: test/dwarf_tied_test.c modified: test/getopttest.c modified: test/test_canonical.c modified: test/test_errmsglist.c modified: test/test_safe_strcpy.c modified: test/testesb.c 2022-01-20: David Anderson commit 0bab1913e563be7174ff0e012572ff7f394d2909 modified: src/bin/dwarfdump/dwarf_names.c Removed pointless DW_FRAME OPS (just a couple) which changed dwarf_names.c modified: src/lib/libdwarf/dwarf.h modified: src/lib/libdwarf/dwarf_names.c More doxygen work. Removed a couple inapproprate DW_FRAME: DW_FRAME_ operations and made DW_FRAME_CFA_COL and DW_FRAME_CFA_COL3 the same value. modified: src/lib/libdwarf/libdwarf.h 2022-01-20: David Anderson commit f2716b01f74f3ec215f4e4f0955d428577f40499 Merge: 0aa057f9 ab955f7f Merge pull request #61 from vtorri/vtorri_meson add meson build system for libdwarf only 2022-01-20: Vincent Torri commit ab955f7ff264f17a623cb2651e5e266272ed4cc5 add zlib macro in config.h when detected 2022-01-20: Vincent Torri commit 728b7ccec1e252ec0cc55d93ad108ccf52825958 remove check of struct _Elf 2022-01-20: Vincent Torri commit 3de43f2887c4bac3ca9129992337f87209f55fa2 remove useless macros 2022-01-20: Vincent Torri commit 1d10e2b1ccb3e2a8d3ef317a857e112ec20a3802 meson - fifth step 2022-01-20: Vincent Torri commit 840ab86dba6bdb0ad5975c03ecd26ad2c4053ea4 meson - fourth step 2022-01-19: David Anderson commit 0aa057f9bbc90178f95b63e7f3d0950a5baddb1b Deleted obsolete comments. Updated copyright year modified: src/lib/libdwarf/dwarf_frame.c Added doxygen comments for frame reading. modified: src/lib/libdwarf/libdwarf.h 2022-01-19: David Anderson commit 796782ab9632246a16434ba7441db5f4588165bd Now the frame example is set up for doxygen modified: doc/checkexamples.c Adding doxygen comments for frame operations. modified: src/lib/libdwarf/libdwarf.h 2022-01-20: Vincent Torri commit af8ae0981422b761bede5baf084301985fa73ae3 meson - third step 2022-01-19: Vincent Torri commit f7c032a949e91f3559e2f97b9c6acb928586270a meson - second step 2022-01-19: Vincent Torri commit 147cb92e16cbc19ef9bd1b5d74256f7885d67dff Add meson build system - first step 2022-01-19: David Anderson commit 421040cb4e78636ee894e08c76a0849c64b1aa66 removed the inclusion of libdwarf_private.h, that was not necessary. Added #define of TRUE and FALSE as those used in the examples for clarity. modified: doc/checkexamples.c 2022-01-19: David Anderson commit cc3a60411a305a5d7c0313354bf06ce0f743fb09 dwarfdump: modified: print_frames.c a couple simple local variables were not initialized. Now they are. 2022-01-19: David Anderson commit 68f19d39485dd9c7404386d4f04d3a24f2fb9fe2 Merge: 82873ae3 19e62905 Merge branch 'master' of https://github.com/davea42/libdwarf-code 2022-01-19: David Anderson commit 19e62905a8e6cb2500c03b842e72280a94361e53 Merge: 34c0a37e d12c3238 Merge pull request #59 from vtorri/vtorri_prototype2 Fix one more "function declaration isn't a prototype" warning in 2022-01-18: David Anderson commit 82873ae3940e63f9b70626425e0b58fe8f523312 Examples improved for reading macro sections modified: doc/checkexamples.c modified: doc/libdwarf.dox New doxygen for reading macro sections. modified: src/lib/libdwarf/libdwarf.h 2022-01-18: David Anderson commit 218abadcfe6cdb9711a3ce9c6267a7abd995d8f7 Updated copyright year modified: src/lib/libdwarf/dwarf_macro5.c 2022-01-18: Vincent Torri commit d12c3238323c7ca01e59fe7ccc0b3bca06725152 Fix one more "function declaration isn't a prototype" warning in dwarfdump modified: ../src/bin/dwarfdump/print_ranges.c 2022-01-18: David Anderson commit 34c0a37e16aa07c689ae0adb7eff6909ed93d044 Merge: 66a582ec dfb28de7 Merge pull request #58 from vtorri/vtorri_elfaccess Fix "function declaration isn't a prototype" warning 2022-01-18: Vincent Torri commit dfb28de7273af7265ff68367b55770658ebc3193 Remove useless elfaccess.h header file modified: CMakeLists.txt modified: cmake/config.h.cmake modified: configure.ac modified: src/lib/libdwarfp/dwarf_pro_arange.c modified: src/lib/libdwarfp/dwarf_pro_dnames.c modified: src/lib/libdwarfp/dwarf_pro_funcs.c modified: src/lib/libdwarfp/dwarf_pro_pubnames.c modified: src/lib/libdwarfp/dwarf_pro_reloc_stream.c modified: src/lib/libdwarfp/dwarf_pro_reloc_symbolic.c modified: src/lib/libdwarfp/dwarf_pro_section.c modified: src/lib/libdwarfp/dwarf_pro_types.c modified: src/lib/libdwarfp/dwarf_pro_vars.c modified: src/lib/libdwarfp/dwarf_pro_weaks.c 2022-01-17: David Anderson commit 66a582ec334fb83cab6b7309683d6512774be114 Fixed a too-long comment. modified: src/lib/libdwarf/dwarf_peread.c Removed trailing whitespace. modified: src/lib/libdwarf/libdwarf.h 2022-01-17: David Anderson commit c2f5490affcb460b207eaf210961c79c3f92d5d0 Dated today modified: doc/libdwarf.dox Aligned some assignments modified: src/lib/libdwarf/dwarf_loc.c Eliminated a bit of useless commentary modified: src/lib/libdwarf/dwarf_loc.h Added doxygen comments to the loclists functions. modified: src/lib/libdwarf/libdwarf.h 2022-01-17: Vincent Torri commit bc871159daad5544a0bba8d187de81e9351ffdec Fix "function declaration isn't a prototype" warning modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_macro.c 2022-01-16: David Anderson commit 5bb2b169521765c9f671255e674cbed15e5bc688 The .debug_names section initial doc. modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2022-01-15: David Anderson commit 06b94f187a57265fb887a662da10cef33a9b263e Up to date with git log modified: ChangeLog 2022-01-15: David Anderson commit 989a86283e6767a01dd69872f2bc40b0c27ee37c More functions with doxygen. modified: src/lib/libdwarf/libdwarf.h 2022-01-15: David Anderson commit db3f28a0c531d25c33af5b9f9d9acbdcf5458650 Merge: dcf32335 710b0e5d Merge branch 'master' of https://github.com/davea42/libdwarf-code Merge of configure/cmake stuff. 2022-01-15: David Anderson commit 710b0e5d2387468791f1b660813ac9318553a088 Merge: 28120f0c 1bb32429 Merge pull request #56 from vtorri/vtorri_checks remove tests related to Elf64_Rela, Elf64_Rel and Elf64_Sym 2022-01-15: Vincent Torri commit 1bb3242996087dff144c0812a7cafd80d155cc26 remove output related to removed tests 2022-01-15: Vincent Torri commit 5e943441d0ba9f0d8f2e265e94d8420bd45530d2 Remove useless checks of Elf64_Rela, Elf64_Rel and Elf64_Sym structures Also remove unused HAVE_LIBELF_OFF64_OK in cmake file modified: CMakeLists.txt modified: cmake/config.h.cmake modified: configure.ac 2022-01-15: David Anderson commit dcf3233577c1272a760027ede512603acd5daf3a Now with latest git log content. modified: ChangeLog 2022-01-15: David Anderson commit 28120f0c707d7bba44d399d867822c9995310353 Fixing trailing white space modified: src/lib/libdwarf/dwarf_abbrev.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_object_detector.c 2022-01-15: David Anderson commit dce675ea8a83c679525d6a4ea2c51ef10f30980b Added an overview of sections like .debug_abbrev where we have functions allowing access without any reference to any CU. modified: doc/libdwarf.dox 2022-01-15: David Anderson commit 389a1b1ee589b14091a7cfc5e22c9d6dd33bccce Fixing over-long lines and trailing whitespace. modified: src/lib/libdwarf/libdwarf.h 2022-01-15: David Anderson commit 6ac9988c9c85a1891546a745f91949a0b954e55c Doxygen added for abbreviations access. modified: libdwarf.h 2022-01-15: David Anderson commit 5b7755f8c1c1b094786d7e5ee98341a4c27211e2 Updated to reveal merges. modified: ChangeLog 2022-01-15: David Anderson commit a485e75134d1fa171753bdd8edea7a20522bf209 recent fixes to configure. modified: ChangeLog 2022-01-15: David Anderson commit 80baad5e09082051234cba4807fcfd0ba2f79009 Merge: fbba7b00 ce9ec60f Merge branch 'master' of https://github.com/davea42/libdwarf-code Removing unused cruft from configure.ac CMakeLists.txt 2022-01-15: David Anderson commit ce9ec60f90642a25675ecd5d36aea15d2c46f78d Merge: 0c3cb985 b04ffc0a Merge pull request #55 from vtorri/vtorri_elf remove checks of useless header files 2022-01-15: David Anderson commit fbba7b0075718e8b761c8a433bc502035142d605 make dist requires these files be present. new file: doc/ChangeLog new file: scripts/ChangeLog new file: src/bin/attr_form/ChangeLog new file: src/bin/buildopstab/ChangeLog new file: src/bin/builduritable/ChangeLog new file: src/bin/dwarfdump/ChangeLog new file: src/bin/dwarfexample/ChangeLog new file: src/bin/dwarfgen/ChangeLog new file: src/bin/gennames/ChangeLog new file: src/bin/tag_attr/ChangeLog new file: src/bin/tag_tree/ChangeLog new file: src/lib/libdwarf/ChangeLog new file: src/lib/libdwarfp/ChangeLog new file: test/ChangeLog 2022-01-14: David Anderson commit 0c3cb985b5b5173919df5c0ad8e8d20a9797ac45 Now does doxygen doc of some use in the Like Tables interfaces. modified: src/lib/libdwarf/libdwarf.h 2022-01-14: David Anderson commit 5b2e350a7f8c5466c34f8282154f2fb9662f81a0 Now working links to line table registers list modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2022-01-14: David Anderson commit 2cb6ea3dd22b890ebca7da2b5d926429d2476d90 Made a reference point for line table registers to refer to. modified: doc/libdwarf.dox Line Table functions now with doxygen. modified: src/lib/libdwarf/libdwarf.h 2022-01-14: David Anderson commit 33e4d5b0d274721a993f0bcfa2d924261acf942a Correct erroneous doxygen comments line table include directories. modified: libdwarf.h 2022-01-14: David Anderson commit b4b2ed0ce79305c95a0e261cf4d53cd3d104d316 Fixed examples added a defgroup for doxygen modified: doc/checkexamples.c Removed a pointless comment. modified: src/lib/libdwarf/dwarf_line.c Seven functions now described for doxygen. A couple functions moved to the group they belong in: the section group. modified: src/lib/libdwarf/libdwarf.h 2022-01-14: David Anderson commit be03cf75d0f5d59a47a5d521390e3cd97f7e13e0 Merge: f5710dde 9ccd32ac Merge pull request #54 from vtorri/vtorri_sgi remove the check of the unused sgidefs.h header file 2022-01-14: Vincent Torri commit 9ccd32ac60551c0c91efba87906f605903c5e898 remove the check of the unused sgidefs.h header file modified: configure.ac 2022-01-13: David Anderson commit f5710ddee5884887206f43611c24f4b03847698e Merge: cdf7867b 81d0e378 Merge branch 'master' of https://github.com/davea42/libdwarf-code vtorri update to debuglink.c for windows 2022-01-13: David Anderson commit 81d0e3782a20e868279bac677e85444387fe1ab2 Merge: 30c838ab f843484c Merge pull request #53 from vtorri/vtorri_unistd Include direct.h on Windows to declare getcwd() 2022-01-13: David Anderson commit cdf7867b294e277ad260b68e8f9fff62582a5499 Changes to be committed: Refined the example to follow proper practice. modified: doc/checkexamples.c Several Dwarf_Line_Context functions now with doxygen data modified: src/lib/libdwarf/libdwarf.h 2022-01-13: Vincent Torri commit f843484c29a8875154dc95eaac07bb9e858cc56c Include direct.h on Windows to declare getcwd() modified: src/lib/libdwarf/dwarf_debuglink.c 2022-01-13: David Anderson commit 30c838aba40da0e21e63a1084008a655bd3f8fe8 Fix botch preventing compiles. modified: libdwarf.h 2022-01-13: David Anderson commit a1e47bfd803c3ef49a47a4bcc7fdf13e4820ddb2 Fixing doxygen comments. modified: doc/checkexamples.c Adding wording about threading. modified: doc/libdwarf.dox Adding doxygen comments modified: src/lib/libdwarf/libdwarf.h 2022-01-12: David Anderson commit bcc2d4999d2c9093fc672b57dae8953a68865438 Now with a loud notification this is a draft. modified: libdwarf.dox 2022-01-09: David Anderson commit 5dd64ffcf4636e57a4e34f919f44d64b9c74a242 More functions with doxygen. modified: src/lib/libdwarf/libdwarf.h 2022-01-09: David Anderson commit 801e7ae7cce755170960053da8253ff7b91898eb Refined examples. modified: doc/checkexamples.c Addtional functions have doxygen. modified: src/lib/libdwarf/libdwarf.h 2022-01-09: David Anderson commit 3e136d554b8026e1fb12e9642ece348cdf1ce061 Added new documentation here modified: ../../../doc/checkexamples.c Doxygen minor changes modified: libdwarf.h 2022-01-09: David Anderson commit 2fbd53d049610d7d646871efeaaeeb78a03b007a More functions with doxygen comments modified: ../../../doc/checkexamples.c modified: libdwarf.h 2022-01-09: David Anderson commit 7b8934640dab15c9090675f5443a82d4e564811d Several functions now with doxygen comments. modified: src/lib/libdwarf/libdwarf.h 2022-01-09: David Anderson commit e04d3d5ce127235924195ba571c7df9cebeb723f Added doxygen comments. modified: libdwarf.h 2022-01-09: David Anderson commit 5d22f2ef063c8fac25e384edcfd4f95ca4723f2a Moved one defgroup down so the collection of fast access groups are together. modified: libdwarf.h 2022-01-09: David Anderson commit fa47785c1931262536aa09384b68e9c64722f21f Adding doxygen comments. modified: src/lib/libdwarf/libdwarf.h 2022-01-08: David Anderson commit fdb6a15d6b2711188d4f35a899ce86bfac942aa2 A few more functions doxygened modified: src/lib/libdwarf/libdwarf.h 2022-01-08: David Anderson commit d72ce4954d52339fa4091ee036a6a2463283d0a1 One new doxygen set. Some minor adjustments. modified: libdwarf.h 2022-01-08: David Anderson commit df52327a7e766d2295abcbd3ba8be3de2114dc26 Doxygen comments added for several attribute functions. modified: src/lib/libdwarf/libdwarf.h 2022-01-08: David Anderson commit 1c86068a9fb583c9dd116bc0267c03a9610fec05 Now end ChangeLog2021 and new ChangeLog properly up to date and correct. modified: ChangeLog modified: ChangeLog2021 2022-01-08: David Anderson commit 7f03bdff67a60ece7f2619e99b6f4cde229b2545 One comment line changed. modified: src/lib/libdwarf/libdwarf.h 2022-01-08: David Anderson commit 394651d0b98c656636262383748344c9642a7722 Changed the defgroup title a few places for greater clarity. modified: libdwarf.h 2022-01-08: David Anderson commit 0822f7a3d6f830045702f0b36a9a1f08cc1f5af4 Now withy first set of functions on DIEs doxygen-d. modified: src/lib/libdwarf/libdwarf.h 2022-01-08: David Anderson commit 946daf8cb4df7f84118aa22ba7b97f36c82add2f Doxygen comments on a few functions. modified: src/lib/libdwarf/libdwarf.h 2022-01-08: David Anderson commit 2812e9b0c089dc34d6807db40bac564b68982f52 Correcting the comments on a function one should not call. dwarf_validate_die_sibling() (though dwarfdump calls it). modified: src/lib/libdwarf/libdwarf.h 2022-01-08: David Anderson commit a498289724ae3890431b59a98943b662a00a5c22 Corrected examples and doxy data modified: doc/checkexamples.c Added doxy data for some functions. modified: src/lib/libdwarf/libdwarf.h 2022-01-07: David Anderson commit 297c54a84d7db421be7e383947123a174d3549be Corrected typos in two parameter names. modified: ../src/lib/libdwarf/libdwarf.h 2022-01-07: David Anderson commit 3daaa621b0c94501a0f9d03bd11b7adf70ebf77b Corrected mistakes and made some examples more generally appropriate in return values. modified: doc/checkexamples.c More doxygen added modified: src/lib/libdwarf/libdwarf.h 2022-01-07: David Anderson commit d27df7ce1cb6a657af628a87266d33c2584218a0 A couple more functions documented doxygen. modified: ../src/lib/libdwarf/libdwarf.h 2022-01-07: David Anderson commit f2cfde15b38d5ad51c15ee9552cf7513f7db6b0d Some more functions have doxygen comments. modified: src/lib/libdwarf/libdwarf.h 2022-01-07: David Anderson commit 28b5e558883c0e4556ed99bdbc8670b243b140d9 More functions with doxygen input modified: src/lib/libdwarf/libdwarf.h 2022-01-07: David Anderson commit e8120831f89f06a08c8c37e1038c2e9127cc400e Doxygen update on 3 functions modified: src/lib/libdwarf/libdwarf.h 2022-01-06: David Anderson commit 84eb2075cd0543d48c07132f839892947b2bd86d Small improvements to the doxygen content. modified: src/lib/libdwarf/libdwarf.h 2022-01-06: David Anderson commit f51f44d223b3d9c9d707084a8d319c2aeafe9c68 Additional doxygen comments. modified: src/lib/libdwarf/libdwarf.h 2022-01-06: David Anderson commit 907168815ff2eae6206d25d394198c9e80d7d6d4 Update copyright year. modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_harmless.c modified: src/lib/libdwarf/dwarf_harmless.h modified: src/lib/libdwarf/dwarf_init_finish.c 2022-01-06: David Anderson commit f802ba7f3ce74a785f36962e73a82a6e2150b112 Improve the wording on error handling modified: doc/libdwarf.dox Renaming non-public functions dwarf_harmless_cleanout -> _dwarf_harmless_cleanout dwarf_harmless_init -> _dwarf_harmless_init modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_harmless.c modified: src/lib/libdwarf/dwarf_harmless.h modified: src/lib/libdwarf/dwarf_init_finish.c Moved some lines around for a more consistent look. Removed DW_HARMLESS_ERROR_MSG_STRING_SIZE as client code has no use for it. modified: src/lib/libdwarf/libdwarf.h 2022-01-05: David Anderson commit f6a951f009d853d1b1ef1de34af00924eb867c2f Completed the Error handling description. modified: libdwarf.dox 2022-01-05: David Anderson commit 47e0357e26c748921767995294d3a4cd0cf4759d Only the base directory has ChangeLog now, the others relegated to history. renamed: scripts/ChangeLog -> scripts/ChangeLog2021 renamed: src/bin/dwarfdump/ChangeLog -> src/bin/dwarfdump/ChangeLog2021 renamed: src/bin/dwarfexample/ChangeLog -> src/bin/dwarfexample/ChangeLog2021 renamed: src/bin/dwarfgen/ChangeLog -> src/bin/dwarfgen/ChangeLog2021 renamed: src/lib/libdwarf/ChangeLog -> src/lib/libdwarf/ChangeLog2021 renamed: src/lib/libdwarfp/ChangeLog -> src/lib/libdwarfp/ChangeLog2021 2022-01-05: David Anderson commit b1d510f891fee8c1cc81548cf3dfb0df187835a0 ChangeLog is for 2022 now. modified: ChangeLog new file: ChangeLog2021 Now showing libdwarf.h #defines instead of hiding them. Works well with doxygen groups. modified: doc/Doxyfile main() now main(void) per standard modified: src/bin/dwarfexample/jitreader.c 2022-01-05: David Anderson commit 1d8564c693381e800afc3d1cde3418a71f4fce6d Update copyright. modified: src/lib/libdwarf/libdwarf_private.h 2022-01-05: David Anderson commit 2ad8ffe22a440c045b0197d7d02844b7059e4eff Cleaning up line length, trailing whitespace, and doxygen group naming. modified: src/lib/libdwarf/dwarf.h modified: src/lib/libdwarf/libdwarf.h 2022-01-05: David Anderson commit 00e5a6550aa2cf4db69fb7003dd4e74dbc01c522 No longer refers to anything but public headers. Simpler. modified: src/bin/dwarfexample/jitreader.c 2022-01-05: David Anderson commit a9c3585ac91197534163d3c55b900a657007142e Squashed commit of the following: commit 6d78aeb0ba3c4239c9103227e6b8c172e100168a Author: David Anderson Date: Wed Jan 5 09:18:23 2022 -0800 The init_dl() function much better documented. Focusing longer text in checkexamples, removing from libdwarf.h proper. modified: doc/checkexamples.c modified: src/lib/libdwarf/libdwarf.h commit 3430711d147aed4587fd356b1a4e4e28cf2839bc Author: David Anderson Date: Tue Jan 4 16:43:38 2022 -0800 One more blank line. modified: src/lib/libdwarf/libdwarf.h commit b3174e213d6f607d0ec1a80fbe2744a5f6d9af15 Author: David Anderson Date: Tue Jan 4 16:09:02 2022 -0800 Now in groups modified: doc/checkexamples.c Final reorganization steps. modified: src/lib/libdwarf/libdwarf.h commit e5fe596d678682a0d593ab78c787bd428ffe897f Author: David Anderson Date: Tue Jan 4 15:41:29 2022 -0800 More movements of functions, small items. modified: libdwarf.h commit 2d0fae72c710a36dcd6cbb21c628ef9b5ffe556e Author: David Anderson Date: Tue Jan 4 15:20:54 2022 -0800 Moving two functions to the group they should be in. modified: libdwarf.h commit 29ec78ab1fe54d40720bae5dacde7094bd976958 Author: David Anderson Date: Tue Jan 4 15:16:13 2022 -0800 Now gnu_pubnames/pubtypes have a defgroup modified: libdwarf.h commit 689c98c9a38312aea3dec57d8b48beeaca03074c Author: David Anderson Date: Tue Jan 4 15:10:11 2022 -0800 Now .debug_pubnames .debug_pubtypes and the others in this format in a group. modified: libdwarf.h commit 4dad4395d673e6578beb4802c9bbf7d3f79d6feb Author: David Anderson Date: Tue Jan 4 14:59:45 2022 -0800 Now .debug_aranges access in a defgroup modified: libdwarf.h commit 96b91edb66158e45d8f4636b3730c6c300189aa2 Author: David Anderson Date: Tue Jan 4 14:46:48 2022 -0800 Now .debug_names in a defgroup modified: libdwarf.h commit 9acb599a067479c11b83fb8ab18ec401a9474c56 Author: David Anderson Date: Tue Jan 4 14:39:05 2022 -0800 Frame section names stuff all together modified: libdwarf.h commit e88cf083b0659fa3b397a2d76e9295b4ee4b8eb5 Author: David Anderson Date: Tue Jan 4 13:47:16 2022 -0800 The dwarf_get_TAG etc funcs in a group now. modified: libdwarf.h commit 94f43001e3b907eb840dc9fcc47c46431c2e9835 Author: David Anderson Date: Tue Jan 4 11:13:52 2022 -0800 deleted duplicated lines modified: libdwarf.h commit ef696175ae405f8c948c818c321890d0ad9b33f3 Author: David Anderson Date: Tue Jan 4 11:07:53 2022 -0800 Major block of functions moved, attribute-related. modified: libdwarf.h commit cceffe5d7605dacd691bc289f7096a837c171937 Author: David Anderson Date: Tue Jan 4 10:27:00 2022 -0800 Now defines DW_DLV_BADOFFSET, used in dwarfdump. modified: src/bin/dwarfdump/dd_globals.h Deleted unused defines and moved some defines. modified: src/lib/libdwarf/libdwarf.h commit 55e3f25be8fd0c38c06dbb767105ff17b1c7a38e Author: David Anderson Date: Tue Jan 4 10:21:22 2022 -0800 Deleted dwarf_compress_integer_block() as it was meant to be removed earlier. No code in libdwarfp uses DW_DLV_NOCOUNT, DW_DLV_BADADDR or DW_DLV_BADOFFSET. None of this could have been useful in any case, it dealt with non-standard integer block compression. modified: src/lib/libdwarfp/dwarf_pro_forms.c modified: src/lib/libdwarfp/dwarf_pro_line.c modified: src/lib/libdwarfp/libdwarfp.h commit 123a4bc9528a7534cc37dd7621a918d15d96b95a Author: David Anderson Date: Tue Jan 4 09:48:03 2022 -0800 Tiny changes. modified: doc/checkexamples.c Toward a better organization modified: src/lib/libdwarf/libdwarf.h commit e442fb9a6676bed0203e3fe83a922c2daf3d1fa0 Author: David Anderson Date: Sun Jan 2 11:25:21 2022 -0800 Many functions moved to a more pleasing order. modified: libdwarf.h commit 94038eb06094d26b0a7843506adf924137ce5916 Author: David Anderson Date: Sun Jan 2 10:42:29 2022 -0800 A part of the doxygen input new file: doc/libdwarf.dox Many functions and types moved toward the target rearrangement. modified: src/lib/libdwarf/libdwarf.h commit 6dfa13d33638b2343f5bffef627d1625f102c2e6 Author: David Anderson Date: Sun Jan 2 07:23:29 2022 -0800 Turned off sorting by name modified: doc/Doxyfile Now with some doxygen information modified: doc/checkexamples.c Fixing a reference to checkexamples.c modified: doc/libdwarf.mm Many functions moved around to make a sensible organization (as opposed to semi-random). Some doxygen comments added. modified: src/lib/libdwarf/libdwarf.h libdwarf-code-0.11.1/ChangeLog2023000066400000000000000000010071331472336503500163720ustar00rootroot000000000000002023-12-19: David Anderson commit e08f6bc975c87f27da0699cd6c232d3ccf04880e New information. modified: READMEwin-msys2.md 2023-12-19: David Anderson commit ae5a7cd3ab524c5abe9f990b1c6983b4cc75bce3 More clarifications. modified: READMEcmake.md 2023-12-19: David Anderson commit 129b8b359dc9e168cf473852f95ccce3e92d938f To make it look right. modified: READMEcmake.md 2023-12-19: David Anderson commit 66f16a565b500bef2bb4e66ff39d946fe7d9fcb9 modified: READMEcmake.md Some clarifications and one error fixed. 2023-12-19: David Anderson commit e12149c819f9436fb92a32c273d0d8035224b7b0 Now with GNUInstallDirs in CMakeLists.txt modified: ChangeLog 2023-12-19: David Anderson commit 7e22b9711fd7804187b681fb80fd315b13de6198 Merge: fe1a067e 028de444 Merge branch 'install' of https://github.com/flagarde/libdwarf-code into flagarde-install Testing pull request The branch updates and simplifies all the CMakeLists.txt files to use include(GNUInstallDirs) and take advantage of all it does. Works fine in all test environments (including VS). 2023-12-18: David Anderson commit fe1a067ec073729ad9e1001db4498f3887c33d18 Up to date with git log modified: ChangeLog 2023-12-18: David Anderson commit 22c352276446ac0c42e73f04573dc6cae50ca94b Due to a change signed to unsigned and an oversight printing of DW_OP_ DWARF data could print ESB_ERR at times Just a two line error. Fixed. modified: src/bin/dwarfdump/print_die.c 2023-12-18: David Anderson commit 1dcc86df64507889f85a93004e6ffb0381adc04c Avoid warning from VS C. modified: src/bin/dwarfdump/print_die.c 2023-12-18: David Anderson commit 61d824c2897de83dde230be667989467f868c8f2 Remove VS C warnings by adding safe casts. modified: src/bin/dwarfdump/dwarfdump.c Remove VS C warnings by changing a local variable type. Rename file-local struct member names to have a common prefix bh_. modified: src/bin/dwarfdump/print_die.c Harmless cast of argument to static function print_line_detail() modified: src/lib/libdwarf/dwarf_line_table_reader_common.h 2023-12-18: David Anderson commit 4a72b17e80f10458944dae4b2031d580804e045f Added appropriate casts in 3 places to silence VS C warnings. These are an improvement for the human reader, too. modified: src/lib/libdwarf/dwarf_crc32.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_xu_index.c 2023-12-18: David Anderson commit 0948a0042285e5b1b611c0f778eac26d33197a1a Warnings from VS C provoked another nice change to macro READ_UNALIGNED_CK() which is used all over the place. modified: src/lib/libdwarf/dwarf_util.h 2023-12-18: David Anderson commit 1e8b7bdc4c6d5c45b7218098e9d74f158f6d5763 Small adjustmets (mainly casts) to avoid warnings from VS C compiler. modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_locationop_read.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_str_offsets.c 2023-12-18: David Anderson commit f91eddc2ac7c2719e99e06006c7501995e346c01 The BIGGEST_UINT #define and its uses are now gone. It was never necessary in the macros it was used in and it was arbitrary. Should have been removed years ago. modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_util.h 2023-12-17: David Anderson commit e2730f58ade299fd5aa29d0dfcb7b14d92790eed These remove the remaining type warnings from VS C in dwarfdump. modified: src/bin/dwarfdump/dwarfdump.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_die.c 2023-12-17: David Anderson commit 0a24f82f08da94bb0bc5994efa277f20a7adb09c Added a comment for doxygen. on dwarf_get_section_info_by_index_a() modified: src/lib/libdwarf/libdwarf.h 2023-12-17: David Anderson commit fdcf13474576cd9c94197d2bf9cf80d0cd05baf2 Changes to be committed: more type changes and casts to remove VS warnings. modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame.h modified: src/lib/libdwarf/dwarf_frame2.c 2023-12-17: David Anderson commit b90d83d5f8d02dc448468447e96db3228108e17e Fixing many compiler warnings. Changing the return type of another function to Dwarf_Unsigned so it actually makes sense. Which will not break anyone's code. (from VS) modified: doc/libdwarf.dox modified: src/lib/libdwarf/dwarf_crc32.c modified: src/lib/libdwarf/dwarf_frame.h modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_locationop_read.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/libdwarf.h 2023-12-17: David Anderson commit dc6a96ef8756a328dc3bf10d80c054aa9217ebcd Changed library-internal data types (and added a very few casts) to avoid type warnings by a compiler. modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loc.h modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_macro5.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_object_read_common.c modified: src/lib/libdwarf/dwarf_peread.c 2023-12-17: David Anderson commit 49b5a83026a119ecba524b07841c87bd5a035ebf Altering (mostly by making internal data Dwarf_Unsigned) so that we avoid many warnings. modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_setup_sections.c modified: src/lib/libdwarf/dwarf_str_offsets.c modified: src/lib/libdwarf/dwarf_util.c Fixed a mistaken return-value type from int to Dwarf_Unsigned. See Changes in doc/libdwarf.dox modified: src/lib/libdwarf/dwarf_query.c modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h 2023-12-17: David Anderson commit def4e90753d756192359ef580cbd331631f87d26 Fixing many instances of unecessarily truncating integers to not truncate by changing declared size to be appropriate. Fixing a few (library-private) argument lists to avoid integer truncation by using the right data type. modified: src/bin/dwarfdump/print_abbrevs.c modified: src/lib/libdwarf/dwarf_line.h modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_print_lines.c modified: src/lib/libdwarf/dwarf_util.c modified: src/lib/libdwarf/dwarf_xu_index.c 2023-12-17: David Anderson commit d58a0dcd9a3aad87c437a73e3f2fe9c37ea2cf38 Fixing some compiler warnings. modified: dd_macrocheck.c modified: dwarfdump.c modified: print_die.c 2023-12-16: David Anderson commit 320e8c3b4a28cc1ffb7df55da8a10f06d016aaee Dealing with compiler warnings. A few required actual correction of the source, most just required casting. modified: src/bin/dwarfdump/dd_getopt.c modified: src/bin/dwarfdump/dd_macrocheck.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfdump/print_loclists.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_rnglists.c 2023-12-16: David Anderson commit 46f159a17a8c08f579238525fa2565a50f049a4b The argument was formally incorrect before. The correction should not cause any problem for anyone. Mistake noticed because a compiler warning appeared highlighting callers. @@ -1736,7 +1736,7 @@ dwarf_loclist_from_expr_c(Dwarf_Debug dbg, Dwarf_Unsigned expression_length, Dwarf_Half address_size, Dwarf_Half offset_size, - Dwarf_Small dwarf_version, + Dwarf_Half dwarf_version, modified: src/lib/libdwarf/dwarf_loc.c dwarf_loclist_from_expr_c(Dwarf_Debug dw_dbg, Dwarf_Unsigned dw_expression_length, Dwarf_Half dw_address_size, Dwarf_Half dw_offset_size, - Dwarf_Small dw_dwarf_version, + Dwarf_Half dw_dwarf_version, modified: src/lib/libdwarf/libdwarf.h 2023-12-15: David Anderson commit 1c53f94e90399b4cbf5f946d633b81a1a597e431 Now has a short section about linking against and testing libdwarf.so The short section about linking against libdwarf.a has a tiny change (moved some words up to the section about linking against libdwarf.so) modified: doc/libdwarf.dox 2023-12-14: Jeremy Rifkin commit 4ccb40556f59f10fe7a34c3edace8808ffb9463c Add ifndef-define for O_RDONLY in elf_load_headers and generic_init (#211) 2023-12-14: David Anderson commit 6a9cfa3b9708bc04e90890cec84115b72ba8240c Up to date with git log. modified: ChangeLog 2023-12-14: David Anderson commit 6e24c3cc2d9b0a7a1455b10327bbf9ae173e0a1f Removing -D_CRT_NONSTDC_NO_WARNINGS everywhere to avoid compiler warnings from Visual Studio meson.build: libdwarf_args += [ '-D_CRT_NONSTDC_NO_WARNINGS', '-D_CRT_SECURE_NO_WARNINGS' ] src/bin/dwarfdump/dd_esb.c:#define _CRT_SECURE_NO_WARNINGS src/bin/dwarfdump/dd_tsearchbal.c:#define _CRT_SECURE_NO_WARNINGS src/bin/gennames/gennames.c:#define _CRT_SECURE_NO_WARNINGS src/lib/libdwarf/dwarf_machoread.c:#define _CRT_SECURE_NO_WARNINGS src/lib/libdwarf/dwarf_object_read_common.c:#define _CRT_SECURE_NO_WARNINGS src/lib/libdwarf/dwarf_peread.c:#define _CRT_SECURE_NO_WARNINGS modified: meson.build modified: src/bin/dwarfdump/dd_esb.c modified: src/bin/dwarfdump/dd_tsearchbal.c modified: src/bin/gennames/gennames.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_object_read_common.c modified: src/lib/libdwarf/dwarf_peread.c 2023-12-12: David Anderson commit 82d23bc1218880bb153c5d541b873901a634dfe4 error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] On 32bit systems casts like (Dwarf_Unsigned) applied to a pointer need to be (Dwarf_Unsigned)(uintptr_t) to avoid failing in compilations. Four places. Would not fail if one avoids --enable-wall and the like. But now fixed. modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame2.c 2023-12-10: David Anderson commit deebe40e89214efe61c7b56debf2565974027dc8 Latest from git log (plus extra on DW_IDX) modified: ChangeLog 2023-12-10: David Anderson commit 12e478e78a93d957c2eb8518dd958c00b8f1cee9 modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h The full set of changes in gdb dwarf2.def is: +/* Internal linkage. A flag. */ DW_IDX (DW_IDX_GNU_internal, 0x2000) +/* External linkage. A flag. Note that gdb no longer generates this; + the default is to assume external linkage. */ DW_IDX (DW_IDX_GNU_external, 0x2001) +/* This entry is the program's entry point. A flag. */ +DW_IDX (DW_IDX_GNU_main, 0x2002) +/* Language for this entry. A DW_LANG_* value. */ +DW_IDX (DW_IDX_GNU_language, 0x2003) +/* This entry is a linkage name. A flag. */ +DW_IDX (DW_IDX_GNU_linkage_name, 0x2004) modified: src/lib/libdwarf/dwarf.h modified: src/lib/libdwarf/dwarf_names.c 2023-12-08: David Anderson commit 26bedb0159e0ff6b1795009115213ebd14b6d959 Now all 0.9.1 modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2023-12-08: David Anderson commit 8b0bd09d8c77d45a68cb1bb00a54186a92b683d9 Corrected spelling of one word. modified: doc/libdwarf.pdf 2023-12-08: David Anderson commit d9f6fe863d775a1e480d79f630e4a97ed78969ab Up to date with spelling fix modified: ChangeLog 2023-12-08: David Anderson commit 9666fdf00753ffd9608f136972f9484d59c613cb Corrected spelling mistake. libnrary -> library modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2023-12-08: David Anderson commit 7894f73f4fe22046a855bafd87902f7eedaaf00a Up to date with git log modified: ChangeLog 2023-12-08: David Anderson commit b33f2b6a2643e7b552cdfeb835ab48a9c82768da Now up to latest for release. modified: doc/libdwarf.pdf 2023-12-08: David Anderson commit 32934f5e442383361b4239298aa4b407d6e35160 Updating to release date modified: README.md modified: doc/libdwarf.dox 2023-12-07: David Anderson commit 288b59b0aaf662fdab66cd61e39c599daa9edc82 A typo. Fixed. modified: test.yml 2023-12-07: David Anderson commit 8416a134976192b1acbdb3bb22c04c72cbad41aa Rm dup mingw inst (ninja) modified: msys2_meson.yml modified: test.yml 2023-12-07: David Anderson commit 089b4ff4229fd09ba2659c131859359bb5178f53 runner-to-vm modified: freebsd_autotools.yml modified: test.yml 2023-12-06: David Anderson commit 3d296d4f5efd1bbce23cc28084f95a3ace39c252 Cleaning up, all seems working. modified: freebsd_meson.yml modified: mac_meson.yml modified: test.yml 2023-12-06: David Anderson commit fcbe5ce9261815aa566cd8f45d291e5ffdfb1146 runner-to-vm modified: freebsd_cmake.yml 2023-12-06: David Anderson commit 68517f3e28fc05536efab9f8f9a402c6f947d85a trial modified: freebsd_meson.yml 2023-12-06: David Anderson commit 0aa394c7c7820121e92971959830702538282322 trial modified: freebsd_meson.yml 2023-12-06: David Anderson commit cb3dba2b4a93b9d28d9265df6a346ef12d2585e2 zlib wrong name. Leaving off. modified: freebsd_meson.yml 2023-12-06: David Anderson commit f3f80cbdb4093a61297ab103af9b778837181529 Fix modified: freebsd_meson.yml 2023-12-06: David Anderson commit 1889a6a211a33a9ac501153df01e829cb0b5c4f7 again modified: freebsd_meson.yml 2023-12-06: David Anderson commit e1d9e65143d98a7045bd80713be030306cffdffa Correcting bug modified: freebsd_meson.yml 2023-12-06: David Anderson commit f5cb963c7668eedfe7cd22a2685bf0906e99cb15 add pkgconf modified: freebsd_autotools.yml 2023-12-06: David Anderson commit 9a3eecf4ac7092c1f0c3acb31a0ffd62efc7b869 Altering fsync setting modified: freebsd_autotools.yml 2023-12-06: David Anderson commit 55f6bd906de69d92bf8b3102a90a56a91376992e Now autoreconf not autogen.sh modified: freebsd_autotools.yml 2023-12-06: David Anderson commit df0703d57a93ac6e06e6200625a4c51c5a7b2d63 Added libtool modified: freebsd_autotools.yml 2023-12-06: David Anderson commit 465e050a3851e3aee1264bca0632af14fd87a5ab For freebsd do fsync_files: false modified: test.yml 2023-12-06: David Anderson commit c4c7290e061d89443e021df8c8d4a159c7d56799 Added fsync as false modified: freebsd_autotools.yml 2023-12-06: David Anderson commit 832704300ba662976cabe4f4f26627c873f5c55c Remove old comments. modified: mac_meson.yml 2023-12-06: David Anderson commit 2b6f8e535c2c25fa2920f85eeb918332f3be9f5b new for single test. new file: freebsd_meson.yml 2023-12-06: David Anderson commit bc7a7c04d1ac56e0c8a48b5a5ef41a0749d7eab5 Meson setup was written wrong... modified: mac_meson.yml modified: test.yml 2023-12-06: David Anderson commit 673c308605640046fd44994fbc8124f006d1127c oops.silly mistake. modified: msys2_meson.yml 2023-12-06: David Anderson commit 7239cad53e355eab75b55816b38565e0f949a372 Fixing, was failing modified: msys2_meson.yml 2023-12-06: David Anderson commit 751e4a1464ba54fd3a68e9ebca54c98bb936c0f8 Fix errors modified: msys2_cmake.yml 2023-12-06: David Anderson commit 4f94c59b774e8c1cf5f29e2ed6dac1ab0d8a322f Removing unwanted install items. modified: mac_autotools.yml 2023-12-06: David Anderson commit 7fc16952c66a9ebb7880481929fd2dd0e2beb9cf Added sync_files: false modified: freebsd_cmake.yml 2023-12-06: David Anderson commit 822d1316d6ec466c6c3b98a261e956f0a40cb8ab Toward individual tests to deal with particular build issues. new file: freebsd_autotools.yml new file: msys2_cmake.yml new file: msys2_meson.yml 2023-12-06: David Anderson commit 205743f182ac924b043df94d573b4cbe8f1e426b fixing freebsd cmake modified: test.yml 2023-12-06: David Anderson commit caca010a2a8967a7f7b0a126d63f6146af449550 trial change to get workable options modified: freebsd_cmake.yml Now with corrected mac cmake. modified: test.yml 2023-12-06: David Anderson commit 297b199b0bf620e0d2beb89cc480de3050f8ff3a needed more -D for cmake. modified: mac_cmake.yml 2023-12-06: David Anderson commit 725369b0e9d721b4c221db515e7643e681485a57 small tweak modified: mac_cmake.yml 2023-12-06: David Anderson commit c059560573dcbd0e0d0e5b3b4e49b91ec9190e43 Testing. modified: freebsd_cmake.yml new file: mac_cmake.yml modified: test.yml 2023-12-05: David Anderson commit 333982334bb4dbd7035c17e668fc0833674f149d Things changed, making them work, I hope modified: .github/workflows/test.yml 2023-12-05: David Anderson commit 92874271148d444d5b9d4eeb1a22599ba82fe35e Removing unwanted whitespace, fixing indents. modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_query.c 2023-12-05: David Anderson commit 7ac6ea034e5e4abc65ba2e2ca8ea4c9d5f86c639 Changing a few local variables to Dwarf_Unsigned to avoid some warnings about size differences from a particular compiler. modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_line.h modified: src/lib/libdwarf/dwarf_util.c 2023-12-05: David Anderson commit 5d89e76d41fd9b111c803b0a748f5703cd765b7f Fixes a mistake returning object values through pointers. Found by Coverity Scan. A mistake created a few days ago. modified: src/lib/libdwarf/dwarf_init_finish.c Add cast to int on error number returned by dwarf_errno(), these are guaranteed to be integers under 1000 and >= 0. Removes a compiler warning. modified: src/lib/libdwarf/dwarf_object_detector.c 2023-12-03: David Anderson commit 3f5352adff5f9dec013faf8365518a68486b3809 Dated Dec 3. modified: libdwarf.dox modified: libdwarf.pdf 2023-12-02: David Anderson commit 67257f5da2b30d476477c55f8cfd85236bfcb7c7 Up to date with git log modified: ChangeLog 2023-12-02: David Anderson commit c4ca69922baf8854a4677dde0681b9a7fc3207bd When system endian and object endian do not always match, the debuglink 4 byte hash value needs de_copy_word() applied. modified: src/lib/libdwarf/dwarf_object_detector.c Better doc of de_copy_word in Dwarf_Debug_s modified: src/lib/libdwarf/dwarf_opaque.h 2023-12-02: David Anderson commit 5fddac64954aefe7a3e33234c5f2ca48491ab0c4 Now with a translation from PE machine number to a name. modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am new file: src/bin/dwarfdump/dd_pe_cputype.h modified: src/bin/dwarfdump/dwarfdump.c 2023-12-01: David Anderson commit 460b234d6474ae4fd3048c154594fa4df925805b Now up to date with git log modified: ChangeLog 2023-12-01: David Anderson commit 903e8cc407e56cde7467c67d7a9ba97d5b06a4fa Adding dd_mac_cputype.h and dd_elf_cputype.h to the build where necessary. modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am Adding support for option --print-machine-arch modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_glflags.c modified: src/bin/dwarfdump/dd_glflags.h Added a missing entry. modified: src/bin/dwarfdump/dd_mac_cputype.h Implementing --print-machine-arch modified: src/bin/dwarfdump/dwarfdump.c Fixing whitespace issues. modified: src/bin/dwarfdump/print_die.c Deleting obsolete commentary. modified: src/bin/dwarfdump/print_sections.c 2023-12-01: David Anderson commit abb4acf6e8c9b40610372770839dd7e5131f8214 This has the implementation of the three new functions that give access to object file header and section data. Small changes, but widely spread! modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_elfread.h modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_machoread.h modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_peread.h modified: src/lib/libdwarf/dwarf_query.c 2023-12-01: David Anderson commit e10170f606842aa164d676ca0135ba15f063f511 Now December, so the html shows the new month. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2023-12-01: David Anderson commit c2d9d3c3303b7d3fb9f836f0348ff0a8640515b3 Changes list up to date modified: doc/libdwarf.dox New for better reporting of dwarf_machine_architecture() by dwarfdump new file: src/bin/dwarfdump/dd_elf_cputype.h new file: src/bin/dwarfdump/dd_mac_cputype.h The three new API functions declared and documented/doxygen. dwarf_machine_architecture() dwarf_get_section_info_by_index_a() dwarf_get_section_info_by_name_a() modified: src/lib/libdwarf/libdwarf.h 2023-11-30: David Anderson commit b90ea31db1dfa9f9d9b95d25554e05738fd63b0a Fixing problems in doxgen comments. modified: doc/checkexamples.c modified: doc/libdwarf.dox 2023-11-29: David Anderson commit 416d1e0f398e25806f5c56f63221e25cb18236fa Latest info. Up to date. modified: ChangeLog 2023-11-29: David Anderson commit c71e435ac49df3f99eac4e0181b75efe4e19e397 Added new fields to Dwarf_Debug for use...soon: de_ftype (one of the DW_FTYPE values) and de_processor (soon to be the object data saying which processor is named in the object file). Documenting new functions dwarf_get_section_info_by_index_a() and dwarf_get_section_info_by_name_a() which return additional section information to callers for all supported object types.. modified: doc/libdwarf.dox Use the new functionss. modified: src/bin/dwarfdump/dwarfdump.c Set the dbg field de_ftype with the DW_FTYPE_ value applicable to the object. modified: src/lib/libdwarf/dwarf_generic_init.c Add the new functions. The old ones now call the new ones. modified: src/lib/libdwarf/dwarf_init_finish.c Record flags, addr and offset (which were not previously recorded. modified: src/lib/libdwarf/dwarf_machoread.c Declare and document the new functions. modified: src/lib/libdwarf/dwarf_opaque.h Set the fields as_offset and as_flags now. modified: src/lib/libdwarf/dwarf_peread.c Declare and document the new functions. modified: src/lib/libdwarf/libdwarf.h 2023-11-29: David Anderson commit 36152b90d3bf88209c1a26bc51ea4ae743cc5b03 Removed trailing whitespace and fixed a couple violations of the CODINGSTYLE.md for libdwarf. modified: dwarf_debuglink.c modified: dwarf_frame.c modified: dwarf_util.h 2023-11-28: David Anderson commit d2b1ec9269ef23aa2527845d483106ff0727fe8b Now up to date with ChangeLog. CoverityScan at 0 defects again. modified: ChangeLog 2023-11-28: David Anderson commit d3596f02aca5bf1a9b151a7c80f5c9cf261508fb Coverityscan found 3 issues. Here, they were real could lead to a segv. the issue was the code has options oriented to testing (probably a mistake to put such in an example) and there was a dereference of a null pointer that could occur in a particular scenario. Fixed. modified: src/bin/dwarfexample/simplereader.c Here the (new, undocumented) option of leaving either of two pointer inputs (for return values) NUll to dwarf_get_section_info_by_name was not coded correctly. Fixed. modified: src/lib/libdwarf/dwarf_init_finish.c 2023-11-28: David Anderson commit 03afade11bd58bb239ec92c2ea517348ba918187 Found more places to use IS_INVALID_DBG() replacing various inconsistent tests of a dbg (Dwarf_Debug pointer). modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_arange.c modified: src/lib/libdwarf/dwarf_debug_sup.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_error.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_util.c 2023-11-27: David Anderson commit fbfbf16e94878e1242f46f1ed9e54a0c9010bbd9 Individual tests of dbg and de_magic are now all in util.h new macro IS_INVALID_DBG to ensure consistency. modified: ../../lib/libdwarf/dwarf_abbrev.c modified: ../../lib/libdwarf/dwarf_alloc.c modified: ../../lib/libdwarf/dwarf_frame.c modified: ../../lib/libdwarf/dwarf_generic_init.c modified: ../../lib/libdwarf/dwarf_global.c modified: ../../lib/libdwarf/dwarf_harmless.c modified: ../../lib/libdwarf/dwarf_init_finish.c modified: ../../lib/libdwarf/dwarf_loc.c modified: ../../lib/libdwarf/dwarf_macro.c modified: ../../lib/libdwarf/dwarf_rnglists.c modified: ../../lib/libdwarf/dwarf_util.h modified: ../../lib/libdwarf/dwarf_xu_index.c 2023-11-27: David Anderson commit 92a841cbc79fbe7c038b68be3b140b5ce27c687e Updated to the date of last minor change. modified: doc/libdwarf.dox Now when reading PE object files callers can get the size of even sections not involved in DWARF. Because useful to some, some of the time. modified: src/lib/libdwarf/dwarf_peread.c modified: src/lib/libdwarf/dwarf_peread.h 2023-11-27: David Anderson commit 76c4b8295cb3ac1a4efade9e79f90ba2470c5f62 Removing pointless blank line modified: bugxml/data.txt 2023-11-25: David Anderson commit c29a5b34d77562766250a79adc8bfbde48eeb4a5 Corrected the gitfixid. modified: bugxml/data.txt regenerated. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-11-25: David Anderson commit c3a2dfc6837485f97cecdb818461cf48f4654ca7 Now with latest modified: ChangeLog 2023-11-25: David Anderson commit d76cce559b898f7059ce5ffd82f3cfd58cb392fe With latest info on debuglink issues modified: bugxml/data.txt The source here uses a libdwarf public function incorrectly which guarantees a memory leak. Now the test case follows the rules... modified: fuzz/fuzz_debuglink.c Fix so that dwarf_gnu_debuglink() will not dereference a NULL pointer. modified: src/lib/libdwarf/dwarf_debuglink.c Clarify the doxgen comments on dwarf_gnu_debuglink(). modified: src/lib/libdwarf/libdwarf.h 2023-11-25: David Anderson commit 0ee98238cc37e79d27cdb2f85eb7af81b9e8215a Up to date with git log modified: ChangeLog 2023-11-25: David Anderson commit d87a170a1c0f79aa001c104367248984307ab221 This is a new-to-me bug report and its fix. DW202311-001 modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-11-25: David Anderson commit ef77596af000719c04bd3e40b97139247ff3efb4 This is the definition of the new macro CHECK_DBG for use inside libdwarf. modified: src/lib/libdwarf/dwarf_util.h 2023-11-25: David Anderson commit f9ce938de8ffa5e837d9215d17bd1b677fdcab03 Ensuring that all API functions that have a Dwarf_Debug input argument check the passed in pointer thoroughly using a new CHECK_DBG macro in dwarf_util.h Many of the place have been incorrectly checking for many years. modified: src/lib/libdwarf/dwarf_abbrev.c modified: src/lib/libdwarf/dwarf_arange.c modified: src/lib/libdwarf/dwarf_crc32.c modified: src/lib/libdwarf/dwarf_debug_sup.c modified: src/lib/libdwarf/dwarf_debugaddr.c modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_dsc.c modified: src/lib/libdwarf/dwarf_error.c modified: src/lib/libdwarf/dwarf_find_sigref.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_groups.c modified: src/lib/libdwarf/dwarf_harmless.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_loc.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_macro5.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_ranges.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_str_offsets.c modified: src/lib/libdwarf/dwarf_stringsection.c modified: src/lib/libdwarf/dwarf_xu_index.c 2023-11-25: David Anderson commit 6fe6f29f1c191202a2334f2eeeca4e2e292adb15 Merge: 7cddf97e 1f698830 Merge branch 'main' of https://github.com/davea42/libdwarf-code merge from github 2023-11-25: David Anderson commit 7cddf97ee462ca27f753328de241cfb350aa6ac9 We now test a Dwarf_Debug better in libdwarf, so we have to set dbg->de_magic properly to test what we want to test here. Done. modified: test/test_linkedtopath.c 2023-11-25: David Anderson commit bd6d53d323061738f70de05f56cc6df0b357646d Minor clarifications and /* dbg */ is now dw_dbg in two places. modified: src/lib/libdwarf/libdwarf.h 2023-11-24: David Anderson commit 06d843c916ab88543cec7b0e64554b8adf1607f2 Was failing to check that the Dwarf_Debug argument was non-null. Exposed as a result of oss fuzz 63900 (which started out as a bug in fuzz/fuzz_debuglink.c) modified: ../src/lib/libdwarf/dwarf_debuglink.c Then we were notified this was originally oss fuzz 56452 ! Odd, we had not heard of 56542 before. The bug has been present since libdwarf/dwarf_debuglink.c was written in 2021. 2023-11-24: David Anderson commit 1f6988307748f427566e3266695bb72d5384bf3d Was failing to check that the Dwarf_Debug argument was non-null. Exposed as a result of oss fuzz 63900 (which started out as a bug in fuzz/fuzz_debuglink.c) modified: ../src/lib/libdwarf/dwarf_debuglink.c The bug has been present since libdwarf/dwarf_debuglink.c was written in 2021. 2023-11-24: David Anderson commit b2d1f44e6a75042a6dc9a3c2f9fe6c9515ca4f5b Missing the #define of O_BINARY. Fixed now. modified: fuzz/fuzz_debuglink.c 2023-11-23: David Anderson commit 528f7495b63d73ec46c153be8770753f4b6869f2 Up to date with git log now modified: ChangeLog 2023-11-23: David Anderson commit 5c91360e97f3cc6a56edbcc1b5e3fd03ad620d4d Now does a better job of printing DW_OP_const_type and a more complete job of printing a dwarf-expression inside another dwarf-expression (odd as that seems). And now, for DW_OP_const_type checks the cu-relative offset for correctness and reports the target die TAG and name. modified: src/bin/dwarfdump/print_die.c 2023-11-22: David Anderson commit 4a62ab06eb85f7b369b5b426039b347caa5ec1c7 Adding printing of a dwarf-expression inside another dwarf expression for certain DW_OP codes. DW_OP_implicit_value DW_OP_entry_value DW_OP_GNU_entry_value modified: src/bin/dwarfdump/print_die.c 2023-11-22: David Anderson commit 898058a794322fc51df7b94a491eaa8a57a7e6c7 Changed an unsigned to Dwarf_Unsigned to avoid a warning from Windows C. modified: src/lib/libdwarf/dwarf_frame.c 2023-11-22: David Anderson commit 32f5ff2ba4ad978c2b27ed31a9380fd9e5253407 Fixed trailing whitespace. Added a blank line in comments for clarity of doxygen output. modified: src/lib/libdwarf/libdwarf.h 2023-11-18: David Anderson commit 6c14db69a3819f43573144bba3d12e4dcdc006fb It's long been the case that for each CU the cu_die would be created twice and one discarded. Now (at least if one uses dwarf_next_cu_header_e() ) that that creation happens only once . modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_find_sigref.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_tied.c 2023-11-18: David Anderson commit 4e585d13d5326579fb4cb462a95c292db9e37c3a Adding space characers in | to force rebuild. modified: fuzz/fuzz_crc.c 2023-11-17: David Anderson commit efa593bc2ddbcd9734ca0dd4ddfff11e492a155a Latest, with typos fixed. modified: doc/libdwarf.pdf 2023-11-17: David Anderson commit 1eadb33958d3d51f3c661a11591e81d43d183796 Corrected spellings and updated the date in the document. modified: doc/libdwarf.dox Corrected a spelling and modified the documentation of dwarf_next_cu_header_d() and dwarf_next_cu_header_e() a little. modified: src/lib/libdwarf/libdwarf.h 2023-11-17: David Anderson commit 55517fccd6117174ba0cea9c618cade3622922f8 Up to date with git log modified: ChangeLog 2023-11-17: David Anderson commit 31b1ce7a1808c1d05f16c36ad9c52a28e5f6ef80 With the new dwarf_next_cu_header_e() details. modified: doc/libdwarf.pdf 2023-11-17: David Anderson commit a312db08715a48318402c4333f0a3385e004cc7b Merge: 865bc397 0732a127 Merge branch 'flagarde-patch-1' The cmake build problem is now fixed. 2023-11-17: David Anderson commit 0732a12741368b9eb69a6e4c555700156a2af238 Merge: 865bc397 9693f06f Merge branch 'patch-1' of https://github.com/flagarde/libdwarf-code into flagarde-patch-1 Fixing cmake typo relevant to zstd. 2023-11-17: David Anderson commit 865bc397c63e12af080d0717f98d642f07df372b Refactored the main CU loop printing DIEs so the actual loop is significantly shorter and easier to understand. modified: src/bin/dwarfdump/print_die.c 2023-11-17: flagarde commit 9693f06ffee3e1f0d0f89fa4b236e63925e064a6 Update FindZSTD.cmake 2023-11-16: David Anderson commit be0a501c954388f0ce236f1de9a888e1b07ddafb Added two new fuzz files as examples of using dwarf_next_cu_header_e() and dwarf_siblingof_c() modified: fuzz/Makefile.am 2023-11-15: David Anderson commit 027888d3efb83820d132cb8f6ae2b5844466860a Now using dwarf_next_cu_header_e() and removing the old call of dwarf_siblingof_b() as the CU-DIE is returned by dwarf_next_cu_header_e(). modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_frames.c An internal function changed its prototype so we have both dwarf_siblingof_b() and dwarf_siblingof_c() with essentially no duplicated code. The implementation of dwarf_next_cu_header_e() added. modified: src/lib/libdwarf/dwarf_die_deliv.c An internal function changed prototype. modified: src/lib/libdwarf/dwarf_opaque.h one line changed to match toe new prototype for the internal function. modified: src/lib/libdwarf/dwarf_tied.c Added and documented dwarf_next_cu_header_e() and dwarf_siblingof_c(). modified: src/lib/libdwarf/libdwarf.h To match up with the new API function we modify the dummy local version which does nothing. modified: test/test_dwarf_tied.c 2023-11-15: David Anderson commit 6e8a397887d6bc8e694c20617cb252a7c8423a4f Documenting dwarf_next_cu_header_e() and dwarf_siblingof_c() and adding important documentation of dwarf_next_cu_header_d() and dwarf_siblingof_b() modified: doc/libdwarf.dox New examples with the new, improved dwarf_next_cu_header_e() modified: doc/checkexamples.c 2023-11-13: David Anderson commit 5ea9cce104ae3e21b3f7337892b982a026154376 These are using the new dwarf_next_cu_header_e() new file: fuzz_die_cu_e.c new file: fuzz_die_cu_e_print.c 2023-11-13: David Anderson commit 449e194bc4ebce603f03d721c031011eda366c84 Added a line to the Linking against libdwarf.a of an essential step of adding -lz -lzstd modified: doc/libdwarf.dox 2023-11-13: David Anderson commit ca40575dc3915093e17b860f65afa666e53afc2a Merge: ec0abd14 853ca654 Merge branch 'jeremy-rifkin-jr/cmake-checks' Approve/commit the CMakeLists.txt improvements. 2023-11-13: David Anderson commit 853ca6546dc61c596a72f06d4dfc0c4e410c9a9e Merge: ec0abd14 b0a6d4b5 Merge branch 'jr/cmake-checks' of https://github.com/jeremy-rifkin/libdwarf-code into jeremy-rifkin-jr/cmake-checks fix definition in CMakeLists.txt and remove unused/redundant checks too. 2023-11-13: David Anderson commit ec0abd14c6e9a1548e0feaf20196a3db04d02473 With a new coverity scan version it found some questionable things. Where an assignment is redundant. Basically adding or removing an assignment of 0. modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/simplereader.c modified: src/bin/dwarfgen/irepline.h modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarfp/dwarf_pro_macinfo.c 2023-11-13: Jeremy commit b0a6d4b5b9c9412ed345686761447c0e99add2c6 Remove unused and redundant checks, also fix a definition 2023-11-12: David Anderson commit b38adecb85a1c0f1ada5ace2c5b259056c0727a5 Clarifying dwarf_next_cu_header_d() modified: doc/checkexamples.c modified: src/lib/libdwarf/libdwarf.h 2023-11-11: David Anderson commit fb3209ad69cea4a156b97f4d4b3e5486bae31ab5 Merge: d05a5125 4391e2ba Merge branch 'flagarde-unloop' Improvements in cmake usage. 2023-11-11: flagarde commit 4391e2ba824908451737dbae1b7fcfc018c7104d put all options on the beginning to be more user friendly 2023-11-11: flagarde commit 6bff62427e5a7c7190b2ace3682ac0131674b368 include it this target commands 2023-11-11: flagarde commit 2c5f41b64bf1ee6d9f4f9c491b680b0a7f31e7ef GENNAMES_OUTPUT is never used 2023-11-11: flagarde commit 953038c32f59491d9c641bcbf7b5296caf77b0b1 enable test just when needed 2023-11-11: flagarde commit ea2efa043b31e5c15d675f076625d58788b8f335 set the header folder in the right place 2023-11-11: flagarde commit 526dcda065a73bffd0f52155b1b3992e00014973 Supress useless variables 2023-11-11: flagarde commit 7338b5019a02694f814bfc01ecdcd7cbfbfed665 Simplify dwarfp 2023-11-11: flagarde commit e55d4f25d71809500c21ad0ea5df8cab0fe5dfb9 simplify dwarf target 2023-11-10: David Anderson commit d05a51256d01a04c8eaf47bad3446924006be78b Up to date with latest cmake changes modified: ChangeLog 2023-11-10: David Anderson commit f697a9077c6263bcb12a7ef2ae3bc50c74be61ba Merge: c8451af2 cede2bd7 Merge branch 'flagarde-cmake' Simplifying cmake CMakeLists.txt and remove a leftover reference to libelf. 2023-11-11: flagarde commit cede2bd7d3666c430cea1f0ea8131ab0a246ff31 Libelf is gone 2023-11-11: flagarde commit a85b6e8a74693634f7edd525941e58cbafe4443b Simplify the logic 2023-11-11: flagarde commit 9e4395a7d609fec0cc72a1df6be8e62b51e1c4fe Zlib and ZSTD are only used in libdwarf so make it PRIVATE 2023-11-11: flagarde commit f6523085f94b23acea1648e04e3e6fdf05ee8131 Remove redundant line 2023-11-11: flagarde commit 66edaed74e9deb45a583d938b438c05077539fa0 DWARF_LIBS is never used 2023-11-08: David Anderson commit c8451af25f5007f6cbb45ac6e0ca5ced43307614 Merge: 2eabd6e2 183e5ea6 Merge branch 'flagarde-zstd' Cleaning up cmake zstd references to be more standard cmake usage. Adding cmakedefine for zstd. 2023-11-08: David Anderson commit 183e5ea6c96756c792e5f62a2c16df3953b63907 Merge: 2eabd6e2 e112a648 Merge branch 'zstd' of https://github.com/flagarde/libdwarf-code into flagarde-zstd Cmake correction for libzstd 2023-11-08: David Anderson commit 2eabd6e2a6d4de9b39e4175072f57206dcab0722 Merge: e1a4cc53 245cc0d6 Merge branch 'flagarde-zlib' Removing some awkward cmake code and switch to find_package(). Much simpler. 2023-11-08: flagarde commit e112a64806dd4fc5226117ae7ec77e900f7d4968 Update config.h.cmake 2023-11-08: flagarde commit bf09d993ce42985d7d5233b6a9d7e94b00cf9a5f propagate to config.h 2023-11-08: flagarde commit 245cc0d6712543fe7bfbecca69a15813a63b605a propagate HAVE_ZLIB_H to config.h 2023-11-08: flagarde commit 218bd5c1246b2cad79ef2811777db63512ad5c4c Use FindZSTD 2023-11-08: flagarde commit d76d3c04dad115b02ea157aa9eb6115a62876cb8 Use FindZLIB.cmake provided by CMake 2023-11-07: David Anderson commit e1a4cc53c3e82727964e1d1e0d8ef1340e4c7152 Merge: e9355ca7 583ece00 Merge branch 'jeremy-rifkin-cmake-improvements' Adds cmake GNUInstallDirs for cross platform installs. Introduces a set of CMAKE_INSTALL_* variables which do not conflict with anything in the libdwarf project. A description in some detail is in the book Provessional CMake (I have no financial interest in the book). 2023-11-06: David Anderson commit 583ece00ed0031e928dc925221922661e51cb053 Merge: e9355ca7 6216e185 Merge branch 'cmake-improvements' of https://github.com/jeremy-rifkin/libdwarf-code into jeremy-rifkin-cmake-improvements Looking at cmake changes 2023-11-06: Jeremy commit 6216e185863f41d6f19ab850caabfff7326020d7 Try to fix include issues 2023-11-06: David Anderson commit e9355ca7a32dcaef96dfb2be9641b0f8b0654a85 Accidentally omitted an ifndef on O_BINARY. Fixed. modified: fuzz_crc.c 2023-11-06: David Anderson commit 1e19293b64bf293a2e274f8881681807f01e8674 Merge: 8698def7 7f806b48 Merge branch 'jeremy-rifkin-cmake-improvements' Fixes a cmake warning and allows more choice in cmake about what to build and whether PIC required. 2023-11-06: David Anderson commit 7f806b481281ab81d189036845fa2bb30ad773f4 Merge: 8698def7 8b163d80 Merge branch 'cmake-improvements' of https://github.com/jeremy-rifkin/libdwarf-code into jeremy-refken-cmake-improvements Want a clearer view of rifkin changes for cmake 2023-11-06: Jeremy commit 8b163d80aa30afd37027e826f6e8becd8e62ee2f Make LIBDWARF_STATIC, LIBDWARF_BUILD, and PIC public definitions 2023-11-06: Jeremy commit 8687cd60eadf6bf37a4a59df96ceb48e5c35faa9 Fixes 2023-11-05: David Anderson commit 8698def74a06747acbbb0cf2037a750a38d066a3 A new file, test/canonicalpath.py, was left out which would make basic debuglink tests fail from a distribution without this file. modified: test/Makefile.am 2023-11-05: David Anderson commit 2a0015b0d63d26d8f1190b1eab0a8ac881607008 A message spelling error correction: diectory->directory modified: scripts/allsimplebuilds.sh 2023-11-05: Jeremy commit 4ca6a7bc86b27d56741923f03c15b5aa274efc28 Set CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 2023-11-05: Jeremy commit 5799cc056302a7f909d9a31863bd0a40ac7ebe5b Bump to 3.5 2023-11-05: Jeremy commit 10d661e45a6b2199f75e885c132b1180511fb50b Some small cmake improvements 2023-11-04: David Anderson commit ee5b78e4bd66063965c7ca607205fd11ddabf9a2 Now freebsd uses cross-platform-actions, as vmactions no longer works for freebsd. modified: test.yml 2023-11-04: David Anderson commit ca727c34a251051515b0df6a1119c763fda2f6e5 trial h 2023-11-04: David Anderson commit 0d450b7d5e947c1f2ddd111ee567037d599d9c3e Passes actionlint modified: freebsd_cmake.yml 2023-11-04: David Anderson commit b23b987345456773caafe70d865b1f7426f35e84 trial g modified: freebsd_cmake.yml 2023-11-04: David Anderson commit df6b15bbff0e82ea7d7b5cbdfc19981bdec57f11 Trial-f modified: freebsd_cmake.yml 2023-11-04: David Anderson commit 3a97aab67b3a5905ba847c5e13b8ca1930deeb53 trial modified: freebsd_cmake.yml 2023-11-04: David Anderson commit d893e75e262a50a2569ac3ed24f8b7a0a22df9ad Trial modified: freebsd_cmake.yml 2023-11-04: David Anderson commit 0de5c2dfc3d976ad49222bfa802483f038f1ead0 Fixing modified: freebsd_cmake.yml 2023-11-04: David Anderson commit 4cb15b806a6fdad75cd0704c9059bf66636183e5 Trying again modified: freebsd_cmake.yml 2023-11-04: David Anderson commit 48335681e96eebd4e52936cb2dcec397b4b1e5a3 Switch to cross-platform-actions modified: freebsd_cmake.yml 2023-11-04: David Anderson commit d89230e0ec759693f271554c75b1f7c597e9b85b commenting out a run that hangs starting vm modified: test.yml 2023-11-04: David Anderson commit cc47409a15926dc09a0bfbd9548deda51de68d7e Removing a run that hangs booting freebsd modified: test.yml 2023-11-04: David Anderson commit 0cfe7788ba99cd0cf29be820c751b73520f9b866 Improved the order of libdwarf calls in examplee, making it easier to release unneeded memory. modified: doc/checkexamples.c 2023-11-04: David Anderson commit 2a6fb5361d9d2da2e97a5d2c9679435cc722667a Making examplee more complete. modified: checkexamples.c 2023-11-04: David Anderson commit a0c5696fa95eed566f2ea46a35bb85fab00deb88 Create CODE_OF_CONDUCT.md 2023-11-04: David Anderson commit 93098873433f0ef7fa0d4a3631aa72fbbddf8cf6 now with dwarf_srcfiles() doc changes here. modified: ChangeLog 2023-11-04: David Anderson commit 2727bb089899417a73657d1918aac5758d2f9a46 Now with much improved doc of dwarf_srcfiles() modified: doc/libdwarf.pdf 2023-11-04: David Anderson commit a18672597c58452ed932b9937fe873f7110421eb Better documentation of dwarf_srcfiles() and accessing the version number of a line table. modified: src/lib/libdwarf/libdwarf.h 2023-11-04: David Anderson commit 4bcf94ee30ffc6d424b776917c984d33bb64316f Corrected the comment about compiling this. Added a missing local variable declaration. modified: doc/checkexamples.c 2023-11-04: David Anderson commit a189179b3c0a447f23c80ddc3849883be2a12650 With latest doc updates shown. modified: ChangeLog 2023-11-04: David Anderson commit 4e2c435a38cd7eb0c05b3ae1616e599cc176a20f Improving format and content of dwarf_srcfiles() documentation. Now with 4 November date. modified: doc/libdwarf.dox modified: doc/libdwarf.pdf modified: src/lib/libdwarf/libdwarf.h 2023-11-03: David Anderson commit 21e4498903193e0b675dff341e61e344870ac8b0 Updated. modified: ChangeLog 2023-11-03: David Anderson commit 7c714926d5680fe1dc4806d20cce2ac8f66fb1eb What canonicalpath.py returns for some directories is now ...std... instead of the previous ..std.. modified: test/debuglink.base modified: test/debuglink2.base The switch to canonicalpath.py was not correctly handled. Now fixed. modified: test/test_debuglink-a.sh modified: test/test_debuglink-b.sh 2023-11-03: David Anderson commit 40e09c31500c492c33b09f52c82e4e40941d5721 Minor tweaks modified: doc/libdwarf.dox Much more complete description of what dwarf_srcfiles() returns and how to use it. modified: src/lib/libdwarf/libdwarf.h 2023-11-03: David Anderson commit 5b2b463f756660bbd20fd0746a54503536770c71 Small changes so that we can pass regression testing on MacOS and hopefully msys2. modified: ChangeLog 2023-11-03: David Anderson commit d00ec74b9eadbdc6e0e83089944cd59841ec63fc Removing debug print statements. modified: test/canonicalpath.py 2023-11-02: David Anderson commit 9530b4a8100ea8e931d5b3d552e5d688bcdb94bb This is the same as regressiontests/script/canonicalpath.py new file: canonicalpath.py Now use canonicalpath.py and ignore test_transformpath.py modified: test_debuglink-a.sh modified: test_debuglink-b.sh 2023-11-02: David Anderson commit 3df08b8af737c11f774c1586460ad5d8c443d3c0 These were not treating O_BINARY correctly and/or failing to use it at all. It is necessary on Windows to read object files properly. No change in logic at all. modified: fuzz/fuzz_aranges.c modified: fuzz/fuzz_crc.c modified: fuzz/fuzz_crc_32.c modified: fuzz/fuzz_debug_addr_access.c modified: fuzz/fuzz_debug_str.c modified: fuzz/fuzz_debuglink.c modified: fuzz/fuzz_die_cu.c modified: fuzz/fuzz_die_cu_attrs.c modified: fuzz/fuzz_die_cu_attrs_loclist.c modified: fuzz/fuzz_die_cu_info1.c modified: fuzz/fuzz_die_cu_offset.c modified: fuzz/fuzz_die_cu_print.c modified: fuzz/fuzz_dnames.c modified: fuzz/fuzz_gdbindex.c modified: fuzz/fuzz_globals.c modified: fuzz/fuzz_gnu_index.c modified: fuzz/fuzz_init_b.c modified: fuzz/fuzz_init_binary.c modified: fuzz/fuzz_macro_dwarf4.c modified: fuzz/fuzz_macro_dwarf5.c modified: fuzz/fuzz_rng.c modified: fuzz/fuzz_set_frame_all.c modified: fuzz/fuzz_showsectgrp.c modified: fuzz/fuzz_simplereader_tu.c modified: fuzz/fuzz_srcfiles.c modified: fuzz/fuzz_stack_frame_access.c modified: fuzz/fuzz_str_offsets.c modified: fuzz/fuzz_tie.c modified: fuzz/fuzz_xuindex.c Fixing the reporting of filenames so that even on msys2 the report is sensible (for msys2) modified: src/bin/dwarfdump/dwarfdump.c Tweak to make it work. modified: src/lib/libdwarf/meson.build Introducing the correct header ifdefs involving DWP_API to match the concept in libdwarf.h modified: src/lib/libdwarfp/libdwarfp.h 2023-11-02: David Anderson commit ca7c784d5e45baf132adf0238bff4ca835fa0f29 A new month, so a change in the titles. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2023-11-02: David Anderson commit bca7f325467a5dd11d5f8b6afc8594b269822100 Changed a suggestion from buildandreleasetest.sh to allsimplebuilds.sh as that makes more sense here. modified: READMEmacos.md 2023-10-31: David Anderson commit e00930a69244025dda57b53238bc6231117c9bd9 Now we test O_BINARY and only if not already set set it to zero. Because in the msys2 windows environment O_BINARY has a value already (from system headers). So we avoid a poinless warning. modified: fuzz/fuzz_aranges.c modified: fuzz/fuzz_debug_str.c modified: fuzz/fuzz_dnames.c modified: fuzz/fuzz_gdbindex.c modified: fuzz/fuzz_globals.c modified: fuzz/fuzz_gnu_index.c modified: fuzz/fuzz_init_b.c modified: fuzz/fuzz_macro_dwarf4.c modified: fuzz/fuzz_set_frame_all.c modified: fuzz/fuzz_str_offsets.c 2023-10-30: David Anderson commit 0a4ba6b0b5dcee6a1876d660c0286960e857a5d6 Correcting the code looking for libz/libzstd in /opt/local or /usr/local. DO NOT USE THIS COMMIT it is just to save this correction and further changes will be madel modified: meson.build modified: src/lib/libdwarf/meson.build 2023-10-30: David Anderson commit 667a6fa8aa7f194a93feae917807033f876fae91 Simplifying. We now require both zlib and libzstd to be present for decompressing object sections. If one is missing it is the same as both missing and then we build libdwarf with no decompression capability. It's much simpler code this way. modified: src/lib/libdwarf/dwarf_init_finish.c 2023-10-25: David Anderson commit b778c2a9a895bfe7e71aa6c1159a59741579a209 Checking for an app (such as cmake) was not properly dealing with the app is not present situation. Resulted in warning. Fixed. modified: scripts/allsimplebuilds.sh 2023-10-25: David Anderson commit 45c4b785359b32ff20a9325e2776855ee9abfaa1 Now meson can find and use zlib, libzstd even if they are in /usr/local/lib instead of system directories. Or in /opt/local/lib etc. No user action required. We no longer use any deprecated meson functions. The meson version required is still 0.53. modified: meson.build modified: test/meson.build 2023-10-25: David Anderson commit f04d7df32ff612de1f24dcc47d5c2faea618e017 Better reporting on zlib libzstd, hopefully better searching too. modified: meson.build 2023-10-25: David Anderson commit d51dd661329891a7919feabc47f35760314fee00 Brought up to date. modified: ChangeLog 2023-10-25: David Anderson commit b5c2aa54344f4a725ecb7e81cd7f92d68e3d48ba Now using project_build_root() and project_source_root() instead of the deprecated functions build_root() and source_root(). Updated the required version to 0.56 as this is the version required to support the project*() commands we now use. Also added code to look in specific directories beyond the standard locations for zlib and libzstd (/opt/local/lib and /usr/local/lib) so the build can work in more environments. modified: meson.build modified: test/meson.build 2023-10-25: zerons commit 809f32b7664f04a9cec28dd1a518725190a26cbd handle DW_AT_data_bit_offset in get_attr_value() (#189) An oversight that this pull fixes. 2023-10-24: David Anderson commit 0e6464b2a55c6a3355695ef9500b79c5d8863ed7 Minor correctsions for meson modified: README.md Toward making it all work more places. modified: meson.build Making it more tolerant of warnings from compilers. modified: scripts/allsimplebuilds.sh Removing unused locals. modified: src/bin/dwarfgen/createirepfrombinary.cc modified: src/bin/dwarfgen/dwarfgen.cc modified: src/lib/libdwarfp/dwarf_pro_section.c Correcting build args for libdwarfp modified: src/lib/libdwarfp/meson.build Removing obsolete ifdef as we do not test that C90 header files exist modified: test/test_macrocheck.c 2023-10-22: David Anderson commit ea1d31e8f88104fcf9a86f529615981b964b7b66 Now present with just a 2 line comment. new file: README 2023-10-22: David Anderson commit 0402c07c9d87dc9aa76681ce11de8f0fc3c35b43 A change to Makefile.am means we can delete this now, leaving README.md . deleted: README 2023-10-22: David Anderson commit d5f0e75ee93986404d69c96d483e3ade6a520a2a All have basically the same line added to each executable(), adding a "link_args :" so that the -fsanitize options are passed to the link step as well as compile steps when running the gcc -fsanitize options. modified: meson.build modified: src/bin/attr_form/meson.build modified: src/bin/buildopstab/meson.build modified: src/bin/builduritable/meson.build modified: src/bin/dwarfdump/meson.build modified: src/bin/dwarfexample/meson.build modified: src/bin/dwarfgen/meson.build modified: src/bin/gennames/meson.build modified: src/bin/tag_attr/meson.build modified: src/bin/tag_tree/meson.build modified: test/meson.build 2023-10-21: David Anderson commit f1408bf9e7c98654173fbf5672ee3671e7db0e21 Documented new fde 0.9.0 fde frame function in the Changes section modified: doc/libdwarf.dox 2023-10-21: David Anderson commit 37c0c26e48754ee69288d73f238d4f54ce957fdb Now checks if required functiosn exist and sets HAVE_UTF8 inconfig so dwarfdump built with meson and print UTF8 properly. modified: meson.build Added options sanitize as in -Dsanitize=true so we can use -fsanitiz3 and wall as in -Dwall=false so we can turn off warnings as errors. modified: meson_options.txt 2023-10-21: David Anderson commit 6504fba6ee02c47517489040afa574a040166478 All these additionally compile dwarfdump_dd_utf8.c so they build with meson (required for swithching regressiontests to building with meson) modified: src/bin/attr_form/meson.build modified: src/bin/dwarfdump/meson.build modified: src/bin/tag_attr/meson.build modified: src/bin/tag_tree/meson.build 2023-10-21: David Anderson commit 15d2a8aed6f46f24ba907c181efd3789fec499f5 libdwarfp was misnamed resulting in generating src/lib/libdwarfp/liblibdwarfp.a Fixed now. modified: src/lib/libdwarfp/meson.build 2023-10-21: David Anderson commit a377f4f21942e20b8a391a3092d402eb3ff09c3f Left-over references to libelf functions removed. modified: src/lib/libdwarfp/meson.build 2023-10-21: David Anderson commit d493bd62b64f157b27529da897ddaf7b1678e33a Added another example of getting frame registers using the latest new frame function in libdwarf.h, modified: src/bin/dwarfexample/frame1.c 2023-10-21: David Anderson commit ec9e7b682f198fdc4b735ca5487b724263b95584 When printing lines about dSYM or debuglink paths returned change the prefix of the output to $HOME if that is equivalent to what is the returned string. This enables regressiontests to work in more system types with no errors. modified: src/bin/dwarfdump/dwarfdump.c 2023-10-18: David Anderson commit 67215ca4b6f42ce2b591335dd6cf6b384b782b11 One line had an incorrect indent (per project codingstandards). Fixed. modified: src/lib/libdwarf/dwarf_frame.c 2023-10-18: Ritesh Oedayrajsingh Varma commit 17de6b8f363f0dc978b6f844c6f1657ebc46f627 Added `dwarf_get_fde_info_for_all_regs3_b` which returns the subsequent PC and whether there are more rows, for easy iteration through all rows in an FDE. This is similar to what `dwarf_get_fde_info_for_reg3_c` already does. (#188) 2023-10-13: David Anderson commit 82798b35a5dbb6d0a7a6ddddac0f2e7dc484f4ff No need to check for automake in a release, it's not needed unless one is building from a git clone. modified: scripts/allsimplebuilds.sh A compiler noticed a used-but-not-set local variable. Now removed. modified: src/bin/dwarfexample/simplereader.c 2023-10-13: David Anderson commit 17039c9d808e49ab64b04715ca1a752a0bfc7337 Specify what build files to emit from cmake because the default is different on some systems. Here we choose -G "Unix Makefiles" whereas in scripts/allsimplebuilds.sh we use -G Ninja modified: scripts/buildandreleasetest.sh 2023-10-13: David Anderson commit 7754301b7063809580c77d1d880c7e193d30f257 Left off a back-quote(`) in new scipt lines ... which broke this script for a few minutes. modified: scripts/buildandreleasetest.sh 2023-10-13: David Anderson commit e6eea37b489b22024b8aa5b2ec97e8655c62089a Added words about scripts/allsimplebuilds.sh modified: READMEwin-msys2.md 2023-10-13: David Anderson commit 0ff5c18bc10bb110c92fd92ac7b605b6045bfe45 Added scripts/allsimplebuilds.sh to the files in the distribution. modified: Makefile.am Added a few words about scripts/allsimplebuilds.sh modified: README.md Modified to remove accidental cmake -DWALL in two places and remove two instances of 'meson configure' which were not required and which, on msys2, forced one to page through by hand output like 'more' that showed all the meson options. modified: scripts/allsimplebuilds.sh 2023-10-13: David Anderson commit e5cf21b004c1b85834c9396062aee5a311c2c82c Adding output of the number of minutes at the end of the run of each script modified: scripts/buildandreleasetest.sh modified: scripts/run-all-tests.sh 2023-10-13: David Anderson commit aa1b4c6f3b16b241b2be8848e3f75b5a86806867 New script demonstrating useful simple builds new file: scripts/allsimplebuilds.sh 2023-10-11: David Anderson commit ef4b5ebd89ef35c2b92f8ba7d61c2f92f671bf44 Minor tweak to correct a typo (only affected windows msys2 builds) modified: scripts/buildandreleasetest.sh 2023-10-11: David Anderson commit 88f9a6619cff179da4fcc19f8a25e465292d87ec All have changes so they work on windows msys2 as well as unix-like systems. modified: test/test_debuglink-a.sh modified: test/test_debuglink-b.sh modified: test/test_dwarfdump.py modified: test/test_dwarfdumpsetup.sh modified: test/test_jitreaderdiff.sh 2023-10-11: David Anderson commit e76b0da1a7fc9a7fcc97fe254358f5ef0accc769 Added important details modified: READMEwin-msys2.md Major revision , now works on Windows msys2 as well. modified: scripts/buildandreleasetest.sh 2023-10-09: David Anderson commit e40372ce4c656e3a76f20117d80f610df582c2f6 Working toward scripts that work on msys2 with shared libdwarf. modified: scripts/buildandreleasetest.sh modified: test/test_dwarfdumpsetup.sh modified: test/test_jitreaderdiff.sh 2023-10-09: David Anderson commit bd752633c39519b2d2564c5bd5750ab2d86b7b44 A simple added rule will avoid automake complaining README is gone. modified: Makefile.am 2023-10-09: David Anderson commit f717ac1039bea2c1454edefcd8d7cad37565f4eb Some versions of autoreconf insist on README and ignore README.md. So reintroducing README (a copy of README.md) new file: README 2023-10-07: David Anderson commit df4cc3f4ef40b442a30203a3691f7ca3273ae226 Correcting md typo modified: READMEwin-msys2.md 2023-10-07: David Anderson commit be42d89044a97e84c7d701c29a6fb4155a871f5c Correcting some errors and also hoping these changes will make things easier to read. modified: README.md modified: READMEcmake.md modified: READMEwin-msys2.md 2023-10-07: David Anderson commit ae3271adac45e45d27afb289c601d90f0844ecff It was failing to mention the base build directory as a source for include of config.h. Fixed. modified: src/bin/gennames/Makefile.am 2023-10-07: David Anderson commit 639e2bb4daf71899e6f7a2163ea831a1b1b4aafc Minor tweak to the script modified: scripts/buildandreleasetest.sh 2023-10-07: David Anderson commit 020bbd37f4529999e37a0a0ca674f6d3cca7dec0 Now, with cmake, both shared-lib and non-shared work properly for Win32 msys2 modified: CMakeLists.txt modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfexample/CMakeLists.txt modified: src/bin/dwarfgen/CMakeLists.txt modified: test/CMakeLists.txt 2023-10-07: David Anderson commit 51e42f74e2ad659c33bd451b01f32675871be6b4 Now listing the revised set of README* files. modified: Makefile.am 2023-10-07: David Anderson commit 84c189d2323382d65f0a40a2e9f7c02f4d6f7079 Updated DW202310-002. Fixed. modified: bugxml/data.txt Regenerated modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-10-07: David Anderson commit 3a658bd1dd7437948cecbf82bb9b24f5f6122a7d DW202310-002 ossfuzz: 63024 The bug was a copy-paste mistake. This bug was in the function when the function was first made public, seven days ago. modified: src/lib/libdwarf/dwarf_machoread.c 2023-10-06: David Anderson commit 19a850b5aae47303dcf9298c05a4e90c8b80a0b4 Now all README are .md and with a new one for msys2 details. deleted: README deleted: README.cmake modified: README.md new file: READMEcmake.md new file: READMEwin-msys2.md 2023-10-05: David Anderson commit f6265d5779245f8737c5fc6553569986c96f2134 More accurate description to setup msys2 mingq64 in windows 10 modified: README.cmake 2023-10-04: David Anderson commit 28509ddf7cb43015ed7a3760bf4c99b3e9553bed Regenerated with version 0.9.0 modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2023-10-04: David Anderson commit 5c33a19272d08df6077fcf54420f7ed801f809a5 Updated with latest modified: ChangeLog 2023-10-04: David Anderson commit 174b9777367869ce6d7200a6084bf42b815c690f All are now denoted as version 0.9.0 modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2023-10-04: David Anderson commit 453b45451766676d2a0a539c7177c617316089af With pacman commands for use with msys2 on Windows so one can build there. modified: README.cmake 2023-10-04: David Anderson commit 4b2285d43d14a307ad956fdf46104c2a68a9b718 Added DW202310-001 ossfuzz 62943 on reading Apple Universal Binary modified: bugxml/data.txt Regenerated modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-10-04: David Anderson commit a9c64d849e05b89509c9f51aa4d0febcca518e18 Now with full universal binary timeline to date. modified: ChangeLog 2023-10-03: David Anderson commit aea77dad8745d9aad5275c3226e4e3156effa71f This is the fix for vulnerability ossfuzz id ossfuzz62943, DW202310-001 which has been in the public repository for one day. Was failing to check, very early on, for an incomplete Mach-O universal object. modified: src/lib/libdwarf/dwarf_machoread.c Here is the timeline of Apple Universal Binary handling in libdwarf: 2023-09-20 In github libdwarf-code discussion #185 asks if libdwarf supports Mach-O universal objects, which We will abbreviate here as Apple Universal Objects (AUB). Each AUB may have a number of Mach-O executables inside. 2023-09-21 Initial commit in the readelfobj-code project of code reading AUB. 2023-09-26 Completed code handling AUB in readelfobj-code project.. 2023-09-27 In the libdwarf-code project we do a little code cleanup related to Mach-O object files. Added a new API function for AUB in libdwarf.h 2023-09-29 Initial commit in dwarfdump so dwarfdump can select what Mach-O object in an AUB to report on (defaults to object 0(zero)). 2023-09-29 Full AUB support is now public on github, 2023-09-30 DW202309-002 ossfuzz id 62833 DW202309-003 ossfuzz id 62834 DW202309-004 ossfuzz id 62842 reported. Bugs in AUB handling present publically for one day. 2023-10-01 Pushed fix for the three bugs in AUB handling: DW202309-002 ossfuzz id 62833 DW202309-003 ossfuzz id 62834 DW202309-004 ossfuzz id 62842 2023-10-02 DW202310-001 ossfuzz id 62943 reported on AUB handling. 2023-10-03 Pushed fix to ossfuzz 62943 DW202310-001 2023-10-03: David Anderson commit 1eb099f0a31b836d0a9919643debadbe4d482150 One of the new messages about Mach-O universal binary files had words run togetherr, now fixed. modified: src/lib/libdwarf/dwarf_errmsg_list.h 2023-10-02: David Anderson commit 1f4b850411a93648e804be0d33416190b84b1c54 Up to date now. modified: ChangeLog 2023-10-02: David Anderson commit 8554a94e7a3661a34eaa99951bdcee2b0239fd93 Two places in _dwarf_object_detector_universal_head_fd() we failed to free(fa). Now we do so. modified: src/lib/libdwarf/dwarf_machoread.c 2023-10-02: David Anderson commit e533fccd7d891dd66f96a298227a15dd0c05ec78 Now we can easily check for gross corruption of the universal binary headers, and we now check for such. modified: src/lib/libdwarf/dwarf_machoread.c Added a new field with the actual whole file size so when reading universal binaries we can easily check for gross corruption of the universal binary headers. au_filesize. modified: src/lib/libdwarf/dwarf_machoread.h 2023-10-02: David Anderson commit 0f996051eaf56238cac4a1cf7031166212ab4646 Fixed accidental blank in error 502. Added 503 (as it is required, defined in libdwarf.h) modified: src/lib/libdwarf/dwarf_errmsg_list.h 2023-10-02: David Anderson commit e57d0f251d85549b7aad5288ef161d160eff8d90 Removed trailing whitespace. modified: src/lib/libdwarf/libdwarf.h 2023-10-02: David Anderson commit ea31407a95ce862e00c2748d7ba8367ee1621f2b Regenerated modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-10-01: David Anderson commit af3eedfd123a55b876022eba5974defb90b166c6 Updated the text on the latest of the bugs. modified: ../../../bugxml/data.txt Corrected a comment on the new function dwarf_init_path_a(). modified: dwarf_generic_init.c 2023-10-01: David Anderson commit 782cc96d558402739288e58fbedd0240844a9b99 Removed 150 lines of #if 0 code (not useful code) and a now-empty function. modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2023-10-01: David Anderson commit 2af75f9fc0042c06c12c820667621fecd78fb4b5 Up to date now. modified: ChangeLog 2023-10-01: David Anderson commit 4dcfdaf50c496ef743bc581f139ca9f4d42ddf47 Completed report on DW202309-004, DW202309-003, and DW202309-002. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-09-30: David Anderson commit 1608be2e62e028aad0f1d7ad17c5863eca0b57e2 up to date. modified: ChangeLog 2023-09-30: David Anderson commit f7c7e84e5a77915bb6570215887118d8e7759122 We have reset memcpy()-like functions to use the prototype that libdwarf has long exported to callers (on request). void copy_word(void *, const void *,unsigned long) The length in practice is small where our swap/no-swap functions are involved. There were some inconsistencies but freebsd 32bit with clang caught them all, so it should be ok everywhere. modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_memcpy_swap.c modified: src/lib/libdwarf/dwarf_memcpy_swap.h modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_peread.c 2023-09-30: David Anderson commit 566f4ee9305d708853e53ee7589cf93830ca6a3b Fix indents and remove trailing whitespace. modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_query.c 2023-09-30: David Anderson commit e8df98c5c6629b75402b8ea5e5a44797fb3ae4b3 Remove left-over printf debug output. modified: src/lib/libdwarf/dwarf_machoread.c 2023-09-30: David Anderson commit a19f51f629dc2d2f84d99926494422cc57e5c10f Now all the word_swap swap_bytes functions have the length argument as size_t (there was some with unsigned long). No calls to these should have a length > 8 (since swap makes no sense on non-integers). modified: src/lib/libdwarf/dwarf_memcpy_swap.h modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_peread.c 2023-09-30: David Anderson commit 1289ba5b2fe87116e2bd3a79e0373f9460f025a4 Small refactoring of freeing internals so we can use the right call at the right point in case of error. Simpler and clearer. modified: src/lib/libdwarf/dwarf_machoread.c 2023-09-30: David Anderson commit d88502010481d7bfa550bdf2dd875a83f7462029 New leak reports, all new and directly related to changes yesterday. Have more fixes to commit today. modified: bugxml/data.txt 2023-09-30: David Anderson commit 5ac9aa1a0adeb18bad6aa531dddc59b35d9b0030 Removed several lines of dead code: Coverity Scan correctly reported it was dead code. modified: src/lib/libdwarf/dwarf_frame2.c 2023-09-29: David Anderson commit 834dbc50dec104fbea389b8dcddb8e6c4cc9dfa8 Version in generated source is now 0.8.1 modified: src/lib/libdwarf/dwarf_names.c 2023-09-29: David Anderson commit c529bb42fa9088c4f7b61a1253dda42348f15523 version in genererated source is 0.8.1 now modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h 2023-09-29: David Anderson commit 7b3fdd228496794c9fc58e049f2e31333a64e80d With universal binary features documented. modified: doc/libdwarf.pdf 2023-09-29: David Anderson commit 4c995195d2009ab24454c914d59a1ce23d4484c7 Fixed a single misspelling in a doxygen comment. modified: src/lib/libdwarf/libdwarf.h 2023-09-29: David Anderson commit 80249f4423b83389c1bd1c4d1ae49f7f5fbc81ea Small spelling corrections and wording changes. modified: libdwarf.dox modified: ../src/lib/libdwarf/libdwarf.h 2023-09-29: David Anderson commit 5ad97c9da90aa5830cc8410f142cb288304806c9 up to date. modified: ChangeLog 2023-09-29: David Anderson commit 0bf443a5b24c503e5ca37d0e17323f695780ec1b Now the tied-file (if Mach-O universal binary) gets reported as such. modified: src/bin/dwarfdump/dwarfdump.c 2023-09-29: David Anderson commit e612fb75b2b75ff78f550aea7c659799432f5bb4 Now dwarfdump prints the number of binaries in the Mach-O universal binary referenced and also prints the number (index) of the individual binary being reported on. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dwarfdump.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_query.c new file: src/lib/libdwarf/dwarf_universal.h modified: src/lib/libdwarf/libdwarf.h 2023-09-29: David Anderson commit 3422281f8006574059c2ab95ec1a798d89764ffc Support for Mach-O univeral-binary reading DO NOT USE THIS COMMIT. Shortly the many debugging printf lines will be removed. modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/dwarf_abbrev.h modified: src/lib/libdwarf/dwarf_alloc.h modified: src/lib/libdwarf/dwarf_errmsg_list.h modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_macho_loader.h modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_machoread.h modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_object_detector.h modified: src/lib/libdwarf/dwarf_opaque.h 2023-09-29: David Anderson commit ce7412392dfae1487572e97428acab63b5cc35ce Adding option --format-universalnumber= so if reading a Mach-O universal binary one can select which executable from that universal binary libdwarf should read. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_glflags.c modified: src/bin/dwarfdump/dd_glflags.h modified: src/bin/dwarfdump/dwarfdump.c 2023-09-29: David Anderson commit f60c9e791aa5c6adc42a3027a01b696f7e38a3a5 Correct indent mistake. modified: dwarf_rnglists.c Remove trailing whitespace modified: libdwarf.h 2023-09-27: David Anderson commit a01681e600acd695658657165c047b9ba8ea9da2 Removing the unused field mo_is_64bit from an internal struct. modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_machoread.h Corrected four filesize casts from (size_t) to (Dwarf_Unsigned) which represents a correction (in practice invisible to library users). modified: src/lib/libdwarf/dwarf_object_detector.c Added a new function, which is invisible to users for now. modified: src/lib/libdwarf/libdwarf.h 2023-09-27: David Anderson commit 3b0408a74c6d2f2b9a81fe3fc0a1564b509ad84e Regenerated with latest vulnerability listed. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-09-23: David Anderson commit 04140b4dcf9d5db880fbf15a76c12290f768daa3 Documenting fix to DW202309-001 modified: bugxml/data.txt 2023-09-23: David Anderson commit cd741379bd0203a0875b413542d5f982606ae637 Fixing DW202309-001 ossfuzz 62547, a bug which has been in the code for many years. The symptom was use-after-free in calling dwarf_finish(), but provoked by code in dwarf_get_fde_for_die(). modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_opaque.h 2023-09-23: David Anderson commit 2867fa3cc7a79ba89c3b7f5672b6096ac4fc28ff New ossfuzz bug DW202309-001 recorded here now. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html Version now 0.8.1 modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarf.pdf modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2023-09-23: David Anderson commit e367283d6299057c52fdf3e50c13d1759086d55a Preparation for dealing with MacOS universl binaries. New structs not yet used. modified: src/lib/libdwarf/dwarf_macho_loader.h 2023-09-18: David Anderson commit d482de0857770c02ac098ce94f487909b06b567a Up to date with git log modified: ChangeLog 2023-09-18: David Anderson commit 25ddab93a059ea8ecce088c73d3b4c66a14dbc23 Documentation issues corrected/updated. modified: README modified: README.md modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html modified: doc/libdwarf.dox 2023-09-17: David Anderson commit 81d80f9eb1605046cd4f75c49335d9d1542e3af6 Small changes in a coupld doxygen comments for clarity. modified: src/lib/libdwarf/libdwarf.h 2023-09-14: David Anderson commit 77b4280522ca87df6a6c6f63776d889d2b5c2bc8 Added clarifying comentary about an argument to dwarf_rnglists_get_rle_head(). modified: src/lib/libdwarf/dwarf_rnglists.c 2023-09-14: David Anderson commit 7ae36936197bbd3c7f2772f790cf9ed9d14b4a84 Added commentary about an argment to dwarf_rnglists_get_rle_head() modified: src/lib/libdwarf/libdwarf.h 2023-09-12: David Anderson commit f8cde1b5c811565cc6de994687a698ae59498b1f Remove trailing whitespace and fix indent and fix too-long lines. modified: dwarf_frame.c modified: dwarf_frame2.c modified: dwarf_machoread.c 2023-09-12: David Anderson commit 9d25bfd2868a2baea83c761fa6d38e0a7229e4ee latest git log modified: ChangeLog 2023-09-12: David Anderson commit ecb2d773f166b7c322d91c312f207d3684d76a6f Merge: 4c48d4cf 320e86eb Merge branch 'main' of https://github.com/davea42/libdwarf-code Fixing a typo in a doxygen comment 2023-09-12: Jeremy Rifkin commit 320e86eb126ef0c5f99370d7dd093c1343e2f7e5 Fix small typo (#182) 2023-09-11: David Anderson commit 4c48d4cfe66674f9c1c6023ceec5d9491670f6d9 Up to date with git log modified: ChangeLog 2023-09-11: David Anderson commit f6941ef1254d72c621fbe8d2f8c1abe9a60262db On FreeBSD 13.2 clang 14 -fsanitize catches certain errors before adding to pointers or before having unsigned add/subtract wrap around (whereas before such were ignored and we could test afterwards for invalid results). So we check before doing the arithmetic now and return error if appropriate. modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame.h modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_rnglists.c 2023-09-11: David Anderson commit 407236514e8c0addac26949db75e4ca7fc56e0fe Minor changes in doxygen comments on frame access functions. modified: doc/libdwarf.dox modified: src/lib/libdwarf/libdwarf.h regeneratid modified: doc/libdwarf.pdf 2023-09-11: David Anderson commit 21984aa2874a65bb8919b2bdb025dfc0336ee2d3 Minor update on building from git source. modified: README modified: README.md 2023-09-09: David Anderson commit f34e0065c6c8f6081b536c23753f2e53c55c71ed Up to date with git log. modified: ChangeLog 2023-09-09: David Anderson commit 6759e3b4e9f6169d8f0ab34c457efc39394989ec Refining the wording now we have successfully run libdwarf-regressiontests. modified: READMEmacos.md 2023-09-08: David Anderson commit 68daec433fc7f72ab0b66115e9aae1aa3f91c21f Small clarification of the two new functions. modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2023-09-08: David Anderson commit 1ac73812595632be4a60715958b7ee126b2619dc Tweaking wording. modified: READMEmacos.md Clearer now that continuing to use dwarf_get_fde_info_for_reg3_b(), and dwarf_get_fde_info_for_cfa_reg3_b() versions for frame register access is ok. Lets one use current or earlier libdwarf shared objects. the new _c() versions simply return one argument as the correct type (Dwarf_Signed). modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2023-09-08: David Anderson commit 29f9aa527b21926c772f4563ab90747fa3ff2c34 A compiler warned of instances of set-but-not-used variables and a couple imprecise declarations. All now fixed. modified: src/bin/attr_form/attr_form_build.c modified: src/bin/buildopstab/buildopscounttab.c modified: src/bin/dwarfdump/print_abbrevs.c modified: src/bin/dwarfdump/print_macro.c modified: src/bin/dwarfdump/print_ranges.c modified: src/bin/gennames/gennames.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_tied.c modified: src/lib/libdwarf/dwarf_util.c 2023-09-08: David Anderson commit bac3cc0e4987c2850103b1b467d366e46c32678e Now we test on MacOS new file: READMEmacos.md For a 32bit system the count of files created by a cmake install of libdwaff differs (lower by two) than for a 64 bit system. So allow either count. modified: scripts/buildandreleasetest.sh 2023-09-07: David Anderson commit 9c615e942d972f5a18856ac37c9c8ec421240b09 Compiler found two unused const variables. Removed them. modified: src/bin/dwarfgen/dwarfgen.cc 2023-09-07: David Anderson commit bfcfbc61d783771298edeaa6c4398bc95e34ae20 Small comment changes for doxygen related to the Frame dw_offset argments. modified: libdwarf.h 2023-09-07: David Anderson commit f3fa1d61b60763855c093bcc2ee8c473247f77d7 Now set for 0.8.0 modified: doc/libdwarf.pdf 2023-09-07: David Anderson commit 3d770bf3441ea646351373d297627dba27a4f70e Regenerated for 0.8.0 modified: doc/libdwarf.pdf 2023-09-07: David Anderson commit 2d3c064780a07f1b1e1d9844325d7ad281fdf248 Regenerated with 'make rebuild' to get the correct version in these headers. modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2023-09-07: David Anderson commit afa59adc34f3446402a63a44bfbe651ad6b6a029 Updating version. No change to libdwarfp. modified: doc/libdwarfp.mm 2023-09-07: David Anderson commit 6251f4b8a0543f31d707ad4a3e88b637fe9956a5 Version changed to 0.8.0 for the next release, reflecting the addition of two new functions. modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: meson.build 2023-09-07: David Anderson commit b052c88512369771ff946f824d83064656673695 Added new functions dwarf_get_fde_info_for_reg3_c() dwarf_get_fde_info_for_cfa_reg3_c() which correctly return a Dwarf_Signed value for the dw_offset argument. dwarf_get_fde_info_for_reg3_b() dwarf_get_fde_info_for_cfa_reg3_b() remain unchanged. These return a Dwarf_Unsigned dw_offset value, which callers must cast to Dwarf_Signed for correct use on DWARF frame information, as has been true since the first libdwarf. modified: src/bin/dwarfdump/print_frames.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/libdwarf.h 2023-09-06: David Anderson commit 687af9c6f9305f433f4fb94435c75a6e7c3a37cd Up to date with git diff modified: ChangeLog 2023-09-06: David Anderson commit ebc892ec98f7003a5b47fecc67d2596f2ca9e7ca Removing trailing whitespace, fixing indents. modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/showsectiongroups.c modified: src/bin/dwarfexample/simplereader.c 2023-09-06: David Anderson commit e15af5c57dbfc9c9be6fe6f890dc0abb6aec10c4 Removing trailing whitespace, fixing indent mistakes, and shortening too-long lines. Per codingstandard. modified: src/lib/libdwarf/dwarf_frame.h modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_line.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_object_detector.c modified: src/lib/libdwarf/dwarf_object_detector.h modified: src/lib/libdwarf/dwarf_safe_arithmetic.h modified: src/lib/libdwarf/libdwarf.h 2023-09-06: David Anderson commit 1e0d6e36dfad997a01fcb48586568fad4f042b4d Added a sanity check and explicitly cast the dw_offset to Dwarf_Signed (previously it was implicit in two calls). modified: src/bin/dwarfexample/frame1.c 2023-09-06: David Anderson commit 0dbbbdf876dd5a9bab692d93ef56c60c5980910e Added commentary, on frame register data and added explicit cast to use of the dw_offset value used in print_one_fde() Added a sanity check for a library error. modified: src/bin/dwarfdump/print_frames.c 2023-09-06: David Anderson commit f2b487fbc062d2703f9938bf4c1cb5ed4b464461 Fixed a typo in doxygen comment. modified: src/lib/libdwarf/libdwarf.h 2023-09-06: David Anderson commit 27efdf020621e67a3c913da66b8975c4cc1bf7e8 Refined comments that point out a very old error in the data type of DWARF frame expression content in return arguments. In struct Dwarf_Regtable_Entry3_s (accessible via dwarf_get_fde_info_for_all_regs3()), and returned by functions dwarf_get_fde_info_for_reg3_b(), and dwarf_get_fde_info_for_cfa_reg3_b(). modified: src/lib/libdwarf/libdwarf.h 2023-09-04: David Anderson commit 911c0b01f5a4cba92b0b1b99dde9fd5889034e2f Correcting a misspelling in the text. modified: ChangeLog 2023-09-03: David Anderson commit dc2095a8618c02476d7a21cb08e3c827b76e97b4 Up to date with git log. modified: ChangeLog 2023-09-03: David Anderson commit b43d17fab5246ffb3376ae2151beaafb4138c15a Now mentioning O_CLOEXEC flag on open(). modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf 2023-09-03: David Anderson commit 3328b9460b13db261200e72e06ce518152bb24d2 In all open() calls we or O_CLOEXEC to the flags bits (when O_CLOEXEC exists). modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_object_detector.c 2023-09-03: David Anderson commit 51f2329e577f186681d6ae4d1c6e52fa8049a24f Current month is now September...regenerated. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2023-08-31: David Anderson commit cea3a4e239f8360bfaa52a55624d72feb1711aa5 Changes now lists the vulerabilities fixed since the 20 May release of 0.7.0 modified: doc/libdwarf.dox 2023-08-30: David Anderson commit b1c64d4198a14725ad26c41da8c4b02e3be9e963 Up to date with git log modified: ChangeLog 2023-08-30: David Anderson commit de3f4a471cf013d1feb39f13e4325d41ab35f7ff Added ossfuzz id to the bug fix entry. modified: ChangeLog A typo here on the DW202308-001 entry, the oss fuzz id is dwarfbug*sh modified: bugxml/data.txt Regenerated. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-08-29: David Anderson commit 03ae18dc3220ac5630637fa67e399d0c3ad4cb8f Fixing a typo. modified: bugxml/data.txt regenerated modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-08-28: David Anderson commit 27c0e022346ad93418d15adee0893b31059a75c4 Incorporated git log and added commentary on this vulnerability. modified: ChangeLog 2023-08-28: David Anderson commit d6dba09a400c2360c441e997bc7a9196c6341efd Logging ossfuzz59576 vulnerability and fix. modified: bugxml/data.txt 2023-08-28: David Anderson commit e53adc90ffd6d5d0fad61546b0041990aefd970b Fixes ossfuzz 59576. A test in case 'L' of augmentations had the wrong test for out of bounds. Changed > to >= . Around line 1615 We lost track that this was an open bug. Now fixed. It has been in existence for years. modified: dwarf_frame2.c 2023-08-25: David Anderson commit 4442d453370b50b943331e359e40dd981668175c Expanded the description of the bug fix where an ET_EXEC object was having relocations applied (linkers do not normally produce a non-relocatable object with relocation sections). modified: ChangeLog 2023-08-23: David Anderson commit 5bdbcf570cc3f999528a7421c6d4bc0e31fb3565 Up to date with git log modified: ChangeLog 2023-08-23: David Anderson commit 96bd161d41050ed367716cdcb249a9e55bfe60a9 An executable with relocations exposed the mistake of running relocations on non-relocatable objects. Now we test the elf header e_type field and if the e_type is not ET_REL we do no relocations. modified: src/lib/libdwarf/dwarf_elfread.c 2023-08-20: David Anderson commit b6e314cd78a79c36252dd4948529f0c2e58605ff Up to date with git log modified: ChangeLog 2023-08-20: David Anderson commit 2c47b4816685d6e2b9f097a718b155baaa587899 Fixed modification date modified: README modified: README.md 2023-08-20: David Anderson commit da6765e589073f7defc94e200ce20db46a56500d The correct define for linking against libdwarf.a (static library) is LIBDWARF_STATIC modified: README modified: README.md modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2023-08-20: David Anderson commit cb22caf8c914ba28866d5e7305191af8b4ca9f2f Misspelled: BUILD_LIBDWARF -> LIBDWARF_BUILD modified: README modified: README.md Latest version modified: doc/libdwarf.pdf 2023-08-19: David Anderson commit 405c669f6d1abe9aa9737bdce3c10163fe4ad17e Documents how to properly deal with linking to libdwarf.a in Visual Studio modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf 2023-08-17: David Anderson commit d0aaf31b3d81344f9e830adff27c54b2f0129367 Up to date. modified: ChangeLog 2023-08-17: David Anderson commit 0c707a68bbda59e53fd703a53ce73107b3d6049e Documented the #define of LIBDWARF_STATIC required to link your code to a static library libdwarf.a modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2023-08-17: David Anderson commit d59251b6eb644265689e2e839a5947c5dbbba3c0 Clarified how one links against a static library libdwarf.a modified: README modified: README.md 2023-08-15: David Anderson commit ef63115fb2b4c0b4d44bdbb215fe873057d674c1 Clarifying a comment. modified: src/bin/dwarfdump/dd_sanitized.c 2023-08-14: David Anderson commit 2c314f3cb2b67346aab727dd92c79dad79cb8661 Small typos/omissions in updates today. modified: src/bin/dwarfdump/CMakeLists.txt modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/meson.build modified: test/CMakeLists.txt modified: test/meson.build 2023-08-14: David Anderson commit fc57075d4d937171fea9dc2fec61f7ec120dd2ed We have a working version with utf-8 variable names shown correctly. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_glflags.h modified: src/bin/dwarfdump/dd_sanitized.c modified: src/bin/dwarfdump/dd_utf8.c modified: src/bin/dwarfdump/dd_utf8.h New option --format-suppress-utf8 that unconditionally turns off utf-8 output, reverting to uri-style output. modified: src/bin/dwarfdump/dwarfdump.c 2023-08-14: David Anderson commit 8b4b34476c96d6aeff11b8a5252fdeedd38ff722 So builds with dd_utf8.c modified: test/Makefile.am 2023-08-14: David Anderson commit 4d313420f101a95c8a10b6eac6d6a0dc72590075 Now mostly builds with configure modified: src/bin/attr_form/Makefile.am modified: src/bin/dwarfdump/dd_utf8.c modified: src/bin/dwarfdump/dd_utf8.h modified: src/bin/tag_attr/Makefile.am modified: src/bin/tag_tree/Makefile.am 2023-08-14: David Anderson commit 67220e29afbcd85cdbbb86ea0fa00a799373c985 With utf8 mods modified: dd_sanitized.h 2023-08-13: David Anderson commit 1a61a88486b91309897e252889323e81f3498f64 More for utf8. new file: dd_utf8.h 2023-08-13: David Anderson commit 467bd43c895a6fa1b231483a7161776502a5e74f Importing utf8 changes from other branch. modified: src/bin/dwarfdump/Makefile.am modified: src/bin/dwarfdump/dd_sanitized.c new file: src/bin/dwarfdump/dd_utf8.c 2023-08-13: David Anderson commit 9bd68f2f9b9a76e87b903a810bf4874f108bfce0 A new internal flag: gf_print_utf8_flag If TRUE we will attempt to print utf8 characters as they should, not uri-style. modified: ../../../configure.ac modified: dd_glflags.c modified: dd_glflags.h modified: dwarfdump.c 2023-08-12: David Anderson commit 9cb10d3a553a215016e3fa150528f62af3d9b986 Now with latest changes. modified: ChangeLog 2023-08-12: David Anderson commit ebcee1385334882c20f375d75302cd3d4bc13798 removing duplicate declarations. One such suffices. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_compiler_info.h modified: src/bin/dwarfdump/dd_globals.h modified: src/lib/libdwarf/dwarf_debugnames.h modified: src/lib/libdwarf/dwarf_object_detector.h 2023-08-12: David Anderson commit 8c3812dad14d7a1e9e8b49fb56d3d96ffd2fdc08 Having realized some options used in configure were suppressing some very valuable warnings, discovered that the following were only in configure.ac (not cmake or meson) and verified each suppresses simple warnings such as 'unused local variable'. Removed the following warnings: -Wnull-dereference causes bogus warnings. -Wbad-function-cast removes useful warnings -Wnostringop-overread removes useful warnings -Wbad-function-cast removes useful warnings -Wmissing-parameter-type removes useful warnings modified: configure.ac 2023-08-12: David Anderson commit 158ab5c9d4aa115ad502d8ce7dd37008ce649dc0 With latest trivial fix. modified: ChangeLog 2023-08-12: David Anderson commit d2c5705953613961b4edde069fb545f4be639f0a Refactoring left in an unused local variable and an unused argument. Removed unused. modified: src/lib/libdwarf/dwarf_line.c 2023-08-12: David Anderson commit 99cb7a9b11c85b7a14be6b381b57f284a613b7d1 Update with latest git log modified: ChangeLog 2023-08-11: David Anderson commit ffa552d3af71d8ff40dd0aa63d36a4dfbb6f811f Minor change to a comment. modified: src/lib/libdwarf/dwarf_base_types.h Now correctly uses the DWARF5 includes array in the line table header to get the compilation directory (when required) to produce the fullest file path possible. It nearly always gave the right answer, but in the special case where a file index of N in the table had a directory index of 0 the full path came out wrong (duplicate directory names). modified: src/lib/libdwarf/dwarf_line.c 2023-08-09: David Anderson commit 336ad49af6f2bb9554ab87ac2ea95981737e12ae Removed mention of libelf (because it is no longer used). modified: scripts/buildandreleasetest.sh Fixed the check for errors on running regression tests: some time ago the final count emitted by libdwarf-regressiontests was changed from FAIL 0 to FAIL count: 0 and run-all-tests.sh was not adjusted to match. Now these match. modified: scripts/run-all-tests.sh 2023-08-07: David Anderson commit 340b0e131922943f00dacd4ee4d3389fbcbd2e76 Now the last .c file in dwarfgen renamed: dg_getopt.c -> dg_getopt.cc and simplified to avoid warnings. modified: src/bin/dwarfgen/CMakeLists.txt modified: src/bin/dwarfgen/Makefile.am renamed: src/bin/dwarfgen/dg_getopt.c -> src/bin/dwarfgen/dg_getopt.cc modified: src/bin/dwarfgen/meson.build 2023-08-07: David Anderson commit 7965d07fd52d4a81a43d82061099cefd5f207e81 Added a cmake module path entry. Not sure it is necessary. modified: CMakeLists.txt Not clear this is being used, but harmless if not. modified: cmake/FindZSTD.cmake 2023-08-07: David Anderson commit af9463ed62919f7c1199fd9c4ce039b9ca03c653 useful, I hope. new file: cmake/FindZSTD.cmake 2023-08-06: David Anderson commit 861853c6c0ca3a20859d5387e0d02716c3e7e742 Documenting another LIBELF mention removed (CMakeLists.txt). modified: ChangeLog 2023-08-06: David Anderson commit e9f5561052fd5553172705f81491a258c7892f2a Updated to reflect recent identification of example code as PUBLIC DOMAIN. modified: COPYING Now marked PUBLIC DOMAIN. modified: src/bin/dwarfexample/simplereader.c 2023-08-06: David Anderson commit 028862dc4373b26448250eeecb12689f0fb00849 Updated reflecting the removal of LIBELF references in libdwarf/CMakeLists.txt modified: ChangeLog 2023-08-06: David Anderson commit 822021b5caa50c07ebc229ef3e66506db4352598 Removed references to LIBELF_LIBRARIES and LIBELF_INCLUDE_DIRS as those are no longer relevant. We don't use libelf as of version 0.7.1. modified: src/lib/libdwarf/CMakeLists.txt 2023-07-16: David Anderson commit 61fb3beeb9f871794719208743218bac8d34b870 Up to date from git log modified: ChangeLog 2023-07-16: David Anderson commit 83e6f04c5b5060b43424de76e024cf73412ac607 Now we check that the number of files that cmake install installs matches the number we know is right. TEST F does this check. modified: scripts/buildandreleasetest.sh 2023-07-15: David Anderson commit a44e9c03c45b3164d16885aa821618dc0f34338f Needed so the new libdwarf.pc.cmake is in the distr. modified: src/lib/libdwarfp/Makefile.am 2023-07-15: David Anderson commit 831b634c19898cf99ca240cd26b83dc3be6d96b2 cmake only: If (for some reason) one wanted to install libdwarfp and dwarfgen ...the install would not be complete if using -DBUILD_DWARFGEN:BOOL=YES or -DBUILD_DWARFGEN=YES Various small mistakes lead to an incomplete install. No-one should be using -DBUILD_DWARFGEN:BOOL=YES one thinks, but it is unfortunate this option's install was done incorrectly till now. modified: CMakeLists.txt modified: cmake/config.h.cmake modified: src/lib/libdwarfp/CMakeLists.txt new file: src/lib/libdwarfp/libdwarfp.pc.cmake Obsolete now libelf not used. deleted: cmake/FindLibElf.cmake 2023-07-14: David Anderson commit f213254afe916b4c7e51fdd88aec4e062d97b470 cmake install was not installing dwarf.h. The bug was introduced in 2021 when the source files were moved around to the current layout and the base CMakeLists.txt install lines were copied to the libdwarf dir. This deletes 2 useless lines and adds a specific line to get dwarf.h installed. modified: src/lib/libdwarf/CMakeLists.txt 2023-07-12: David Anderson commit 26e807bd6edb7dd45b9faaebccc340d7278beb4e Bringing up to date with git log modified: ChangeLog 2023-07-12: David Anderson commit 81c4c9b69fc8f7a7fe41b321659d6165fc3b5491 The side effect of changing some attribute printing is these baselines for 'make check' have to be updated. Done. modified: test/test-mach-o-32.base modified: test/testobjLE32PE.base modified: test/testuriLE64ELf.base 2023-07-12: David Anderson commit 9ba4501eff0e21422b3986f36d6d8b7df43ad911 Remove a couple special cases, unifying under a commot version The visible side effect is that things like address_size print as 4 instead of 0x00000004 in most cases. modified: src/bin/dwarfdump/print_die.c 2023-07-12: David Anderson commit f3c20004f7a0857e711e2528c1a7b1d210734b05 Changing the name of a local variable for the convenience of a Windows user. See github issue 173 modified: src/bin/dwarfexample/jitreader.c 2023-07-11: David Anderson commit fb90950e8146a81b8b0fe68fe971a655fd592f24 Adding DW202307-001 Also, ensuring that references to regressiontests start with regressiontests/ (A few such were left off). modified: bugxml/data.txt 2023-07-11: David Anderson commit c8c5073f35b1efdcc610ecf369c78f87fdd34714 Vulnerability DW202307-001 ossfuzz id: 60506 Reading a fuzzed object with a corrupted experimental (non-standard) line table format could result in a crash/out-of-bounds-read. Present since October 2015 when support for this form of line table was added. modified: src/lib/libdwarf/dwarf_line_table_reader_common.h 2023-07-08: David Anderson commit c95f0584878e9443f940930bb26ec5e3a4de5815 Added clarifying comments about printing macro data and handling of macro import. No logic change. modified: doc/checkexamples.c modified: fuzz/fuzz_macro_dwarf5.c modified: src/bin/dwarfdump/print_macro.c 2023-07-07: David Anderson commit d075037bfa6e679cb217c7b432ced42aca3c5132 A tiny appearance tweak. modified: CODINGSTYLE.md 2023-07-07: David Anderson commit 879fd06d2091b4154fcef31ebc370bf8f525126d Corrected typo and made another minor change. modified: CODINGSTYLE.md Up to date again. modified: doc/libdwarf.pdf 2023-07-07: David Anderson commit 236a416ff8a0261b82056119e68f3078a55fd16c Small clarifications. Fixed a ###Indentation line modified: CODINGSTYLE.md 2023-07-07: David Anderson commit 1f89bb177df7781b5fd7aaf07bc35378d262a371 The list of sections that can be read independently of other sections now includes .debug_addr (left out by accident). modified: doc/libdwarf.dox 2023-07-04: David Anderson commit 2af70c5b8dc4f84d58da25b6978e5894994876be Clarifying (see Changes here) builds on Windows: which build systems allow static (non-shared) libdwarf. modified: README modified: README.md 2023-07-03: David Anderson commit a3e20ef181d021286d16dc3730b8a66ff48695a6 Fixed indent mistake modified: test.yml 2023-07-03: David Anderson commit ab810163a6198914817c1589e49ba7cb65737248 modified: test.yml 2023-07-03: David Anderson commit 00419b2134482ff624f58c97363c78bf0acc5f26 tweak macos modified: test.yml 2023-07-03: David Anderson commit fd86cfb3abcfc211bd98875feb35fdd2a0ee077a Should work for macos now modified: mac_meson.yml modified: test.yml 2023-07-03: David Anderson commit 64d346fd2a48135be49d259a0992de082a5668c6 add back --overwrite modified: mac_autotools.yml 2023-07-03: David Anderson commit 3f589d710b72efa059fefcd5c4c6b82d6903fdba mac no longer do bash curl of homebrew modified: mac_autotools.yml modified: mac_meson.yml modified: test.yml 2023-07-03: David Anderson commit b0d9843546697243cb1783867602771c250ff46d Remove install of homebrew modified: mac_autotools.yml 2023-07-03: David Anderson commit 98d8eebb1541c3319c30d490538aa758080b2138 Commented macos-meson out too modified: test.yml 2023-07-03: David Anderson commit ea27e3621ab65ae837662b2d822e0817103530c4 comment out non-working macos autotools and macos cmake modified: test.yml 2023-07-03: David Anderson commit 1a4cfb616bfef89e116efe6a96a9802c11fdf9f2 New test, now with brew cleanup modified: mac_autotools.yml 2023-07-02: David Anderson commit ed22079d91d49c6ffc232f8b3cf4cf310bb9dc6b Another trial. modified: mac_autotools.yml 2023-07-02: David Anderson commit 9750dff047cb5641583fd36e6e5a82b0c981e845 Another test. modified: mac_autotools.yml 2023-07-02: David Anderson commit 4ff3c19b23a2d1c7aa66d4fcfcdd65cd739a07b8 A problem with homebrew, diagnosis added.. modified: mac_autotools.yml modified: test.yml 2023-07-02: David Anderson commit f47918226d58322e0541ccfdeb0fbe57d6876162 Now with July date. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2023-07-02: David Anderson commit ce532787c19522f2aec1001c6afdee89c8c9a214 Fixed four real-but-minor issues found by coverity scan. Has no effect on the output of dwarfgen. modified: src/bin/dwarfgen/dwarfgen.cc 2023-06-30: David Anderson commit 72d509693c7b53f0a7db17a7b5e6858dfdb22132 Removing two small blocks referring to libelf. modified: meson.build modified: meson_options.txt 2023-06-29: David Anderson commit fe76278480a3e8ae25bdfcceb863568038b13a53 Latest git data. no more libelf references. modified: ChangeLog 2023-06-29: David Anderson commit 5b2ba5649702d5ad7b5fbe11a48af704885eafb0 Remove libelf references except to say it is never referenced as of now. modified: README modified: README.cmake modified: README.md 2023-06-29: David Anderson commit 4270e7d4f3f0b36b10861dbc90d0127837136d97 Completely missed a test for an alloc fail in one place, and failed to return useful error text in the case where a correct check for alloc fail was done. modified: src/lib/libdwarf/dwarf_frame2.c 2023-06-29: David Anderson commit cfecc8d526d3c66ede35c0e4cfaec7da5e30535c The ASNX macro needed a tiny change to avoid compiler warnings on big-endian machine. Due to the change of how things like sh_type_ (for example) are defined. modified: dwarfgen.cc 2023-06-29: David Anderson commit 77d9cad797963942497d004103b602d55f5a7882 Remove all references to libelf and to elf.h modified: CMakeLists.txt modified: configure.ac modified: meson.build 2023-06-29: David Anderson commit fd3c0b9593801941924da35fcf0642e149c0c21b Fix compiler warnings about unused variables etc. modified: src/bin/dwarfgen/dwarfgen.cc 2023-06-29: David Anderson commit a3c918dd60eeed229e7841e35f189a4bcf672e5f Remove an uused #define (was for libelf use). modified: src/bin/dwarfgen/dwarf_elf_defines.h 2023-06-29: David Anderson commit 12781997e08d74aaf0df42c7fc60d8491db4f436 Finish up changing nbufs from Dwarf_Signed to Dwarf_Unsigned. modified: src/lib/libdwarfp/dwarf_pro_arange.c modified: src/lib/libdwarfp/dwarf_pro_macinfo.c modified: src/lib/libdwarfp/dwarf_pro_macinfo.h modified: src/lib/libdwarfp/dwarf_pro_section.c modified: src/lib/libdwarfp/dwarf_pro_section.h modified: src/lib/libdwarfp/dwarf_pro_types.c modified: src/lib/libdwarfp/dwarf_pro_types.h 2023-06-28: David Anderson commit ca199e529e17dd4747c0e209a05711f68d4f5d03 Merge: 0bf73a21 6087df9e Merge branch 'wr-elf' Now with no need for libelf anywhere.. 2023-06-28: David Anderson commit 6087df9e17df47095f55314aa4be6d9745cc683b tiny tweak setting sh_addralign. modified: dwarfgen.cc 2023-06-28: David Anderson commit dc4c5049940d1ecbec351d0688824a5acc4ee247 generated object now with mode read/write for all (not execute for anyone). modified: dwarfgen.cc 2023-06-28: David Anderson commit cfd65e1c94e5a21cdc8c37f58bbece1f3fa81f3b Now seems to generate our limited elf as created by dwarfgen ... correctly. modified: dwarfgen.cc 2023-06-28: David Anderson commit 7f6bc8c1d49af2f52e94bed368474493d15a28ea Changed a type from unsigned to Dwarf_Unsigned. modified: irepresentation.h 2023-06-28: David Anderson commit c6e459e00dfeee00be7f32ab7589cf6e3bd07f37 Almost works. DO NOT USE THIS COMMIT modified: dwarfgen.cc 2023-06-27: David Anderson commit 3c6a9a538f6682d45f40b0bed8e93c4a19b5dfec Now also writes. DO NOT USE THIS COMMIT. modified: dwarfgen.cc 2023-06-27: David Anderson commit 32a769c9d98ab744674cb4b2d26baea922299d9c DO NOT USE THIS COMMIT. Compiles, but is incomplete. modified: dwarfgen.cc 2023-06-26: David Anderson commit 0bf73a21035510aaa51d508670c7e6d02bef76a7 Completing records on DW202306-011 modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-06-26: David Anderson commit 6f75899f1f90fa87e52da0df09ddaa2e5be778f9 Correction to a sanity test. DW202306-011 ossfuzz 60090 The test was < yet was supposed to be >= . The test itself is just a few weeks old. Near line 855. modified: src/lib/libdwarf/dwarf_frame2.c 2023-06-25: David Anderson commit c10644be2f21737ac2b20e586c65e79f9ae8aedc DO NOT USE THIS COMMIT. It's a work in progress. modified: Makefile.am modified: dwarfgen.cc modified: irepresentation.h modified: strtabdata.h 2023-06-24: David Anderson commit 6753a63c4dae4b71908fb446fcb93e986e536289 Now just char arrays. modified: dwarf_elfstructs.h 2023-06-24: David Anderson commit 0609f2efe2a501f331f265c491a2f9c1d8783d1e Not needed deleted: dwarf_elf_data.h 2023-06-24: David Anderson commit 53744098650689bcfcf5441525b1634798c39c2c Not wanted now. deleted: dwarf_elf_interface.h 2023-06-22: David Anderson commit 680d91ea3dfd4def97ea7119621ab2f58d21481e Regenerated. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-06-19: David Anderson commit fe967a59a203ab08376d416c6eba754ea0ba111c Correctly states the default library for cmake is a static library, libdwarf.a modified: README.cmake 2023-06-19: David Anderson commit 53463eff32b9ee59bf94915286f89a4f6301b6cb Latest bug has improved comments. modified: bugxml/data.txt 2023-06-19: David Anderson commit 08cfa285846d7c4a2da011c944927a0d55847987 Comparing a signed value to unsigned in one new test was a mistake. Now properly qualified to avoid a mistaken if() (this is a test only applicable to IRIX. ) modified: src/lib/libdwarf/dwarf_frame2.c 2023-06-19: David Anderson commit 9479e68b4734f27679d36297a3a04b0a213b4934 Have fixed DW202306-010. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-06-19: David Anderson commit b7437c9e4923906e9b3f3860a0c8a8289cff0a91 Vulnerability DW202306-010 ossfuzz id: 59950. Now we check for bad augmentation data (like field lengths) where checking was inadequate. modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame2.c 2023-06-19: David Anderson commit 72f3333e2646f350f0c9ee2e342bb4809aab051d modified: .github/workflows/freebsd_cmake.yml modified: .github/workflows/mac_autotools.yml modified: .github/workflows/mac_meson.yml modified: .github/workflows/msys2_autotools.yml Now all the workflows have the permissions: line in the standard position following an on: (rather than before the on:) 2023-06-18: David Anderson commit cee6ad7da45827aeee00f93b622066264f041600 Bringing ChangeLog up to date. modified: ChangeLog 2023-06-18: David Anderson commit 277e4f718e0061a068a74287291a4d8e8d18e94a Non-shared builds and shared-lib builds result in libdwarf.so (or .dll) having only the intended API functions visible to callers. Modified to match up with the altered #defines near the start of libdwarf.h . modified: meson.build modified: src/bin/attr_form/meson.build modified: src/bin/buildopstab/meson.build modified: src/bin/builduritable/meson.build modified: src/bin/dwarfdump/meson.build modified: src/bin/dwarfexample/meson.build modified: src/bin/dwarfgen/meson.build modified: src/bin/gennames/meson.build modified: src/bin/tag_attr/meson.build modified: src/bin/tag_tree/meson.build modified: src/lib/libdwarf/meson.build 2023-06-18: David Anderson commit 9a856a4bee90c1b7cc3f4e8cf6c2dd8ce6b02848 Non-shared builds and shared-lib builds result in libdwarf.so (or .dll) having only the intended API functions visible to callers. modified: CMakeLists.txt modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarfp/CMakeLists.txt 2023-06-18: David Anderson commit c05c2e4b1295358df4bec45253e8ee3d446aa823 Minor (one line) change to make this work properly with the build and libdwarf.h changes. modified: libdwarf.pc.in 2023-06-18: David Anderson commit f3ef97144dff49b647bb2f3734a7c11f951a9dc7 A small change was required to match up as desired with the default settings of meson and cmake builds. modified: scripts/buildandreleasetest.sh 2023-06-18: David Anderson commit c3b42421059bffbdecdb7250c8e58cb90f20c4b2 Revising the list of #defines allows building of correct shared library libdwarf in all environments while allowing non-shared (static library) builds with cmake and meson. For linux static library builds can be done. The #defines are slightly easier to understand with this revision. modified: src/lib/libdwarf/libdwarf.h 2023-06-18: David Anderson commit 9f725d0ed099cb0b5692cf1f635d05dc3d418e25 Updates reflecting a new meson option --default-library and the ability to do correct shared library builds (meaning library-internal functions are invisible to callers) with all three build systems. modified: README modified: README.cmake modified: README.md 2023-06-18: David Anderson commit e5c5f33db75bea03e20e7ca4fb0cb8e4f14b99f6 Adding ChangeLog2021 and 2022 to the distribution. Omitted by accident. modified: Makefile.am 2023-06-15: David Anderson commit ae1d1070163785a4f6aeded7f8084eae2898c684 the meson documentation on line wasy wrong. plain mason_options does not work. modified: Makefile.am renamed: meson_options -> meson_options.txt 2023-06-15: David Anderson commit 6b65d0eccec28aefeaef4c5a14c9c775802eb38d Now matches the rename of meson_options.txt to meson_options to agree with what the meson doc says. modified: Makefile.am 2023-06-15: David Anderson commit a39c5668dbb03ad1e5b1ee0b190f951cf24a3e58 According to meson official documentation any meason after 1.1 should name the file meson_options, not the original meson_options.txt. We cannot use meson below 1.45. renamed: meson_options.txt -> meson_options 2023-06-15: David Anderson commit 0d5bc0612af062850da4102d5259913ea55fbec8 Now with DW_LANG for Mojo, new this month in DWARF. modified: src/lib/libdwarf/dwarf_names.c 2023-06-13: David Anderson commit 1320701ac56f35dbefb01be7857553fbd3e90106 Updated. modified: ChangeLog 2023-06-13: David Anderson commit 29f771024891fced11439bfab88ab25b6f60a912 Regenerated. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html Added a note that in 0.7.1 there are vulnerabilities fixed (reading corrupt object files). modified: doc/libdwarf.dox 2023-06-13: David Anderson commit 28d88b7081d79db13472d112d790eabff9950633 Added gitfixid for DW202306-009. modified: bugxml/data.txt 2023-06-13: David Anderson commit 9cae1be75ec333d2b8ab8800df4850ed77a8b025 Fixing DW202306-009 ossfuzz id: 59775 A carefully fuzzed object could read one byte past the end of a frame section If the last thing in a frame section is DW_OP_GNU_encoded_addr (data is supposed to follow such). Corrupt Dwarf. Now we check and return an error. This vulnerability involved DW_OP_GNU_encoded_addr. modified: src/lib/libdwarf/dwarf_locationop_read.c 2023-06-13: David Anderson commit 44dbfe78d6586281ef76761fb6b3e6eaf18fcc21 Add doxygen commentary clarifying aspects of reading defailed Frame data. modified: src/lib/libdwarf/libdwarf.h 2023-06-13: David Anderson commit 7c3df3000529e0c199163ab44f1c4108a97f22ae Remove a blank last line. modified: src/lib/libdwarf/dwarf_safe_arithmetic.c 2023-06-13: David Anderson commit ffe2f9b786f32d6033e9d4570d7b2d9367196e21 minor change in a comment format for consistency. modified: src/lib/libdwarf/dwarf_frame.c 2023-06-11: David Anderson commit 0978c6c29a5dd88f2eaf0cd1ce7c88e4912de322 Moving the not-used-yet code to the end of this source file. It is in #if 0 so is not compiled. Leaving the important code first. modified: src/lib/libdwarf/dwarf_safe_arithmetic.c 2023-06-11: David Anderson commit f6137eb8a14fe3576cdeb5f09cbe446b0cc0c0da modified: src/lib/libdwarf/dwarf_safe_arithmetic.c Removed unused defines and put the declaration inside #if 0 region last. modified: src/lib/libdwarf/dwarf_safe_arithmetic.h 2023-06-11: David Anderson commit d84d88b48abd673db1b5c161769401cd589260f2 Removing a function that is not used. It was in #if 0 #endif and is now gone. modified: src/lib/libdwarf/dwarf_frame.c 2023-06-11: David Anderson commit e851ca8323ef7ba2de76dd6219a462706286b8a3 Renamed _dwarf_add_check to _dwarf_signed_add_check Removed another #include. Removed debugging printf (which were #if 0) modified: src/lib/libdwarf/dwarf_safe_arithmetic.c Just has the renaming aspect. modified: src/lib/libdwarf/dwarf_safe_arithmetic.h 2023-06-11: David Anderson commit 3dc465cda402fe6c761b5df6ee3d98168b08117f Removed two #include lines -- they are not required here. modified: src/lib/libdwarf/dwarf_safe_arithmetic.c 2023-06-11: David Anderson commit f19a9557f8205b15b0d021ad543bd18f213dbdad Removed an unused local variable. modified: src/lib/libdwarf/dwarf_frame.c 2023-06-10: David Anderson commit 73a955d6c04f87321fe41057af26ee31e613d3dc Adding permissions: read-all modified: freebsd_cmake.yml modified: mac_autotools.yml modified: mac_meson.yml modified: msys2_autotools.yml modified: test.yml 2023-06-10: David Anderson commit 6483e44afa743c5abff9fee5930f5dca58c933da Now up to date. modified: ChangeLog 2023-06-10: David Anderson commit d4ba6ab340f3309e05851886f046315143110534 regenerated modified: doc/libdwarf.pdf Altering to match project codingstyle (trailing spaces, for and if format) modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame2.c A bug introduced a few minutes ago now fixed. we now pass CoverityScan with no issues. modified: src/lib/libdwarf/dwarf_safe_arithmetic.c 2023-06-10: David Anderson commit 2a898d863c312bbf453d443986df76d35e60d648 Nearly up to date now. modified: ChangeLog 2023-06-10: David Anderson commit 435347714549485d9500cffb58451af0f932ee42 Revised date to today and removed wording on 0.7.1 that no longer applies. modified: doc/libdwarf.dox 2023-06-10: David Anderson commit 56a1c79cbf61b898ddb168ffbca52e2c13b78df0 Some function prototypes used /*name*/ and now use doxygen-friendly dw_name instead. modified: src/lib/libdwarf/libdwarf.h 2023-06-10: David Anderson commit 1b3fcc3dfe643c959b66e6825671884984d2d9e8 Fixed conflicts with the codingstandard. modified: src/lib/libdwarf/dwarf_leb.c 2023-06-10: David Anderson commit 4ac01464970b2f4427ab363e9702308eb294f84e In dwarf_decode_leb128() the function was inconsistent about testing outval and len128_length pointers before dereferencing them. Now it is fully consistent and always allows for NULL for those. modified: src/lib/libdwarf/dwarf_leb.c 2023-06-10: David Anderson commit abb50656598c42dd4629e878642e68029f3dbc32 Regenerated. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-06-10: David Anderson commit eb0f40c4158227b15fd083ba15d49cb08c47f510 Updated with latest fix modified: bugxml/data.txt 2023-06-10: David Anderson commit c5b909630bb566cdbf68fae4091f049f3b22ff11 Added a comment where we call _dwarf_read_cie_fde_prefix() modified: src/lib/libdwarf/dwarf_frame.c DW202306-008 ossfuzz id: 59699 Check a byte pointer before we dereference it in _dwarf_read_cie_fde_prefix(). modified: src/lib/libdwarf/dwarf_frame2.c 2023-06-10: David Anderson commit 6119e36058a82c7207cd6199bd59cfd5f1c6b0af Latest. modified: bugxml/data.txt 2023-06-10: David Anderson commit c8c54ba5c79b0a2687f0fa2ac331479506c3210f DW202306-007 ossfuzz id: 59602 modified: bugxml/data.txt In two particular cases the necessary check for reading-past-end was missing. modified: src/lib/libdwarf/dwarf_locationop_read.c 2023-06-10: David Anderson commit e8c726e2be644df2706342b7a80633d07ecd7fb4 Adding printing of DW_CFA_LLVM_def_aspace_cfa_sf address space modified: fuzz/fuzz_set_frame_all.c DW202306-004 fuzzer: ossfuzz id: 59595 modified: src/lib/libdwarf/dwarf_frame.c 2023-06-09: David Anderson commit 616d6e93cb24434e112f03e5a313b1207e549854 Now up to latest git log modified: ChangeLog 2023-06-09: David Anderson commit 9181a0ef691c392561d3efffc322d06c66d18627 Now we use a non-public struct in dwarf_frame to build up data on register state. And we only copy to the public Frame structs when we must (to return data). And we comment a bit to explain how it works. modified: src/lib/libdwarf/dwarf_frame.c 2023-06-09: David Anderson commit 4f95239b05afd4df0599aa669b5b3eefece7d2d2 New private struct for internal use in dwarf_frame.c Now offset is Dwarf_Signed for internal use in dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame.h 2023-06-09: David Anderson commit 113261071d93ba00b1abaee9b4b50b3f2fb6bb9f Removed declarations involving struct Dwarf_Regtable3_s_c and struct Dwarf_Regtable_Entry3_s_c as we abandon that additional set of structs. modified: src/lib/libdwarf/libdwarf.h 2023-06-09: David Anderson commit 88455911f2e656ce2473ed83b0a0c163ffd8ca8e Added comentary about the test. modified: src/bin/dwarfexample/frame1.c 2023-06-09: David Anderson commit 30c420a9e6d3a7a1b18fdc9e8ea880a5492994a2 Updated with latest. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-06-09: David Anderson commit 149e60a9424712090a1a0cd44675226bf37a5f0d comments with new bugs added at top of file. modified: bugxml/data.txt 2023-06-09: David Anderson commit f200830719316fec4f84ce34f0754a38c802954e Omitted a test for y not zero, leading to division by zero. Fixed. modified: src/lib/libdwarf/dwarf_safe_arithmetic.c 2023-06-09: David Anderson commit 9e83da53c8ce3506229dcdd719bff019b6092fcc DW_LANG_Mojo has been added to the languages list by the DWARF committee with value 0x0033 modified: dwarf.h 2023-06-08: David Anderson commit c72cd15329751086838f2b15bcad4d25b5075857 Fixing cmake build of test modified: test/CMakeLists.txt Proper declaration of main() to make meson build work. modified: test/test_int64_test.c 2023-06-08: David Anderson commit 4b540c4a0150d86c60e7be155c05087ad7656ef3 Now with git fix id for ossfuzz 59517 modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-06-08: David Anderson commit c9caa16bf69b24db6c3f13e269deb826a4a4bb3a Regenerated. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html modified: doc/libdwarf.pdf 2023-06-08: David Anderson commit f664f93d456284130afbd3c2e35b39e5f2740366 Adding support for the new int64 safe multiply source files dwarf_safe_arithmetic.[hc] And adding a new test for safe multiply. modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/meson.build 2023-06-08: David Anderson commit d9cd2592337d99f44dd6ccb6f4cdee6c3a7bf822 Now uses safe arithmetic where it matters. Adds dwarf_get_fde_info_for_reg3_c() dwarf_get_fde_info_for_cfa_reg3_c() as alternatives to dwarf_get_fde_info_for_reg3_b() Cdwarf_get_fde_info_for_cfa_reg3_b() The difference is the newer ones have a Signed offset, which properly matches the text of the DWARF standard(s). modified: src/lib/libdwarf/dwarf_frame.c Added a new file ru_soffset to support new functions dwarf_get_fde_info_for_reg3_c() dwarf_get_fde_info_for_cfa_reg3_c() which provide a signed offset for certain operations (as stated above). modified: src/lib/libdwarf/dwarf_frame.h Adds two new functions and two new structs to support the new signed offset while keeping the versions that already existed. modified: src/lib/libdwarf/libdwarf.h In other words there new functions and structs, but the previously existing ones are still supported. 2023-06-08: David Anderson commit 0012b38dd66632d458c6dfd99186c04fb77490b1 Added a new DW_DLE error 501, for arithmetic overflows. modified: src/lib/libdwarf/dwarf_errmsg_list.h 2023-06-08: David Anderson commit 3f0431c7ea563e1ed30896b123aceae9338cba5c Cleaning up indents and removing unused code. modified: src/lib/libdwarf/dwarf_safe_arithmetic.c modified: src/lib/libdwarf/dwarf_safe_arithmetic.h 2023-06-08: David Anderson commit 89773e02ef509c07db4095c47c1f71509aee2892 This is the new test related to safe 64bit multiply new file: test/test_int64_test.c 2023-06-08: David Anderson commit 354d936634ed42b64ed55e72849ac4ac1170fad1 Added a new test. modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/meson.build 2023-06-08: David Anderson commit 342ff0ca5590625e5372a4b122bbd25331471be3 Removed one blank line. modified: src/lib/libdwarf/dwarf_xu_index.c 2023-06-08: David Anderson commit 2e23d5442322aa69f2561d71c631c7f2d4846d62 Modified indent on one line. modified: fuzz/fuzz_set_frame_all.c 2023-06-08: David Anderson commit 092dafadcc604ce9aa0f1041cfbcb31b9c98d141 Modified an error message to have more details printed. modified: src/bin/dwarfdump/print_frames.c 2023-06-08: David Anderson commit 5f3c2e9fb6c438d3b6f8ed1000e06d2f235352e8 Remove one blank line. modified: src/lib/libdwarf/dwarf_frame2.c 2023-06-08: David Anderson commit f57e0222da1b788c0aabaf1a218b7bd186adad33 Fixing indents, removing trailing whitespace. modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c Functions that check 64bit multiplify using always-safe operations. new file: src/lib/libdwarf/dwarf_safe_arithmetic.c new file: src/lib/libdwarf/dwarf_safe_arithmetic.h 2023-06-06: David Anderson commit 384e75950953a81e741f1f5b9430c5577967881e Merge: 65cb55b6 f7269c0f Merge branch 'main' of https://github.com/davea42/libdwarf-code Fix to commit id. 2023-06-06: David Anderson commit 65cb55b6cf325a86beffbf68173a5176d3956c8c New bugs noted modified: bugxml/data.txt 2023-06-07: sungbin commit f7269c0f5c53a7fe2288e431156b860dbd9cdfa1 Fix Typo in bugxml/data.txt (#166) 2023-06-04: David Anderson commit 643f5c9fe4868e67f1df3574c044207c9d4e50e2 Documenting vulnerability DW202306-001 ossfuzz id: 59517 _dwarf_exec_frame_instr() was missing some sanity checks and in one case(DW_CFA_val_offset) a request to show the instruction details got the wrong value modified: bugxml/data.txt 2023-06-04: David Anderson commit cf16fa633b7d73efbd85146cce7b363800440b8e A printf was lacking a newline, making the output very odd-looking for no good reason. Added a newline to the printf. modified: fuzz/fuzz_set_frame_all.c 2023-06-01: David Anderson commit 8b475cea946fe571571ec01702291e38616ad5f9 Regenerated modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-06-01: David Anderson commit 436bdb809020e219710f4ee9ecc179980f3c86cc The description of fuzzer: ossfuzz id: 56451 said it was a test program function, but actually it is ALSO an omission in libdwarf. So attributed to libdwarf now and the wording made clearer. modified: bugxml/data.txt 2023-05-31: David Anderson commit 18fec5f25d4c84c756e038dde6f658f78a10b399 Document DW202305-010, a new report of a vulnerability. (use "git push" to publish your local commits) 2023-05-31: David Anderson commit 8ef9c8fb613e59f534e789e91a73088eaa5b8a5a Vulnerability DW202305-010 ossfuzz id: 59478 Fuzzing provoked one of four error cases that could leak locally allocated memory from _dwarf_exec_frame_instructor() (called by dwarf_expand_frame_instructions). Called enough times with fuzzed data could result in filling memory leading to the library being unable to work for the caller and instead just returning errors. This bug has been present in the code for many years. modified: src/lib/libdwarf/dwarf_frame.c 2023-05-31: David Anderson commit 60d6143347e5eee87a6533d7394d3969d2c90d74 Regeneration ('make rebuild') removed a comment as in dwarf.h a duplicated DW_AT entry no longer has the duplicate. modified: src/lib/libdwarf/dwarf_names.c 2023-05-30: David Anderson commit 87990cf881e72cd10314c68cc69670d0e05946d0 Now with latest from git log. modified: ChangeLog 2023-05-30: David Anderson commit 7be3a252da6df46c7afb50750f9f149c7319fc8f Now showing all the latest vulnerability data. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-05-30: David Anderson commit d4f4361aa0d6819fb07598ab74ed31fd388f2393 Now fully up to date, hopefully all existent oss fuzz issues addressed. modified: bugxml/data.txt 2023-05-30: David Anderson commit 12a612fc8db38fc26cd5e6064f09a6f825891c7c DW202305-009 ossfuzz id: 56451 Changed by adding initializers of zero to local variables not previously initialized. modified: fuzz/fuzz_dnames.c Added checks to dwarf_dnames_abbrevtable() so required pointers are verified non-null before use. Still never returns DW_DLV_ERROR. With required input pointers missing it returns DW_DLV_NO_ENTRY. modified: src/lib/libdwarf/dwarf_debugnames.c 2023-05-30: David Anderson commit 97d6310bd2b69e653db76cf02be51341190c39d9 Updated with latest update of known bugs. modified: bugxml/data.txt 2023-05-30: David Anderson commit 282126391c1c8aae5c6c1ad28e5e8c3dc4943940 ossfuzz 56450. For a standard Dwarf_Debug we failed to call _dwarf_free_static_errlist() hence some code calling libdwarf and encountering an error with a NULL Dwarf_Debug passed in left behind malloc space. The leak is quite small, but it has been present for a very long time. modified: src/lib/libdwarf/dwarf_alloc.c 2023-05-30: David Anderson commit 21b33d13024d18b09e32914ca5718a5c81d1ad67 It was calling exit() early, not allowing dwarf_finish() to be called. ossfuzz 56462 And it was doing a local malloc and failing to call free() on that local space in some situations. ossfuzz 58026 modified: fuzz/fuzz_set_frame_all.c 2023-05-30: David Anderson commit 8b17d41a31c33e0b3b9727a8044e0093a754d6d7 Document DW202305-006 ossfuzz id: 56472 The test code as written here gets an error from valgrind for calling libdwarf with an uninitialized pointer. The fix is to initialize the Dwarf_Die instance by adding = 0; This was not a libdwarf bug (the original fix actually fixed a libdwarf bug, and this valgrind issue pointed out the need for the test case fix.. modified: bugxml/data.txt modified: fuzz/fuzz_simplereader_tu.c 2023-05-30: David Anderson commit 72a19f627b84fe4d2cb0942f5e6d70a0a615b440 Updating DW202305-005 ossfuzz id: 56462 modified: bugxml/data.txt 2023-05-30: David Anderson commit 5612eff9f1a40229690fd0e61083101df85e776b DW202305-005 ossfuzz id: 56462 To avoid leaks the libdwarf calling program MUST call dwarf_finish(). The code here was failing to do that in a number of error situations. Now it just returns from functions on error and lets main() call dwarf_finish(), a call that has always been in main(). modified: fuzz/fuzz_set_frame_all.c 2023-05-29: David Anderson commit 7be3c6e4fc632a13c4901d5ea47eddf0fb599adf now up to date with git log modified: ChangeLog 2023-05-29: David Anderson commit 8832094fa0b1ecca3ad8cbc6b47242d9ddab1183 Added text to ossfuzz 56443 DW202303-009 Now have the real fix. modified: bugxml/data.txt 2023-05-29: David Anderson commit 241fe0cb415569975c451d1f2d62fb2b2147cd72 The actual fix to ossfuzz56443 DW202303-053 Unfortunately -fsanitize does not show the bug, only valgrind does. modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_alloc.h modified: src/lib/libdwarf/dwarf_generic_init.c 2023-05-29: David Anderson commit 443ccb173513bf68beaf9f9a1fbf305cbb41610d Added comments on unfixed issues modified: bugxml/data.txt 2023-05-29: David Anderson commit e2ef9556567e13cf7b7fee50a9bc87f577fb9101 Amplified comment. modified: fuzz/fuzz_crc_32.c 2023-05-25: Mateusz Janda commit 9b26105456ee9a09cc02c7c58f343338e92c1b2e DW_AT_GNU_bias duplicate removed (#165) 2023-05-24: David Anderson commit 5cd5372b6761c38980527a06aa7a84537a72b130 Updated to bring up to date. modified: ChangeLog 2023-05-24: David Anderson commit a5d44c690636aa9c49ba4c6656f042c05f42c7ed Removed the last references to elf.h, libelf.h, HAVE_ELF and HAVE_LIBELF from libdwarf . There are no references to these in dwarfdump. libdwarfp and dwarfgen still use libelf and elf.h modified: src/lib/libdwarf/dwarf_elf_defines.h modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2023-05-23: David Anderson commit ce2d5456240aad4c7ebbf72632d5665c6b6190c7 With the fixed latest vulnerability reports. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-05-23: David Anderson commit d3bd3a7119f64c9b950e29fdf3a1ed8385e91086 Hopefully easier to understand Error Handling now. New susubsections. modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2023-05-23: David Anderson commit abaec0a1bb502bbb2e1fcf8f04aaabd231b9c1b3 Adding a comment instead of actually fixing the source. modified: fuzz/fuzz_crc_32.c 2023-05-23: David Anderson commit c6fee564f36906537f08fb07dec43ce855bd131d Latest reports dealt with. modified: bugxml/data.txt 2023-05-23: David Anderson commit 4638617fc49bcda961105452db97919a7d33dad7 Restored to be the intended sketch. modified: doc/checkexamples.c 2023-05-23: David Anderson commit 97a78122268c9a74701f2dd3115f902309e9a484 Repairing the examplep5() function which specified an infinite loop. The doc/checkexamples.c examplep5() code was hard to understand. modified: fuzz/fuzz_macro_dwarf5.c 2023-05-23: David Anderson commit abebda6e0e3e3f52cf55ee0da6b84d608e57f425 The examplep5() function was badly written and had an infinite loop. oops. It's not much better now, but at least no infinite loop. modified: doc/checkexamples.c 2023-05-23: David Anderson commit c6e4f105eccbedec3822a3f83a4f3a4fa9b2aa51 A printf in the test code was missing its ending newline. That lead to annoying messages when doing a diff of the program text output.. Now the printf has its newline. modified: fuzz/fuzz_set_frame_all.c 2023-05-23: David Anderson commit 3bdf0b00f13187d9e689cb8cab6ed00c9591c53e Updated to latest. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-05-23: David Anderson commit b3df2530732ea515cda5a85438871e15c6723ead dwarf_highpc_b() was dereferencing a pointer argument before checking the argument. Now we check before using. modified: src/lib/libdwarf/dwarf_query.c 2023-05-23: David Anderson commit a0bb79d65d00fb3e345e6101b52367d7ced8937a Now up to date. modified: ChangeLog 2023-05-23: David Anderson commit 8ea7e0d5ff1ca701716db87483e9c7264ea4ed70 Some vulnerabilies I was unaware of came to light and are now fixed as appropriate and documented in the vulnerabilities data. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-05-23: David Anderson commit e3c303bf760ff49a5cdb5f8ac78f53fc06218130 Making the error handling wording more precise and clearer. modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2023-05-23: David Anderson commit 448b8fb4f6e534b56a44b43f1653673fdf820e80 This is test code, not part of libdwarf. An uninitialized local variable named 'die' would crash the caller when passed to any libdwarf function. C code cannot check random pointers for validity. Fixed by initializing the variable to 0. modified: fuzz/fuzz_die_cu_attrs_loclist.c 2023-05-23: David Anderson commit 60c885a4db0a924b60e9830d238bf77bf8993de1 DW202305-006 ossfuzz id: 56472 The API functions here all lacked any checks on the arguments. Now they all check such as much as is practical. This problem existed when the code was originally written in 2021. modified: src/lib/libdwarf/dwarf_xu_index.c 2023-05-23: David Anderson commit b722aebd0d2b77309e0fe107bf56e14e513f6b4f Updated DW202305-004 modified: bugxml/data.txt 2023-05-23: David Anderson commit 79d32a15dc6df082d01764660010400c7b269ff2 Added comments to _dwarf_special_no_dbg_error_malloc() modified: src/lib/libdwarf/dwarf_alloc.c 2023-05-23: David Anderson commit 6fac1021c67d72da6b65f99ad815978d40b4c1e8 oss fuzz 56446 DW202305-004 An local pointer initialized with just 'stack trash' (so no proper initializer) was passed to libdwarf. That is a mistake in the test code. C cannot determine if a non-null value is a legitimate value as a pointer. Not a library bug. modified: fuzz/fuzz_dnames.c 2023-05-22: David Anderson commit bf9c51326e2be6e3ee1b89b4767fa9c7120068e3 Now mentions version change to 0.7.1 modified: ChangeLog 2023-05-22: David Anderson commit 9d6b907f1a2f5fc10301909d188e176a054d5724 Updating version for new code to be added. Now 0.7.1 modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c modified: src/lib/libdwarf/libdwarf.h 2023-05-21: David Anderson commit d8006304766b107f962e3b86c5f7699da68e40e0 Added comment about release. modified: ChangeLog 2023-05-21: David Anderson commit 47bc8ccf5234f397d940878a237d62f2eab4e1bb with latest from git log. modified: ChangeLog 2023-05-21: David Anderson commit 0e0fb968c72ae14bd86183e0135051f3bb1ef3ef Added checks of user-supplied FRAME register choices (such as the number to use for the CFA register) to guarantee the choices are all in appropriate relationship as documented in libdwarf.pdf and the html version of the document. modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame.h modified: src/lib/libdwarf/dwarf_frame2.c 2023-05-21: David Anderson commit 0c8379bd854b22702623ac6b28fd178fd530e670 Documented changes after 0.5.0 modified: README modified: README.md 2023-05-20: David Anderson commit 2933193b2d7aef2ff2131f2f07bed1822ad08623 Fixing the format of release dates. modified: README modified: README.md 2023-05-20: David Anderson commit 9e1fafeb8c3a0d3becc889a27eb4f1179959f7ad Updated to show release. modified: README modified: README.md 2023-05-20: David Anderson commit 424b789988dc27e3af0821df930e514917055ab7 Identifying tarrelease on all entries. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-05-19: David Anderson commit 60e572dbf7b4ded66b488f54773f66aaf6184321 Documenting DW202305-003 oss fuzz 59091 modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-05-19: David Anderson commit 4017ab8b92195641e6876b388cebe2d3307634f5 This is the final code change for release libdwarf-0.7.0 When the experimental two-level line table support was written one test for '> sectionend' was wrong, it needs to be '>= sectionend'. Written in 2021. In some other cases '>' is ok. Fixing DW202305-003 oss-fuzz 59091 modified: src/lib/libdwarf/dwarf_line_table_reader_common.h 2023-05-19: David Anderson commit 2783706a87420d1902c03a3ec573d7775a0d408d Adding memset to initialize a local struct instance to avoid unpredictable behavior while running. valgrind complained about it. modified: fuzz_findfuncbypc.c 2023-05-17: David Anderson commit e75cc02e1d6b7d4e5148b015bbe0d8ed080dc0f3 Now has example of dwarf_validate_die_sibling() even though that is not something one needs to use. This is all essentially documentation changes. Ready for release. modified: doc/checkexamples.c modified: doc/libdwarf.dox modified: doc/libdwarf.pdf modified: src/lib/libdwarf/libdwarf.h 2023-05-13: David Anderson commit 59b57abfe94c12e47175d433dcabe9b6ac3ed033 Fix indents and remove trailing whitespace and remove one blank line. modified: src/bin/dwarfdump/print_die.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/libdwarf.h 2023-05-13: David Anderson commit 5120fcbad3e90eca2b9a2486c3bb125d5908e4be freebsd cmake uses ninja so no need for libtool. modified: test.yml 2023-05-13: David Anderson commit 4eca9a5d4f94f5b9e73510ecf0dce02e6fb2a704 Fixing the name modified: freebsd_cmake.yml 2023-05-13: David Anderson commit 173f8641f9a20d823e00785b1646563310516e14 Separated out a possible improvement, removing an install target new file: freebsd_cmake.yml Removing duplicate pkg install targets. modified: test.yml 2023-05-13: David Anderson commit 84db2e08a637d2dbcd4fbdbc4f759be4f429c7cf Suplicate list of bash in pkg install command for freebsd cases. meson case failing oddly. Another change somewhere in the background? modified: ../../../.github/workflows/test.yml 2023-05-13: David Anderson commit 0c09ce5dc54800af173689662da7a58c5142f2f2 ChangeLog up to date ...again.. modified: ChangeLog 2023-05-13: David Anderson commit 53990846344a2e52df65481cd7405bf7e46aedea Compiler found an unused local variable. Now removed. modified: src/bin/dwarfdump/print_die.c 2023-05-13: David Anderson commit d90f42ee6288997095b3bb041ed5f1c3675354b9 Brings ChangeLog up to date. modified: ChangeLog 2023-05-13: David Anderson commit d24fe012b997e54638adea9ed2ce8747e0aeeda3 More refactoring print_die_and_children_internal(). The function traverses the DIE tree and is reduced from ~300 to ~200 lines so the loop and recursion are more understandable. modified: src/bin/dwarfdump/print_die.c 2023-05-12: David Anderson commit 334b0ca480c703cf1ae454bb1c421dfd37744b1a Changing a select few local variables to have more meaningful names, names not easily confused with one another. Im print_die_and_children_internal() modified: src/bin/dwarfdump/print_die.c 2023-05-12: David Anderson commit 74832091748da62e5973025a903c139ac2cba74d Updated doxygen comments for dwarf_validate_die_sibling() slightly. modified: src/lib/libdwarf/libdwarf.h 2023-05-12: David Anderson commit 71b025de461274a7841118005a653b6b26c1b611 Refactor print_die_and_children_internal() as the function is too long to be readily understood. It's still too long though. modified: print_die.c 2023-05-12: David Anderson commit 2624bea19ba106452d6880a32d772247d30afe8f Refactor print_die_and_children_internal() as the function is too long to be readily understood. It's still too long though. modified: print_die.c 2023-05-11: David Anderson commit 9dbf454b117a05591af0b8c7ac7db176aed2093a Latest version modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-05-10: David Anderson commit 618980baf126e97c548018a2ce358a5d10a9f42e Everywhere appropriate in local headers, updating copyright to 2023. modified: src/lib/libdwarf/dwarf.h modified: src/lib/libdwarf/dwarf_abbrev.h modified: src/lib/libdwarf/dwarf_alloc.h modified: src/lib/libdwarf/dwarf_arange.h modified: src/lib/libdwarf/dwarf_base_types.h modified: src/lib/libdwarf/dwarf_debugaddr.h modified: src/lib/libdwarf/dwarf_debuglink.h modified: src/lib/libdwarf/dwarf_debugnames.h modified: src/lib/libdwarf/dwarf_die_deliv.h modified: src/lib/libdwarf/dwarf_dsc.h modified: src/lib/libdwarf/dwarf_elf_access.h modified: src/lib/libdwarf/dwarf_elf_defines.h modified: src/lib/libdwarf/dwarf_elf_rel_detector.h modified: src/lib/libdwarf/dwarf_elfstructs.h modified: src/lib/libdwarf/dwarf_errmsg_list.h modified: src/lib/libdwarf/dwarf_error.h modified: src/lib/libdwarf/dwarf_frame.h modified: src/lib/libdwarf/dwarf_gdbindex.h modified: src/lib/libdwarf/dwarf_global.h modified: src/lib/libdwarf/dwarf_gnu_index.h modified: src/lib/libdwarf/dwarf_harmless.h modified: src/lib/libdwarf/dwarf_line.h modified: src/lib/libdwarf/dwarf_loc.h modified: src/lib/libdwarf/dwarf_machoread.h modified: src/lib/libdwarf/dwarf_macro5.h modified: src/lib/libdwarf/dwarf_memcpy_swap.h modified: src/lib/libdwarf/dwarf_object_detector.h modified: src/lib/libdwarf/dwarf_object_read_common.h modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_pe_descr.h modified: src/lib/libdwarf/dwarf_peread.h modified: src/lib/libdwarf/dwarf_reading.h modified: src/lib/libdwarf/dwarf_rnglists.h modified: src/lib/libdwarf/dwarf_safe_strcpy.h modified: src/lib/libdwarf/dwarf_str_offsets.h modified: src/lib/libdwarf/dwarf_string.h modified: src/lib/libdwarf/dwarf_tied_decls.h modified: src/lib/libdwarf/dwarf_tsearch.h modified: src/lib/libdwarf/dwarf_util.h modified: src/lib/libdwarf/dwarf_xu_index.h modified: src/lib/libdwarf/libdwarf.h modified: src/lib/libdwarf/libdwarf_private.h 2023-05-10: David Anderson commit 87dd57f28467d4ccdb143c4ebb26fda9a4a41cfb Documenting the fix to DW202305-002, oss fuzz58797 modified: bugxml/data.txt 2023-05-10: David Anderson commit eeb935200f78b8509e6b1837f6825b9d551b9f7d Fixing DW202305-002, oss-fuzz 58797, the Yesterday's fix was incomplete. modified: src/lib/libdwarf/dwarf_line_table_reader_common.h 2023-05-10: David Anderson commit a8745ec7679fcf641f34e79c02a90950f1f98586 Changed yesterday. Up to date. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-05-09: David Anderson commit 8ef9846dbb0cde913f14cc20b6a44095fb88956c Now with gitfixid for oss-fuzz issue 58769, DW202305-001 modified: bugxml/data.txt 2023-05-09: David Anderson commit 8337c03894048eb91061a4ae4e0f82ec7492b930 Added gitfixid for oss-fuzz issue 58769, DW202305-001 modified: bugxml/data.txt 2023-05-09: David Anderson commit edc241bd0bf22c94d2d496f3cb761e60f066cd14 Describing oss-fuzz issue 58769, DW202305-001 modified: bugxml/data.txt Small rearangement of dwarf_elf* headers. New function IssueExpError() modified: src/lib/libdwarf/dwarf_elf_load_headers.c Detecting corrupt data relevant to oss-fuzz issue 58769, DW202305-001 modified: src/lib/libdwarf/dwarf_line_table_reader_common.h 2023-05-09: David Anderson commit c3832862d3d64c7134e7b9570a6e2c6abbec375d For msys2 autotools, restore make distcheck modified: test.yml 2023-05-09: David Anderson commit 9811823aa74d91d04630ae7a7aab7e527278f084 Restore the make distcheck modified: msys2_autotools.yml 2023-05-09: David Anderson commit 4711f6d6fb2d220f55608ce615d9571ec7269264 Add a rm -f of something created by Windows msys2 named test_setupsections.exe.manifest modified: test/Makefile.am 2023-05-08: David Anderson commit f3b9197e7bb0d00592d0d75065afcc2b0875a8ad Small change to msys2 autotools invocation to avoid a new warning modified: ../../configure.ac 2023-05-08: David Anderson commit c952fc6bdb23f2835bd5a4d9747ed2b5518a05ee Testing a change. modified: .github/workflows/msys2_autotools.yml 2023-05-06: David Anderson commit c80b10bbcd42a1a7e6bf656b2a3850e7d6c10d65 comment out msys2 autotools while we figure out whay test/test_setupsections.exe.manifest is left after distclean. modified: test.yml 2023-05-06: David Anderson commit 863e4a15cec5083714aff4ff109ccb90b165a2ba For testing outside of the ci do-all test. new file: .github/workflows/msys2_autotools.yml rm -f a couple temp files to be sure removed. modified: test/test_debuglink-a.sh rm -f a couple temp files to be sure removed. modified: test/test_debuglink-b.sh 2023-05-06: David Anderson commit 2efdc4fe1f79edb2edf7e98d2736ff50a997af46 Toward msys2 build in workflow modified: test/Makefile.am 2023-05-06: David Anderson commit a0661718cc633dfaf15c58df7ec5c9c96ebbb836 Issues with the Makefile , hopefully all fixed. modified: test/Makefile.am 2023-05-06: David Anderson commit b7bef5a3dd3389def940b8093bc974913620485c Added a .h in safestrcpy rule modified: test/Makefile.am 2023-05-06: David Anderson commit f7da67867e77ab767920ec1ec98d32ee055ff70d Now with a better explanation of why we split out dwarf_setup_sections.[ch] modified: ChangeLog 2023-05-06: David Anderson commit 4b2691baaeb2c98d733d887fa59b6b9ea2ab0314 Updates from git log modified: ChangeLog 2023-05-06: David Anderson commit a61867ee941ccfb5013e657b5c4a1f833bdeef47 Added tests to the test code. modified: test/test_setupsections.c 2023-05-05: David Anderson commit c8c4b48f85141646f751be145e4cd9a66cddedcf Now run the new test_setupsections test. modified: test/CMakeLists.txt modified: test/meson.build Fix code mistakes, set standard iteration count to 1. modified: test/test_setupsections.c 2023-05-05: David Anderson commit 47ef977174b17be9689951c44f0db9422a673a10 Testing the setupsections code. Iterating this version loop 3Mn times with the --count option taks about 3 seconds (default is much smaller) modified: test/Makefile.am new file: test/test_setupsections.c 2023-05-04: David Anderson commit 8312a88d5ed57f879ed6440a4df9e328db997d0c Removing the #if 0 code that is now in dwarf_setup_sections.c modified: src/lib/libdwarf/dwarf_init_finish.c 2023-05-04: David Anderson commit 40b7167da97544bdcf5a08050c90a1418cb3fbe6 Now supports the refactoring adding dwarf_setup_sections.c and .h for cmake & meson. modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/meson.build 2023-05-04: David Anderson commit 162803c76d46a163403d12ca47a3a939d9fa8c04 Refactored the setting up of section records into dwarf_setup_sections.c (moved from dwarf_init_finish.c) so we can get a timing baseline of what _dwarf_enter_section_in_de_debug_sections_array does and (in due course) replace its code with something faster and with much less code. modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/dwarf_init_finish.c new file: src/lib/libdwarf/dwarf_setup_sections.c new file: src/lib/libdwarf/dwarf_setup_sections.h 2023-05-03: David Anderson commit 81e5968d506aa50562aa3df64783f030d9e316cc Modified ts_entry which saves 8 bytes that were pointlessly wasted (counting padding no longer needed). modified: src/bin/dwarfdump/dd_tsearchbal.c 2023-05-03: David Anderson commit 2ae7b691cce0f99f1542cf3d32d565b76a98bf6f Split one line into two to avoid too-long line. modified: src/lib/libdwarf/dwarf_frame.c Remove trailing whitespace. Remove leading/trailing blank lines. modified: src/lib/libdwarf/dwarf_elfread.h modified: src/lib/libdwarf/dwarf_errmsg_list.h modified: src/lib/libdwarf/dwarf_line.h modified: src/lib/libdwarf/dwarf_secname_ck.h removed include stdio.h, was for debug only. modified: src/lib/libdwarf/dwarf_secname_ck.c 2023-05-03: David Anderson commit a6809f258fdd57d928daf7865bcc29cbc84522b8 Now checks that DW_AT_abstract_origin with DW_FORM_ref_addr refers to a valid DIE in .debug_info modified: src/bin/dwarfdump/print_die.c 2023-05-02: David Anderson commit c779d667f7fc7c66cae371a1a9ae0bd780a8393b Up to date with git log modified: ChangeLog 2023-05-02: David Anderson commit 685372749ce431fd5ba3b2fddfa7d0306b3c8a7f Now the list of section names to ignore is handled with binary search, so cutting search time approximately in half. modified: src/lib/libdwarf/dwarf_secname_ck.c 2023-05-02: David Anderson commit dd6093f5efbd57dbd2e8e2441093067e4313d9e2 Now all the builds use the new source file, and the self tests all test the revised function. modified: src/lib/libdwarf/CMakeLists.txt modified: src/lib/libdwarf/Makefile.am modified: src/lib/libdwarf/meson.build modified: test/CMakeLists.txt modified: test/Makefile.am modified: test/meson.build 2023-05-02: David Anderson commit 394b353a25a0e3ecbe4b6bd21fa3d02d3798b772 Now include dwarf_secname_ck.h to get the moved functions. modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_init_finish.c Removed _dwarf_ignorethissection() prototype from here. modified: src/lib/libdwarf/dwarf_opaque.h Factored out _dwarf_startswith and _dwarf_ignorethissection for simpler testing and smaller code. Shortly performance will be improved too, since the refactoring makes that easy.. new file: src/lib/libdwarf/dwarf_secname_ck.c new file: src/lib/libdwarf/dwarf_secname_ck.h New test code for the factored out functions. new file: test/test_ignoresec.c 2023-05-02: David Anderson commit 7432b7a9b1909cffca34fbace217bcbfc4d9bd45 Function definition had initial left brace in the wrong place. modified: dwarf_init_finish.c 2023-05-02: David Anderson commit 9e051d9f696244c3e794f2890778b29457bcfead Adding new DW_LANG attribute names (new in DWARF6, public on dwarfstd.org now). modified: dwarf_names.c 2023-05-01: David Anderson commit aa97b2bc34eaeea619df6c39f93b4e190d93b1d6 One new line of code (prevous commit) had incorrect indentation. Fixed. No logic change. modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2023-05-01: David Anderson commit e41c8ead4db5bd6864354820d6b4cdd03119ae11 Latest change. Related to section groups. modified: ChangeLog 2023-05-01: David Anderson commit a0872b2f09d2f9b034a8e8a1dd43a204ebbc2233 Minor update of the date (May now, not April). modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2023-05-01: David Anderson commit 6c667ab643f4a78d153b58bc3690047d9fca2f09 This fixes a problem due to the way one user creates group sections for .text as an aid to LTO (link time optimization), which pointlessly cause libdwarf to issue an error. Pointless because libdwarf pays no attention to the sections causing an error, so we should ignore them in section groups too. In read_gs_section_group() use _dwarf_ignorethissection to avoid putting section group entries with the unwanted names in any group. modified: src/lib/libdwarf/dwarf_elf_load_headers.c Changing _dwarf_ignorethissection() to use startswith() instead of strcmp() in looking for text etc that libdwarf is not interested in. modified: src/lib/libdwarf/dwarf_init_finish.c 2023-04-27: David Anderson commit 1f84190bf84c68ac6d80d31a4e0b562659d4faf4 Added OSSF Best Practices badge. modified: README modified: README.md 2023-04-27: David Anderson commit 545322e1897bbc15fa8f26943802b34c41f81274 Corrected the section on reading an object with no file present (the section index is now Dwarf_Unsigned per Changes after 0.6.0) modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf 2023-04-27: David Anderson commit da679e0148d04643dfc713f320272cd3dbdc6b40 Up to date with git log modified: ChangeLog 2023-04-27: David Anderson commit 055d0301be97d107c4098f65b1958f15ace25cfc Updated to today date. Changed dwarfstd.org link from http to https. modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2023-04-27: David Anderson commit caa2ad7b9a4fbd6ec0c24518f6ff8342658bd971 Now documents the testing needed for contributions. modified: CONTRIBUTING.md 2023-04-25: David Anderson commit d1719d5c76d9bf19d69ec940ab92ffbac763e70f Now up to date with git log modified: ChangeLog 2023-04-25: David Anderson commit 1cac955c5388e56f729184e1888e5aa69c207f2c Now an earlier detection of some corrupt Elf headers. modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2023-04-21: David Anderson commit 3d624ee882713938564ea30fc35683da418992ee Now up to date with git log. modified: ChangeLog 2023-04-21: David Anderson commit b355024686bbc963f5bef9c09fb5f9470de3ae0d Additional small modifications to extended elf section counts, correcting earlier approximations. Hopefully all now correct. modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2023-04-20: David Anderson commit 8cbcf36da07d2f245af4bdc2a63f7e24552069c2 The correct new spelling is DW_LANG_Assembly (not Assembler). modified: dwarf.h 2023-04-20: Mateusz Janda commit afb87c6d9f6f25bc652a871ac3074098e1d226c8 Support for large number of section headers (#160) 2023-04-16: David Anderson commit 975430ca8c739f65aa6b458533cfb0e068d3d495 DW202303-006 and -012 were both assigned the same oss fuzz number, which was disguized another mistake. modified: data.txt modified: dwarfbug.html modified: dwarfbug.xml modified: dwarfbuglohi.html 2023-04-16: David Anderson commit 09d2ea27346d8cf6076ee65d29f9bcde40daa9d3 Now with latest DW_LANG codes assigned. modified: dwarf.h 2023-04-15: David Anderson commit 7d362787aba63d89857284169309acf612807034 Don't report in htmldoc.tar modified: .gitignore 2023-04-15: David Anderson commit e4f01daf0f1bdaaa718dec4fcccf8be759e2695a Don't report on bugxml/__pycache__ modified: .gitignore 2023-04-15: David Anderson commit 035db2b4f822d5395a10ab79279e6fbaa14d8087 Recent changes entered from git log modified: ChangeLog Corrected the git commit id for 58026 ossfuxx modified: bugxml/data.txt Regenerated: modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-04-15: David Anderson commit 27e06267b2931cdfbbaf46492f88a3f9040abb20 Changed a register variable from int (!) to Dwarf_Unsigned to match everywhere else. modified: src/lib/libdwarf/dwarf_frame.c Fixed doubled comment end to a single */ modified: src/lib/libdwarf/libdwarf.h 2023-04-15: David Anderson commit b4ac71c98292d7de32584358441dada59dff2944 Changed suggested email from libdwarf-list to libdwarf. modified: configure.ac 2023-04-15: David Anderson commit 9972bef26da3c43fcc3e2ecd6621c09930b3bd06 Minor text change. Modified the email address a little. modified: SECURITY.md 2023-04-15: David Anderson commit 558bee0286dd422871715511161477dab746f135 Documenting DW202304-004 ossfuzz 58026 modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-04-15: David Anderson commit 76bf9444dfed876da987c2cfeac0d09dbe1a3fba Changed internal fields with register numbers into Dwarf_Unsigned. The previous use of Dwarf_Half lead to a failure to detect some corrupt register numbers read from DWARF. Leading to a segmentation violation in libdwarf. DW202304-004 ossfuzz 58026 The bugs the test object exposed have been present for over 25 years. modified: src/lib/libdwarf/dwarf_frame.c Changed register number data from Dwarf_Half to Dwarf_Unsigned. modified: src/lib/libdwarf/dwarf_frame.h modified: src/lib/libdwarf/dwarf_opaque.h 2023-04-15: David Anderson commit 4f933efa3a73f09403910d7804fde4c9907de284 Added doxygen comments pointing out where two public structs show register number as 16 bits unsigned, restricting the number of registers that can be handled to that (currently reasonable) limit. modified: src/lib/libdwarf/libdwarf.h 2023-04-15: David Anderson commit 1c8ad2fbbcecec257cbd8852bfa34af30a28752f Added a comment documenting that the code can leak memory as in case of certain errors found in corrupt dwarf it immiately exit()s and does not call dwarf_finish(). Arranged that in case of some errors the code prints the error name, not the error number. modified: fuzz/fuzz_set_frame_all.c 2023-04-12: David Anderson commit 9f7b5cfc844fa1e462b86c42419e7d191fc9dcc0 Made three names bold (relating to frame registers). modified: doc/libdwarf.dox 2023-04-12: David Anderson commit b87cf166362e21a575b2cccd0bc155977b514c9b Removed redundant -W entries. modified: configure.ac 2023-04-12: David Anderson commit f69bc261e4ccf6ff60741d3743ee96b697f1d4cc Merge: a6ea699c e8aa1e4b Merge branch 'main' of https://github.com/davea42/libdwarf-code renameing branch did this. 2023-04-12: David Anderson commit a6ea699ca78c04aa88a8ff3fe5c5a498d6693d07 Removing set-not-used local variable modified: src/lib/libdwarf/dwarf_query.c 2023-04-12: David Anderson commit e8aa1e4bd25c3eeb1da20485a53462e7ac99b58d Update scorecards.yml Changing a comment to ref main instead of master 2023-04-11: David Anderson commit 40c63f7190267964e7443920a60f5826986df109 Latest git log messages now present here. modified: ChangeLog 2023-04-11: David Anderson commit 78da6f683a34052b5a3c0ea11cfe774fc7ec6e84 Made a small change to the description of DW202304-003. The test case was cleverly fuzzed to bypass some kinds of checks. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-04-11: David Anderson commit 4aa19e68e135a9124478254df398b60c9cc0cced New bug fix DW202304-003 oss fuzz 57887 modified: bugxml/data.txt Regenerated. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-04-11: David Anderson commit aa7a80e8fcd473041dd319f1a9209af04aae1d6f Fixing trailing whitespace. Removing several comments like /* FIXME */ as they related to a past change and no longer need to be referenced. modified: src/lib/libdwarfdwarf_line.c 2023-04-11: David Anderson commit 426ed6faa6bae3274e3da93a3e33ddaf94037e3a Removing trailing whitespace. modified: dwarf_fission_to_cu.c 2023-04-11: David Anderson commit 2eac3737685eda19eb3ddcc0e386f901709510c1 Added commentary in _dwarf_get_addr_index_itself() as to why one cannot issue the error there in case of a bogus index into .debug_addr. Removed some trailing whitespace. modified: dwarf_form.c 2023-04-11: David Anderson commit 1729d9af3f690bece912ae0f625b312566d0ae25 DW202304-003 ossfuzz 57887 The fuzzed test case involved an index that was so close to wrapping around a 64bit unsigned that testing after doing arithmetic would fail to catch the error. Now doing much better checking in _dwarf_extract_address_from_debug_addr(). modified: dwarf_query.c 2023-04-11: David Anderson commit ce002f8e78c80a96997efa86db51ec0f38a04fda Up to date with git log now. modified: ChangeLog 2023-04-11: David Anderson commit 00f42432edf992246ad4e4a475a30808334820ab Correcting by adding omitted ossfuzz identifiers to ChangeLog (just a few cases missed) and ensuring that data.txt is correct. modified: ChangeLog modified: bugxml/data.txt 2023-04-10: David Anderson commit 480f858bd03bff4e64ee353c2d11c5b8ffa6ff4d Updated date, removed noise word 'simply' from several places, and cleaned up formatting of the Recent Changes section. now mentions the compatibility break due to 32bit section counts added to Elf requiring a library API change. modified: doc/libdwarf.dox 2023-04-09: David Anderson commit a0b23a465aa67a519a3d0fee6f2b035cc4aebac7 Updated DW202304-002 oss fuzz 57766 modified: bugxml/data.txt Regenerated. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-04-09: David Anderson commit 761da806fc950c6b26c1763e8989a814e9b16a59 Fixing DW202304-002 oss fuzz 57766 A read off the end of the relevant (.debug_str_offsets) section. Using renamed fields related to str_offsets modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_fission_to_cu.c Add a new check for sanity in reading indexes to be used on str_offsets. Simplify and correct _dwarf_extract_string_offset_via_str_offsets() modified: src/lib/libdwarf/dwarf_form.c Revise the list of values used in str_offsets data for cu contexts. Document the fields better. Put the boolean markers next to what they relate to. Delete a useless boolean. modified: src/lib/libdwarf/dwarf_opaque.h Using renamed fields related to str_offsets modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_str_offsets.c 2023-04-09: David Anderson commit 77e8585029e71c296eca40a39cd1907256302cd1 Notes on a new bug number. More in a few minutes. modified: bugxml/data.txt 2023-04-07: David Anderson commit 6caff11db733e9d8bb2125a0edeac2ade65ef545 Documenting the new incompatibility forced by section counts > 16 bits. modified: doc/libdwarf.dox The incompatibilities are discussed here. Will affect those using dwarf_object_init_b(). modified: src/lib/libdwarf/libdwarf.h These are the changes to correctly read the 32bit section count e_shnum and e_shstrndx The 'man 5 elf' page gives the outline, but what linkers create is slightly different. Now we handle both documented and actual. modified: src/lib/libdwarf/dwarf_elf_load_headers.c All this is due to changing index section numbers from Dwarf_Half to Dwarf_Unsigned. modified: src/bin/dwarfexample/jitreader.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_machoread.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_peread.c 2023-04-07: David Anderson commit 02f451aed20dae9bdb4ed6267d561c6ca7a52f09 Bugs fixed by the commit shown next. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-04-06: David Anderson commit 91c8bffb6c8104ad3231ed040d77a30018e6c981 Adding DW202304-001 for oss fuzz 57711 with fix commit id.. modified: bugxml/data.txt 2023-04-06: David Anderson commit a53581496308f1a84fafde7de6e4eda91efa38b6 We no longer issue DWARF_CHECK messages on problems reading certain line table API functions. Unless we are using a relevant -k option. Only matters in three corrupted objects. Might change it back at some point. modified: src/bin/dwarfdump/print_lines.c 2023-04-06: David Anderson commit da0d1efbeddcff23c25704bd9672e98314928b19 Some lines printing DWARF_CHECK appeared when doing printing. Now they only appear when doing'checking. It has to do with line (table) details details suceeding or (in 3 test objects) failing. Now we don't print the DWARF_CHECK if printing. modified: src/lib/libdwarf/dwarf_line.c A fix to oss fuzz 57711. A problem present for many years. A crash due to a negative value in a line table Dwarf_Signed API. The stack trace shown was pretty crazy (a mess). Many places were having trouble checking bounds due to the historic choice of Dwarf_Signed in the API interfaces but Dwarf_Unsigned internally (as Dwarf_Unsigned is really the only sensible choice). So now we explicitly check for value < 0 (where that makes sense) so even with signed values we can do other checks without worrying about negative values. modified: src/lib/libdwarf/dwarf_line_table_reader_common.h 2023-04-06: David Anderson commit 89ebcaffd9913e371b8f7e2afd72e097350067ab Dated April modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2023-04-06: David Anderson commit 8d08175af2b842e2994e2ffae1945273c23a1470 now the date prints as January 2023 instead of with a specific date and time. Makes it simpler in git not having change so frequently. modified: bugxml/readbugs.py 2023-04-06: David Anderson commit 5ac919ea71370bad448628900f4f75919b1654df Many local variables were used that had no initializer. function exampled(). While that may not have changed the output it is extremely bad proctice. And can easily lead to irreproducible results. Now all initialized to zero. No other change. modified: fuzz/fuzz_srcfiles.c 2023-04-06: David Anderson commit c6e362598b9cf78f9dc8c07e8f2e1341b84522fd Adding two new error codes for line table errors/corruption. DW_DLE_LINE_INDEX_WRONG index into line table corrupt DW_DLE_LINE_COUNT_WRONG count in line table corrupt modified: dwarf_errmsg_list.h modified: libdwarf.h 2023-04-06: David Anderson commit 60b324de009df07ca34e47b60d3d5e18fa3b07ac Removed the union defined here, the struct member of the union is retained. References to the struct are shorter now. The union was created to support IRIX rqs (not described here) and that support has been irrelevant for 25 years. modified: dwarf_line.h 2023-04-05: David Anderson commit 6c4e9c043f9a50626f940b5372ad6116cd3c351c Regenerated. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2023-04-05: David Anderson commit 4bb3aaed068e4f9e1ef972a041238d6942131e87 generated from latest bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-04-05: David Anderson commit 4cac4e5031ef3131055bd24c15b51383a6208d4d Remove trailing whitespace and fix indents. modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2023-04-05: David Anderson commit 28ddb555edd1c4639b843381039824fb04025911 Now correctly reads the rare Elf object files that need more sections than fit in a 16 bit section count. See 'man 5 elf' for details (at least on modern Linux) on how this works. modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_elfread.h 2023-04-05: David Anderson commit ac7e8b7b5ee25a37448ba4d374f62110702ab059 Refined a comment about Elf sections. modified: src/lib/libdwarf/libdwarf.h 2023-04-01: David Anderson commit db71f9b6841053057394db9472c7cfc0681a7eeb New bug fix modified: bugxml/data.txt 2023-04-01: David Anderson commit 21b076f652992c03f145f6edeb623918e17693f8 Fix ossfuzz 57562. DW202303-59 a corrupt DW_AT_sibling value (in a fuzzed object) resulted in an infinite loop in a normal calling program looking for sibling DIEs. modified: src/lib/libdwarf/dwarf_die_deliv.c 2023-03-30: David Anderson commit fa14b64ae7d3ed79d872475a3936a275f135bf9c Latest dwarfbug data modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-03-30: David Anderson commit 9977c2912fa84b5a9b883baf4db311da447e5e50 Removed the only (DW_DLV_NO_ENTRY) instance, using DW_DLV_NO_ENTRY itself (it is in a comment). modified: src/lib/libdwarf/dwarf_die_deliv.c 2023-03-30: David Anderson commit b5173ffefaa1bbbcf400819e1f8e4356486d3f16 Changed (DW_DLV_ERROR) to DW_DLV_ERROR everywhere. It looks better now. modified: src/lib/libdwarf/dwarf_line_table_reader_common.h 2023-03-30: David Anderson commit 33813299bdb67d00ef994929ef2e849a92bcdcac 75527 -> 57527. fixed typo. modified: bugxml/data.txt 2023-03-30: David Anderson commit d9a1fccce9940812f60fd1e9f5a8f557d92a7a0b Just added a note on the 57527 code change modified: ChangeLog 2023-03-30: David Anderson commit f0dc381cad6c0ed62e3a41de8f796bc8c6a5009a Added new bug fix modified: ChangeLog 2023-03-30: David Anderson commit a2f248569cd52d6955f160fd5f153c9afe8ec945 Added DW202303-058 ossfuzz 57537 modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-03-30: David Anderson commit 36e4063ade31c9ea6ea5df973d2045b36877885b ossfuzz 57527. A .debug_line section truncated to just the right point (in a certain 12 byte area) in a line table header causes an memory reference outside any correct data. This has been true for many years. Now we check before looking at memory. In addition a few _dwarf_error() now use _dwarf_error_string() so some possibly-useful information can be reported by library callers. Also deleted 4 lines of dead code (was repeating a test done a few lines above). modified: src/lib/libdwarf/dwarf_line_table_reader_common.h Also changed a few return (DW_DLV_ERROR); to return DW_DLV_ERROR; with no useless parentheses. 2023-03-30: David Anderson commit 4eb65e7aabd5343956768cc9b7c4f7f04f4cbea5 Identifying 2GB read limit as vulnerability. modified: data.txt modified: dwarfbug.html modified: dwarfbug.xml modified: dwarfbuglohi.html 2023-03-29: David Anderson commit 025f6bcdb3ed51606d73f4bb4c5cfb7e7066f336 Updated from git log modified: ChangeLog 2023-03-29: David Anderson commit 5c153615e4e0c610bd6e541fcf74523654ebd90c Added DW202303-056 for oss fuzz 57516 modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-03-29: David Anderson commit 5dc3de5ce70331692a2700b218fb79e0d4d81c23 Fixing DW202303-055 ossfuzz id: 57516 The abbrev section showed DW_FORM_implicit_const after fuzzing the test object yet there was no implicit const in the original and no implicit const value to access. Resulted in an attempt to index off a non-existent array. library crash. Now we issue an error. modified: src/lib/libdwarf/dwarf_query.c 2023-03-29: David Anderson commit 0e3ff723b6d6eec263db0cee6162393c011e4b5d Removed an if and related as the following if was sufficient all by itself. modified: src/lib/libdwarf/dwarf_die_deliv.c I case dwarf_get_xu_hash_entry is passed a dw_index which is out of range return DW_DLV_NO_ENTRY instead of an error. Fix the test of Dwarf_Unsigned vs Dwarf_Sig8 size, and if the sizes don't match actually return DW_DLV_ERROR (the return was missing!) Peculiar testcase behavior running on 32bit FreeBSD revealed the coding error. modified: src/lib/libdwarf/dwarf_xu_index.c In doxygen comments document the behavior of dwarf_get_xu_hash_entry with a too-large dw_index. modified: src/lib/libdwarf/libdwarf.h 2023-03-29: David Anderson commit ae22edab4dfddf3b22f966df38c4a7da2417ebac Bringing up to date with git log. modified: ChangeLog 2023-03-29: David Anderson commit d5d5d919743b9a7920a0686eef12046ae336d1a1 Filling in datefixed: and gitfixid: with best current guess in a couple of old entries. modified: data.txt 2023-03-28: David Anderson commit e5ca7fef6d6680b251dcd7d4fbbfc140b8cfb5b1 Remove trailing whitespace. Fix indents. modified: src/lib/libdwarf/dwarf_debugaddr.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_elfread.c modified: src/lib/libdwarf/dwarf_find_sigref.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_line_table_reader_common.h modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_str_offsets.h modified: src/lib/libdwarf/dwarf_xu_index.c 2023-03-28: David Anderson commit 45be14751e65fe7f2a26d0258edf7663a2136e0f Remove trailing whitespace. Fix indents. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_dwconf.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_gdbindex.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfdump/print_macro.c 2023-03-28: David Anderson commit 711416fd385ac28921e43beb759777d7d685c302 Removed all mention of macro checksize(), it was already an empty macro. modified: dd_regex.c 2023-03-28: David Anderson commit 3addc636fe5fa0b47a58ca90e848df1aada25dde Deleting a single line with declaring an unused local variable. modified: dwarf_rnglists.c 2023-03-28: David Anderson commit f8032529c9deb4dd15d80325c6f2e6cb8c5fa6f5 All these had free(errp) which here is harmless as errp is null, but whether a Dwarf_Error * is null or not free() on it is never appropriate, and if not-null the free is very wrong. modified: fuzz_die_cu_offset.c modified: fuzz_die_cu_print.c modified: fuzz_showsectgrp.c 2023-03-28: David Anderson commit 541b15c1ec2e01396f36d389bc9fe98da48ecb55 Fixed typo. modified: ChangeLog Now with all known bugs covered & fixed. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-03-28: David Anderson commit 39a1abd35cba15967b96fb22b71b54870c312195 ChangeLog up to date. modified: ChangeLog Latest bug content modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-03-28: David Anderson commit 29a27cc5df622674fe14d3bc9b43cfe663db6da3 Completed notes on ossfuzz 57442 DW2023-052 modified: bugxml/data.txt 2023-03-28: David Anderson commit 271b9b8367a8151fcd98723d73382ec56f05c810 Fixes ossfuzz 57443 DW202303-053 Fixes ossfuzz 57442 DW202303-052 Checks more carefully for a corrupted rnglists header. modified: src/lib/libdwarf/dwarf_rnglists.c 2023-03-28: David Anderson commit 2b19bc239f3cedd1b2461e4265d90633277ce704 ossfuzz 57485 Fixing a mistake in this test source, which was doing a free() that is documented as inappropriate.. modified: fuzz/fuzz_die_cu_attrs.c 2023-03-28: David Anderson commit 8bf96199a0e130483cceca6bfacfbe4127441ab1 Previous version was wrong for large sections. This version with the read loop tested is working. modified: src/lib/libdwarf/dwarf_elfread.c 2023-03-28: David Anderson commit 506d2d3a1b2de05095cca4b6754c47f41a0cfd45 Broke the read of object sections into pieces < 2GB in size. Necessary due to Linux read() size limit (in the kernel). modified: src/lib/libdwarf/dwarf_elfread.c 2023-03-28: David Anderson commit 76bc7743752724be5b87a4da3f0d2242e6a0be50 Now known bug reports all listed, some with no fixes yet. modified: bugxml/data.txt 2023-03-28: David Anderson commit e1b613af80a6e09140f018e983d16cb1a0e5af07 Coverity Scan discovered issues. All are fixed with these changes. A loop looking for invalid .conf files was kind of doing the wrong thing. So it had dead code. Now doing the right thing and passes modified: src/bin/dwarfdump/dd_dwconf.c Deleted dead code (constand propagation in Coverity found it) and replaced with a comment saying there is no need to check the offset-size. modified: src/lib/libdwarf/dwarf_gnu_index.c More dead code. Removed it. modified: src/lib/libdwarf/dwarf_rnglists.c 2023-03-27: David Anderson commit 51617feed280703a409b91396fc291208693b410 The fuzz/* files have to be in a distribution for testing to fully work. So now they are. modified: Makefile.am modified: configure.ac new file: fuzz/Makefile.am new file: fuzz/README.md 2023-03-27: David Anderson commit e0e732929c36887e4cea82e38fab075786cdf320 Had an accidental c99 declaration mixed with code. modified: src/bin/dwarfdump/dd_command_options.c Had an accidental c99 declaration mixed with code, but here it was just a stray extra ; in a list of declarations. modified: src/lib/libdwarf/dwarf_str_offsets.c 2023-03-27: David Anderson commit 72087846050cb22d0b241a1aefd6fe057ad0ee9a Remove build on push. This is only for emergency testing of changes in brew or mac setup modified: mac_meson.yml 2023-03-27: David Anderson commit 75f5b429bfd8558bde047b6286e3ea9e013fdecf using --overwrite on mac_autotools now modified: test.yml 2023-03-27: David Anderson commit f00c2a86398b653a639d8116669e24b46f5e0e6d A test on its own of mac autotools modified: mac_autotools.yml 2023-03-27: David Anderson commit e6e586971d04da33031743c8c88dd659381493ef Another odd mod to get macos_meson to build. modified: test.yml 2023-03-27: David Anderson commit f43538102e793386352ae4368b781cb62d8504c5 For a test. pkgconf problem. modified: mac_meson.yml 2023-03-27: David Anderson commit c25a14c3fd5522aff0b1d2a77d7ee66b7c529779 ossfuzz 57437 ossfuzz 57443 Unused local variables removed. modified: src/lib/libdwarf/dwarf_gdbindex.c A free() was duplicated, Windows compiler noticed. modified: src/lib/libdwarf/dwarf_line_table_reader_common.h 2023-03-27: David Anderson commit cfe5c2dfac0d4eca22cf450db770fdba2bacdd38 Another unused arg not reported by local compilers. Removed argument. modified: print_debug_gnu.c 2023-03-27: David Anderson commit 61d50244ca20877638ae5ca1c453f5066198c6d4 The compiler used in workflows noticed an unused argument that is not noticed in local builds. This removes that unused argument in _dwarf_read_str_offsets_header(). modified: ../../src/lib/libdwarf/dwarf_fission_to_cu.c modified: ../../src/lib/libdwarf/dwarf_str_offsets.c modified: ../../src/lib/libdwarf/dwarf_str_offsets.h 2023-03-27: David Anderson commit dbc0c3fff2a066bf422d655188cacc9fe0194900 Fixing the DW_DLE count modified: ../../lib/libdwarf/libdwarf.h We now have to have more #include and declarge a glflags instance explicitly here since we updated dd_regex.c. modified: ../../../test/test_regex.c 2023-03-27: David Anderson commit d202f85d6e9f83d25cbb6287a0d55973cf86b923 latest modified: ChangeLog 2023-03-27: David Anderson commit 054de66aec29f3ed67c14b675b9e0981004cdd27 Now shows several new bug reports. modified: bugxml/dwarfbug.html 2023-03-27: David Anderson commit 920f292fe6437fa69e6f973cfcb023a5d070383b Now the warning about odd address size no longer repeats. Happens just once, not every time detected. Once suffices. modified: src/bin/dwarfdump/print_die.c 2023-03-27: David Anderson commit 33144113e7dceab8c087b370308bef4b872e6bf4 Previous commit was flawed. This is much better and clearer. And indents/trailingwhitespace fixed. modified: src/bin/dwarfdump/dd_regex.c 2023-03-26: David Anderson commit dbacdce5f28b28ec468f1c6b252d4cd6ca3ca443 Fixes a number of warnings about unused and set but not used. modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_str_offsets.c modified: src/lib/libdwarf/dwarf_xu_index.c 2023-03-26: David Anderson commit 3f497b52a5216f107e5d8bf01102d996d82b9f55 Fixed a mistaken change for -h modified: src/bin/dwarfdump/dd_command_options.c Fixing a misplaced #endif modified: src/bin/dwarfdump/dd_regex.c Improving an error message modified: src/bin/dwarfdump/dwarfdump.c 2023-03-26: David Anderson commit b8d7a93053aa178c8c95dbcc0a514e4766447e5d Added test file name modified: bugxml/data.txt 2023-03-26: David Anderson commit 11e1bb2dd0d05fde888e5a7ad336b96354c1ef18 this had a mistake which somehow still compiled for me. The isinset() macro was not visible during the compile modified: src/bin/dwarfdump/dd_regex.c 2023-03-26: David Anderson commit 0d02f951643bc3b75300b27ff796f83dd6befe86 The declaration/definition Dwarf_Die die; was both uninitialized and unused. Removed it. modified: fuzz/fuzz_die_cu.c 2023-03-26: David Anderson commit c3280f61a5fd2cb792ad36160cf1c11b1950c37d Unfixed ossfuzz bugs noted. modified: data.txt 2023-03-26: David Anderson commit 07573fe97064ebf1d9b36269aa1219f4728225f0 With all recent fixes. modified: bugxml/data.txt 2023-03-26: David Anderson commit b21f40a9047e288e931b2b15729965a7dd2529e8 Printing -h usage data failed do to a change yesterday. Fixed modified: src/bin/dwarfdump/dd_command_options.c 2023-03-26: David Anderson commit 24f5697aecd77092de20f0f7e7d91fbc1f2b3da0 In new error cases we could fail to close a FILE stream, resulting in a memory leak from fopen. DW202303-048 modified: src/bin/dwarfdump/dd_dwconf.c 2023-03-26: David Anderson commit df64db4740f1b480e602b1112107d51f0d269828 DW202303-047. This eliminates the double free. modified: src/bin/dwarfdump/dwarfdump.c 2023-03-26: David Anderson commit 9eac0c8bbae3fadb2be3d5ee15b9c44f42d2f966 Fixes DW202303-045. We were not checking for ASCII and not ensuring that if the regex compile failed we ignored regex processing. The restriction that the regex search pattern may only include the ASCII subset of utf-8 is now enforced and ERRORs result if it is violated. (At the present time: this is a limitation of the existing code) modified: dd_command_options.c modified: dd_regex.c 2023-03-25: David Anderson commit 8d5319d90610c4cc38c08ba2c8e64a3dba4a6761 Now with DW202303-045 filled in. modified: bugxml/data.txt 2023-03-25: David Anderson commit b2e5a6288e268c80a36ffeb1f6fb369d0a92a559 Now all ERROR messages show up in the count at the end of dwarfdump output. modified: src/bin/dwarfdump/dd_regex.c 2023-03-25: David Anderson commit c3c9dfb666bb668377e0d3a16813d24c367e4667 Corrected spelling in an error message. src/bin/dwarfdump modified: dd_regex.c 2023-03-25: David Anderson commit bb8fab9e5e4e40b1268b31d90882c2ab93653eaf DW202303-045 Now stops compiling regex and issues an error if the string (or rather the nfa for the string) is too long. modified: src/bin/dwarfdump/dd_regex.c 2023-03-25: David Anderson commit 69f13a2106201145939a68ed662c0c9e4b54579f Now DW202303-044 is complete. modified: bugxml/data.txt Regenerated: modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-03-25: David Anderson commit 3269f43d2a044bfcce71d30ce214a305473d1ea3 Fixes DW202303-044 With that lone backslash in --search-regex=\\ (or any pattern ending in backslash) The regex compiler incremented p by one and then dereferenced and stored the resulting value. But if the dereference gave 0 (the NULL byte) this resulted in unpredictable, but bad, effects since unknown bytes after the pattern string would then be referenced as part of the pattern. Now we notice the improper NUL and issue an error. modified: src/bin/dwarfdump/dd_regex.c 2023-03-25: David Anderson commit 4a8a201cdb3408a2cfdc2946418b51b884140a2c Fixing DW202303-042, the code did not return from traverse_die() on receiving an error from libdwarf. Fixed. modified: src/bin/dwarfdump/print_die.c 2023-03-25: David Anderson commit bbc9b05ef89a6cd92ad167ad0f16d8eaea946879 Documented DW202303-040 (on dwarfdump). modified: data.txt 2023-03-25: David Anderson commit fd92b647e5e3a524be94b3b06c9efd14a8292946 DW202303-040. Fixes crashes due to bad handling of options like --file-abi= modified: src/bin/dwarfdump/dd_command_options.c 2023-03-25: David Anderson commit cb8dd45770f2e1f440aab60adac0256f268fc16e Fixes DW202303-010 by dealing with a corrupted dwarfdump.conf file.. src/bin/dwarfdump: modified: dd_dwconf.c Minor message change to be a tiny bit more accurate if dwarfdump cannot open an object file. src/bin/dwarfdump: modified: dwarfdump.c 2023-03-24: David Anderson commit 06a34f2ecc42078f92883be5124c988010ed3013 Latest and current data modified: data.txt modified: dwarfbug.html modified: dwarfbug.xml modified: dwarfbuglohi.html no actual change. modified: readbugs.py 2023-03-24: David Anderson commit 216840b5e441dda5352037aaeac023182a577107 Now with all the (known) oss fuzz bugs fixed. modified: bugxml/data.txt regenerated modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2023-03-24: David Anderson commit e4053c9a0f25db0bed28372d9b77a50a0307dc10 oss fuzz 57335. oss fuzz 57463. The test case is kind of pushing the bounds here. modified: bugxml/data.txt Added a comment, the call will fail as written. But now there will be no library crash. modified: fuzz/fuzz_die_cu_attrs.c Added a new error, DW_DLE_INVALID_NULL_ARGUMENT(498) modified: src/lib/libdwarf/dwarf_errmsg_list.h Now returns DW_DLV_ERROR if dw_return_bool is passed in as NULL. modified: src/lib/libdwarf/dwarf_form.c Added a new error, DW_DLE_INVALID_NULL_ARGUMENT(498) Documented the dw_return_bool pointer to dwarf_hasform() more completely. modified: src/lib/libdwarf/libdwarf.h 2023-03-24: David Anderson commit 0e8fafd578695235cdd8cc8857eae22d64f940fb Another libdwarf fix defined. modified: bugxml/data.txt 2023-03-24: David Anderson commit 8b6fcfb5cb38ee491ea0973b7699fb7d2c3e080f More of the oss fuzz covered by reports now. modified: bugxml/data.txt 2023-03-24: David Anderson commit 7165918c8594061c3f5ba7dd4df7c4555c68ec78 Fixes ossfuzz 57149. Fixes ossfuzz 57193. Fixes ossfuzz 57292. Fixes ossfuzz 57300. In find_cu_die_base_fields() we use _dwarf_internal_global_formref_b() in several additional places as all these need to constrain the search, not just one of thes base-fields. The bugs present since 2017 (DWARF5 released). modified: src/lib/libdwarf/dwarf_die_deliv.c 2023-03-24: David Anderson commit 873aa151d50e4b701f99a58b6cf07f0c5ea1d2af Added a sanity check before reading so if it's the check fails we get a more detailed message than otherwise. modified: src/lib/libdwarf/dwarf_xu_index.c 2023-03-24: David Anderson commit fcf906a3ab1e5488e818b7393fc06a20414b3a53 Latest vulnerability updates. bugxml/ modified: data.txt 2023-03-24: David Anderson commit 9253810b56ece5dd7722407aacf503e606c7338c Fixed oss fuzz 56895 modified: data.txt 2023-03-24: David Anderson commit 771cfcca1ef6a4a7eb9595d700fc72020d0ed72e Fixing ossfuzz 56895, reading past end of section of a Compilation Unit. the tests of such were not sufficiently precise to catch the error. This was a very old bug. modified: src/lib/libdwarf/dwarf_die_deliv.c 2023-03-24: David Anderson commit 81ee0849b77554d93805b79a59d3e0370b1fbe16 Now showing fix to ossfuzz 56807 and recording it in vulnerabilities. modified: ChangeLog 2023-03-24: David Anderson commit 484f50ef8be0506be2e4b5fbad489868db5c7985 Fixing oss fuzz 56807. Memory leak reading fuzzed object file. This is a very old bug. Only seen with a fuzzed object file. modified: src/lib/libdwarf/dwarf_line_table_reader_common.h 2023-03-23: David Anderson commit 0c92ef5b66c5bbcacae03fbf355b12713151c098 Fixes oss fuzz 57107. The infinite loop was caused by letting internal function _dwarf_find_CU_Context_given_sig() unconditionally do too much in the middle of setting up a CU_Context (by letting it start more CU_contexts(). The implicit infinite loop has been there a few years, depending on the correctness of object files DWARF4/DWARF5 being read. Calls new internal _dwarf_internal_global_formref_b() (which is also called by dwarf_global_formref_b() with its specific new argument at zero) So for internal-library-use we can make modified: src/lib/libdwarf/dwarf_die_deliv.c Introduced a new function _dwarf_internal_find_die_given_sig8() with a new argument and now API function dwarf_find_die_given_sig8() just calls the new function with a specific value (0) of the new argument for the general case. Added a #if 0 dump_bytes() local function for debugging of Sig8 values. Added a new argument to _dwarf_find_CU_Context_given_sig() so it can properly decide whether it should create new CU_Contexts or not. modified: src/lib/libdwarf/dwarf_find_sigref.c file-static find_sig8_target_as_global_offset() added the new argument to help fix the infinite loop. Implements the new _dwarf_internal_global_formref_b() modified: src/lib/libdwarf/dwarf_form.c The new internal functions declared here. modified: src/lib/libdwarf/dwarf_opaque.h 2023-03-22: David Anderson commit 266e832df89ae4b4f6a9fad28c73a2777c07eec9 free(errp) is always wrong, removed it. Ensured on return from the LLVM fuzz interface always dwarf_finish() close() and unlink modified: fuzz/fuzz_die_cu_attrs_loclist.c 2023-03-22: David Anderson commit 774f98e596df9dd8f3cb92ec76243caaa4287039 Fixes ossfuzz 57027. Fixes ossfuzz 57048. Small code change, but massive difference. This has been wrong since dwarf_xu_index existed, which would have been after the DWARF5 standard was issued Feb 2017. modified: src/lib/libdwarf/dwarf_xu_index.c 2023-03-22: David Anderson commit 5fde5e404a98c6727889cf14d8f93ec2138a6fad oss fuzz 56993. One place in _dwarf_read_line_table_header() where there was an error (corrupt data) found the code failed to free(format_values). Fixed. This bug was years old. modified: src/lib/libdwarf/dwarf_line_table_reader_common.h This has been wrong for quite a while, likely years. 2023-03-22: David Anderson commit b9393bb9b6399a34f8616a272d030bdd004a5ef5 Merge: 68089962 bd331ae7 ossfuzz 56897 ossfuzz 56906 ossfuzz 56958 Merge branch 'newrnglists' Merging several fixes reading debug_addr and debug_rnglists And fuzz/fuzz_rng.c too. 2023-03-22: David Anderson commit bd331ae7d839983efcc3bfbe3d656b781d45160c Removed an unnecessary struct gi_fileheader_s Revised the calculations of offfsets to work correctly. Added many checks for out-of-bounds offsets. modified: src/lib/libdwarf/dwarf_gdbindex.c 2023-03-22: David Anderson commit 48552f5f19c90dd2737cd4ee8e03a843ae23de82 Corrected the calculation of offsets in the raw-section reading code and changed to mostly use offsets. modified: src/lib/libdwarf/dwarf_rnglists.c 2023-03-22: David Anderson commit 4e8f26b857b5fe86557e344cd176c69462435c19 Corrected the calculation of the ending offset and added a useful comment. modified: src/lib/libdwarf/dwarf_debugaddr.c 2023-03-22: David Anderson commit f14ba8b4af34698b2fdbd76efc52ef96a9a91256 Removed the unused pointer gi_string_pool. modified: src/lib/libdwarf/dwarf_gdbindex.h 2023-03-22: David Anderson commit 5149a583a263a9a17e462e038d42c8e3f91c8469 Replaced an incorrect comment with a correct one. modified: src/bin/dwarfdump/print_gdbindex.c 2023-03-22: David Anderson commit ade1be5d2efacaa23fbda4b4c1f08fcb8c0b3e4b Every return from the *LLVM* function has to do certain housekeeping to avoid leaks (dwarf_finish(dbg) for example). Several here failed to do that. modified: fuzz/fuzz_rng.c 2023-03-21: David Anderson commit 680899627db6f05b8cf8d86272255563b6d81ebd Initialized local variables to follow the requirements of libdwarf. modified: fuzz_die_cu_attrs.c modified: fuzz_die_cu_offset.c 2023-03-21: David Anderson commit cc6e97128fe889b11cbc9542ad6d73a3bfcdf4a0 These have local Dwarf_Die pointers left uninitialized. That violates the requirements of the libdwarf API. Now set to 0 at declaration. modified: fuzz/fuzz_die_cu_attrs.c modified: fuzz/fuzz_die_cu_offset.c 2023-03-20: David Anderson commit 2ee326bad2b4286ca19a2d007d2bb0e77adcdcff Restoring the working dwarf_rnglists.c. My mistake having a new incomplete version visible. modified: dwarf_rnglists.c 2023-03-20: David Anderson commit fcbbee163bbdfbba7def899d3628b912649c724e Latest changes from git log modified: ChangeLog 2023-03-20: David Anderson commit 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 ossfuzz id 56540. ossfuzz id 56487. ossfuzz id 56480. ossfuzz id 56497. These fixes are to the tests, not the library. Several had code that was going to crash due to mistakes in the test code itself. Removed all instances of free(errp) where errp is Dwarf_Error *errp as that is never necessary or appropriate. Any leftover allocations made in libdwarf and not 'dwarf_dealloc*' or documented as user-must-free data returned via pointers to the caller are automatically freed by dwarf_finish() unless there are libdwarf bugs. modified: fuzz_die_cu.c modified: fuzz_die_cu_attrs.c modified: fuzz_die_cu_info1.c modified: fuzz_die_cu_offset.c modified: fuzz_die_cu_print.c modified: fuzz_macro_dwarf5.c modified: fuzz_showsectgrp.c modified: fuzz_simplereader_tu.c modified: fuzz_srcfiles.c modified: fuzz_stack_frame_access.c modified: fuzz_xuindex.c 2023-03-20: David Anderson commit 16a4078e91cf8c695b491c6fbcbe14f4e7ec02b8 Before dereferenceing errp ensure errp is not NULL. modified: fuzz_debug_addr_access.c modified: fuzz_findfuncbypc.c modified: fuzz_set_frame_all.c 2023-03-20: David Anderson commit 2eced75af9903ab778c3b237ec7be3ddc93ea6ec ossfuzz 56568 All instances of Dwarf_Error error; changed to Dwarf_Error error = 0; to avoid unwanted stack random bytes in the pointer. modified: fuzz/fuzz_aranges.c modified: fuzz/fuzz_crc_32.c modified: fuzz/fuzz_debug_str.c modified: fuzz/fuzz_die_cu.c modified: fuzz/fuzz_die_cu_attrs.c modified: fuzz/fuzz_die_cu_attrs_loclist.c modified: fuzz/fuzz_die_cu_info1.c modified: fuzz/fuzz_die_cu_offset.c modified: fuzz/fuzz_die_cu_print.c modified: fuzz/fuzz_dnames.c modified: fuzz/fuzz_findfuncbypc.c modified: fuzz/fuzz_gdbindex.c modified: fuzz/fuzz_globals.c modified: fuzz/fuzz_gnu_index.c modified: fuzz/fuzz_init_b.c modified: fuzz/fuzz_macro_dwarf4.c modified: fuzz/fuzz_macro_dwarf5.c modified: fuzz/fuzz_set_frame_all.c modified: fuzz/fuzz_simplereader_tu.c modified: fuzz/fuzz_srcfiles.c modified: fuzz/fuzz_stack_frame_access.c modified: fuzz/fuzz_str_offsets.c modified: fuzz/fuzz_xuindex.c modified: src/lib/libdwarf/dwarf_rnglists.c 2023-03-20: David Anderson commit 59f5769780213c8fc4c82efbd829cc02fd13ef8c Most recent generated. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2023-03-20: David Anderson commit c04edfaf20904ee70e867afbf0ee87fb939ec42b new file: fuzz_debug_addr_access.c 2023-03-18: David Anderson commit fafb744cfceaa53fd153a33af38f6105af9b00cf generated files. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-03-14: David Anderson commit 003fb181750f499f4fd30fe7908c82fd5de62d2e Improved a rather useless error message. modified: src/bin/dwarfdump/print_gdbindex.c 2023-03-14: David Anderson commit 8e935967d3415296f8d3886618dda7f554b16f8d Brought up to date with the oss-fuzz fixed so far. modified: data.txt 2023-03-14: David Anderson commit e564c9350c104f16eb2223d7b29082e3deb5d2fb Added many checks for valid pointers and offsets. Corrected logic which was just wrong. Now ossfuzz 56676 passes (DW202303-006). Also fixes oss fuzz 56456. These problems existed since this source was written in 2014. modified: src/lib/libdwarf/dwarf_gdbindex.c Added two small comments. modified: src/lib/libdwarf/dwarf_gdbindex.h Changed doxygen comments on gdbindex functions that now return DW_DLV_NO_ENTRY when an array index is higher than exists in an array. modified: src/lib/libdwarf/libdwarf.h 2023-03-13: David Anderson commit 685d4bc6589f554796f5c75cc9b4693eea0a52ed More new bug/vulnerabilities Entire new list not yet described. modified: data.txt modified: dwarfbug.html modified: dwarfbug.xml modified: dwarfbuglohi.html 2023-03-12: David Anderson commit 4360c7d2852ef54248591d25149962e404c3af83 With the recent changes shown. modified: ChangeLog 2023-03-12: David Anderson commit c1e0dbec0f5de31ea84931bd3f5c491d26dc2f72 Fixing indent mistakes. Removing trailing whitespace. Altering a small number of too-long lines. modified: src/lib/libdwarf/dwarf_debugaddr.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_fission_to_cu.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_macro.c modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_str_offsets.c modified: src/lib/libdwarf/dwarf_util.c 2023-03-12: David Anderson commit 64eaaa58703258cab02896e798664a1bb11a3d5c Removing #if 0 debug code. modified: src/lib/libdwarf/dwarf_debugaddr.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_str_offsets.c 2023-03-12: David Anderson commit 0343c63bd04d387924974e6da60d8471fdf945a9 This is a significant revision of dwarf_str_offsets.[ch] with consequences in several places. ossfuzz id 56478. ossfuzz id 56489. ossfuzz id 56476. The old code was hard to follow. This is much easier to understand. Still has debugging-related #if 0 in it, those will be removed in the next commit. modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_fission_to_cu.c modified: src/lib/libdwarf/dwarf_form.c modified: src/lib/libdwarf/dwarf_macro5.c modified: src/lib/libdwarf/dwarf_opaque.h modified: src/lib/libdwarf/dwarf_query.c modified: src/lib/libdwarf/dwarf_str_offsets.c modified: src/lib/libdwarf/dwarf_str_offsets.h 2023-03-12: David Anderson commit ffecb2b04828a2a20bb6e9ca808e9da4b2c5dd7d Tbe vulerabilities list is a work in progress. There is much more to do. modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbug.xml modified: bugxml/dwarfbuglohi.html 2023-03-08: David Anderson commit 434f6121136047631a579cf77fac651a8f8765a2 Now more bugs listed. Fixed or not. modified: data.txt 2023-03-07: David Anderson commit bdd4a131603c1bffdd5b452a624300f31dd9a2f8 modified: ChangeLog 2023-03-07: David Anderson commit 86671059c1c240ae56433fa94993dcd28df2ae7d Corrected several things to get correct processing. Tests for appropriate values from READ_AREA_LENGTH_CK were nowhere exactly correct, so all have been updated (see last two commits). Also fix 56453. This should finally fix oss fuzz 56636. modified: src/lib/libdwarf/dwarf_debugaddr.c Added more precise READ_AREA_LENGTH_CK tests. modified: src/lib/libdwarf/dwarf_gnu_index.c 2023-03-07: David Anderson commit 90da06a9de8e4bbdf4fe20e12322b73133166dc0 Improving the READ_AREA_LENGTH calls as revealed by oss fuzz 56636 modified: src/lib/libdwarf/dwarf_util.c 2023-03-07: David Anderson commit bb99fe7ddb2bc6601bcb0ee30ced6a8cc8cb0564 Related to oss fuzz 56536, some placew where READ_AREA_LENGTH values where not fully checked. This will require a revisit in a few of these cases modified: src/lib/libdwarf/dwarf_arange.c modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_frame2.c modified: src/lib/libdwarf/dwarf_global.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_rnglists.c modified: src/lib/libdwarf/dwarf_str_offsets.c 2023-03-07: David Anderson commit 832ee2aa1a8e30d7afe4fc99adcc2bd15af0802c Change so pointless repetition of certain errors in .debug_gnu_pubnames/types are avoided. Fixed indents. modified: src/bin/dwarfdump/print_debug_gnu.c 2023-03-07: David Anderson commit 973f16ae10e48d75a4eb0d3d9843a5b687eed8eb Vulnerabilities update. modified: bugxml/dwarfbug.xml 2023-03-07: David Anderson commit d2c18155f5d04011ac7d81d0ea696a9d34daa0c8 Latest info on vulnerabilities modified: bugxml/data.txt modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html 2023-03-07: David Anderson commit b55ce0185528bf0a99e375cf8f3c84b76b6881a3 Merge: 48bbdb9d d9c14b2b Merge branch 'master' of https://github.com/davea42/libdwarf-code Due to fuzz issues. 2023-03-07: David Anderson commit 48bbdb9d9fa5a400e920e5c9564243e4470bd88d Fixes here for several fuzzing issues. WIll show numbers shortly. modified: bugxml/dwarfbug.html modified: bugxml/dwarfbuglohi.html modified: src/bin/dwarfdump/print_debug_gnu.c modified: src/lib/libdwarf/dwarf_gnu_index.c modified: src/lib/libdwarf/dwarf_gnu_index.h modified: src/lib/libdwarf/libdwarf.h 2023-03-07: madamantis-leviathan commit d9c14b2b12a3313c78bbfa808e12ed242b7f0adc Remove functions that are no longer available from the source (#154) 2023-03-05: David Anderson commit a4a5f55e0bf0678ea1c903b3ee417e4d4a22fb41 Good version. new file: bugxml/dwarfbug.xml Not final, but at least no leakage now. modified: src/lib/libdwarf/dwarf_gnu_index.c 2023-03-05: David Anderson commit bcd9f7aef270e850f04a805f685ee8cb60ce85f9 New vuln. modified: data.txt Updates. modified: dwarfbug.html modified: dwarfbuglohi.html deleted: dwarfbuglohi.xml For now, complete. modified: readbugs.py 2023-03-05: David Anderson commit 20552b46c678dd30d6ab1270ddf4054cb2d412aa So we have the bug html inside the repo. new file: bugxml/dwarfbug.html new file: bugxml/dwarfbuglohi.html new file: bugxml/dwarfbuglohi.xml modified: bugxml/readbugs.py Not Quite Right yet. Closer to right. modified: src/lib/libdwarf/dwarf_gnu_index.c 2023-03-03: David Anderson commit 590c4ca0a2a66d80f5ed1a9588656255e8e29ab7 Updated to have git log data. modified: ChangeLog 2023-03-03: David Anderson commit e7cce2398d35f6edac0cadab0e596423a73aaaa0 Added git fix id for 56636. modified: bugxml/data.txt 2023-03-03: David Anderson commit a3ab3f16ab67f4d976561fe0d863e1ed8b71f3c6 oss-fuzz 56636 There were some logic mistakes here. Now fixed, we think. modified: src/lib/libdwarf/dwarf_debugaddr.c 2023-03-03: David Anderson commit d7711e0dd0cc10e94cdd754ee8b4512085661c92 Minor corrections to the data on DW202303-001 and -002 modified: data.txt 2023-03-03: David Anderson commit 92aa9854a4577d04322782c1576aaa1aa7ca0f7f Now with latest from git log modified: ChangeLog 2023-03-03: David Anderson commit c8c029a2a91b7774908000b374342ac5239bd7ee Now with 0.7.0 version. modified: doc/libdwarf.pdf 2023-03-03: David Anderson commit 89d3beccd161657760585967255bbabf67e5b4c9 Fixes oss-fuzz 56548. Reading line tables headers some fields were not checked for impossibly-large values. Now all such fields are checked for sanity. modified: src/lib/libdwarf/dwarf_line_table_reader_common.h 2023-03-02: David Anderson commit 6eb98f38178814bc001187c08d9d74b4a8fa5b0f ChangeLog up to date with git log. Now working on 0.7.0. modified: ChangeLog 2023-03-02: David Anderson commit 948352178dc791796ed574a961191844d8322493 dwarf_attrlist() With a particular error (corrupted data) leading to an improper DW_FORM value did not return an error and compounded problems by continuing on, leading to a memory leak. oss-fuzz 56465 Also moved a local down to the only lexical scope using the local variable. modified: src/lib/libdwarf/dwarf_query.c We now return on the first error. 2023-03-02: David Anderson commit fde4acadc00c805a0e0592848d75398c142c3f19 Now uses the simpler dwarf_dealloc_attribute as that guarantees the way to dealloc. Also then zeroes the pointer made stale by the dealloc. modified: src/lib/libdwarf/dwarf_print_lines.c 2023-03-02: David Anderson commit 1fe3b2989a08c91d68e72bdd5ce437c1ccf3024d Was failing to check for a NULL die pointer being passed in where non-null was required. Now generates an error when a caller does that. modified: src/lib/libdwarf/dwarf_frame.c 2023-02-28: David Anderson commit a74e1d1f6d3bb174c985d572d4b6d555a8ea6090 Removing unused locals and arguments. modified: src/bin/dwarfdump/print_debug_names.c modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_macro.c New macro section output changed the baseline. modified: test/testobjLE32PE.base 2023-02-27: David Anderson commit ef5d172dedc7c0e2a3e3d4418efa42f318b8af17 The implementation of dwarf_get_fde_for_die() needed a small change to avoid a leak. The API of dwarf_get_fde_for_die() is unchhanged. modified: src/lib/libdwarf/dwarf_frame.c modified: src/lib/libdwarf/dwarf_frame.h modified: src/lib/libdwarf/dwarf_frame2.c 2023-02-27: David Anderson commit bfbc1cf7e4e1721f60f250d990ab484f64c189ba Now, for SGI/MIPS executables we check that any DW_AT_MIPS_fde attribute actually has the offset of a genuine fde, and report an error if anything wrong. For the first time we are testing dwarf_get_fde_for_die(). modified: src/bin/dwarfdump/print_die.c 2023-02-27: David Anderson commit fb66da9f410d1cdba92b7ae3117e8cd735dfe189 In one place the free(paths) required by the API was ommitted, leading to a leak. Fixed now. modified: src/bin/dwarfexample/dwdebuglink.c 2023-02-24: David Anderson commit 27b1bf1b6b3f1109fdb616c17603ae3a179bd8e3 Added commentary on an IRIX/MIPS related frame. modified: src/lib/libdwarf/libdwarf.h 2023-02-24: David Anderson commit 819cb71d795237536adce774576380bddac29d87 References the new macro print function in a few places. The idea is to show the name of a macro and the value as distinct fields (with -v) modified: src/bin/dwarfdump/print_macinfo.c modified: src/bin/dwarfdump/print_macro.c 2023-02-24: David Anderson commit 73150d06208b2d936b60e49a8dfdad2015375943 A new dd internal function for reporting macro data. modified: dd_macrocheck.h 2023-02-24: David Anderson commit ce58b4e9e463b7ac99fa4d0a0e15782c432320a3 Corrected and commented the code splitting macro name from the macro value (if any value there). modified: src/lib/libdwarf/dwarf_macro.c 2023-02-23: David Anderson commit 309f0935a0846157e99d5627ba7a4ba0d40a968c Each has a few lines of new code testing libdwarf small functions not otherwise tested. modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_lines.c 2023-02-23: David Anderson commit b23afe59362cfeace31215412ed24a8f46275327 Fixed a couple arguments to use the dw_ form. Comments now explain how a function for experimental line tables is not actually useful. modified: src/lib/libdwarf/libdwarf.h 2023-02-23: David Anderson commit d91391381b145c2bf9479be82c0b76f2ec851471 Updated the tarrrelease: field with 0.6.0 release where appropriate. modified: data.txt 2023-02-23: David Anderson commit 0c045738675965a8ed7c4aea9f8dfa5eb297b24f These now have the version as 0.7.0 modified: doc/libdwarf.dox modified: doc/libdwarfp.mm 2023-02-23: David Anderson commit 22cb0af1ebcf141a6f5d1bdb99666dedb3010eaa Now all name the version as 0.7.0 modified: CMakeLists.txt modified: configure.ac modified: meson.build 2023-02-23: David Anderson commit fbd8f69c1d37f0675112227b8a3af321c75388e7 make rebuild updated the version string in comments in these generated source files. modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h 2023-02-23: David Anderson commit 24fa44cc0492ae212e20e80a6faaf84517427655 Revised to provide a better print of the abbrevs part of a .debug_names block and to check and report on the reuses of an abbrev. Add -v to dwarfdump --print-debug-names modified: src/bin/dwarfdump/print_debug_names.c Make rebuild changed version in a comment. Now 0.7.0 modified: src/lib/libdwarf/dwarf_names.c 2023-02-23: David Anderson commit 217037be0da853b2dfb08e52a2c8c3a480a0ae47 Removed the API functions dwarf_dnames_abbrev_by_code() (which is slow, not needed Use either dwarf_dnames_name() or dwarf_dnames_abbrevtable() instead, depending on what you want to accomplish.) And dwarf_dnames_abbrev_form_by_index() (which never worked and was never tested except just before removing this function). modified: src/lib/libdwarf/dwarf_debugnames.c modified: src/lib/libdwarf/libdwarf.h 2023-02-23: David Anderson commit 0535a155c5ddb2537f8ec8c84795eff025ec15eb When the form is an indexed addr we check that that referenced via the index and DIE we get the correct addr. A sanity and function correctness check. modified: src/bin/dwarfdump/print_die.c 2023-02-23: David Anderson commit cbb1c34c3a7571a3e14f06576ff244cedb7af95c Removed trailing whitespace. modified: src/bin/dwarfdump/dd_tsearchbal.c 2023-02-20: David Anderson Release of libdwarf 0.6.0 today. modified: ChangeLog modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2023-02-20: David Anderson commit 8a8f028978cb041e64592ad52b54567459b9a25e make rebuild should not have copied dwarf_names.c (which gennames creates) into dwarfdump source. So the cp is removed. The mv to libdwarf source remains and is essential. modified: src/bin/gennames/Makefile.am 2023-02-20: David Anderson commit 8777ffee659b20a0d276c55d78d0d1fcf96319b3 There was no reason to have make rebuild copy dwarf_names.c into dwarfdump. The one in libdwarf suffices. deleted: ../dwarfdump/dwarf_names.c 2023-02-20: David Anderson commit 24ae907a3034925521ed408c6ab4384e38f49a3a make rebuild updated to match 0.6.1 as release, all these instances are in comments. modified: src/bin/dwarfdump/dwarf_names.c modified: src/bin/dwarfdump/dwarfdump-af-table.h modified: src/bin/dwarfdump/dwarfdump-ta-ext-table.h modified: src/bin/dwarfdump/dwarfdump-ta-table.h modified: src/bin/dwarfdump/dwarfdump-tt-ext-table.h modified: src/bin/dwarfdump/dwarfdump-tt-table.h modified: src/lib/libdwarf/dwarf_names.c 2023-02-20: David Anderson commit e9fbfc0fac2f8fdeb2dbf057d47acf6a4b9b6b51 tools/updatesemanticversion.py 0.6.1 setting a new version. modified: CMakeLists.txt modified: configure.ac modified: doc/libdwarf.dox modified: doc/libdwarfp.mm modified: meson.build modified: src/lib/libdwarf/libdwarf.h 2023-02-20: David Anderson commit da8acdad735740579d2f79856da4a617578e0a36 Change file-local function names to not start with dwarf_. That is reserved for API function names. modified: src/bin/dwarfdump/dd_tsearchbal.c 2023-02-20: David Anderson commit 52a8e4b9bd0fe8cff9d7e7fcb8ea6682d60c45b9 Added pkgconf to macos autotools run, that is now required where it was not required earlier. modified: test.yml 2023-02-20: David Anderson commit 80ef777ba7e2c26a35d849f365ad3ca157062087 workflow test, added a brew install pkgconf modified: mac_autotools.yml 2023-02-20: David Anderson commit 104aa2da46a1a798a264654508b1e1e32baf799d Adding as this one test is failing in test.yml .github/workflows: new file: mac_autotools.yml 2023-02-20: David Anderson commit 2684f4314098ff9677b4d5c18f510666fe8ce0b8 Now up to date for release 0.6.0 modified: ChangeLog 2023-02-20: David Anderson commit a93ff50891b07b83c1becb7cc1329236f6732cde This is the commit (of documentation) for the 6.0.0 release. modified: ChangeLog modified: doc/libdwarf.dox modified: doc/libdwarf.pdf 2023-02-18: David Anderson commit 9cab819ba330011b0e78754ee4f6b8937b4fd051 Source used for testing/fuzzing. new file: fuzz/fuzz_aranges.c new file: fuzz/fuzz_crc.c new file: fuzz/fuzz_crc_32.c new file: fuzz/fuzz_debug_addr_access.c new file: fuzz/fuzz_debug_str.c new file: fuzz/fuzz_debuglink.c new file: fuzz/fuzz_die_cu.c new file: fuzz/fuzz_die_cu_attrs.c new file: fuzz/fuzz_die_cu_attrs_loclist.c new file: fuzz/fuzz_die_cu_info1.c new file: fuzz/fuzz_die_cu_offset.c new file: fuzz/fuzz_die_cu_print.c new file: fuzz/fuzz_dnames.c new file: fuzz/fuzz_findfuncbypc.c new file: fuzz/fuzz_gdbindex.c new file: fuzz/fuzz_globals.c new file: fuzz/fuzz_gnu_index.c new file: fuzz/fuzz_init_b.c new file: fuzz/fuzz_init_binary.c new file: fuzz/fuzz_init_path.c new file: fuzz/fuzz_macro_dwarf4.c new file: fuzz/fuzz_macro_dwarf5.c new file: fuzz/fuzz_rng.c new file: fuzz/fuzz_set_frame_all.c new file: fuzz/fuzz_showsectgrp.c new file: fuzz/fuzz_simplereader_tu.c new file: fuzz/fuzz_srcfiles.c new file: fuzz/fuzz_stack_frame_access.c new file: fuzz/fuzz_str_offsets.c new file: fuzz/fuzz_tie.c new file: fuzz/fuzz_xuindex.c 2023-02-13: David Anderson commit 77c30fe6c97f078c0f57ec946f59754dada497fd Up to date with git log modified: ChangeLog 2023-02-13: David Anderson commit b0af192116cbe4a79b0ca7b8fb47900b5ae3648f Now up to date with latest changes in module titles.. modified: doc/libdwarf.pdf 2023-02-11: David Anderson commit 4cb3d61c49edb2fcf888708060c9ce09f952fb73 Working toward easier to read documentation. All the changes are in doxygen comments. modified: doc/checkexamples.c Regenerated modified: doc/libdwarf.pdf modified: src/bin/dwarfexample/jitreader.c modified: src/bin/dwarfexample/showsectiongroups.c modified: src/lib/libdwarf/libdwarf.h 2023-02-11: David Anderson commit 447a6d8f35f5945c0a8edbb01f3afc2a28765538 Small tweeks relating the two loclist examples (with links from each to the other). modified: doc/checkexamples.c Corrected date to today. modified: doc/libdwarf.dox 2023-02-11: David Anderson commit 1805c17ae90ea29b913fbd0aca7dad3253c18d40 Loclist access/locexpr access is valid for DWARF2 through DWARF5, clarified that here. modified: doc/checkexamples.c modified: src/lib/libdwarf/libdwarf.h 2023-02-09: David Anderson commit 13f1fe1cb73bc393f4abef85cdbb378ffd5bcdb2 With latest from gitlog modified: ChangeLog 2023-02-09: David Anderson commit ce1fee38c5586889e2d2dfd6af35dc083be9028a Emphasize the new argument style is a suggestion, not a requirement. modified: CODINGSTYLE.md 2023-02-09: David Anderson commit ce1fee38c5586889e2d2dfd6af35dc083be9028a Emphasize the new argument style is a suggestion, not a requirement. modified: CODINGSTYLE.md 2023-02-09: David Anderson commit 3312467a707e743f91f535f4fcdcde4dc6bb5981 A minor addition that describes the (new) approach to argument list presentation. It's mostly not yet followed and is not required. modified: CODINGSTYLE.md 2023-02-09: David Anderson commit 48bd6abf355262f29b293a24c425dc81eec9b639 Improving the consistency of presentation of arguments to functions. No logic change. modified: dwarf_query.c 2023-02-09: David Anderson commit 43aeedce6984b7c09ea4adc608f277279c5e5683 Fixing discrepancies from CODINGSTYLE. Trailing whitespace, a too-long line, and if( -> if ( No change in logic. modified: src/lib/libdwarf/dwarf_debugaddr.c modified: src/lib/libdwarf/dwarf_gdbindex.c modified: src/lib/libdwarf/dwarf_init_finish.c modified: src/lib/libdwarf/dwarf_loclists.c modified: src/lib/libdwarf/dwarf_util.c modified: src/lib/libdwarf/dwarf_xu_index.c 2023-02-09: David Anderson commit 16b3f93fac0989d25c129182130afc62719ffa4e Bringing up to date with git log modified: ChangeLog 2023-02-09: David Anderson commit a9a8924d775c0389220a0fce7a762f4752fd974c Everywhere we dealloc (drop) a Dwarf_Error ensure we have a valid Dwarf_Error* to dereference for the dealloc. These situations arise when the calling program passes NULL as the Dwarf_Error* to a libdwarf function, which normally only happens in toy or small calling programs. In libdwarf/ modified: dwarf_debugaddr.c modified: dwarf_die_deliv.c modified: dwarf_fission_to_cu.c modified: dwarf_form.c modified: dwarf_generic_init.c modified: dwarf_init_finish.c modified: dwarf_loc.c modified: dwarf_loclists.c modified: dwarf_query.c modified: dwarf_str_offsets.c modified: dwarf_util.c 2023-02-08: David Anderson commit 4a78820c8749eeca6f56d4f31693965f7cac0473 Changed the name of the error arg from err to error for consistency. modified: dwarf_alloc.c 2023-02-08: David Anderson commit 3423ca18432b02b3ac2ecbb8541a16becb373474 Changed the Dwarf_Error name to be error for consistency across the rest of libdwarf. modified: dwarf_frame.c modified: dwarf_gdbindex.c modified: dwarf_line.c modified: dwarf_print_lines.c modified: dwarf_util.c modified: dwarf_xu_index.c 2023-02-03: David Anderson commit 43107bc59332a47aeb17e4a63ad4f191ab92c41c Something went badly wrong with the pull or something. Obvious misaligment from the last change. modified: CMakeLists.txt 2023-02-03: David Anderson commit a26db7aeefb8bb6a9d8fca029459e7ea071e8f00 Using @code @endcode so the cc command looks right. modified: doc/checkexamples.c Updated date of last update. modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf 2023-02-03: Ludovic Chopin commit 74837fb700269b26287a401a8d91061725c48c82 CMakeLists.txt: fix crosscompile cmake build (#150) `check_c_source_runs` cannot be run in crosscompilation cases, only check compilation by replacing it with `check_c_source_compiles` Fixes #149 Co-authored-by: Ludovic Chopin 2023-02-02: David Anderson commit 6123495407fa877b6a2e17f7a7f7c0e5632bdcc5 Now up to date with git log modified: ChangeLog 2023-02-02: David Anderson commit fc1c55b70f52f18f491f82a9ffda8fa1d379fe58 set_up_section() is now easier to understand yet does the same job. modified: src/lib/libdwarf/dwarf_init_finish.c 2023-02-02: David Anderson commit 08bcf43f4b293d5206dfcc2f107ea0041fb8d5de Added -Wnostringop-overread to the -W list as -Wstringop-overread defaults *on* in alpinelinux gcc and sometimes has false positives depending on other compiler options (not good). modified: configure.ac Corrected two typos in comment words. LFAGS -> FLAGS modified: m4/dw_compiler.m4 2023-02-01: David Anderson commit 27704554af7294899f33706c2908565b1ad8d20e Up to date with git log modified: ChangeLog 2023-02-01: David Anderson commit 5ea279585fe15b8a9a0cf8efe034518799e2803f Ensure new file libdwarf/libdwarf.pc.cmake gets into the distribution. modified: src/lib/libdwarf/Makefile.am 2023-01-31: David Anderson commit 44bd35172ee75cb96d7c56031b2f986336eaf435 A few words on cmake 'make install' added. modified: README.cmake 2023-01-31: David Anderson commit 7368a1062271e08e7df0f188d8b02c9991a0d03a This creates a useful libdwarf.pc with install. It also creates a useless extra libdwarf.pc which is not at all useful. Unsure why. You will get better results using meson instead in most cases. modified: src/lib/libdwarf/CMakeLists.txt new file: src/lib/libdwarf/libdwarf.pc.cmake 2023-01-31: David Anderson commit a8b59bea77d868fae8442e69fe4d366c7045df61 Bringing up to date. modified: ChangeLog 2023-01-31: David Anderson commit 4823a9a14a127ba298b37cbc7613de0c21e0682a Documenting corrections to dwarf_offset_list() modified: doc/libdwarf.dox Improve an error message related to checking dwarf_offset_list() results. Correct the dealloc call to be correct. This function did not, before this, work on 32bit pointer systems. modified: src/bin/dwarfdump/print_die.c Dealing with the new DW_DLA_UARRAY allocation type for dwarf_offset_list(). modified: src/lib/libdwarf/dwarf_alloc.c modified: src/lib/libdwarf/dwarf_query.c Defining and documenting DW_DLA_UARRAY. modified: src/lib/libdwarf/libdwarf.h 2023-01-28: David Anderson commit ef60bff461a533da09f4ad3e9c1ece1249237ea2 Bringing ChangeLog up to date with git log. modified: ChangeLog 2023-01-28: David Anderson commit 4f6376d8f4d57497e4083405d94f00651576b51a _dwarf_memcpy_swap_bytes is now simpler and accomodates all words 8 bytes or less long by swapping bytes. modified: src/lib/libdwarf/dwarf_memcpy_swap.c Now uses memcpy to write part of the line table header, not WRITE_UNALIGNED as WRITE_UNALIGNED is intended for integers requiring byte-swapping when the target object and the runnning libdwarfp do not have the same endianness. the write changed is a set of bytes, not an integer at all. modified: src/lib/libdwarfp/dwarf_pro_section.c 2023-01-24: David Anderson commit ac2952e266e617cddd9d371d18b6664906e7e012 Now notes release in a couple entries (0.5.0). modified: bugxml/data.txt Latest. modified: doc/libdwarf.pdf 2023-01-24: David Anderson commit 8b8265142a78563b840df9b02f15b263cac8708e Now with the git id of the fix. modified: bugxml/data.txt Mention the bug in Changes from 0.5.0 to 0.60. modified: doc/libdwarf.dox 2023-01-24: David Anderson commit d059264c2e2a8e74b6ad6e13b7ea062b2cbec650 Instead of strlen, use esb_string_len() on the struct esb_s string so safe_strcpy() is aware of the copy-from length.. modified: src/bin/dwarfdump/print_die.c 2023-01-24: David Anderson commit 97e90eb7ab98df60b8da0bdc2ac855711c4db804 Fix DW202301-001, where DW_FORM_strx3 DW_FORM_addrx3 were mistakenly treated as 4 byte values. modified: src/lib/libdwarf/dwarf_util.c 2023-01-21: David Anderson commit 52f9045ac2d0e07e83b0e617eb75a7906722303d Bringing up to date with git log. modified: ChangeLog 2023-01-21: David Anderson commit 2fc3bdd86abe60a2083e0baaeabf5fe54e966412 Removing trailing whitespace and fixing indents. Fixed a couple lines pointlessly longer than libdwarf CODINGSTYLE specifies. modified: src/bin/dwarfdump/dd_command_options.c modified: src/bin/dwarfdump/dd_sanitized.c modified: src/bin/dwarfdump/print_frames.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/jitreader.c modified: src/bin/dwarfexample/showsectiongroups.c modified: src/bin/dwarfexample/simplereader.c modified: src/lib/libdwarf/dwarf_crc.c modified: src/lib/libdwarf/dwarf_debuglink.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_str_offsets.c modified: src/lib/libdwarf/libdwarf.h modified: src/lib/libdwarf/dwarf_arange.c 2023-01-21: David Anderson commit 4274fabfb0baf26db172cb818e8e1245fed3913b Fixing seven defects noted by CoverityScan. modified: src/bin/dwarfdump/print_die.c modified: src/bin/dwarfdump/print_lines.c modified: src/bin/dwarfexample/jitreader.c modified: src/bin/dwarfexample/simplereader.c 2023-01-21: David Anderson commit b78bd35437ca6649a860bf83fa6b454a2a7bc119 Bringing git log up to date. modified: ChangeLog 2023-01-21: David Anderson commit e57c7e731ca54002fc00595a62f3d99191c27d33 Removing a set of DW_FRAME #define that were just added and are not actually desirable. modified: src/lib/libdwarf/dwarf.h Updateing these as a consequence. modified: src/bin/dwarfdump/dwarf_names.c modified: src/lib/libdwarf/dwarf_names.c Some duplicate dwarf_get_GNUIVIS_name() entries removed. modified: src/lib/libdwarf/libdwarf.h 2023-01-21: David Anderson commit 9ed3f2ff43bfc611ee763bab7a8907941137fd26 Merge: b4eb3ae5 671571a9 Merge branch 'master' of https://github.com/davea42/libdwarf-code Cmake now using PROJECT_DIR 2023-01-21: Pavel Dovgalyuk commit 671571a9a14999b88662ce855513545da87f4602 Replace CMAKE dirs with PROJECT dirs (#148) Replacing CMAKE_*_DIR with PROJECT_*_DIR allows adding this project as a subproject in cmake config. 2023-01-20: David Anderson commit b4eb3ae529a54e8bac4de6408e0f63b4a72f80dc The added entries in dwarf.h are now reflected in these functions. Now dwarf_get_FRAME_name() knows of the full set of such defined in dwarf.h. Created, as always, by the command 'make rebuild' in a build directory. modified: src/bin/dwarfdump/dwarf_names.c modified: src/lib/libdwarf/dwarf_names.c 2023-01-20: David Anderson commit d2ac319d3349b86b6f5fbba009657e3c8e52220d Refining a printf used in debugging, and only debugging. modified: src/bin/gennames/gennames.c 2023-01-20: David Anderson commit d899c99aa0a7e29cdb3d024c875561a43579b048 The DW_FRAME defines set is expanded to fill in a gap. A gap that should never have existed. There is no effect on the API other than dwarf_get_FRAME_name() can now return a full set of the basic static set. modified: src/lib/libdwarf/dwarf.h 2023-01-20: David Anderson commit 04ab8c31ba97ee7e21c251d6f605aff54ebeb326 Corrected DW_IDX_hi_user from 0x0fff to the DWARF5 value of 0x3fff. modified: src/lib/libdwarf/dwarf.h 2023-01-17: David Anderson commit a4acf84b0f3aa087e4ed4413bcd9b13f7cae7aa3 Bringing up to date with git log modified: ChangeLog 2023-01-17: David Anderson commit 1bffee59eb8de582fe360601a0a7d485a45fe066 Twenty functions named dwarf_ were really internal-only functions. Not in the API. A few named decades ago, some created more recently. Now all such have a leading single underbar, so named _dwarf_ as a clear indication they are not part of the API. These became apparent comparing the API (libdwarf.h) to functions reported by coverage analysis (gcov/lcov). modified: dwarf_arange.c modified: dwarf_elf_load_headers.c modified: dwarf_frame.c modified: dwarf_line.c modified: dwarf_machoread.c modified: dwarf_machoread.h modified: dwarf_peread.c modified: dwarf_tsearchhash.c 2023-01-16: David Anderson commit d46c1d2eeac7a66a699a892b3d3c50b6a6f135e1 Now showing latest fixes to pkgconf references for libzstd. modified: ChangeLog 2023-01-16: David Anderson commit 31c3f298d4d11ec92fde6b5d176007ed20fe3755 Changed zstd_deps to libzstd_dep and similarly for requirements_libdwarf_pc. To match the real pkgconf name of the library. modified: meson.build Fixed the typo ref config_h.set11 where config.h.set10 was meant. It means set to one or zero specifically (rather than a more general set). In meson documentation, look for config_data.set10 modified: src/lib/libdwarf/meson.build 2023-01-16: David Anderson commit f6d5dc20755cfcba300bac9eb27f86447c51a3df Corrected the requirements_libdwarf_pc to reference libzstd because the pkgconf name is libzstd.pc modified: configure.ac 2023-01-16: David Anderson commit 7c83a9e7dd5a7238b16c7a38862a95fd3d39e2ba Corrected the check for libzstd, so HAVE_ZSTD and HAVE_ZSTD_H are now set in config.h modified: CMakeLists.txt 2023-01-14: David Anderson commit bf923fc046fd868808489e5137b9f7bb0d982902 To avoid warnings from a careful compiler we avoid redefining glflags when building test__sanitized.c by using a -DTESTING in test/ builds to remove the reference to glflags from dd_sanitized.c. modified: src/bin/dwarfdump/dd_sanitized.c modified: test/CMakeLists.txt 2023-01-14: David Anderson commit 76bebde070af2d49360a141053962949a9ea913a Each had a pointer subtraction and wanted a result of Dwarf_Unsigned so now using uintptr_t and Dwarf_Unsigned casts to assure compilers this is as intended. modified: src/lib/libdwarf/dwarf_debuglink.c modified: test/test_dwarf_tied.c 2023-01-13: David Anderson commit 3f8182189e94c9db549f1c59ac4fddafe3da30e4 Now with the warning fixed. modified: ChangeLog 2023-01-13: David Anderson commit ac6dd985c978dbeaca258be325b98d6aafb805b2 To do a pointer-difference without compiler warnings we fix using uintptr_t. modified: dwarf_str_offsets.c 2023-01-12: David Anderson commit e14770ba81d514b9e962b82479c30ece8a1a2db0 Up to date with git log, including fixing a bug with make check (which would cause compilation failure). modified: ChangeLog 2023-01-11: David Anderson commit 9f0c8cd7ba0903b2fea66115afb8b16312ea4222 Needed to add a fake _dwarf_error_string() implementation so this can compile (as we do not link with libdwarf itself). modified: test/test_linkedtopath.c 2023-01-11: David Anderson commit 5ca41b6751adf51856b839da3168a7baf2a7268c Now all these accept option --suppress-de-alloc-tree and ignore it so regressiontests can use these more easily. modified: src/bin/dwarfexample/dwdebuglink.c modified: src/bin/dwarfexample/findfuncbypc.c modified: src/bin/dwarfexample/frame1.c modified: src/bin/dwarfexample/jitreader.c modified: src/bin/dwarfexample/showsectiongroups.c modified: src/bin/dwarfexample/simplecrc.c modified: src/bin/dwarfexample/simplereader.c 2023-01-10: David Anderson commit f043691022b9ec4c6dc13ad6a7e650e7a6ea7dfb Fixing dwardump -h : changes now in ChangeLog modified: ChangeLog 2023-01-10: David Anderson commit 78855e4b8b1f48e456cec9adbf21de1d78ff5433 Improved the -h (help) message for --print-strings and --print-str-offsets dwarfdump options. modified: src/bin/dwarfdump/dd_command_options.c 2023-01-10: David Anderson commit d3e59a126829b098ac5f1a7ab757f545287607f1 The -f option was omitted from the help text. Oops. Added it following -F in help. modified: src/bin/dwarfdump/dd_command_options.c 2023-01-09: David Anderson commit 8133c2d0a6068c99193cf47f36de3dced60a7855 Now with latest includeing git fix id for bug DW202212-001 modified: ChangeLog 2023-01-09: David Anderson commit 35fb2b0eb05e6e52eaf4a674429067644d7bdb57 Updated DW202212-001 with git fix id. modified: bugxml/data.txt 2023-01-09: David Anderson commit 45f6d778811553a835916b60845933e6dda63b7f See bug DW202212-001 There are four different Elf/Dwarf corruptions here not previously noticed. All these now noticed. modified: src/lib/libdwarf/dwarf_die_deliv.c modified: src/lib/libdwarf/dwarf_elf_load_headers.c modified: src/lib/libdwarf/dwarf_generic_init.c modified: src/lib/libdwarf/dwarf_query.c 2023-01-04: David Anderson commit 096f1ab0727baa1ba72b08d00953e2a5b243a2b3 Defines the new DenialOfService bug DW202212-001 modified: bugxml/data.txt correct a printf for clarity. Add a return on success finding the pc in the object. modified: src/bin/dwarfexample/findfuncbypc.c Add a new option to help test this cude. --suppress-de-alloc-tree is the option. modified: src/bin/dwarfexample/frame1.c Add a new option to help test this cude. --suppress-de-alloc-tree is the option. modified: src/bin/dwarfexample/jitreader.c Clarify the error report in case the group requested is simply not present. Add a new option to help test this cude. --suppress-de-alloc-tree is the option. modified: src/bin/dwarfexample/showsectiongroups.c Add a new option to help test this cude. --suppress-de-alloc-tree is the option. Simplify the code in main() reading argv[]. modified: src/bin/dwarfexample/simplereader.c Add new tests so if an unreasonable build-id is present an error is returned. modified: src/lib/libdwarf/dwarf_debuglink.c Define the meaning of 'unreasonable build-id' as DW_BUILDID_SANE_SIZE. modified: src/lib/libdwarf/dwarf_debuglink.h Look for a variety of Elf object errors not previosly noted. See DW202212-001. modified: src/lib/libdwarf/dwarf_elf_load_headers.c 2023-01-04: David Anderson commit c49cf80fd866d968c3606f520050e74deeb7d665 Up to date 2023 modified: ChangeLog Now with all 2022 modified: ChangeLog2022 2023-01-04: David Anderson commit 5960a7983e58c4263d752daa53866c25f3e4ef50 New log, new year. modified: ChangeLog new file: ChangeLog2022 New DW_DLE error codes for bug DW202212-001 modified: src/lib/libdwarf/dwarf_errmsg_list.h modified: src/lib/libdwarf/libdwarf.h libdwarf-code-0.11.1/INSTALL000066400000000000000000000366261472336503500153520ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command './configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the 'README' file for instructions specific to this package. Some packages provide this 'INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The 'configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a 'Makefile' in each directory of the package. It may also create one or more '.h' files containing system-dependent definitions. Finally, it creates a shell script 'config.status' that you can run in the future to recreate the current configuration, and a file 'config.log' containing compiler output (useful mainly for debugging 'configure'). It can also use an optional file (typically called 'config.cache' and enabled with '--cache-file=config.cache' or simply '-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how 'configure' could check whether to do them, and mail diffs or instructions to the address given in the 'README' so they can be considered for the next release. If you are using the cache, and at some point 'config.cache' contains results you don't want to keep, you may remove or edit it. The file 'configure.ac' (or 'configure.in') is used to create 'configure' by a program called 'autoconf'. You need 'configure.ac' if you want to change it or regenerate 'configure' using a newer version of 'autoconf'. The simplest way to compile this package is: 1. 'cd' to the directory containing the package's source code and type './configure' to configure the package for your system. Running 'configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type 'make' to compile the package. 3. Optionally, type 'make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type 'make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the 'make install' phase executed with root privileges. 5. Optionally, type 'make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior 'make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing 'make clean'. To also remove the files that 'configure' created (so you can compile the package for a different kind of computer), type 'make distclean'. There is also a 'make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type 'make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide 'make distcheck', which can by used by developers to test that all other targets like 'make install' and 'make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the 'configure' script does not know about. Run './configure --help' for details on some of the pertinent environment variables. You can give 'configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU 'make'. 'cd' to the directory where you want the object files and executables to go and run the 'configure' script. 'configure' automatically checks for the source code in the directory that 'configure' is in and in '..'. This is known as a "VPATH" build. With a non-GNU 'make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use 'make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple '-arch' options to the compiler but only a single '-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the 'lipo' tool if you have problems. Installation Names ================== By default, 'make install' installs the package's commands under '/usr/local/bin', include files under '/usr/local/include', etc. You can specify an installation prefix other than '/usr/local' by giving 'configure' the option '--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option '--exec-prefix=PREFIX' to 'configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like '--bindir=DIR' to specify different values for particular kinds of files. Run 'configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of '${prefix}', so that specifying just '--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to 'configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the 'make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, 'make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of '${prefix}'. Any directories that were specified during 'configure', but not in terms of '${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the 'DESTDIR' variable. For example, 'make install DESTDIR=/alternate/directory' will prepend '/alternate/directory' before all installation names. The approach of 'DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of '${prefix}' at 'configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving 'configure' the option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. Some packages pay attention to '--enable-FEATURE' options to 'configure', where FEATURE indicates an optional part of the package. They may also pay attention to '--with-PACKAGE' options, where PACKAGE is something like 'gnu-as' or 'x' (for the X Window System). The 'README' should mention any '--enable-' and '--with-' options that the package recognizes. For packages that use the X Window System, 'configure' can usually find the X include and library files automatically, but if it doesn't, you can use the 'configure' options '--x-includes=DIR' and '--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of 'make' will be. For these packages, running './configure --enable-silent-rules' sets the default to minimal output, which can be overridden with 'make V=1'; while running './configure --disable-silent-rules' sets the default to verbose, which can be overridden with 'make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX 'make' updates targets which have the same timestamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its '' header file. The option '-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put '/usr/ucb' early in your 'PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in '/usr/bin'. So, if you need '/usr/ucb' in your 'PATH', put it _after_ '/usr/bin'. On Haiku, software installed for all users goes in '/boot/common', not '/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features 'configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, 'configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the '--build=TYPE' option. TYPE can either be a short name for the system type, such as 'sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file 'config.sub' for the possible values of each field. If 'config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option '--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with '--host=TYPE'. Sharing Defaults ================ If you want to set default values for 'configure' scripts to share, you can create a site shell script called 'config.site' that gives default values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' looks for 'PREFIX/share/config.site' if it exists, then 'PREFIX/etc/config.site' if it exists. Or, you can set the 'CONFIG_SITE' environment variable to the location of the site script. A warning: not all 'configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to 'configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the 'configure' command line, using 'VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified 'gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 'configure' Invocation ====================== 'configure' recognizes the following options to control how it operates. '--help' '-h' Print a summary of all of the options to 'configure', and exit. '--help=short' '--help=recursive' Print a summary of the options unique to this package's 'configure', and exit. The 'short' variant lists options used only in the top level, while the 'recursive' variant lists options also present in any nested packages. '--version' '-V' Print the version of Autoconf used to generate the 'configure' script, and exit. '--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally 'config.cache'. FILE defaults to '/dev/null' to disable caching. '--config-cache' '-C' Alias for '--cache-file=config.cache'. '--quiet' '--silent' '-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to '/dev/null' (any error messages will still be shown). '--srcdir=DIR' Look for the package's source code in directory DIR. Usually 'configure' can determine that directory automatically. '--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. '--no-create' '-n' Run the configure checks, but stop before creating any output files. 'configure' also accepts some other, not widely useful, options. Run 'configure --help' for more details. libdwarf-code-0.11.1/Makefile.am000066400000000000000000000044231472336503500163430ustar00rootroot00000000000000###Copyright (C) 2018 Vincent Torri nine-deep dwarfdump switches from indentation by spaces to a nest-level number. 2020-09-08: libdwarf/dwarfdump work well with DWARF4 and DWARF5, including DWP files. 2020-07-08: libdwarf now reads .debug_gnu_pubtypes & pubnames (non-standard but gcc creates them in DWARF5) via a small number of new functions and dwarfdump --print-debug-gnu prints both sections. Verifying the .debug_info offsets is not yet done. 2020-06-29: Dwarfdump now dumps DWARF5 .debug_rnglists and .debug_loclists. To handle DWARF5 there are a small number of new functions. All existing functions are still supported, but to read DWARF5 some small changes are required. In libdwarf see libdwarf2.1.pdf and also see libdwarf/ChangeLog for details. 2020-05-23: dwarfdump now takes much less malloc() to work, as measured by valgrind --tool=massif and massif-visualizer. A dwarfdump run that did 2.2Gib of malloc/free before the changes now does 1.4GiB. 2020-05-19: libdwarf and dwarfdump now support DWARF5 .debug_rnglists. The new interfaces are documented in libdwarf/libdwarf2.1.pdf. The new option to dwarfdump is "--print-raw-rnglists". 2019-11-04: The code (dwarfdump/libdwarf), regressiontests, and readelfobj directories and all their tests are known to work on Linux(Ubuntu on x86_64 and i686), FreeBSD, MacOS Catalina (with Apple Command Line Tools), and IBM s390 (Big Endian!) running Ubuntu Linux. On Windows-MinGW the full regression tests have not been tested, but 'make check' works for dwarfdump/libdwarf (the current dwarfdump make check actually does run dwarfdump and checks that dwarfdump basically works). 2019-04-16: Now a --disable-libelf configure/build of libdwarf/dwarfdump can read elf, mach-o DSYM, and PE executable/dll object files. Such a build will not need or use libelf or elf.h . The dwarfdump options that display Elf section headers or relocation record data are not available in a --disable-libelf build. Nor is dwarfdump's support of reading archive files available in a --disable-libelf build. This libdwarf detects corrupt Elf object files much sooner than before, but does not explain what the corruption really is. Use GNU readelf (or readelfobj, a project on sourceforge) to get more detail about the problems found. See https://www.prevanders.net/dwarf.html for the git clone command for readelfobj. With --disable-libelf the --enable-dwarfgen option does not work: the dwarfgen build will fail. 2019-02-18: For building on machines without a usable elf.h or libelf but possibly with a libelf.h visible, --disable-libelf ensures the build won't use libelf or elf.h anywhere. -lz will be done if zlib.h is visible, independent of libelf, libelf.h, and elf.h 2019-02-08: If one has a standard Bourne shell (sh) available (such as sh on MacOS and sh in MinGW on Windows) one may be able to build libdwarf and dwarfdump natively and they can read Mach-o dSYM and PE object files to access DWARF information. This has NOT been tested under MacOS, so will likely fail on MacOS. No elf.h, libelf.h or zlib.h should be present. For example, the following is known to work under MinGW and this general plan applies to all builds including all builds with elf.h and libelf: mkdir test cd test #(copy the source tree into test, if from git #the name of the top level will likely be 'code') cd code sh -x scripts/FIX-CONFIGURE-TIMES cd .. mkdir bld cd bld ../code/configure (choose your preferred options here) make 2019-01-15: The pre-build dwarf_names.[hc] and the tag related files are now part of the standard build so there is no longer any two-stage aspect of the build. The build simply compiles files in the distribution. If you use git to access the source be sure to sh scripts/FIX-CONFIGURE-TIMES to adjust the file timestamps as having timestamps in the right relationships is vital and git does not maintain timestamps. The script is always safe to run. It takes about 30 seconds. 2018-12-22: The complicated process of building certain .c and .h files has been relegated to the few people updating files libdwarf/libdwarf.h.in, libdwarf/dwarf_errmsg_list.h, dwarfdump/tag_attr_ext.list,dwarfdump/tag_attr.list, dwarfdump/tag_tree_ext.list, and dwarfdump/tag_tree.list. For everyone else the build is simply compiling the .c and .h files in the distribution. Simpler. sh scripts/buildstandardsource.sh creates these files. 2018-10-22: dwarfdump can now dump mach-o (MacOS) dSYM dwarf. All the usual libdwarf interfaces work. A new libdwarf initialization call dwarf_init_path() may be convenient for you to use. 2018-08-05: dwarfdump.conf is now installed by make install in /shared/libdwarf/dwarfdump . Any dwarfdump.conf or .dwarfdump.conf in your $HOME directory will be found before the one in shared. The file is only opened when one wants a more accurate register naming in frame reports (the default is just to name things r54 etc, choosing the right abi with -x abi= can be helpful at times). 2018-06-24: The configure has been completely rewritten to follow current standards and practices. For simple builds the standard ./configure make works as always, but the generated libdwarf.a appears in libdwarf/.libs/libdwarf.a , as does the shared object if "./configure --enable-shared" is used. To build dwarfgen one adds the configure option --enable-dwarfgen instead of using 'make all'. To build the example code one adds the configure option --enable-dwarfexample instead of using 'make all'. "mkdir /tmp/bld ; cd /tmp/bld ; /configure" continues to work, as does configure --host= . 2018-06-14: A small simplification of build options simplifies building across different environments. If your environment needs to use the non-standard elf_open() call instead of unix/linux open() then do /configure --enable-elf-open which sets HAVE_ELF_OPEN in config.h. 2018-03-27: All the DWARF5 FORMs appear to be dealt with. It's now possible to cross-compile libdwarf and dwarfdump. See the README. 2016-11-30: An alternative build mechanism using cmake is now in the source tree. The builds for product testing continue to be done using configure && make. 2016-09-20: --enable-sanitize option added to configure. This builds with -fsanitize=address to check for out of bounds memory access. 2016-09-05: dwarfexample/simpleexample.c now has a simple option letting one extract all .debug_info, .debug_types strings into a file by themselves in case one wanted to examine string frequencies, for example. 2016-06-01: Now we use DW_VERSION_DATE_STR for dates everywhere instead of __DATE__ __TIME__ so a repeated build gets identical object output. DW_VERSION_DATE_STR is updated by UPDATEDWARFDUMPVERSION.sh wherever that string is needed. 2015-11-26: If DWARF section data you intend to read with libdwarf is compressed by zlib (a section name like .zdebug_info indicates such compression) libdwarf etc will need zlib's headers and archive or shared-library at build and link time. If you do not have zlib everything will compile fine and will work on ordinary DWARF sections but libdwarf will not be able to read .zdebug_ compressed sections. zlib.h is the main zlib header and libz.a is the most likely zlib library you will encounter. 2015-11-15: It is now possible to build outside of the source tree. See README. So configure.in changed a little. 2015-01-13: Removed dwarfdump2 and references to it. dwarfdump has the (tsearch) features needed so the C++ version no longer a benefit. libdwarf-code-0.11.1/README000066400000000000000000000000441472336503500151620ustar00rootroot00000000000000### Nothing here. ### See README.md libdwarf-code-0.11.1/README.md000066400000000000000000000311101472336503500155570ustar00rootroot00000000000000# This is libdwarf README.md Updated 29 November 2024 ## Goal Libdwarf has been focused for years on both providing access to DWARF2 through DWARF5 data in a portable way while also detecting and reporting if the DWARF is corrupted and avoiding run-time crashes or memory leakage regardless how corrupted the DWARF being read may be. The intent is to provide ABI independent access to DWARF data and ensure that data returned by the library is meaningful. When the DWARF6 standard is released by the DWARF committee support will be added (as soon as reasonably possible) to libdwarf for all changes/additions while continuing to support previous versions. ## github actions ci runs builds on Linux, Freebsd, msys2, and MacOS using configure,cmake, and meson. [![ci](https://github.com/davea42/libdwarf-code/actions/workflows/test.yml/badge.svg)](https://github.com/davea42/libdwarf-code/actions/workflows/test.yml) [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7275/badge)](https://bestpractices.coreinfrastructure.org/projects/7275) Version 0.11.1 Released 1 December 2024. Version 0.11.0 Released 15 August 2024. Version 0.10.1 Released 1 July 2024. Version 0.9.2 Released 2 April 2024. Version 0.9.1 Released 27 January 2024. Version 0.9.0 Released 8 December 2023. ## NOTE on linking against libdwarf.a If you are linking code against a static library libdwarf.a You must arrange to define the macro LIBDWARF_STATIC in compiling your code that does a #include "libdwarf.h". See also READMEwin-msys2.md ## REQUIREMENTS from a libdwarf.tar.xz Mentioning some that might not be automatically in your base OS release. Restricting attention here to just building libdwarf and dwarfdump. Nothing in the project requires or references elf.h, libelf.h, or libelf as of 29 June 2023, version 0.8.0. If the objects you work with do not have section content compressed with zlib(libz) or libzstd neither those libraries nor their header files are required for building/using libdwarf/dwarfdump. Ubuntu: sudo apt install xz pkgconf zlib1g zlib1g-dev libzstd1 sudo apt install libzstd-dev # Use of libzstd1 is new in 0.4.3 # zlib1g zlib1g-dev libzstd1 are all optional but # are required to read any DWARF data in compressed # sections. libzstd1 was used by many linux system utilities # in Ubuntu 20.04. optional add: cmake meson ninja doxygen FreeBSD: pkg install bash xz python3 gmake liblz4 zstd # libzstd is likely in /usr/local/lib and zstd.h # in /usr/local/include and the compiler may not look there # by default. All will still build fine without it and # without lzib too, though compressed DWARF sections # may not be readable. # example: CPPFLAGS="-I/usr/local/include/" LDFLAGS="-L/usr/local/lib" ./configure optional add: binutils cmake meson ninja doxygen Ensure that all the needed programs are in $PATH, including python3. # candidate command to make python3 visible (as root) # something like: cd /usr/local/bin ; ln -s python3.9 python3 ## BUILDING from a libdwarf.tar.xz This is always recommended as it's not necessary to have GNU autotools installed. These examples show doing a build in a directory different than the source as that is generally recommended practice. ### GNU configure/autotools build Note: if you get a build failure that mentions something about test/ and missing .Po object files add --disable-dependency-tracking to the configure command. rm -rf /tmp/build mkdir /tmp/build cd /tmp tar xf /libdwarf-0.4.2.tar.xz cd /tmp/build /tmp/libdwarf-0.4.2/configure make make check ### cmake build READMEcmake.md has details on the available cmake options. We suggest that you will find meson a more satisfactory tool. ### meson build meson 0.45.1 on Ubuntu 18.04 fails. meson 0.55.2 on Ubuntu 20.04 works. meson 0.60.3 on Freebsd 12.2 and Freebsd 13.0 works. See READMEwin-msys2.md for the mingw64 msys2 packages to install and the command(s) to do that in msys2. The tools listed there are also for msys2 meson and autotools/configure. The msys2 meson ninja install not only installs libdwarf-0.dll and dwarfdump.exe it updates the executables in the build tree linking to that dll so all such executables in the build tree work too. For example (all build environments): meson /tmp/libdwarf-0.4.2 ninja ninja install ninja test For a faster build, adding additional checks: export CFLAGS="-g -pipe" export CXXFLAGS="-g -pipe" meson /tmp/libdwarf-0.4.2 -Ddwarfexample=true ninja -j8 ninja install ninja test To build a libdwarf that does not refer to or link with decompression libraries zstd or zlib, add the meson option "-Ddecompression=false" ## BUILDING example showing simple builds: This checks for the existence critical executables such as cmake,meson,and ninja and only runs builds that could work. Useful in any supported environment. sh scripts/allsimplebuilds.sh ## BUILDING on linux from a git clone with configure/autotools Ignore this section if using meson (or cmake). This is not recommended as it requires you have more software installed. For Ubuntu configure, install additional packages: autoconf automake libtool pkg-config For FreeBSD configure, install additional packages: autoconf automake libtool pkgconf Here we assume the source is in a directory named /path/to/code For example, on Ubuntu 20.04 ``` sudo apt-get install autoconf libtool pkg-config ``` Note: if you get a build failure that mentions something about test/ and missing .Po object files add --disable-dependency-tracking to the configure command. Using the source/build directories from above as examples, do : # Standard Linux Build cd /path/to/code sh autogen.sh cd /tmp/build /path/to/code/configure make make check ## BUILDING on MacOS from a git clone configure /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew install autoconf automake libtool # Then use the Standard Linux Build lines above. ### Options to meson on Linux/Unix For the basic configuration options list , do: meson configure /path/to/code To set options and show the resulting actual options: # Here just setting one option. meson setup -Ddwarfexample=true . /home/davea/dwarf/code meson configure . The meson configure output is very wide (just letting you know). ### Options to configure/autotools on Linux/Unix For the full options list , do: /path/to/code/configure --help By default configure compiles and uses libdwarf.a. With `--enable-shared --disable-static" appended to the configure step, libdwarf.so is built and the runtimes built will reference libdwarf.so. As of version 0.9.1 the configure option "--disable-decompression" tells the build to compile libdwarf and dwarfdump with no reference to the zlib or zstd libraries. If you get a build failure that mentions something about test/ and missing .Po object files add --disable-dependency-tracking to the configure command. With that option do not assume you can alter source files and have make rebuild all necessary. See: https://www.gnu.org/savannah-checkouts/gnu/automake/history/automake-history.html#Dependency-Tracking-Evolution Other options of possible interest: --enable-wall to turn on compiler diagnostics --enable-dwarfexample to compile the example programs. configure -h shows the options available. Sanity checking: gcc has some checks that can be done at runtime. -fsanitize=undefined is turned on for configure by --enable-sanitize ### Options to meson on linux MacOS Windows (Msys2) As of 0.9.0 meson builds default to be shared-library builds. These options go on the meson setup command line. the default can be explicitly chosen with: --default-library shared A static libdwarf (archive) libdwarf.a can be built with --default-library static By default compiler warnings are errors. Add the following to let compilations continue: -Dwerror=false By default compiles look for C/C++ language issues. Add the following to add gcc -fsanitize checking in the build to catch various memory errors (the generated code is larger and slower than normal). -Dsanitize=true ### Options to configure on Windows (Msys2) All libdwarf builds are automatically shared object (dll) builds. No static libdwarf.a can be built. If you need static libdwarf.a use meson or cmake. Has the same meson setup reporting as on Linux (above). See READMEwin-msys2.md ### Distributing via configure/autotools When ready to create a new source distribution do a build and then make distcheck # INCOMPATIBILITIES. Changes to interfaces ### Comparing libdwarf-0.11.0 to libdwarf-0.9.1 Added dwarf_get_ranges_baseaddress() to the API. ### Comparing libdwarf-0.9.1 to libdwarf-0.9.0 Altered the type of the return value of dwarf_die_abbrev_code() and dwarf_get_section_count() from int to Dwarf_Unsigned for consistency (should always have been this way). ### Comparing libdwarf-0.9.0 to libdwarf-0.8.0 New interfaces allow full support for Mach-O (Apple) universal binaries: dwarf_init_path_a(), dwarf_init_path_dl_a(), and dwarf_get_universalbinary_count(). ### Comparing libdwarf-0.8.0 to libdwarf-0.7.0 The default build (with meson) is shared-library. to build with static (archive) libdwarf add --default-library static to the meson command line (applies to meson builds in Linux,Macos, and Windows-mingw). On Windows-mingw one can build static libdwarf when using cmake or meson (configure will not allow a static libdwarf to be built on Windows). See Options to meson on Windows (Msys2) above. ### Comparing libdwarf-0.7.0 to libdwarf-0.6.0 struct Dwarf\_Obj\_Access\_Methods\_a\_s changed for extended ELF so the library can handle section count values larger than 16bits. dwarf\_dnames\_abbrev\_by\_code() and dwarf\_dnames\_abbrev\_form\_by\_index() were removed from the API, better alternatives already existed. ### Comparing libdwarf-0.6.0 to libdwarf-0.5.0 The dealloc required by dwarf\_offset\_list() was wrong, use dwarf\_dealloc(dbg, offsetlistptr, DW_DLA_UARRAY). The function dwarf\_dietype\_offset() has a revised argument list so it can work correctly with DWARF4. dwarf\_get\_pubtypes() and similar changed to eliminate messy code duplication. Fixed memory leaks and treatment of DW\_FORM\_strx3 and DW\_FORM\_addrx3. ### Comparing libdwarf-0.5.0 to libdwarf-0.4.2 dwarf\_get\_globals() is compatible but it now returns data from .debug\_names in addition to .debug\_pubnames (either or both could be in an object file). New function dwarf\_global\_tag\_number() makes the data from .debug\_names a bit more useful (if a library user wants it). Three new functions were added to enable printing of the .debug_addr section independent of other sections and the new dwarfdump option --print-debug-addr prints that section. ### Comparing libdwarf-0.4.2 to libdwarf-0.4.1 No incompatibilities. ### Comparing libdwarf-0.4.1 to libdwarf-0.4.0 Added a new function dwarf\_suppress\_debuglink\_crc() which speeds up gnu debuglink (only use it if you are sure the debuglink name-check alone is sufficient). ### Comparing libdwarf-0.4.0 to libdwarf-0.3.4 A few dealloc() functions changed name to have a consistent pattern for all such. Access to the DWARF5 .debug\_names section is now fully implemented. See the Recent Changes section in libdwarf.pdf (in the release). [dwhtml]: https://www.prevanders.net/libdwarfdoc/index.html [dwpdf]: https://www.prevanders.net/libdwarf.pdf Or see the latest online html version [dwhtml] for the details.. Or see (via download) the latest pdf html version [dwpdf]. Notice the table of contents at the right edge of the html page. ## Reading DWARF from memory If one has DWARF bytes in memory or in a kind of file system libdwarf cannot understand one should use dwarf_object_init_b() ...call libdwarf functions... dwarf_object_finish() and create source to provide functions and data for the three struct types: struct Dwarf_Obj_Access_Interface_a_s struct Dwarf_Obj_Access_Methods_a_s struct Dwarf_Obj_Access_Section_a_s These functions and structs now seem complete (unlike the earlier libdwarf versions), hence the name and content changes. For a worked out example of reading DWARF direct from memory with no file system involved see src/bin/dwarfexample/jitreader.c and see the html [dwhtml] (www.prevanders.net/libdwarfdoc/index.html). The latest pdf is [dwpdf] (www.prevanders.net/libdwarf.pdf) David Anderson. libdwarf-code-0.11.1/READMEcmake.md000066400000000000000000000046621472336503500165740ustar00rootroot00000000000000# Cmake on Unix/linux/MacOS/FreeBSD/OpenBSD Created 26 April 2019 Updated 19 December 2023 Consider switching entirely to meson for your build. Unless a shared library is specifically requested cmake builds a static library: libdwarf.a For cmake, ignore the autogen.sh script in the base source directory, autogen.sh is only for configure. By default cmake builds just libdwarf and dwarfdump and libdwarf is a static (archive) library. To switch to a shared library output with cmake add the following to the cmake command: -DBUILD_SHARED=YES -DBUILD_NON_SHARED=NO Lets assume the base directory of the the libdwarf source in a directory named 'code' inside the directory '/path/to/' Always arrange to issue the cmake command in an empty directory. If you are building a Shared Library you may need to install before running tests to allow the tests to work Use -DCMAKE_INSTALL_PREFIX=/some/path to chose the install path. You can install in any temporary directory or in system directories and the tests will work. # build the fast way mkdir /tmp/cmbld cd /tmp/cmbld cmake -G Ninja -DDO_TESTING:BOOL=TRUE /path/to/code ninja ninja test # slower build mkdir /tmp/cmbld cd /tmp/cmbld cmake -G "Unix Makefiles" -DDO_TESTING:BOOL=TRUE /path/to/code make ctest -R self It is best to specify -G explicitly since some versions of cmake seem to have a different default for -G than others. On Windows msys2 -DBUILD_SHARED=YES will build libdwarf.dll. To show all the available cmake options for 'code': cmake -L /path/to/code For dwarfexample: cmake -G Ninja -DBUILD_DWARFEXAMPLE=ON /path/to/code make or cmake -G "Unix Makefiles" -DDO_TESTING=ON /path/to/code make # To list the tests ctest -N # To run all the tests (their names start with # the letters 'self'). ctest -R self To turn off linking with or using zlib or zstd libraries or headers there is an option to cmake as of libdwarf 0.9.1: cmake -G Ninja -DENABLE_DECOMPRESSION=NO /path/to/code By default ctest just shows success or failure with no details. To debug a cmake test, for example if test 22 fails and you want to know what the test output is, use the following: ctest --verbose -I 22 In case one wishes to see the exact compilation/linking options passed at compile time when using -G "Unix Makefiles": make VERBOSE=1 With -G Ninja the generated build.ninja file shows the build details. libdwarf-code-0.11.1/READMEmacos.md000066400000000000000000000016651472336503500166160ustar00rootroot00000000000000## MacOS builds of libdwarf and dwarfdump Tested on up to date MacOS Ventura September 8, 2023 ## Getting set up Install Mac Command Line Tools from Apple if you do not have compilers installed. Point your browser to macports.org and install the port command by downloading a .pkg file, clicking on the downloaded package, and following the instructions. Close Terminal (if open). Open a terminal window (at this point the port program will be in your $PATH ). sudo port install zlib sudo port install zstd sudo port install meson sudo port select --set python3 python311 port commands install in subdirectories of /opt/local. ## Basic validation At this point normal configure/cmake/meson builds should work and 'make check' works too. From the source directory one can run: sh scripts/allsimplebuilds.sh The full libdwarf-regressiontests suite runs successfully. There is no reason for you to run that testsuite. libdwarf-code-0.11.1/READMEwin-msys2.md000066400000000000000000000123631472336503500173610ustar00rootroot00000000000000# USING MSYS2 (WINDOWS) CMAKE, MESON, CONFIGURE Created 7 October 2023 Updated 19 December 2023 msys2 provides an environment much like posix/unix/linux with programs precompiled for use on windows installed in its own set of locations. Do not use the -DWALL option to cmake or --enable-wall to configure or the meson equivalent as it causes a minor warning about I64u , from gcc (treated as an error). When using configure note that building a static library libdwarf.a is not supported. A static libdwarf.a can be built with meson or cmake. ### Shared library builds Libdwarf builds from configure and cmake are static (archive) library builds by default. Meson builds to a shared library by default. On msys2 with cmake one can generate a shared library build with: -DBUILD_SHARED=YES -DBUILD_NON_SHARED=NO With the following on the meson command line one can build libdwarf as an archive and dwarfdump and the programs built will use the static library. --default-library static The meson default is shared and can be explicitly chosen by: --default-library shared configure will only allow generation of shared library builds, while for cmake and meson one can choose whether to build a shared library or a static (archive) library (libdwarf.a). On msys2 with configure one gets a shared library build with: --enable-shared --disable-static ### NOTE on linking against libdwarf.a If you are are linking code against a static library libdwarf.a you must arrange to define the macro LIBDWARF_STATIC in compiling your code that does a #include "libdwarf.h". To pass LIBDWARF_STATIC to the preprocessor with Visual Studio: right click on a project name In the contextual menu, click on Properties at the very bottom In the new window, double click on C/C++ On the right, click on Preprocessor definitions The is a small down arrow on the right, click on it, then click on Modify Add LIBDWARF_STATIC to the values Click on OK to close the windows ### Building with Visual Studio on Windows While Windows Visual Studio is not a supported environment the following may be of interest to some. Building in Windows Visual Studio is fairly straightforward. We'll use the simplest possible setup (we hope). Using VS buttons and settings do: 1. Main Panel: Click Git. Subpanel: click Clone Repository In the subpanel fill in the clone source: https://github.com/davea42/libdwarf-code and the directory to place the clone. 2. Main Panel: Click Git. Options list: click Cmake Setup. A Folder View panel (should show up) Click on the top-level CMakeLists.txt file. 3. Main Panel: Click Build. Options list: click Build All Expect a few warnings because the source uses Posix rather than Windows-only calls where applicable. A way to eliminate such warnings using VS is to edit CMakeSettings_schema.json 1. Click on Project (top level menu) 2. Click on "CMake Settings for libdwarf" 3. In the settings panel click on "Edit JSON" 4. In the "buildCommandArgs" line
   Change 
     "buildCommandArgs": ""
   to
     "buildCommandArgs": "-D_CRT_SECURE_NO_WARNINGS"
   
## Setting up msys2 on Windows We suggest you use meson for msys2 builds. Direct your browser to msys2.org Download a recent .exe from the downloads page. For example msys2-x86_64-20230718.exe Execute it and follow the instructions on msys2.org A straightforward way to use the tests etc in the source is to find the appropriate MSYS2 shell program and put a link to it on the desktop. The Windows list of applications will show MSYS2 and under that category there will be a list of candidates to use. The useful candidates on x86_64 are are MSYS2 MINGW64 The compiler is gcc MSYS2 CLANG64 The compiler is clang the following should get you sufficient files for building and testing all the build mechanisms: basics pacman -Suy pacman -S base-devel git autoconf automake libtool pacman -S mingw-w64-x86_64-python3 pacman -S mingw-w64-x86_64-toolchain pacman -S mingw-w64-x86_64-zlib pacman -S mingw-w64-x86_64-zstd pacman -S mingw-w64-x86_64-doxygen extras for meson/cmake pacman -S mingw-w64-x86_64-meson pacman -S mingw-w64-x86_64-cmake pacman -S mingw-w64-x86_64-python3-pip To create a distribution one needs xz: pacman -S mingw-w64-x86_64-xz to list packages pacman -Q to remove packages pacman -R ## Ninja speed cmake will generate ninja makefiles on mingw by default, add '-G "Unix Makefiles"' to the cmake command line to generate makefiles for gnu make, but we suggest you use "-G Ninja" for speed and clarity.. ## Basic Testing of libdwarf This checks for the existence critical executables such as cmake,meson,and ninja and only runs builds that could work. sh scripts/allsimplebuilds.sh ## Set a Prefix for test installs To get a usable set of executables set a prefix (for cmake, -DCMAKE_INSTALL_PREFIX=$HOME/bin presuming the bin directory is something in your $PATH in msys2. Set an appropriate prefix whichever build tool you use. ninja install cp src/bin/dwarfdump/dwarfdump.conf to $HOME # then dwarfdump.exe # which will give a short message about # No object file provided. In which case # dwarfdump is usable. libdwarf-code-0.11.1/SECURITY.md000066400000000000000000000014721472336503500161010ustar00rootroot00000000000000# Security Policy ## Supported Versions Fixes to vulnerabilities result in the project issuing a new release with the fixes. We do not patch and release an updated version of a previous release. We will fix any vulnerability from any release if and only if the vulnerability still exists in the latest release. | Version | Supported | | ------- | ------------------ | | 0.9.1 | :white_check_mark: | | < 0.9.1 | :white_check_mark: | ## Reporting a Vulnerability One way to report is to add a Issue on the issues page for the project. Another is to email to libdwarf at linuxmail dot org Normally we respond to a report within one day and provide fixes within a day or two. We can provide the new version of the affected source file as a diff or a copy of the fixed source file(s) when that seems appropriate. libdwarf-code-0.11.1/appveyor.yml000066400000000000000000000025401472336503500166750ustar00rootroot00000000000000environment: global: LIBELF_INSTALL_PREFIX: "C:/libelf" matrix: - platform: Win32 CMAKE_GENERATOR_NAME: "Visual Studio 14 2015" CMAKE_OPTIONS: "" - platform: Win32 CMAKE_GENERATOR_NAME: "Visual Studio 14 2015" CMAKE_OPTIONS: "-DBUILD_SHARED=ON" - platform: Win32 CMAKE_GENERATOR_NAME: "Visual Studio 14 2015" CMAKE_OPTIONS: "-DBUILD_SHARED=ON -DBUILD_NON_SHARED=OFF" - platform: x64 CMAKE_GENERATOR_NAME: "Visual Studio 14 2015 Win64" CMAKE_OPTIONS: "" - platform: x64 CMAKE_GENERATOR_NAME: "Visual Studio 14 2015 Win64" CMAKE_OPTIONS: "-DBUILD_SHARED=ON" - platform: x64 CMAKE_GENERATOR_NAME: "Visual Studio 14 2015 Win64" CMAKE_OPTIONS: "-DBUILD_SHARED=ON -DBUILD_NON_SHARED=OFF" configuration: Release install: - git clone https://github.com/dvirtz/libelf.git - cd libelf - git checkout cmake - cmake . -B_build -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_INSTALL_PREFIX=%LIBELF_INSTALL_PREFIX% - cmake --build _build --config %CONFIGURATION% - cmake --build _build --config %CONFIGURATION% --target INSTALL - cd .. build_script: - cmake . -B_build -G "%CMAKE_GENERATOR_NAME%" -DLIBELF_ROOT=%LIBELF_INSTALL_PREFIX% %OPTIONS% - cmake --build _build --config %CONFIGURATION% test_script: - cmake --build _build --config %CONFIGURATION% --target RUN_TESTS libdwarf-code-0.11.1/autogen.sh000066400000000000000000000006231472336503500163030ustar00rootroot00000000000000#!/bin/sh # Generates Makefiles and more. srcdir=`dirname $0` (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have autoconf installed to compile $PROJECT." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" exit 1 } set -e -x autoreconf --warnings=all --install --verbose --force libdwarf-code-0.11.1/bugxml/000077500000000000000000000000001472336503500156025ustar00rootroot00000000000000libdwarf-code-0.11.1/bugxml/README000066400000000000000000000016451472336503500164700ustar00rootroot00000000000000 The files here are for maintaining a list of bugs fixed so html and xml can be posted to prevanders.net and CVE (see cert.org) issues can reference a public database. This is intended mainly for bugs that can result in application crashes as such can represent a vulnerability that can be exploited. Bugs that result simply in errors in output (but no crash) will typically not be mentioned. Bugs in dwarfdump are not vulnerabilities in the same way and at present these do not get CVE identifiers. To update the report with a new bug prepend a copy of data.template to data.txt. Then enter the data available for the new bug. To update the local web page to check it go to /home/davea/web4/gweb and do sh dwarfbugupdate.sh which will use ./readbugs.py here to update the relevant web pages. Carefully follow the existing formats, the parser is very very simple. David Anderson Created: 2016-05-03. Updated: 2017-07-06. libdwarf-code-0.11.1/bugxml/bugrecord.py000077500000000000000000000245141472336503500201410ustar00rootroot00000000000000#!/usr/bin/python3 # Copyright (c) 2016-2016 David Anderson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of the example nor the # names of its contributors may be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY David Anderson ''AS IS'' AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL David Anderson BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY # OF SUCH DAMAGE. import sys # Use only
 or 
all by itself in data.xml. # No other data on either of such lines. # All the lines between these two markers should be # shown in individual lines. def xmlize(linea, inhtml, inpre): outi = [] l = linea if l.find("
") != -1:
        if inhtml == "y":
            s2 = "

" + l + "\n" else: s2 = l + "\n" inpre = "y" return s2, inpre if l.find("
") != -1: if inhtml == "y": s2 = l + "\n" + "

" else: s2 = l + "\n" inpre = "n" return s2, inpre if inpre == "y" and inhtml == "n": outi += [""] for c in l: if c == "<": outi += ["<"] elif c == ">": outi += [">"] elif c == "&": outi += ["&"] # elif c == "'": # outi += ["'"] elif c == '"': outi += ["""] else: outi += [c] if inpre == "y" and inhtml == "n": outi += [""] outi += ["\n"] s2 = "".join(outi) return s2, inpre def paraline(name, linea): out = "" strp = linea.strip() if len(strp) < 1: out = "

" + name + ":" + "

" return out out = "

" + name + ": " out += linea out += "

" return out def paralines(name, lines): inpre = "n" if len(lines) < 1: out = "

" + name + ":" + "

" return out out = "

" + name + ":" for lin in lines: f, inpre = xmlize(lin, "y", inpre) out += f out += "

" return out def para(name, str): if str == None: out = "

" + name + ":" + "

" elif len(str) > 0: out = "

" + name + ": " + str + "

" else: out = "

" + name + ":" + "

" return out class bugrecord: def __init__(self, dwid): self._id = dwid.strip() self._cve = "" self._fuzzer = "" self._datereported = "" self._reportedby = "" self._vulnerability = [] self._product = "" self._description = [] self._datefixed = "" self._references = [] self._gitfixid = "" self._tarrelease = "" def setcve(self, pubid): if self._cve != "": print("Duplicate cve ", self._cve, pubid) sys.exit(1) self._cve = pubid.strip() def setfuzzer(self, id): if self._fuzzer != "": print("Duplicate fuzzer ", self._fuzzer, id) sys.exit(1) self._fuzzer = id.strip() def setdatereported(self, rep): if self._datereported != "": print("Duplicate datereported ", self._datereported, rep) sys.exit(1) self._datereported = rep.strip() def setreportedby(self, rep): if self._reportedby != "": print("Duplicate reportedby ", self._reportedby, rep) sys.exit(1) self._reportedby = rep.strip() def setvulnerability(self, vuln): if len(self._vulnerability) != 0: print("Duplicate vulnerability ", self._vulnerability, vuln) sys.exit(1) self._vulnerability = vuln def setproduct(self, p): if len(self._product) != 0: print("Duplicate product ", self._product, p) sys.exit(1) self._product = p.strip() def setdescription(self, d): if len(self._description) != 0: print("Duplicate description ", self._description, d) sys.exit(1) self._description = d def setdatefixed(self, d): if len(self._datefixed) != 0: print("Duplicate datefixed ", self._datefixed, d) sys.exit(1) self._datefixed = d.strip() def setreferences(self, r): if len(self._references) != 0: print("Duplicate references ", self._references, r) sys.exit(1) self._references = r def setgitfixid(self, g): if len(self._gitfixid) != 0: print("Duplicate gitfixid ", self._gitfixid, g) sys.exit(1) self._gitfixid = g.strip() def settarrelease(self, g): if len(self._tarrelease) != 0: print("Duplicate tarrelease ", self._tarrelease, g) sys.exit(1) self._tarrelease = g.strip() def plist(self, title, lines): if lines == None: print(title) return if len(lines) == 1: print(title, lines[0]) return print(title) for l in lines: print(l) def printbug(self): print("") print("id:", self._id) print("cve:", self._cve) print("fuzzer:", self._fuzzer) print("datereported:", self._datereported) print("reportedby:", self._reportedby) self.plist("vulnerability:", self._vulnerability) print("product:", self._product) self.plist("description:", self._description) print("datefixed:", self._datefixed) self.plist("references:", self._references) print("gitfixid:", self._gitfixid) print("tarrelease:", self._tarrelease) def generate_html(self,num): s5 = "".join(self._id) idhead = ''.join([str(num),") ",self._id]) t = "".join(['

',idhead, "

"]) txt = [t] inpre = "n" s, inp = xmlize(self._id, "y", inpre) t = paraline("id", s) txt += [t] s, inp = xmlize(self._cve, "y", inpre) t = paraline("cve", s) txt += [t] s, inp = xmlize(self._fuzzer, "y", inpre) t = paraline("fuzzer", s) txt += [t] s, inp = xmlize(self._datereported, "y", inpre) t = paraline("datereported", s) txt += [t] s, inp = xmlize(self._reportedby, "y", inpre) t = paraline("reportedby", s) txt += [t] # MULTI t = paralines("vulnerability", self._vulnerability) txt += [t] s, inp = xmlize(self._product, "y", inpre) t = paraline("product", s) txt += [t] # MULTI t = paralines("description", self._description) txt += [t] s, inp = xmlize(self._datefixed, "y", inpre) t = paraline("datefixed", s) txt += [t] # MULTI t = paralines("references", self._references) txt += [t] s, inp = xmlize(self._gitfixid, "y", inpre) t = paraline("gitfixid", s) txt += [t] s, inp = xmlize(self._tarrelease, "y", inpre) t = paraline("tarrelease", s) txt += [t] t = '

[top]

' txt += [t] return txt def paraxml(self, start, main, term): # For single line xml remove the newline from the main text line. out = start l = main.strip() if len(l) > 0: out += l out += term return out def paraxmlN(self, start, main, term): # For multi line xml leave newlines present. out = start inpre = "n" for x in main: l = x.rstrip() t, inpre = xmlize(l, "n", inpre) if len(t) > 0: out += t out += term return out def generate_xml(self): txt = [] t = "" txt += [t] inpre = "n" s, inpre = xmlize(self._id, "n", inpre) t = self.paraxml("", s, "") txt += [t] s, inpre = xmlize(self._cve, "n", inpre) t = self.paraxml("", s, "") txt += [t] s, inpre = xmlize(self._fuzzer, "n", inpre) t = self.paraxml("", s, "") txt += [t] s, inpre = xmlize(self._datereported, "n", inpre) t = self.paraxml("", s, "") txt += [t] s, inpre = xmlize(self._reportedby, "n", inpre) t = self.paraxml("", s, "") txt += [t] s, inpre = xmlize(self._product, "n", inpre) t = self.paraxml("", s, "") txt += [t] # MULTI p = self._vulnerability t = self.paraxmlN("", p, "") txt += [t] # MULTI p = self._description t = self.paraxmlN("", p, "") txt += [t] s, inpre = xmlize(self._datefixed, "n", inpre) t = self.paraxml("", s, "") txt += [t] # MULTI p = self._references t = self.paraxmlN("", p, "") txt += [t] s, inpre = xmlize(self._gitfixid, "n", inpre) t = self.paraxml("", s, "") txt += [t] s, inpre = xmlize(self._tarrelease, "n", inpre) t = self.paraxml("", s, "") txt += [t] t = "" txt += [t] return txt libdwarf-code-0.11.1/bugxml/data.template000066400000000000000000000001741472336503500202520ustar00rootroot00000000000000id: cve: fuzzer: datereported: reportedby: vulnerability: product: description: datefixed: references: gitfixid: endrec: libdwarf-code-0.11.1/bugxml/data.txt000066400000000000000000004266501472336503500172710ustar00rootroot00000000000000 id: DW202407-012 fuzzer: ossfuzz id: 70763 datereported: 2024-07-28 reportedby: David Korczynski vulnerability: InfiniteRecursion reading CUs leads to crash product: libdwarf description: The code added in git fix id 6b40a0ed378826273080a7b11e7274c2b61d018b two days ago involved adding code setting up compilation unit data and in find_cu_die_base_fields() we called dwarf_global_formref() whereas we must call _dwarf_internal_global_formref_b() to avoid an infinite recursion. A crash was only possible when reading corrupt DWARF. datefixed: 2024-07-28 references: regressiontests/ossfuzz70763/fuzz_macro_dwarf5-5161075908083712 gitfixid: 1b79d618bf5aab2bda9be495c531b13e94ae056a tarrelease: endrec: DW202407-012 id: DW202407-011 fuzzer: ossfuzz id: 70753 datereported: 2024-07-28 reportedby: David Korczynski vulnerability: InfiniteRecursion reading CUs leads to crash product: libdwarf description: The code added in git fix id 6b40a0ed378826273080a7b11e7274c2b61d018b two days ago involved adding code setting up compilation unit data and in find_cu_die_base_fields() we called dwarf_global_formref() whereas we must call _dwarf_internal_global_formref_b() to avoid an infinite recursion. A crash was only possible when reading corrupt DWARF. datefixed: 2024-07-28 references: regressiontests/ossfuzz70753/fuzz_die_cu_offset-6598270743281664 gitfixid: 1b79d618bf5aab2bda9be495c531b13e94ae056a tarrelease: endrec: DW202407-011 id: DW202407-010 fuzzer: ossfuzz id: 70721 datereported: 2024-07-27 reportedby: David Korczynski vulnerability: Heap Use After Free product: libdwarf description: Libdwarf was referencing freed space attempting to free up a compilation-unit DIE in the process of creating a context for a compilation-unit DIE, given a particular corruption of the DWARF data being read. This bug has been present for several years. datefixed: 2024-07-27 references: regressiontests/ossfuzz70721/fuzz_macro_dwarf5-4907954017468416 gitfixid: 6fa96f95e043bac9b98ca6f7a9a542dae8f46cd tarrelease: endrec: DW202407-010 id: DW202407-009 fuzzer: ossfuzz id: 70287 datereported: 2024-07-10 reportedby: David Korczynski vulnerability: Huge malloc request could crash caller product: libdwarf description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. datefixed: 2024-07-10 references: regressiontests/ossfuzz70287/ gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c tarrelease: endrec: DW202407-009 id: DW202407-008 fuzzer: ossfuzz id: 70282 datereported: 2024-07-10 reportedby: David Korczynski vulnerability: Huge malloc request could crash caller product: libdwarf description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. datefixed: 2024-07-10 references: regressiontests/ossfuzz70282/ gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c tarrelease: endrec: DW202407-008 id: DW202407-007 fuzzer: ossfuzz id: 70278 datereported: 2024-07-10 reportedby: David Korczynski vulnerability: Huge malloc request could crash caller product: libdwarf description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. datefixed: 2024-07-10 references: regressiontests/ossfuzz70278/ gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c tarrelease: endrec: DW202407-007 id: DW202407-006 fuzzer: ossfuzz id: 70277 datereported: 2024-07-10 reportedby: David Korczynski vulnerability: Huge malloc request could crash caller product: libdwarf description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. datefixed: 2024-07-10 references: regressiontests/ossfuzz70277/ gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c tarrelease: endrec: DW202407-006 id: DW202407-005 fuzzer: ossfuzz id: 70266 datereported: 2024-07-10 reportedby: David Korczynski vulnerability: Huge malloc request could crash caller product: libdwarf description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. datefixed: 2024-07-10 references: regressiontests/ossfuzz70266/fuzz_findfuncbypc-6093996460408832 gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c tarrelease: endrec: DW202407-005 id: DW202407-004 fuzzer: ossfuzz id: 70263 datereported: 2024-07-10 reportedby: David Korczynski vulnerability: Huge malloc request could crash caller product: libdwarf description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. datefixed: 2024-07-10 references: regressiontests/ossfuzz70263/fuzz_die_cu-4960441042796544 gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c tarrelease: endrec: DW202407-004 id: DW202407-003 fuzzer: ossfuzz id: 70256 datereported: 2024-07-10 reportedby: David Korczynski vulnerability: Huge malloc request could crash caller product: libdwarf description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. datefixed: 2024-07-10 references: regressiontests/ossfuzz70256/fuzz_rng-483822291655065 gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c tarrelease: endrec: DW202407-003 id: DW202407-002 fuzzer: ossfuzz id: 70246 datereported: 2024-07-09 reportedby: David Korczynski vulnerability: Huge malloc request could crash caller product: libdwarf description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. datefixed: 2024-07-10 references: regressiontests/ossfuzz70246/fuzz_macro_dwarf5-5128935898152960 gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c tarrelease: endrec: DW202407-002 id: DW202407-001 fuzzer: ossfuzz id: 70244 datereported: 2024-07-09 reportedby: David Korczynski vulnerability: Memory leaks reading rnglists product: libdwarf description: Libdwarf was failing to free() some allocations in reading .debug_rnglists. This bug has been present for a week or so. datefixed: 2024-07-09 references: regressiontests/ossfuzz70244/fuzz_die_cu_attrs_loclist-4958134427254784 gitfixid: 906a4428a5d92e17948da4249cfccbe8f5ae8005 tarrelease: endrec: DW202407-001 id: DW202406-002 fuzzer: ossfuzz id: 69641 datereported: 2024-06-14 reportedby: David Korczynski vulnerability: Memory Leak reading .debug_loclists product: libdwarf description: During startup (reading initial fields from .debug_loclists) libdwarf was allocating an array of integers but in the normal case was failing to free the array. This bug in DWARF5 handling has been in the code for a week or so. See also DW202406-001. datefixed: 2024-06-15 references: regressiontests/ossfuzz69641/fuzz_die_cu_attrs_loclist-6271271030030336 gitfixid: 32d832900ebe2e61ec07e82625a561415be05424 tarrelease: libdwarf-0.10.1.tar.xz endrec: DW202406-002 id: DW202406-001 fuzzer: ossfuzz id: 69639 datereported: 2024-06-14 reportedby: David Korczynski vulnerability: Memory Leak reading .debug_loclists product: libdwarf description: During startup (reading initial fields from .debug_loclists) libdwarf was allocating an array of integers but in the normal case was failing to free the array. This bug in DWARF5 handling has been in the code for a week or so. See also DW202406-002. datefixed: 2024-06-15 references: regressiontests/ossfuzz69639/fuzz_die_cu_offset-6001910176350208 gitfixid: 32d832900ebe2e61ec07e82625a561415be05424 tarrelease: libdwarf-0.10.1.tar.xz endrec: DW202406-001 id: DW202403-001 fuzzer: ossfuzz id: 67490 datereported: 2024-03-18 reportedby: David Korczynski vulnerability: Reads past end of line table product: libdwarf description: A carefully corrupted line table header can cause libdwarf to read outside of its allowed areas in a .debug_line section reading the file names part of the header. The failure to check for end-of-section before reading past end-of-section at the very last byte in section (at a very few specific points in the line table reader code where a valid line table header would not require a test) has been present for many years. datefixed: 2024-02-19 references: regressiontests/ossfuzz67490/fuzz_srcfiles-5195296927711232 gitfixid: 2930f3121ee6b07da405103934c329bbeca0382f tarrelease: libdwarf-0.9.2.tar.xz endrec: DW202403-001 id: DW202402-003 fuzzer: hongg datereported: 2024-02-18 reportedby: ifygecko vulnerability: crashes randomly reading fuzzed locllist product: libdwarf description: A carefully corrupted loclists entry can cause libdwarf to read outside of its allowed areas in dwarf_loclists.c due to lack of a sanity check. A segmentation error and libdwarf crash is likely. Similar code in dwarf_rnglists.c and that now has the additional checks. The bugs have been present in both since the code was created in June 2020. datefixed: 2024-02-18 references: regressiontests/hongg2024-02-18/SIGSEGV-m.fuzz gitfixid: 5cfbd87dff4fc3c3b595bb92ed886934945b372c tarrelease: libdwarf-0.9.2.tar.xz endrec: DW202402-003 id: DW202402-002 cve: CVE-2024-2002 fuzzer: hongg datereported: 2024-02-16 reportedby: ifygecko vulnerability: crashes randomly on fuzzed object product: libdwarf description: In a multiply-corrupted DWARF object libdwarf may try to dealloc(free) an allocation twice. Results are unpredictable and various. This has been a possibility since we added code to prevent leaks when generating 'unattached' Dwarf_Error records (where there is no Dwarf_Debug available at the point of error). The problem was introduced in libdwarf-0.1.0 in 2021. datefixed: 2024-02-17 references: regressiontests/hongg2024-02-16/SIGABRT-a.fuzz SIGABRT-b.fuzz SIGABRT-c.fuzz SIGSEGV-d.fuzz SIGSEGV-e.fuzz SIGSEGV-f.fuzz SIGSEGV-g.fuzz SIGSEGV-h.fuzz SIGSEGV-i.fuzz SIGSEGV-k.fuzz gitfixid: 404e6b1b14f60c81388d50b4239f81d461b3c3ad tarrelease: libdwarf-0.9.2.tar.xz endrec: DW202402-002 id: DW202402-001 fuzzer: ossfuzz id: 66646 datereported: 2024-02-12 reportedby: David Korczynski vulnerability: Reference memory outside of section. product: libdwarf description: The data pointer for DW_FORM_ref1 was not being validated as pointing into the section before being dereferenced. Here reading a corrupted DWARF section. A library crash is likely. This test failure happened to be on a DW_AT_abstract_origin attribute, but the problem applies in many other situations. Nearly the other forms had checks. This check has been missing for many years. Similarly the requisite check was missing from DW_FORM_block1 for many years and that too was fixed so all the FORMs have checks now. datefixed: 2024-02-13 references: regressiontests/ossfuzz66646/fuzz_findfuncbypc-5178544143532032 gitfixid: f21e2f7687f3dca183026a1fb72ca1f0dcf8befa tarrelease: libdwarf-0.9.2.tar.xz endrec: DW202402-001 id: DW202311-002 fuzzer: ossfuzz id: 64496 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Null dereference from dwarf_gnu_debuglink() product: libdwarf description: If the Dwarf_Debug was opened with dwarf_init_object_b() there is no pathname known to libdwarf and the library was dereferencing a null pointer as a result. With the library bug fixed the fuzz/fuzz_debuglink.c test case was violating the rules of use of the function resulting in memory leakage. The documentation has been improved on this function. datefixed: 2023-11-25 references: regressiontests/ossfuzz64496/fuzz_debuglink-615437663823462 gitfixid: d76cce559b898f7059ce5ffd82f3cfd58cb392fe tarrelease: libdwarf-0.9.0.tar.xz endrec: DW202311-002 id: DW202311-001 fuzzer: ossfuzz id: 56452 datereported: 2023-11-24 reportedby: David Korczynski vulnerability: Null dereference product: libdwarf description: Passing a null Dwarf_Debug to dwarf_add_debuglink_global_path() lead to library crash. The code was not checking for a valid Dwarf_Debug Argument. The bug was present when the function was created in 2021 Moreover, oss fuzz originally noted the bug on 02 March 2023 but I can find no trace of a notification of the bug arriving before 24 November 2023. Fixing this sort of thing for all functions, here is the last commit id... ef77596af000719c04bd3e40b97139247ff3efb4 datefixed: 2023-11-25 references: regressiontests/ossfuzz56452/fuzz_debuglink-cs4231a-5927365017731072 gitfixid: 1f6988307748f427566e3266695bb72d5384bf3d tarrelease: libdwarf-0.9.0.tar.xz endrec: DW202311-001 id: DW202310-002 fuzzer: ossfuzz id: 63024 datereported: 2023-10-06 reportedby: David Korczynski vulnerability: Heap buffer overflow product: libdwarf description: A copy-paste error lead to a heap buffer overflow. Named the wrong struct in calling calloc(). The function with the bug was added seven days ago. datefixed: 2023-10-07 references: regressiontests/ossfuzz63024/fuzz_init_path-5486726493372416 gitfixid: 3a658bd1dd7437948cecbf82bb9b24f5f6122a7d tarrelease: libdwarf-0.9.0.tar.xz endrec: DW202310-002 id: DW202310-001 fuzzer: ossfuzz id: 62943 datereported: 2023-10-02 reportedby: David Korczynski vulnerability: Heap buffer overflow product: libdwarf description: The heap buffer overflow was due to a failure to do initial sanity checks on a universal object. The object involved was not large enough to have a complete universal header. This bug was in the public repository for three days (in all-new code, for Apple Universal Binary objects). datefixed: 2023-10-03 references: regressiontests/ossfuzz62943/fuzz_init_path-5486726493372416 gitfixid: aea77dad8745d9aad5275c3226e4e3156effa71f tarrelease: libdwarf-0.9.0.tar.xz endrec: DW202310-001 id: DW202309-004 fuzzer: ossfuzz id: 62842 datereported: 2023-09-30 reportedby: David Korczynski vulnerability: Heap buffer overflow product: libdwarf description: The heap buffer overflow in _dwarf_memcpy_swap_bytes was due a failure to check for a valid size field (a fuzzed value) in a count of array elements.. Now we check for a sensible count. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects). datefixed: 2023-10-01 references: regressiontests/ossfuzz62842/fuzz_findfuncbypc-4964619766333440.fuzz gitfixid: f7c7e84e5a77915bb6570215887118d8e7759122 tarrelease: libdwarf-0.9.0.tar.xz endrec: DW202309-004 id: DW202309-003 fuzzer: ossfuzz id: 62834 datereported: 2023-09-30 reportedby: David Korczynski vulnerability: Memory leak in _dwarf_macho_setup() product: libdwarf description: The September 29 addition of Mach-O universal binary support resulted in memory leaks due to revising memory alloc/free incompletely when fuzzed object files were encountered.. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects). datefixed: 2023-10-01 references: regressiontests/ossfuzz62834/fuzz_init_path-4573857635500032 gitfixid: f7c7e84e5a77915bb6570215887118d8e7759122 tarrelease: libdwarf-0.9.0.tar.xz endrec: DW202309-003 id: DW202309-002 fuzzer: ossfuzz id: 62833 datereported: 2023-09-30 reportedby: David Korczynski vulnerability: Memory leak in _dwarf_macho_setup() product: libdwarf description: The September 29 addition of Mach-O universal binary support resulted in memory leaks due to revising memory alloc/free incompletely when fuzzed object files were encountered.. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects). datefixed: 2023-10-01 references: regressiontests/ossfuzz62833/fuzz_set_frame_all-4521858130903040 gitfixid: gitfixid: f7c7e84e5a77915bb6570215887118d8e7759122 tarrelease: libdwarf-0.9.0.tar.xz endrec: DW202309-002 id: DW202309-001 fuzzer: ossfuzz id: 62547 datereported: 2023-09-22 reportedby: David Korczynski vulnerability: Heap use after free product: libdwarf description: Calling dwarf_get_fde_for_die() causes the problem as its special handling in a user calling for fde destruction is wrong when dwarf_finish() is calling for fde destruction. dwarf_finish() can refer to freed memory in trying to delete a CIE twice. The use after free has a dependence on the order nodes are seen in the de_alloc_tree tdestroy() walk of the table (the order is not predictable). Broken in release 0.8.0 and all previous releases. datefixed: 2023-09-23 references: regressiontests/ossfuzz62547/fuzz_stack_frame_access-5263709637050368 gitfixid: cd741379bd0203a0875b413542d5f982606ae637 tarrelease: libdwarf-0.9.0.tar.xz endrec: DW202309-001 id: DW202308-001 fuzzer: ossfuzz id: 59576 datereported: 2023-06-04 reportedby: David Korczynski vulnerability: Read from outside frame section product: libdwarf description: A fuzzed object results in reading outside a frame section due to a comparison being > when it should have bin >= at about line 1615 in dwarf_frame2. Could result in crash or incorrect frame data returned. Somehow we lost track of this open bug. The bug has been in the code since the augmentation was first implemented in the library. datefixed: 2023-08-26 references: regressiontests/ossfuzz59576/fuzz_set_frame_all-5867083595120640 gitfixid: e53adc90ffd6d5d0fad61546b0041990aefd970b tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202308-001 id: DW202307-001 fuzzer: ossfuzz id: 60506 datereported: 2023-07-09 reportedby: David Korczynski vulnerability: Read from outside section product: libdwarf description: A fuzzed object results in reading outside a line table due to a corruption in a non-standard (experimental) line table format. A corrupted offset was not checked for sanity. The bug has been in the code since the experimental line table support was added in 2015. datefixed: 2023-07-11 references: regressiontests/ossfuzz60506/fuzz_srcfiles-6494439909228544.fuzz gitfixid: c8c5073f35b1efdcc610ecf369c78f87fdd34714 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202307-001 id: DW202306-011 fuzzer: ossfuzz id: 60090 datereported: 2023-06-24 reportedby: David Korczynski vulnerability: Read from invalid memory address product: libdwarf description: A fuzzed object results in an addition overflow in reading CIE data leading to a read from an invalid address. An almost-correct check for an overflow in case of a fuzzed aug_irix_exception_table augmentation leads to a crash. The bug was incorrect coding of a test (for an absurd value) written a few weeks ago. datefixed: 2023-06-26 references: regressiontests/ossfuzz60090/fuzz_set_frame_all-5757752673435648 gitfixid: 6f75899f1f90fa87e52da0df09ddaa2e5be778f9 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202306-011 id: DW202306-010 fuzzer: ossfuzz id: 59950 datereported: 2023-06-18 reportedby: David Korczynski vulnerability:library reads outside frame section product: libdwarf description: A fuzzed object results in adding a too large value (from CIE frame augmentation data) to a pointer, having failed to check the value for reasonableness. That add overflows so dereferencing the pointer in dwarf_frame.c could lead to a crash in the library or getting nonsense information returned to the caller. This bug has been present for many years. datefixed: 2023-06-19 references: regressiontests/ossfuzz59950/fuzz_set_frame_all-6613067367317504 gitfixid: b7437c9e4923906e9b3f3860a0c8a8289cff0a91 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202306-010 id: DW202306-009 fuzzer: ossfuzz id: 59775 datereported: 2023-06-11 reportedby: David Korczynski vulnerability: Fuzzed object results in read past end of section. product: libdwarf description: A fuzzed object results in reading one byte past the end of a .eh_frame section in internal function _dwarf_read_loc_expr-op(). Now we check for that before we dereference a pointer (to read the particular single-byte field). datefixed: 2023-06-13 references: regressiontests/ossfuzz59775/fuzz_die_cu_attrs_loclist-4504718844755968 gitfixid: 9cae1be75ec333d2b8ab8800df4850ed77a8b025 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202306-009 id: DW202306-008 fuzzer: ossfuzz id: 59699 datereported: 2023-06-08 reportedby: David Korczynski vulnerability: Read past end of section product: libdwarf description: In reading a CIE prefix of a fuzzed object we read past the end of the section due to a failure to check a byte pointer before we dereference it in _dwarf_read_cie_fde_prefix(). datefixed: 2023-05-10 references: regressiontests/ossfuzz59699/fuzz_stack_frame_access-6523659305746432 gitfixid: c5b909630bb566cdbf68fae4091f049f3b22ff11 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202306-008 id: DW202306-007 fuzzer: ossfuzz id: 59602 datereported: 2023-06-04 reportedby: David Korczynski vulnerability: Buffer overflow read product: libdwarf description: In _dwarf_read_loc_expr_op() we read one byte past available data as the required check for past-end was missing. datefixed: 2023-06-10 references: regressiontests/ossfuzz59602/fuzz_die_cu_attrs_loclist-6737086749999104 gitfixid: c8c54ba5c79b0a2687f0fa2ac331479506c3210f tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202306-007 id: DW202306-006 fuzzer: ossfuzz id: 59727 datereported: 2023-06-01 reportedby: David Korczynski vulnerability: Integer Overflow product: libdwarf description: Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517 datefixed: 2023-06-08 references: gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202306-006 id: DW202306-005 fuzzer: ossfuzz id: 59717 datereported: 2023-06-01 reportedby: David Korczynski vulnerability: Integer Overflow product: libdwarf description: Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517 datefixed: 2023-06-08 references: gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202306-005 id: DW202306-004 fuzzer: ossfuzz id: 59595 datereported: 2023-06-09 reportedby: shinibufa (github) vulnerability: Signed Integer overflow product: libdwarf description: Signed Integer Overflow. In _dwarf_exec_frame_instr(), called by dwarf_expand_frame_instructions(), there was a DW_CFA_LLVM_def_aspace_cfa_sf and we failed to check for overflow. The test case had a overflow. Now we do that check. datefixed: 2023-06-10 references: regressiontests/ossfuzz59595/fuzz_set_frame_all-5319697747542016 gitfixid: e8c726e2be644df2706342b7a80633d07ecd7fb4 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202306-004 id: DW202306-003 fuzzer: shinibufa datereported: 2023-06-09 reportedby: shinibufa (github) vulnerability: use after free product: libdwarf description: Heap use-after-free dwarf_query.c datefixed: 2023-05-19 references: regressiontests/shinibufa/fuzzed_input_file gitfixid: 4017ab8b92195641e6876b388cebe2d3307634f5 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202306-003 id: DW202306-002 fuzzer: ossfuzz id: 59519 datereported: 2023-06-01 reportedby: David Korczynski vulnerability: Integer Overflow product: libdwarf description: Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517 datefixed: 2023-06-08 references: regressiontests/ossfuzz59519/fuzz_set_frame_all-4670829255065600 gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202306-002 id: DW202306-001 fuzzer: ossfuzz id: 59517 datereported: 2023-06-01 reportedby: David Korczynski vulnerability: Signed Integer Overflow product: libdwarf description: Nine different places in dwarf_frame.c multiplied a factored value by a (usually) small integer without checking if the factored value read from the object could possibly be real. So the factored value when multiplied by the factor could overflow. In some of the cases the factored value is signed, some it is unsigned. This sanity checking of factored frame offset values never existed before in the library. datefixed: 2023-06-08 references: regressiontests/ossfuzz59517/fuzz_set_frame_all-5741671019839488 gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202306-001 id: DW202305-010 fuzzer: ossfuzz id: 59478 datereported: 2023-05-31 reportedby: David Korczynski vulnerability: Memory leak in dwarf_expand_frame_instructions() product: libdwarf description: Fuzzing provoked one of four error cases that could leak locally allocated memory from _dwarf_exec_frame_instructor() (called by dwarf_expand_frame_instructions). The code did free(localregtab) but needed to do FREELOCALMALLOC, a macro specific to this function which cleans up all local allocations. All four places have been corrected. Called enough times with fuzzed data could result in filling memory leading to the library being unable to work for the caller and instead just returning errors. This bug has been present in the code for many years. datefixed: 2023-05-31 references: regressiontests/ossfuzz59478/fuzz_set_frame_all-5300774457180160 gitfixid: 8ef9c8fb613e59f534e789e91a73088eaa5b8a5a tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202305-010 id: DW202305-009 fuzzer: ossfuzz id: 56451 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Write to memory fails product: libdwarf description: One problem is a bug in the test source: fuzz/fuzz_dnames.c. It calls dwarf_dnames_abbrevtable() incorrectly. The caller is required to provide arrays dw_idxattr_array and dw_form_array and pass a pointer to such. The code was just passing in a pointer to nothing. The library code has no possible way to determine the passed in pointers are usable. In addition, dwarf_dnames_abbrevtable() did not check that pointers passed in were non-null before use, but now it does. datefixed: 2023-05-30 references: regressiontests/ossfuzz56451/fuzz_dnames-4986494365597696 gitfixid: 12a612fc8db38fc26cd5e6064f09a6f825891c7c tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202305-009 id: DW202305-008 fuzzer: ossfuzz id: 56492 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Timeout (exceeds 50 seconds) product: fuzz testing description: The problem is a bug in the test source: fuzz/fuzz_macro_dwarf5.c. One must not blame the fuzzer author for examplep5(), the code was based on doc/checkexamples.c and there examplep() was really just a sketch. The testcase here no longer specifies an infinite loop. datefixed: 2023-05-23 references: regressiontests/ossfuzz56492/fuzz_macro_dwarf5-6497277180248064 gitfixid: 97a78122268c9a74701f2dd3115f902309e9a484 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202305-008 id: DW202305-007 fuzzer: ossfuzz id: 56474 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Null pointer dereference. product: libdwarf description: Calling dwarf_highpc_b() lead to crash. The function was dereferencing an argument before the argument was checked. Now it is checked for null before any dereference. In addition, the test code, fuzz/fuzz_die_cu_attrs_loclist.c, called dwarf_highpc_b() with a Dwarf_Die that is uninitialized local variable (hence contents unpredictable). C code has no way to catch such a caller error. This is a bug in the test code. We are changed the test code local data pointer variable to be initialized with the value 0. datefixed: 2023-05-23 references: regressiontests/ossfuzz56474/fuzz_die_cu_attrs_loclist-4719938125561856 gitfixid: b3df2530732ea515cda5a85438871e15c6723ead tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202305-007 id: DW202305-006 fuzzer: ossfuzz id: 56472 datereported: 2023-02-27 reportedby: David Korczynski vulnerability: Crash on null pointer argument. product: libdwarf description: A call to any dwarf_get_fission or any API entry with _xu_ in the name (functions for DWARF5 Debug Fission, called Split Dwarf in DWARF5) would crash the caller if any relevant argument was null. The problem has existed since the code was written in 2021. Once that is fixed valgrind complains about using an uninitialized value. fuzz/fuzz_simplereader_tu.c calls libdwarf with the declation being Dwarf_Die die; no initializer present. Bad behavior, even a library crash is likely. datefixed: 2023-05-30 references: regressiontests/ossfuzz56472/fuzz_simplereader_tu-6614412934119424 gitfixid: 8b17d41a31c33e0b3b9727a8044e0093a754d6d7 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202305-006 id: DW202305-005 cve: fuzzer: ossfuzz id: 56462 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Unpredictable crash or erroneous data returned product: libdwarf description: A call to dwarf_set_frame_undefined_value() dwarf_set_frame_rule_initial_value() dwarf_set_frame_same_value() dwarf_set_frame_cfa_value() dwarf_set_frame_rule_table_size() with unusable values was not being caught. Now if the set of values violates the required relationships an error is returned on requesting actual frame data. The problem has existed for many years (fixed May 23). Once that is fixed valgrind shows leaks. That is because fuzz/fuzz_set_frame_all.c fails to call dwarf_finish() and, instead, simple exit()s at several places. Updated the test source to return from its functions and only exit() from main() after the dwarf_finish() call. datefixed: 2023-05-30 references: regressiontests/ossfuzz56462/fuzz_set_frame_all-5424385441005568 gitfixid: 21b33d13024d18b09e32914ca5718a5c81d1ad67 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202305-005 id: DW202305-004 cve: fuzzer: ossfuzz id: 56446 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Incorrect section bound check product: libdwarf test code description: The test program fuzz_dnames.c passed a non-null pointer containing garbage content. The fix is to initialize (in fuzz_dnames.c) the local variable to null (0). datefixed: 2023-05-23 references: regressiontests/ossfuzz56446/fuzz_dnames-4784811358420992 gitfixid: 6fac1021c67d72da6b65f99ad815978d40b4c1e8 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202305-004 id: DW202305-003 cve: fuzzer: ossfuzz id: 59091 datereported: 2023-05-19 reportedby: David Korczynski vulnerability: Incorrect section bound check product: libdwarf description: A fuzzed line table in the non-standard (experimental) two-level line table format exposed a failure as the test was v > sectionend whereas it has to be v >= sectionend as end pointers are always one-past the end of the area. This was incorrect since the experimental table support was added in 2021. datefixed: 2023-05-19 references: regressiontests/ossfuzz59091/fuzz_macro_dwarf5-5135813562990592 gitfixid: 4017ab8b92195641e6876b388cebe2d3307634f5 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202305-003 id: DW202305-002 cve: fuzzer: ossfuzz id: 58797 datereported: 2023-05-10 reportedby: David Korczynski vulnerability: Memory Leak reading experimental line table product: libdwarf description: A fuzzed line table in the non-standard (experimental) two-level line table format had several unchecked values and one was larger than made any sense, and detecting the error revealed a memory leak. Caused by the incomplete fix to DW202305-001 (yesterday). This is was a failure to run some crucial tests, which would have exposed the problem before DW202305-001 was completed. Incomplete testing. datefixed: 2023-05-10 references: regressiontests/ossfuzz58797/fuzz_macro_dwarf5-4872686367801344 gitfixid: eeb935200f78b8509e6b1837f6825b9d551b9f7d tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202305-002 id: DW202305-001 cve: fuzzer: ossfuzz id: 58769 datereported: 2023-05-09 reportedby: David Korczynski vulnerability: Excessive malloc reading experimental line table product: libdwarf description: A fuzzed line table in the non-standard (experimental) two-level line table format had several unchecked values and one was larger than made any sense. The failure was due to oss-fuzz limiting malloc to 3GB. The failure was appropriate as the fuzzed values were inappropriate. We now check for sensible values. See libdwarf/dwarf_line_table_reader_common.h The code was in libdwarf starting in 2021. datefixed: 2023-05-09 references: regressiontests/ossfuzz58769/fuzz_macro_dwarf5-5460713058205696 gitfixid: edc241bd0bf22c94d2d496f3cb761e60f066cd14 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202305-001 id: DW202304-004 cve: fuzzer: ossfuzz id: 58026 datereported: 2023-04-15 reportedby: David Korczynski vulnerability: Segv on unknown address reading frame data. product: libdwarf description: On reading a corrupt frame register number the library could crash with a segmentation violation. This bug has been present in the code for 25 years. The conversion of an impossibly large (carefully constructed) register number to a Dwarf_Half or unsigned int the result looked reasonable, invalidating some tests for reasonableness. Now we do all the tests on the full Dwarf_Unsigned register number(s) and retain the value in the long form everywhere. Fixed 2023-04-15. Once that is fixed there is still a leak found by valgrind. Tht test code fuzz/fuzz_set_frame_all.c does a local malloc and in some cases returned without free-ing it locally. Now that local malloc has the necessary local free. datefixed: 2023-05-30 references: regressiontests/ossfuzz58026/fuzz_set_frame_all-4582976972521472.fuzz gitfixid: 21b33d13024d18b09e32914ca5718a5c81d1ad67 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202304-004 id: DW202304-003 cve: fuzzer: ossfuzz id: 57887 datereported: 2023-04-10 reportedby: David Korczynski vulnerability: Reading outside the intended section data. product: libdwarf description: Crash in libdwarf on reading .debug_addr given a bogus index entry. Due to failing to correctly check that the index is out of range. The index was close to overflowing Dwarf_Unsigned so testing values *after* arithmetic done on the incoming index was too late: so we read outside the .debug_addr table. The checks have been incomplete since this DWARF5 section code was written. libdwarf/dwarf_query.c datefixed: 2023-04-11 references: regressiontests/ossfuzz57887/fuzz_die_cu-4866423964172288 gitfixid: 1729d9af3f690bece912ae0f625b312566d0ae25 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202304-003 id: DW202304-002 cve: fuzzer: ossfuzz id: 57766 datereported: 2023-04-07 reportedby: David Korczynski vulnerability: Heap Buffer Overflow product: libdwarf description: Crash in libdwarf on reading an attribute due to failing to check that an index into .debug_str_offsets is sane. So we read far outside the relevant table. The checks have been incomplete since this DWARF5 section code was written. Two functions in libdwarf dwarf_form.c had the same problem. datefixed: 2023-04-09 references: regressiontests/ossfuzz57766/fuzz_die_cu_print-5295062170075136 gitfixid: 761da806fc950c6b26c1763e8989a814e9b16a59 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202304-002 id: DW202304-001 cve: fuzzer: ossfuzz id: 57711 datereported: 2023-04-04 reportedby: David Korczynski vulnerability: dereference null pointer product: libdwarf description: Crash in libdwarf on dwarf_srcfiles() call. A dereference off a null pointer due to corrupt file numbers not being noticed. Any such crash left an incomplete and misleading stack trace. The large numbers treated as Dwarf_Signed were part of the problem. Now in libdwarf we check Dwarf_Signed for negative values and issue an error if the value less than 0. So later casts to Dwarf_Unsigned work as intended. The libdwarf problems have been in the library for a very long time. datefixed: 2023-04-06 references: regressiontests/ossfuzz57711/fuzz_srcfiles-4695324781576192 gitfixid: da0d1efbeddcff23c25704bd9672e98314928b19 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202304-001 id: DW202303-059 cve: fuzzer: ossfuzz id: 57562 datereported: 2023-03-30 reportedby: David Korczynski vulnerability: Infinite loop reading DIEs product: libdwarf description: Caller looping on dwarf_siblingof_b() (wanting to touch all siblings) could be put in an infinite loop. A DW_AT_sibling attribute with a corrupted attribute value meant the caller never sees the DW_DLV_NO_ENTRY return signalling all siblings have been seen. datefixed: 2023-04-01 references: regressiontests/ossfuzz57562/fuzz_findfuncbypc-6681114772373504 gitfixid: 21b076f652992c03f145f6edeb623918e17693f8 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-059 id: DW202303-058 cve: fuzzer: ossfuzz id: 57527 datereported: 2023-03-29 reportedby: David Korczynski vulnerability: reading off end of valid data can crash library product: libdwarf description: A line table header truncated by a fuzzer to just the right length (anywhere within a 12 byte area) would cause memory references outside of valid data. Now we check there is object data present before referring to that area and if not, return an error. datefixed: 2023-03-30 references: regressiontests/ossfuzz57527/fuzz_srcfiles-4599045397282816 gitfixid: 36e4063ade31c9ea6ea5df973d2045b36877885b tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-058 id: DW202303-057 cve: fuzzer: datereported: 2023-03-26 reportedby: Pedro Navarro vulnerability: Unable to read large object sections product: libdwarf description: A section 2GB+ in size could not be read by libdwarf. Such is a Denial of Service. Simply turning the big read into however many are needed (each below 2GB) was simple to do. The limitation in the 'read' libc function (really a Linux kernel limitation) is well documented but we had not noticed before now. Few object files are so large. datefixed: 2023-03-28 references: gitfixid: 8bf96199a0e130483cceca6bfacfbe4127441ab1 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-057 id: DW202303-056 cve: fuzzer: ossfuzz id: 57516 datereported: 2023-03-28 reportedby: David Korczynski vulnerability: Null dereference in dwarf_hasattr() product: libdwarf description: With a corrupted attribute dwarf_hasattr() could try to access an implicit_const abbrev value indexing off of a NULL library internal pointer. Because the abbrev section had no actual implicit const value due to the corruption, so the internal array for holding such was not present. The pointer abl_implicit_const was NULL. Now we test the pointer for NULL and if NULL report an error. This lack of a NULL check has existed for many years. datefixed: 2023-03-29 references: regressiontests/ossfuzz57516/fuzz_die_cu_attrs-6171488289161216 gitfixid: 5dc3de5ce70331692a2700b218fb79e0d4d81c23 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-056 id: DW202303-055 cve: fuzzer: ossfuzz id: 57485 datereported: 2023-03-27 reportedby: David Korczynski vulnerability: product: None, test code bug description: Abort in fuzz_die_cu_attrs.c The fault was in test code. Since fixed (earlier today). No code change here. datefixed: 2023-03-28 references: regressiontests/ossfuzz57485/ gitfixid: 2b19bc239f3cedd1b2461e4265d90633277ce704 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-055 id: DW202303-054 cve: fuzzer: ossfuzz id: 57463 datereported: 2023-03-24 reportedby: David Korczynski vulnerability: dereference null in test code product: none, test code bug description: The fault was in test code. fuzz_die_cu_attrs.c Since fixed (earlier today). No code change here. datefixed: 2023-03-24 references: regressiontests/ossfuzz57463/fuzz_die_cu_attrs-5158380196200448 gitfixid: e4053c9a0f25db0bed28372d9b77a50a0307dc10 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-054 id: DW202303-053 cve: fuzzer: ossfuzz id: 57443 datereported: 2023-03-24 reportedby: David Korczynski vulnerability: Double free in _dwarf_read_line_table_header product: libdwarf description: The same bug seen earlier A double free when a particular error is in the line table header. Fixed already. gitfixid is more recent than truly required. datefixed: 2023-03-28 references: regressiontests/ossfuzz57443/fuzz_srcfiles-6015429578719232 gitfixid: c25a14c3fd5522aff0b1d2a77d7ee66b7c529779 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-053 id: DW202303-052 cve: fuzzer: ossfuzz id: 57442 datereported: 2023-03-24 reportedby: David Korczynski vulnerability: Heap buffer overflow product: libdwarf description: Corrupt .debug_rngslists leads to crash when a rnglists header has a length indicating a longer section than we really have. Now we check more carefully for that situation. The bug existed from 2017, when DWARF5 support was added to the library. datefixed: 2023-03-28 references: regressiontests/ossfuzz57442/fuzz_rng-5974595378479104 gitfixid: 271b9b8367a8151fcd98723d73382ec56f05c810 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-052 id: DW202303-051 cve: fuzzer: ossfuzz id: 57437 datereported: 2023-03-24 reportedby: David Korczynski vulnerability: Heap double free product: libdwarf description: In a specific error case reading a fuzzed object and calling dwarf_srcfiles local data was freed twice. The bug was fixed earlier, and involved src/lib/libdwarf/dwarf_line_table_reader_common.h. datefixed: 2023-03-28 references: regressiontests/ossfuzz57437/fuzz_srcfiles-5281689109921792 gitfixid: c25a14c3fd5522aff0b1d2a77d7ee66b7c529779 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-051 id: DW202303-050 cve: fuzzer: ossfuzz id: 57429 datereported: 2023-03-24 reportedby: David Korczynski vulnerability: invalid free() in test source product: libdwarf description: The test source violates libdwarf requirements. fuzz/fuzz_die_cu_attrs.c was doing free on a name pointer returned from dwarf_diename. The documentation clearly states that pointer should not have a free() done. fix id below is fixing the test source. datefixed: 3023-03-28 references: regressiontests/ossfuzz57429/fuzz_die_cu_attrs-4845537731149824 gitfixid: 2b19bc239f3cedd1b2461e4265d90633277ce704 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-050 id: DW202303-049 cve: fuzzer: ossfuzz id: 57408 datereported: 2023-03-24 reportedby: David Korczynski vulnerability: Stack Overflow, _dwarf_create_a_new_cu_context... product: libdwarf description: involves find_sig8_target_as_global_offset() and is the same problem as seen in other guises earlier. The case becomes an infinite loop, so eventually the stack gets exhausted. Fixed. See also ossfuzz id 56540. ossfuzz id 56487. ossfuzz id 56497. ossfuzz 57480 datefixed: 2023-03-26 references: regressiontests/ossfuzz57408/fuzz_die_cu-4702098356043776 gitfixid: 24f5697aecd77092de20f0f7e7d91fbc1f2b3da0 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-049 id: DW202303-048 cve: fuzzer: ossfuzz datereported: 2023-03-08 reportedby: Youngseok Choi vulnerability: Memory leak (was double free). product: dwarfdump description: The command: dwarfdump --file-name= -kG -ka results in a a memory leak. In certain error cases we failed to fclose() a FILE * used to read dwarfdump.conf. Earlier changes fixed the double free, this fixes the memory leak.. datefixed: 2023-03-24 references: regressiontests/choi015/poc_file_03 gitfixid: 24f5697aecd77092de20f0f7e7d91fbc1f2b3da0 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-048 id: DW202303-047 cve: fuzzer: ossfuzz datereported: 2023-03-08 reportedby: Youngseok Choi vulnerability: Double Free product: dwarfdump description: The command: dwarfdump --check-unique --check-abbrev results in a double free. The table of unique errors contained makename() data, so that aspect caused a double free as makename gets destructed independently. Fixed now,letting makename destructor do the work. datefixed: 2023-03-24 references: regressiontests/choi015/poc_file_04 gitfixid: df64db4740f1b480e602b1112107d51f0d269828 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-047 id: DW202303-046 cve: fuzzer: ossfuzz datereported: 2023-03-08 reportedby: Youngseok Choi vulnerability: global buffer overflow product: dwarfdump description: The command: dwarfdump --search-regex=t[ą--]e Note the non-ascii character. The dwarfdump regex only allows ascii in search patterns, not the rest of UTF-8. datefixed: 2023-03-26 references: regressiontests/choi012/poc_file_10 gitfixid: 9eac0c8bbae3fadb2be3d5ee15b9c44f42d2f966 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-046 id: DW202303-045 cve: fuzzer: ossfuzz datereported: 2023-03-08 reportedby: Youngseok Choi vulnerability: Heap buffer overflow, regex product: dwarfdump description: The command: dwarfdump --search-regex= with a simple, really long, string. (with no file named) resulted in a buffer overflow in a buffer in dd_regex.c. No object file is required for the test. The code now checks stores to the internal array holding the non-deterministic finite automata (nfa) datefixed: 2023-03-25 references: regressiontests/baselines/choi014.base gitfixid: bb8fab9e5e4e40b1268b31d90882c2ab93653eaf tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-045 id: DW202303-044 cve: fuzzer: ossfuzz datereported: 2023-03-08 reportedby: Youngseok Choi vulnerability: Heap buffer overflow product: dwarfdump description: The command: dwarfdump --search-regex=\\ (with no file named) resulted in a heap use after free. No object file is required for the test. The dd_regex.c regex compiler failed to notice when a trailing backslash caused the pattern compiler to step past the pattern string. Now we notice and issue an error. datefixed: 2023-03-25 references: regressiontests/baselines/choi013.base gitfixid: 3269f43d2a044bfcce71d30ce214a305473d1ea3 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-044 id: DW202303-043 cve: fuzzer: ossfuzz datereported: 2023-03-08 reportedby: Youngseok Choi vulnerability: Heap Use After Free product: libdwarf description: The command: dwarfdump choi012/poc_file_08 was resulting in a heap use after free. It no longer does, due to earlier libdwarf fixes. datefixed: 2023-03-25 references: regressiontests/choi012/poc_file_08 gitfixid: 4a8a201cdb3408a2cfdc2946418b51b884140a2c tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-043 id: DW202303-042 cve: fuzzer: ossfuzz datereported: 2023-03-08 reportedby: Youngseok Choi vulnerability: Memory Leak product: dwarfdump description: The command: dwarfdump --check-all choi012/poc_file_07 leaked memory in dwarfdump. A single instance of print_error_and_continue() failed to return DW_DLV_ERROR when libdwarf reported an error. Before recent fixes to libdwarf this would also generate heap-use-after-free. datefixed: 2023-03-25 references: regressiontests/choi012/poc_file_07 gitfixid: 4a8a201cdb3408a2cfdc2946418b51b884140a2c tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-042 id: DW202303-041 cve: fuzzer: ossfuzz datereported: 2023-03-08 reportedby: Youngseok Choi vulnerability: Heap Use after Free product: dwarfdump description: The command: dwarfdump --check-frame-extended choi012/poc_file_06 is now working, apparently fixed by earlier bug fixes in libdwarf. datefixed: 2023-03-25 references: regressiontests/choi012/poc_file_06 gitfixid: fd92b647e5e3a524be94b3b06c9efd14a8292946 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-041 id: DW202303-040 cve: fuzzer: ossfuzz datereported: 2023-03-07 reportedby: Youngseok Choi vulnerability: Reading from zero page product: dwarfdump description: The command: dwarfdump --file-abi= causes big problems. Denial of service. For many of such commands with an '=' and nothing following the dwoptarg variable is not set at all, leading to a segmentation violation. datefixed: 2023-03-25 references: regressiontests/choi011/README gitfixid: fd92b647e5e3a524be94b3b06c9efd14a8292946 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-040 id: DW202303-039 cve: fuzzer: ossfuzz id: 56480 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Reading a compilation unit never finishes product: libdwarf description: Reading a DWARF compilation unit header in a corrupted object caused an infinite loop of repeated calls (growing the stack at each call) in libdwarf. Now the library properly reflects a NO ENTRY case avoiding the loop and the test case returns an unrelated error due to other corruption. Arguably the loop was due to corruption too, but it should not have gotten stuck in the loop (and now it will not get stuck). See also ossfuzz id 56540. ossfuzz id 56487. ossfuzz id 56497. ossfuzz 57408 datefixed: 2023-03-20 references: regressiontests/ossfuzz56480/fuzz_die_cu_print-5264022485467136 gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-039 id: DW202303-038 cve: fuzzer: ossfuzz id: 57335 datereported: 2023-03-22 reportedby: David Korczynski vulnerability: Null dereference in dwarf_hasform() product: libdwarf description: Passing a null dw_return_bool pointer dereferenced zero, but now, instead we return DW_DLV_ERROR with error code DW_DLE_INVALID_NULL_ARGUMENT The test driver fuzz_die_cu_attrs.c passed in a NULL argument (the test was not modified except for adding a comment) but libdwarf now checks for a null argument. datefixed: 2023-03-24 references: regressiontests/ossfuzz57335/fuzz_die_cu_attrs-6235345560928256.fuzz gitfixid: e4053c9a0f25db0bed28372d9b77a50a0307dc10 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-038 id: DW202303-037 cve: fuzzer: ossfuzz id: 57300 datereported: 2023-03-21 reportedby: David Korczynski vulnerability: Out of Memory product: libdwarf description: Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 and others listed here. datefixed: 2023-03-24 references: regressiontests/ossfuzz57300/fuzz_die_cu-4752724662288384 gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-037 id: DW202303-036 cve: fuzzer: ossfuzz id: 57300 datereported: 2023-03-15 reportedby: David Korczynski vulnerability: Out of Memory product: libdwarf description: Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 See DW202303-034 57149 See DW202303-034 57193 See DW202303-034 57292 datefixed: 2023-03-24 references: regressiontests/ossfuzz57300/fuzz_die_cu-4752724662288384 gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-036 id: DW202303-035 cve: fuzzer: ossfuzz id: 57292 datereported: 2023-03-15 reportedby: David Korczynski vulnerability: Out of Memory product: libdwarf description: Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 and others listed here. datefixed: 2023-03-24 references: regressiontests/ossfuzz57292/fuzz_die_cu_print-5412313393135616 gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-035 id: DW202303-034 cve: fuzzer: ossfuzz id: 57193 datereported: 2023-03-15 reportedby: David Korczynski vulnerability: Infinite loop till out of memory. product: libdwarf description: The infinite loop reading a fuzzed object file was caused by letting internal function _dwarf_find_CU_Context_given_sig() unconditionally do too much in the middle of setting up a CU_Context (by letting it start more CU_contexts(). The implicit infinite loop has been there a few years, depending on the correctness of object files DWARF4/DWARF5 being read. Same bug as ossfuzz 57107, ossfuzz 57149. datefixed: 2023-03-24 references: regressiontests/ossfuzz57193/fuzz_die_cu_offset-5215024489824256 gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-034 id: DW202303-033 cve: fuzzer: ossfuzz id: 57149 datereported: 2023-03-15 reportedby: David Korczynski vulnerability: Stack overflow product: libdwarf description: Infinite loop till out of memory Similar to 57107 DW202303-032 but revealed there were more places in find_cu_die_base_fields that needed to call the internal _dwarf_internal_global_formref_b() function. The bug was present since 2017, when DWARF5 support for new 'base' fields was created. datefixed: 2023-03-24 references: regressiontests/ossfuzz57149/fuzz_srcfiles-6213793811398656 gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-033 id: DW202303-032 cve: fuzzer: ossfuzz id: 57107 datereported: 2023-03-14 reportedby: David Korczynski vulnerability: Infinite loop till out of memory. product: libdwarf description: The infinite loop reading a fuzzed object file was caused by letting internal function _dwarf_find_CU_Context_given_sig() unconditionally do too much in the middle of setting up a CU_Context (by letting it start more CU_contexts(). The implicit infinite loop has been there a few years, depending on the correctness of object files DWARF4/DWARF5 being read. datefixed: 2023-03-23 references: regressiontests/ossfuzz57107/fuzz_die_cu_attrs_loclist-4991396240293888 gitfixid: 0c92ef5b66c5bbcacae03fbf355b12713151c098 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-032 id: DW202303-031 cve: fuzzer: ossfuzz id: 57048 datereported: 2023-03-14 reportedby: David Korczynski vulnerability: product: libdwarf description: Calling dwarf_next_cu_header_d() on a corrupted object file results in an infinite loop and (eventually) a crash in dwarf_xu_index.c attempting to resolve an 8 byte hash key. The bug existed from the first version of this source file. The same bug as DW202303-030. datefixed: 2023-03-22 references: regressiontests/ossfuzz57048/fuzz_findfuncbypc-4647942385696768 gitfixid: 774f98e596df9dd8f3cb92ec76243caaa4287039 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-031 id: DW202303-030 cve: fuzzer: ossfuzz id: 57027 datereported: 2023-03-12 reportedby: David Korczynski vulnerability: Infinite loop reading a gnu index section. product: libdwarf description: Calling dwarf_next_cu_header_d() on a corrupted object file results in an infinite loop and (eventually) a crash in dwarf_xu_index.c attempting to resolve an 8 byte hash key. The bug existed from the first version of this source file, which was in 2017 as the data involved DWARF5, new in 2017. datefixed: 2023-03-22 references: regressiontests/ossfuzz57027/fuzz_stack_frame_access-5123569972805632 gitfixid: 774f98e596df9dd8f3cb92ec76243caaa4287039 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-030 id: DW202303-029 cve: fuzzer: ossfuzz id: 56993 datereported: 2023-03-12 reportedby: David Korczynski vulnerability: Leaked Memory product: libdwarf description: Calling dwarf_get_macro_context on a particular fuzzed object file results in a memory leak when a particular error in the corrupted section is detected. The malloc was done by the line table reader code. The bug was there for many years datefixed: 2023-03-22 references: regressiontests/ossfuzz56993/fuzz_macro_dwarf5-5770464300761088 gitfixid: 5fde5e404a98c6727889cf14d8f93ec2138a6fa tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-029 id: DW202303-028 cve: fuzzer: ossfuzz id: 56958 datereported: 2023-03-12 reportedby: David Korczynski vulnerability: Out of memory crash. product: libdwarf description: Failing to check for error conditions in a fuzzed object correctly lead to a giant malloc that could not succeed. datefixed: 2023-03-22 references: regressiontests/ossfuzz56958/fuzz_stack_frame_access-6097292873826304 gitfixid: b9393bb9b6399a34f8616a272d030bdd004a5ef5 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-028 id: DW202303-027 cve: fuzzer: ossfuzz id: 56906 datereported: 2023-03-09 reportedby: David Korczynski vulnerability: Heap Buffer overflow reading rnglists section. product: libdwarf description: Calling dwarf_get_rnglist_rle() on a corrupted object file could result in a library crash. datefixed: 2023-03-22 references: regressiontests/ossfuzz56906/fuzz_rng-6031783801257984.fuzz gitfixid: b9393bb9b6399a34f8616a272d030bdd004a5ef5 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-027 id: DW202303-026 cve: fuzzer: ossfuzz id: 56897 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Heap buffer overflow reading the rnglists section product: libdwarf description: dwarf_get_rnglist_offset_index_value() could fail on a corrupt object due to imprecise calculations of entry offsets. Fixed by a major update of the code in dwarf_rnglists.c datefixed: 2023-03-22 references: regressiontests/ossfuzz56897/fuzz_rng-5105415777288192 gitfixid: b9393bb9b6399a34f8616a272d030bdd004a5ef5 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-026 id: DW202303-025 cve: fuzzer: ossfuzz id: 56895 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Heap buffer overflow reading compilation unit header. product: libdwarf description: Calling dwarf_next_cu_header_d() on the fuzzed test object results in a library crash in fuzz_die_cu_attrs_loclist.c due to a failure to precisely test for a too-short Compilation Unit header. Now a DW_DLV_ERROR is returned. A very old bug. datefixed: 2023-03-24 references: regressiontests/ossfuzz56895/fuzz_macro_dwarf5-5080340952907776 gitfixid: 771cfcca1ef6a4a7eb9595d700fc72020d0ed72e tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-025 id: DW202303-024 cve: fuzzer: ossfuzz id: 56807 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Memory Leak in dwarf_check_lineheader_b() product: libdwarf description: The fuzzed test object file resulted in a memory leak calling dwarf_check_lineheader_b() as called from fuzz_srcfiles.c Two error conditions in dwarf_line_table_reader_common.h were missing a required free(). datefixed: 2023-03-24 references: regressiontests/ossfuzz56807/fuzz_srcfiles-4626047380619264 gitfixid: 484f50ef8be0506be2e4b5fbad489868db5c7985 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-024 id: DW202303-023 cve: fuzzer: ossfuzz id: 56568 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Test build failure product: Test harness description: The fuzz_dnames.c testcase build failed. A result of removing two functions from the API, dwarf_dnames_abbrev_by_code() and dwarf_dnames_abbrev_form_by_index(). Removed 2023-02-23. The test source no longer uses those two functions. The first was slow and hard to use. The second was unusable and never worked. The documentation (libdwarf.pdf) gives alternates in the library that work. datefixed: 2023-03-20 references: gitfixid: 2eced75af9903ab778c3b237ec7be3ddc93ea6ec tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-023 id: DW202303-022 cve: fuzzer: ossfuzz id: 56497 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Memory Leak product: test harness description: The leak was due to the test driver fuzz/fuzz_rng.c failing to call dwarf_finish at the point of returning as a result of the corrupted binary returning an error condition. datefixed: 2023-03-20 references: regressiontests/ossfuzz56497/ gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-022 id: DW202303-021 cve: fuzzer: ossfuzz id: 56487 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Memory Leak product: testing harness description: The leak was due to the test driver fuzz/fuzz_rng.c failing to call dwarf_finish at the point of returning as a result of the corrupted binary returning an error condition. datefixed: 2023-03-20 references: regressiontests/ossfuzz56487/clusterfuzz-testcase-fuzz_rng-6655451078197248 gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-021 id: DW202303-020 cve: fuzzer: ossfuzz id: 56458 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Heap buffer overflow product: libdwarf description: The overflow encountered when reading a corrupted line table header in read_a_name_table_header in dwarf_debugnames.c There was insufficient checking for out of bounds values. datefixed: 2023-03-20 references: regressiontests/ossfuzz56458/fuzz_findfuncbypc-5073632331431936 gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-020 id: DW202303-019 cve: fuzzer: ossfuzz id: 56454 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Stack buffer overflow product: libdwarf description: The overflow was in dwarf_get_version_of_die() One return failed to free a local malloc due to the particular corruption in the text object DWARF. datefixed: 2023-03-20 references: regressiontests/ossfuzz56454/ gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-019 id: DW202303-018 cve: fuzzer: ossfuzz id: 56807 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Memory leak reading line table product: libdwarf description: A memory leak in _dwarf_read_line_table() reading a particular corrupted object. One return failed to free a local malloc. An very old bug, encountered reading corrupted DWARF line tables. datefixed: 2023-03-20 references: regressiontests/ossfuzz56807fuzz_srcfiles-4626047380619264 gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-018 id: DW202303-017 cve: fuzzer: ossfuzz id: 56450 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Stack Buffer Overflow product: libdwarf description: Stack buffer overflow in dwarf_dietype_offset. Reading a corrupted object file. The bug was in the test code, not libdwarf. Having fixed that, valgrind finds that some memory is not freed by dwarf_finish(). In dwarf_alloc.c March 20 _dwarf_free_all_of_one_debug() if the Dwarf_Debug was normal we failed to call _dwarf_free_static_errlist() and that left memory allocated from a bogus earlier call to the library (a situation libdwarf should handle and now does). datefixed: 2023-05-30 references: regressiontests/ossfuzz56450/fuzz_die_cu_attrs-4953133005799424 gitfixid: tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202303-017 id: DW202303-016 cve: fuzzer: ossfuzz id: 56476 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Heap Buffer Overflow in dwarf_get_rnglist_offset_value product: libdwarf description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files datefixed: 2023-03-12 references: regressiontests/ossfuzz56476/fuzz_rng-5008229349588992/ gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-016 id: DW202303-015 cve: fuzzer: ossfuzz id: 56489 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Heap Buffer Overflow in read_single_rle_entry product: libdwarf description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files datefixed: 2023-03-12 references: regressiontests/ossfuzz56489/fuzz_srcfiles-5091530466787328 gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-015 id: DW202303-014 cve: fuzzer: ossfuzz id: 56478 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Heap Buffer Overflow in read_single_rle_entry product: libdwarf description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files datefixed: 2023-03-12 references: regressiontests/ossfuzz56478/fuzz_rng-5030515398017024 gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-014 id: DW202303-013 cve: fuzzer: ossfuzz id: 56460 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Heap Buffer Overflow product: libdwarf description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files datefixed: 2023-03-12 references: regressiontests/ossfuzz56460/fuzz_str_offsets-5376904040677376-5240324382654464 gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-013 id: DW202303-012 cve: fuzzer: ossfuzz id: 56456 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Heap Buffer Overflow product: libdwarf description: A heap buffer overflow reading a fuzzed object file Code reading the gdbindex section was not fully checking for valid offsets and pointers Duplicate of DW202303-006 datefixed: 2023-03-14 references: regressiontests/ossfuzz56456/fuzz_gdbindex-5240324382654464 gitfixid: e564c9350c104f16eb2223d7b29082e3deb5d2fb tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-012 id: DW202303-011 cve: fuzzer: ossfuzz id: 56453 datereported: 2023-02-28 reportedby: David Korczynski vulnerability: Null pointer dereference product: libdwarf description: A null pointer dereference in reading a fuzzed object file. This is related to checks for a correct value from the READ_AREA_LENGTH macro. The missing checks have been missing a very long time. datefixed: 2023-03-07 references: regressiontests/ossfuzz56453 gitfixid: 86671059c1c240ae56433fa94993dcd28df2ae7d tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-011 id: DW202303-010 cve: fuzzer: ossfuzz datereported: 2023-03-07 reportedby: Youngseok Choi vulnerability: Stack overflow dwarfdump product: dwarfdump description: A wholly corrupted speically constructed dwarfdump.conf which is entirely inappropriate ascii really made a mess of one's screen. Now after a couple lines of garbage we give up on that conf file. And we print the garbage sanitized to avoid messing up one's screen. The fix also avoids buffer overflow. datefixed: 2023-03-25 references: regressiontests/choi010/poc_file gitfixid: cb8dd45770f2e1f440aab60adac0256f268fc16e tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-010 id: DW202303-009 cve: fuzzer: oss-fuzz id: 56443 datereported: 2023-03-01 reportedby: David Korczynski vulnerability: Denial of service with corrupt line table header product: libdwarf description: With any one of a small set of corrupted data fields in a line table header that were not checked for sanity the library could try to malloc a giant space, which could take a long time to succeed or fail. After that almost anything could happen. Same as ossfuzz 56548. With the bug in 56548 fixed, now we still have a bug, there is a leak from _dwarf_special_no_dbg_error_malloc() -fsanitize does not show the bug here, but valgrind does datefixed: 2023-05-29 references: regressiontests/ossfuzz56443/fuzz_crc_32-4750941179215872 gitfixid: 241fe0cb415569975c451d1f2d62fb2b2147cd72 tarrelease: libdwarf-0.8.0.tar.xz endrec: DW202303-009 id: DW202303-008 cve: fuzzer: oss-fuzz id: 56530 datereported: 2023-03-01 reportedby: David Korczynski vulnerability: Denial of Service with corrupt attribute product: libdwarf description: With a particular data corruption dwarf_attrlist() failed to return an error and the library would dereference a stale pointer. This also provoked a memory leak. Same bug as DW202303-001 datefixed: 2023-03-02 references: ossfuzz56530/fuzz_findfuncbypc-6272642689925120 gitfixid: 948352178dc791796ed574a961191844d8322493 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-008 id: DW202303-007 cve: fuzzer: oss-fuzz id: 56735 datereported: 2023-03-04 reportedby: David Korczynski vulnerability: Denial of service with corrupt debug_macro section. product: libdwarf description: We were not checking .debug macro data for a corrupted internal macro length field. Now we check. datefixed: 2023-03-08 references: regressiontests/ossfuzz56735/fuzz_macro_dwarf5-6718585377783808 gitfixid: bb99fe7ddb2bc6601bcb0ee30ced6a8cc8cb0564 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-007 id: DW202303-006 cve: fuzzer: oss-fuzz id: 56456 datereported: 2023-03-04 reportedby: David Korczynski vulnerability: Denial of service (crash) looking for gdbindex section. product: libdwarf description: The logic was wrong in a couple places (fixed now) and almost nothing was checked for validity. Now we check, so to libdwarf do not result in a crash of the library. The bugs have been there since the code was written in 2014. datefixed: 2023-03-14 references: regressiontests/ossfuzz56456/fuzz_gdbindex-5240324382654464 gitfixid: e564c9350c104f16eb2223d7b29082e3deb5d2fb tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-006 id: DW202303-005 cve: fuzzer: oss-fuzz id: 56676 datereported: 2023-03-04 reportedby: David Korczynski vulnerability: Denial of service with corrupt frame section. product: libdwarf description: A call to dwarf_expand_frame_instructions() with corrupt data gets a segmentation violation. datefixed: 2023-03-14 references: regressiontests/ossfuzz56676/fuzz_set_frame_all-5081006119190528.fuzz gitfixid: e564c9350c104f16eb2223d7b29082e3deb5d2fb tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-005 id: DW202303-004 cve: fuzzer: oss-fuzz id: 56666 datereported: 2023-03-04 reportedby: David Korczynski vulnerability: Denial of service with corrupt gnu_index section product: libdwarf description: A corrupted .debug_gnu_index header was not properly checked, and the calculation setting up the table in memory was not correctly set up. datefixed: 2023-03-08 references: regressiontests/ossfuzz56666/fuzz_gnu_index-4803574417981440 gitfixid: 64eaaa58703258cab02896e798664a1bb11a3d5c tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-004 id: DW202303-003 cve: fuzzer: oss-fuzz id: 56636 datereported: 2023-03-03 reportedby: David Korczynski vulnerability: Denial of service with corrupt .debug_addr section product: libdwarf description: A corrupted .debug_addr header was not properly checked, and the calculation setting up the table in memory was not correctly set up. Calling dwarf_debug_addr_by_index() could crash the calling application. datefixed: 2023-03-03 references: regressiontests/ossfuzz56636/fuzz_debug_addr_access-4801779658522624.fuzz gitfixid: a3ab3f16ab67f4d976561fe0d863e1ed8b71f3c6 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-003 id: DW202303-002 cve: fuzzer: oss-fuzz id: 56548 datereported: 2023-03-01 reportedby: David Korczynski vulnerability: Denial of service with corrupt line table header product: libdwarf description: With any one of a small set of corrupted data fields in a line table header that were not checked for sanity the library could try to malloc a giant space, which could take a long time to succeed or fail. After that almost anything could happen. Same bug fix as 56443 datefixed: 2023-03-03 references: regressiontests/ossfuzz56548/fuzz_findfuncbypc-5073632331431936 gitfixid: 89d3beccd161657760585967255bbabf67e5b4c9 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-002 id: DW202303-001 cve: fuzzer: oss-fuzz id: 56465 datereported: 2023-03-01 reportedby: David Korczynski vulnerability: Denial of Service with corrupt attribute product: libdwarf description: With a particular data corruption dwarf_attrlist() failed to return an error and the library would dereference a stale pointer. This also provoked a memory leak. datefixed: 2023-03-02 references: regressiontests/ossfuzz56465/fuzz_die_cu_offset-5866690199289856 gitfixid: 948352178dc791796ed574a961191844d8322493 tarrelease: libdwarf-0.7.0.tar.xz endrec: DW202303-001 id: DW202301-001 cve: fuzzer: datereported: 2023-01-24 reportedby: Steve Kaufmann vulnerability: Denial of Service with DW_FORM_strx3 product: libdwarf description: Any use of DW_FORM_strx3 or DW_FORM_addrx3 would get libdwarf very confused and incorrect return values and or a library crash might result. datefixed: 2023-01-24 references: regressiontests/kaufmann2/ct-bad.o gitfixid: 97e90eb7ab98df60b8da0bdc2ac855711c4db804 tarrelease: libdwarf-0.6.0.tar.xz endrec: DW202301-001 id: DW202212-001 cve: fuzzer: oss-fuzz datereported: 2022-12-28 reportedby: David Korczynski vulnerability: Denial of Service with fuzzed object. product: libdwarf description: The fuzzed testcase has at least four major errors which libdwarf did not catch, leading to unpredictable library behavior, possibly including crashing the calling program. Things not noticed before the fix (and now resulting in error being reported): A) The object has just 2 sections, too few to be real. at least 3 sections are needed to contain DWARF information of any kind. B) Section zero has non-zero contents, in violation of the Elf object specification. C) The header says section strings are in section zero (a violation of the Elf specification). D) Section 1 masquerades as .note.gnu.debug-id and the description size is gigantic (as is the section, which fits the description field length). datefixed: 2023-01-09 references: regressiontests/ossfuzz54724/clusterfuzz-54724-poc gitfixid: 45f6d778811553a835916b60845933e6dda63b7f tarrelease: libdwarf-0.6.0.tar.xz endrec: DW202212-001 id: DW202208-001 cve: fuzzer: unspecified datereported: 2022-08-27 reportedby: Han Zheng vulnerability: Double free on corrupted frame data. product: libdwarf description: A carefully corrupted object file would cause libdwarf to do a double free in handling an error condition in dwarf_expand_frame_instructions(). (in libdwarf/dwarf_frame.c) That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. datefixed: 2022-08-27 references: regressiontests/hanzheng/fuzzedobject gitfixid: 428235e3d132fb62faf7732735fdbb034d6264b4 tarrelease: libdwarf-0.5.0.tar.xz endrec: DW202208-001 id: DW202207-001 cve: fuzzer: ossfuzz datereported: 2022-05-01 reportedby: David Korczynski vulnerability: buffer overflow in dwarf_form.c product: libdwarf description: A carefully corrupted string would cause libdwarf to read outside of a buffer containing the string (one past the end) when checking the string to determine if it is a full path in processing a .gnu.debuglink section. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. datefixed: 2022-07-23 references: regressiontests/ossfuzz47150/clusterfuzz-testcase-minimized-fuzz_init_path-6727387238236160.fuzz gitfixid: 24dff940cc4c71a9c3cb5475aee231b19163a12c tarrelease: libdwarf-0.5.0.tar.xz endrec: DW202207-001 id: DW202206-001 cve: fuzzer: datereported: 2022-06-15 reportedby: Casper Sun vulnerability: buffer overflow in dwarf_form.c product: libdwarf description: A carefully corrupted .debug_info section would cause libdwarf to read outside of a buffer containing a Dwarf_Sig8 symbolic reference. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. This failure to check for buffer overflow has been present since DWARF4 when DW_FORM_ref_sig8 was added to libdwarf. datefixed: 2022-06-15 references: regressiontests/sleicasper2/buffer-overflow-dwarf-form gitfixid: 7ef09e1fc9ba07653dd078edb2408631c7969162 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202206-001 id: DW202205-001 cve: fuzzer: datereported: 2022-05-26 reportedby: Casper Sun vulnerability: buffer overflow in dwarf_globals.c product: libdwarf description: A carefully corrupted .debug_pubnames section would cause libdwarf to read outside of a buffer containing the section contents. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. The bug has been present for many years. datefixed: 2022-05-29 references: regressiontests/sleicasper/bufferoverflow gitfixid: 8151575a6ace77d005ca5bb5d71c1bfdba3f7069 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202205-001 id: DW202111-016 cve: fuzzer: oss-fuzz-41240 datereported: 2021-11-20 reportedby: David Korczynski vulnerability: Out-of-memory in fuzz_init_path product: libdwarf description: A corrupted object. The PE object section header for section .gnu_debuglink is corrupted. A very large number is in the VirtualSize field. Attempting a malloc for the section could succeed or might fail, resulting in Denial Of Service.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41240
  
datefixed: 2021-11-21 references: regressiontests/ ossfuzz41240/clusterfuzz-testcase-minimized-fuzz_init_path-5929343686148096 gitfixid: a120c808234060c3c9b1872ab9a059aa1ac70b1d tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-016 id: DW202111-015 cve: fuzzer: oss-fuzz-40896 datereported: 2021-11-10 reportedby: David Korczynski vulnerability: Out-of-memory in fuzz_init_path product: libdwarf description: A corrupted object. Several Elf section sizes and section offsets are larger than the file size.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40896
  
datefixed: 2021-11-12 references: regressiontests/ossfuzz40896/clusterfuzz-testcase-fuzz_init_path-5337872492789760 regressiontests/ossfuzz40896/clusterfuzz-testcase-minimized-fuzz_init_path-5337872492789760 gitfixid: b7a119dc07c502c1334bcbf8dd04ca0e4d5f6ab6 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-015 id: DW202111-014 cve: fuzzer: oss-fuzz-40895 datereported: 2021-11-10 reportedby: David Korczynski vulnerability: Out-of-memory in fuzz_init_binary product: libdwarf description: A corrupted object. Some Elf section sizes are larger than the file size.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40895
  
datefixed: 2021-11-12 references: regressiontests/ossfuzz40895/clusterfuzz-testcase-fuzz_init_binary-4805508242997248 regressiontests/ossfuzz40895/clusterfuzz-testcase-minimized-fuzz_init_binary-4805508242997248 gitfixid: b7a119dc07c502c1334bcbf8dd04ca0e4d5f6ab6 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-014 id: DW201907-001 cve: CVE-2019-14249 fuzzer: datereported: 2019-07-23 reportedby: unknown vulnerability: Denial of service with zero size section group product: libdwarf description: dwarf_elf_load_headers.c in libdwarf before 2019-07-05 allows attackers to cause a denial of service (division by zero) via an ELF file with a zero-size section group (SHT_GROUP), as demonstrated by dwarfdump. datefixed: 2019-07-05 references: gitfixid: cb7198abde46c2ae29957ad460da6886eaa606ba tarrelease: libdwarf-0.4.1.tar.xz endrec: DW201907-001 id: DW202111-013 cve: fuzzer: oss-fuzz-40802 datereported: 2021-11-07 reportedby: David Korczynski vulnerability: Null-dereference READ in dwarf_object_init_b product: libdwarf description: A corrupted object. The error handling code in dwarf_object_init_b was not properly dealing with a NULL pointer Dwarf_Error *errp in the test code.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40802
  
datefixed: 2021-11-19 references: regressiontests/ossfuzz40802/ clusterfuzz-testcase-fuzz_init_binary-5538015955517440.fuzz regressiontests/ossfuzz40802/clusterfuzz-testcase-minimized-fuzz_init_binary-5538015955517440.fuzz gitfixid: adf4dae25b39039f1821b095688c00f3010e1d37 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-013 id: DW202111-012 cve: fuzzer: oss-fuzz-40801 datereported: 2021-11-07 reportedby: David Korczynski vulnerability: Timeout in fuzz_init_path product: libdwarf description: A corrupted object. libdwarf detects it quickly now.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40801
  
datefixed: 2021-11-07 references: regressiontests/ossfuzz801/clusterfuzz-testcase-fuzz_init_path-5443517279764480 regressiontests/ossfuzz40801/clusterfuzz-testcase-minimized-fuzz_init_path-5443517279764480 gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-012 id: DW202111-011 cve: fuzzer: oss-fuzz-40799 datereported: 2021-11-02 reportedby: David Korczynski vulnerability: Out-of-memory in fuzz_init_path product: libdwarf description: A corrupted object. Gigantic section sizes or offsets were provoking a large malloc. Now these are detected and no malloc is attempted (an error is returned).
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40799
  
datefixed: 2021-11-07 references: regressiontests/ossfuzz40799/clusterfuzz-testcase-fuzz_init_path-5245778948390912 regressiontests/ossfuzz40799/clusterfuzz-testcase-minimized-fuzz_init_path-5245778948390912 gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-011 id: DW202111-010 cve: fuzzer: oss-fuzz-40627 datereported: 2021-11-02 reportedby: David Korczynski vulnerability: Abrt in _dwarf_error_string product: libdwarf description: The Elf object file has some corruption. The read now stops with an error.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40627
  
datefixed: 2021-11-07 references: regressiontests/ossfuzz40627/clusterfuzz-testcase-fuzz_init_path-5186858573758464 regressiontests/ossfuzz40627/clusterfuzz-testcase-minimized-fuzz_init_path-5186858573758464 gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-010 id: DW202111-009 cve: fuzzer: oss-fuzz-40729 datereported: 2021-11-05 reportedby: David Korczynski vulnerability: Timeout - fuzz_init_binary product: libdwarf description: The object file (macho 64 bit) has some header fuzzing that was not caught reading the object until the macho reader tried a gigantic malloc.. Now the library code catches the error before malloc and returns an error code.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40729
  
datefixed: 2021-11-07 references: regressiontests/ossfuzz40729/clusterfuzz-testcase-minimized-fuzz_init_binary-4791627277795328 gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-009 id: DW202111-008 cve: fuzzer: oss-fuzz-40731 datereported: 2021-11-03 reportedby: David Korczynski vulnerability: Out-of-memory in fuzz_init_binary product: libdwarf description: The fuzzed macho64 object has corrupted headers. The library notices and reports an error.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40731
  
datefixed: 2021-11-07 references: regressiontests/ossfuzz40731/clusterfuzz-testcase-fuzz_init_binary-5983147574034432 gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-008 id: DW202111-005 cve: fuzzer: oss-fuzz-40674 datereported: 2021-11-03 reportedby: David Korczynski vulnerability: Heap-buffer-overflow in _dwarf_elf_setup_all_section_groups product: libdwarf description: Object file has corrupt section group information. Results in buffer overflow.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40674#c6
  
datefixed: 2021-11-07 references: regressiontests/ossfuzz40674/clusterfuzz-testcase-minimized-fuzz_init_path-6557751518560256 gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-005 id: DW202111-004 cve: fuzzer: oss-fuzz-40673 datereported: 2021-11-03 reportedby: David Korczynski vulnerability: Null-dereference READ in dwarf_object_init_b product: libdwarf description: The macho object has corrupted headers and now mentions that and stops. Verified as fixed by oss-fuzz 2021-11-03
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40673
  
datefixed: 2021-11-05 references: regressiontests/ossfuzz40673/clusterfuzz-testcase-minimized-fuzz_init_path-6240961391362048.fuzz gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-004 id: DW202111-003 cve: fuzzer: oss-fuzz-40671 datereported: 2021-11-03 reportedby: David Korczynski vulnerability: Direct-leak in _dwarf_get_debug product: libdwarf description: The test code is calling a libdwarf-internal function (which is against the rules, only libdwarf function names beginning with dwarf_ are callable. When building libdwarf as an archive there is no means to enforce this rule) doc/libdwarf.mm/pdf now documents this rule.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40671
  
datefixed: 2021-11-05 references: regressiontests/oss40671/clusterfuzz-testcase-fuzz_init_path-5455557297831936 regressiontests/oss40671/clusterfuzz-testcase-minimized-fuzz_init_path-5455557297831936 gitfixid: b40f7e291216e771185f62292dd6304b5a662926 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-003 id: DW202111-002 cve: fuzzer: oss-fuzz-40669 datereported: 2021-11-03 reportedby: David Korczynski vulnerability: Out-of-memory in fuzz_init_path product: libdwarf description: Corrupted MachO object can crash caller.b Two fields in the MachO file header were not checked for sanity so nonsense large values could lead to excessive malloc and or a caller segmentation violation. Fixed by DW202111-001. Verified as fixed by oss-fuzz
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40669
  
datefixed: 2021-11-04 references: regressiontests/ossfuzz40669/clusterfuzz-testcase-minimized-fuzz_init_path-5399726397194240 regressiontests/clusterfuzz-testcase-fuzz_init_path-5399726397194240 gitfixid: b40f7e291216e771185f62292dd6304b5a662926 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-002 id: DW202111-001 cve: fuzzer: oss-fuzz-40663 datereported: 2021-11-03 reportedby: David Korczynski vulnerability: Timeout in fuzz_init_path product: libdwarf description: Corrupted MachO object can crash caller Two fields in the MachO file header were not checked for sanity so nonsense large values could lead to excessive malloc and or a caller segmentation violation. Verified by oss-fuzz as fixed. The testcase has illegal libdwarf call and improper include statements.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40663
  
datefixed: 2021-11-04 references: regressiontests/ossfuzz40663/clusterfuzz-testcase-minimized-fuzz_init_path-6122542432124928 gitfixid: b40f7e291216e771185f62292dd6304b5a662926 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202111-001 id: DW202010-003 cve: CVE-2020-28163 datereported: 2020-10-27 reportedby: Casper Sun vulnerability: Passing null to %s due to corrupt line table header. product: libdwarf description: If a DWARF5 line table header has an invalid FORM for a pathname, the fi_file_name field may be null and printing it via %s can result in referencing memory at address 0, possibly generating segmentation violation or application crash. Now in case of null we provide a fixed string of and for the form code we print the value and so there are no unpredictable effects.

  This should be visible after redhat makes it public.
  Filed on bugzilla.redhat 23 November 2021.
  bugzilla.redhat.com/show_bug.cgi?id=2026000
  
datefixed: 2020-10-28 references: regressiontests/c-sun2/nullpointer gitfixid: faf99408e3f9f706fc3809dd400e831f989778d3 tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202010-003 id: DW202010-002 cve: CVE-2020-28162 datereported: 2020-10-27 reportedby: Casper Sun vulnerability: dwarfdump crashes if the nest of C scopes is too deep product: dwarfdump description: An object file where the DIEs depth of nesting exceeds the limit of 800 levels due to corruption or a compiler bug can result in exhausting the die stack array and writing past its end. A segmentation fault is possible. The code at the point of error was not adjusting the array index properly so an invalid dereference could occur. Now the test code is correct and the array overflow is detected resulting in a normal error return. Additional places where this could occur were identified and the proper test added.
  Unable to enter in bugzilla.redhat.com
  so CVE can be completed by Fedora (as CNA)
  as dwarfdump is not part of Fedora
  
datefixed: 2020-10-28 references: regressiontests/c-sun2/globaloverflow gitfixid: a7fa8edd640b74daf8e7a442dcec96640875b4fb tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202010-002 id: DW202010-001 cve: CVE-2020-27545 datereported: 2020-10-10 reportedby: Casper Sun vulnerability: A carefully corrupted line table can crash calling app product: libdwarf description: A carefully crafted object with an invalid line table could cause libdwarf to dereference a pointer reading a single byte outside of the intended .debug_line section and potentially outside of memory visible to the library. A segmentation fault is possible. The code testing for the error was coded incorrectly so an invalid dereference could occur. Now the test code is correct and the error is detected resulting in a normal error return.
  This should be visible after redhat makes it public.
  Filed on bugzilla.redhat 22 November 2021.
  bugzilla.redhat.com/show_bug.cgi?id=2025694
  
datefixed: 2020-10-17 references: regressiontests/c-sun/poc gitfixid: 95f634808c01f1c61bbec56ed2395af997f397ea tarrelease: libdwarf-0.4.1.tar.xz endrec: DW202010-001 id: DW201801-001 cve: datereported: 2018-01-28 reportedby: Agostino Sarubbo vulnerability: Incorrect frame section can crash dwarfdump product: dwarfdump description: A carefully crafted object with an invalid frame section set of initial-instructions can crash the frame-instructions decode in dwarfdump. In addition, a couple places in libdwarf are not as careful in checking frame data as they should be. A segmentation-fault/core-dump is possible. datefixed: 2018-01-29 references: sarubbo-11/testcase{1,2,3,4,5}.bin gitfixid: 7af0ecddfafed88446969cbf8c888356ad485d99 tarrelease: libdwarf-20180129.tar.gz endrec: DW201801-001 id: DW201712-001 cve: datereported: 2017-12-01 reportedby: Agostino Sarubbo vulnerability: Incorrect frame section could let caller crash product: libdwarf description: A carefully crafted object with an invalid frame section can result in passing back data to a caller of dwarf_get_fde_augmentation_data() is erroneous and will result in the caller reference off the end of the frame section. A segmentation-fault/core-dump is possible. datefixed: 2017-12-01 references: sarubbo-10/1.crashes.bin gitfixid: 329ea8e56bc9550260cae6e2e9756bfbe7e2ff6d tarrelease: libdwarf-20180129.tar.gz endrec: DW201712-001 id: DW201711-002 cve: datereported: 2017-11-08 reportedby: Agostino Sarubbo vulnerability: Incorrect line table section could crash caller product: libdwarf description: An carefully crafted object with a invalid line table section crafted to end early at a particular point resulted in dereferencing outside the line table from libdwarf/dwarf_line_table_reader_common.c . A segmentation-fault/core-dump is possible. datefixed: 2017-11-08 references: regressiontests/sarubbo-9/3.crashes.bin gitfixid: a1644f4dde7dd5990537ff7ad22a9e94b8723186 tarrelease: libdwarf-20180129.tar.gz endrec: DW201711-002 id: DW201711-001 cve: datereported: 2017-11-01 reportedby: Agostino Sarubbo vulnerability: Incorrect frame section could crash caller product: libdwarf description: A carefully crafted object with a resulting invalid frame section with DW_CFA_advance_loc1 implying data off-the-end-of-section will dereference an invalid pointer. A segmentation fault and core dump is possible. Corrected code checks now. datefixed: 2017-11-02 references: regressiontests/sarubbo-8/1.crashes.bin gitfixid: 44349d7991e44dd3751794f76537cabcf65ee28d tarrelease: libdwarf-20180129.tar.gz endrec: DW201711-001 id: DW201709-001 cve: datereported: 2017-09-19 reportedby: Agostino Sarubbo vulnerability: Incorrect abbrev section could crash caller. product: libdwarf description: A fuzzed object with a resulting invalid abbrev section where the end of section follows an abbrev tag would dereference a non-existent has-child byte. datefixed: 2017-09-26 references: regressiontests/sarubbo-3/1.crashes.bin gitfixid: bcc2e33908e669bacd397e3c941ffd1db3005d17 tarrelease: libdwarf-20180129.tar.gz endrec: DW201709-001 id: DW201706-001 cve: CVE-2017-9998 datereported: 2017-06-28 reportedby: team OWL337 vulnerability: Addition overflow in libdwarf leads to segmentation violation product: libdwarf description: A fuzzed object with a resulting invalid value can overflow when added to a valid pointer (depending on how the runtime memory is laid out) and thereafter a dereference results in a segmentation violation).
 see
  https://bugzilla.redhat.com/show_bug.cgi?id=1465756
  for contact information of those finding the bug.
  Fabian Wolff sent email and provided
  the link to the web page.
 
datefixed: 2017-07-06 references: regressiontests/wolff/POC1 gitfixid: e91681e8841291f57386f26a90897fd1dcf92a6e tarrelease: libdwarf-20180129.tar.gz endrec: DW201706-001 id: DW201703-007 cve: datereported: 2017-03-21 reportedby: Marcel Bohme and Van-Thuan Pham vulnerability: Heap overflow in strncmp (libelf bug) product: libdwarf (libelf) description: 7/7. A heap overflow in strncmp() is due to libelf failing to check arguments to elf_ strptr. This is not a bug in libdwarf, it is a libelf bug. A pointer for being in bounds (in a few places in this function) and a failure in a check in dwarf_attr_list(). The test object is intentionally corrupted (fuzzed).
 A portion of sanitizer output with Ubuntu 14.04:
 ==180133==ERROR: AddressSanitizer: heap-buffer-overflow
   on address 0x60d00000cff1 at pc 0x0000004476f4
   bp 0x7fff87dd7dd0 sp 0x7fff87dd7590
 READ of size 8 at 0x60d00000cff1 thread T0
    #0 0x4476f3 in __interceptor_strncmp (/home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/dwarfdump+0x4476f3)
    #1 0x7992ae in this_section_dwarf_relevant /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:608:13
    #2 0x781064 in _dwarf_setup /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:722:14
    #3 0x77d59c in dwarf_object_init /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:922:20

 With Ubuntu 16.04 libelf dwarfdump gets:
 ERROR:  dwarf_elf_init:  DW_DLE_ELF_STRPTR_ERROR (30)
 a call to elf_strptr() failed trying to get a section name
 
Fix date is irrelevant, libdwarf no longer uses libelf. datefixed: 2017-07-06 references: regressiontests/marcel/crash7 gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1 tarrelease: libdwarf-20180129.tar.gz endrec: DW201703-007 id: DW201703-006 cve: CVE-2017-9052 datereported: 2017-03-21 reportedby: Marcel Bohme and Van-Thuan Pham vulnerability: Heap overflow in dwarf_formsdata product: libdwarf description: 6/7. A heap overflow in dwarf_formsdata() is due to a failure to check a pointer for being in bounds (in a few places in this function) and a failure in a check in dwarf_attr_list(). The test object is intentionally corrupted (fuzzed).
 A portion of sanitizer output with Ubuntu 14.04:
 ==180130==ERROR: AddressSanitizer: heap-buffer-overflow
  on address 0x61100000589c at pc 0x0000006cab95
  bp 0x7fff749aab10 sp 0x7fff749aab08
 READ of size 1 at 0x61100000589c thread T0
    #0 0x6cab94 in dwarf_formsdata /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_form.c:937:9
    #1 0x567daf in get_small_encoding_integer_and_name /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:1533:16
    #2 0x562f28 in get_attr_value /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:5030:24
    #3 0x555f86 in print_attribute /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:3357:13

 After fixes applied dwarfdump says:
 ERROR:  dwarf_attrlist:  DW_DLE_DW_DLE_ATTR_OUTSIDE_SECTION(281)
 
datefixed: 2017-03-21 references: regressiontests/marcel/crash6 gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1 tarrelease: libdwarf-20180129.tar.gz endrec: DW201703-006 id: DW201703-005 cve: CVE-2017-9053 datereported: 2017-03-21 reportedby: Marcel Bohme and Van-Thuan Pham vulnerability: Heap overflow in _dwarf_read_loc_expr_op() product: libdwarf description: 5/7. A heap overflow in _dwarf_read_loc_expr_op() is due to a failure to check a pointer for being in bounds (in a few places in this function). The test object is intentionally corrupted (fuzzed).
 A portion of sanitizer output with Ubuntu 14.04:
 ==180112==ERROR: AddressSanitizer: heap-buffer-overflow
  on address 0x60800000bf72 at pc 0x00000084dd52
  bp 0x7ffc12136fd0 sp 0x7ffc12136fc8
 READ of size 1 at 0x60800000bf72 thread T0
    #0 0x84dd51 in _dwarf_read_loc_expr_op /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc.c:250:9
    #1 0x841f16 in _dwarf_get_locdesc_c /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc2.c:109:15
    #2 0x837d08 in dwarf_get_loclist_c /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc2.c:685:18
    #3 0x57dff2 in get_location_list /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:3812:16

 After fixes applied dwarfdump says:
 ERROR:  dwarf_get_loclist_c:  DW_DLE_LOCEXPR_OFF_SECTION_END
 (343) Corrupt dwarf
 
datefixed: 2017-03-21 references: regressiontests/marcel/crash5 gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1 tarrelease: libdwarf-20180129.tar.gz endrec: DW201703-005 id: DW201703-004 cve: datereported: 2017-03-21 reportedby: Marcel Bohme and Van-Thuan Pham vulnerability: Heap overflow in set_up_section strlen product: libdwarf (libelf) description: 4/7. An apparent heap overflow that gives the appearance of being in libdwarf is due to libelf call elf_strptr() failing to fully check that its arguments make sense. This is not a bug in libdwarf, it is a libelf bug. The test object is intentionally corrupted (fuzzed). The submission was with Ubuntu 14.04. With Ubuntu 16.04 there is no sanitizer error report. As of 2023 libdwarf no longer calls or references libelf.
 A portion of sanitizer output with Ubuntu 14.04:
 ==180109==ERROR: AddressSanitizer: heap-buffer-overflow
   on address 0x60b00000b000 at pc 0x00000048fd12
   bp 0x7fff4ad31ef0 sp 0x7fff4ad316b0
 READ of size 16 at 0x60b00000b000 thread T0
    #0 0x48fd11 in __interceptor_strlen (/home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/dwarfdump+0x48fd11)
    #1 0x7a84a4 in set_up_section /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:285:27
    #2 0x79aaa5 in enter_section_in_de_debug_sections_array /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:355:5
    #3 0x78170b in _dwarf_setup /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:746:19

 With Ubuntu 16.04 libelf one gets:
 ERROR:  dwarf_elf_init:  DW_DLE_ELF_STRPTR_ERROR (30)
 a call to elf_strptr() failed trying to get a section name
 
datefixed: references: regressiontests/marcel/crash4 gitfixid: tarrelease: libdwarf-20180129.tar.gz endrec: DW201703-004 id: DW201703-003 cve: datereported: 2017-03-21 reportedby: Marcel Bohme and Van-Thuan Pham vulnerability: Heap overflow in strcmp product: libdwarf (libelf) description: 3/7. An apparent heap overflow that gives the appearance of being in libdwarf is due to libelf call elf_strptr() failing to fully check that its arguments make sense. This is not a bug in libdwarf, it is a libelf bug. The test object is intentionally corrupted (fuzzed). The submission was with Ubuntu 14.04. With Ubuntu 16.04 there is no sanitizer error report. A portion of sanitizer output with Ubuntu 14.04:
  ==180106==ERROR: AddressSanitizer: heap-buffer-overflow
    on address 0x60f00000ef09 at pc 0x000000447300
    bp 0x7ffc667dce10 sp 0x7ffc667dc5d0
  READ of size 4 at 0x60f00000ef09 thread T0
    #0 0x4472ff in __interceptor_strcmp (/home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/dwarfdump+0x4472ff)
    #1 0x79938f in this_section_dwarf_relevant /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:612:12
    #2 0x781064 in _dwarf_setup /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:722:14
    #3 0x77d59c in dwarf_object_init /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:922:20
    #4 0x899d4f in dwarf_elf_init_file_ownership /
 
With Ubuntu 16.04 libelf one gets: ERROR: dwarf_elf_init: DW_DLE_ELF_STRPTR_ERROR (30) a call to elf_strptr() failed trying to get a section name Fix date is irrelevant, libdwarf no longer uses libelf. datefixed: references: regressiontests/marcel/crash3 gitfixid: tarrelease: libdwarf-20180129.tar.gz endrec: DW201703-003 id: DW201703-002 cve: CVE-2017-9054 datereported: 2017-03-21 reportedby: Marcel Bohme and Van-Thuan Pham vulnerability: Heap overflow in _dwarf_decode_s_leb128_chk() product: libdwarf description: 2/7. In _dwarf_decode_s_leb128_chk() a byte pointer was dereferenced just before was checked as being in bounds. The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output:
  .debug_line: line number info for a single cu
  ==180103==ERROR: AddressSanitizer: heap-buffer-overflow
    on address 0x610000007ffc at pc 0x0000007b0f5b
    bp 0x7ffe06bbf510 sp 0x7ffe06bbf508
  READ of size 1 at 0x610000007ffc thread T0
    #0 0x7b0f5a in _dwarf_decode_s_leb128_chk /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_leb.c:304:9
    #1 0x7e753e in read_line_table_program /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./
       dwarf_line_table_reader_common.c:1167:17
    #2 0x7d7fe3 in _dwarf_internal_srclines /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./dwarf_line.c:690:15
    #3 0x7f9dbb in dwarf_srclines_b /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./dwarf_line.c:944:12
    #4 0x5caaa5 in print_line_numbers_this_cu /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_lines.c:762:16

  After fix applied one gets:
  ERROR:  dwarf_srclines:  DW_DLE_LEB_IMPROPER (329)
  Runs off end of section or CU
 
datefixed: 2017-03-21 references: regressiontests/marcel/crash2 gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1 tarrelease: libdwarf-20180129.tar.gz endrec: DW201703-002 id: DW201703-001 cve: CVE-2017-9055 datereported: 2017-03-21 reportedby: Marcel Bohme and Van-Thuan Pham vulnerability: Heap overflow in dwarf_formsdata product: libdwarf description: 1/7. In dwarf_formsdata() a few data types were not checked as being in bounds. The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output:
 LOCAL_SYMBOLS:
 < 1><0x0000002f>    DW_TAG_subprogram

 ==180088==ERROR: AddressSanitizer: heap-buffer-overflow on
  address 0x60800000bf72 at pc 0x0000006cab95 bp
  0x7fff31425830 sp 0x7fff31425828
  READ of size 1 at 0x60800000bf72 thread T0
    #0 0x6cab94 in dwarf_formsdata /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_form.c:937:9
    #1 0x567daf in get_small_encoding_integer_and_name /home/
       ubuntu/subjects/build-asan/libdwarf/dwarfdump/print_die.c:1533:16
    #2 0x576f38 in check_for_type_unsigned /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:4301:11
    #3 0x56ad8c in formxdata_print_value /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:4374:39
    #4 0x5643be in get_attr_value /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:5140:24
    #5 0x555f86 in print_attribute /home/ubuntu/subjects/build
  ...

  After fixes applied dwarfdump gets:
  ERROR:  dwarf_attrlist:  DW_DLE_DW_DLE_ATTR_OUTSIDE_SECTION(281)
 
datefixed: 2017-03-21 references: regressiontests/marcel/crash1 gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1 tarrelease: libdwarf-20180129.tar.gz endrec: DW201703-001 id: DW201611-008 cve: CVE-2016-10254 datereported: 2016-11-04 reportedby: Agostino Sarubbo vulnerability: Crash libelf reading fuzzed object. product: libdwarf description: This is a weakness in libelf checking. Testing that current libdwarf deals with it properly, though it was never a bug in libdwarf. The CVE mentions libdwarf.
  blogs.gentoo.org/ago/2016/11/04/elfutils-memory-allocation-failure-in-allocate_elf-common-h/
  www.openwall.com/lists/oss-security/2017/03/22/2
  
Fixed in gentoo libelf by Agostino Sarubbo. datefixed: 2016-11-04 references: regressiontests/sarubbo-b/00011-elfutils-memalloc-allocate_elf gitfixid: tarrelease: libdwarf-20180129.tar.gz endrec: DW201611-008 id: DW201611-007 cve: CVE-2016-10255 datereported: 2016-11-04 reportedby: Agostino Sarubbo vulnerability: Crash libelf reading fuzzed object. product: libdwarf description: This is a weakness in libelf checking. Testing that current libdwarf deals with it properly, though it was never a bug in libdwarf. The CVE mentions libdwarf.
  bugzilla.redhat.com/show_bug.cgi?id=1387584
  www.openwall.com/lists/oss-security/2017/03/22/1
  blogs.gentoo.org/ago/2016/11/04/elfutils-memory-allocation-failure-in-__libelf_set_rawdata_wrlock-elf_getdata-c/
  
Fixed in gentoo libelf by Agostino Sarubbo. datefixed: 2016-11-04 references: regressiontests/sarubbo-a/00031-elfutils-memalloc-__libelf_set_rawdata_wrlock gitfixid: tarrelease: libdwarf-20180129.tar.gz endrec: DW201611-007 id: DW201611-006 cve: CVE-2016-9480 datereported: 2016-11-14 reportedby: Puzzor (Shi Ji) vulnerability: Heap buffer overflow product: libdwarf description: An object with corrupt contents causes a memory reference out of bounds, a heap buffer overflow reference.
 heap-buffer-overflow in dwarf_util.c:208 for val_ptr

 # Version
 bb9a3492ac5713bed9cf3ae58ddb7afa6e9e98f8
 (in regression tests here named  heap_buf_overflow.o)

 # ASAN Output
 <0> tag: 17 DW_TAG_compile_unit  name: "strstrnocase.c" FORM 0xe "DW_FORM_strp"
 <1> tag: 46 DW_TAG_subprogram  name: "is_strstrnocase" FORM 0xe "DW_FORM_strp"
 =================
 ==1666==ERROR: AddressSanitizer: heap-buffer-overflow on address
   0xb5846db9 at p
 c 0x080b3a1b bp 0xbfa75d18 sp 0xbfa75d08
 READ of size 1 at 0xb5846db9 thread T0
    #0 0x80b3a1a in _dwarf_get_size_of_val /home/puzzor/libdwarf-code/
        libdwarf/dwarf_util.c:208
    #1 0x8056602 in _dwarf_next_die_info_ptr /home/puzzor/libdwarf-code/
        libdwarf/dwarf_die_deliv.c:1353
    #2 0x8057f4b in dwarf_child /home/puzzor/libdwarf-code/libdwarf/
       dwarf_die_de liv.c:1688
    #3 0x804b5fa in get_die_and_siblings simplereader.c:637
    #4 0x804b65c in get_die_and_siblings simplereader.c:643
    #5 0x804b3f3 in read_cu_list simplereader.c:611
    #6 0x804aeae in main simplereader.c:533
    #7 0xb6ffe275 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18275)
    #8 0x80491c0  (/home/puzzor/libdwarf-code/dwarfexample/simplereader+
         0x80491c 0)

 0xb5846db9 is located 0 bytes to the right of 249-byte region
    [0xb5846cc0,0xb5846db9)
 allocated by thread T0 here:
    #0 0xb727fae4 in __interceptor_malloc (/usr/lib/i386-linux-gnu/libasan.so.
       3+ 0xc3ae4)
    #1 0xb71a9b98  (/usr/lib/i386-linux-gnu/libelf.so.1+0x9b98)
 
For the orignal bug report see
 https://sourceforge.net/p/libdwarf/bugs/5/
 
datefixed: 2016-11-16 references: regressiontests/puzzor/heap_buf_overflow.o gitfixid: 5dd64de047cd5ec479fb11fe7ff2692fd819e5e5 tarrelease: libdwarf-20180129.tar.gz endrec: id: DW201611-005 cve: CVE-2016-9558 datereported: 2016-11-11 reportedby: Agostino Sarubbo vulnerability: negation of -9223372036854775808 cannot be represented in type product: libdwarf description: With the right bit pattern in a signed leb number the signed leb decode would execute an unary minus with undefined effect. This is not known to generate an incorrect value, but it could, one supposes. datefixed: 2016-11-11 references: regressiontests/sarubbo-2/00050-libdwarf-negate-itself gitfixid: 4f19e1050cd8e9ddf2cb6caa061ff2fec4c9b5f9 tarrelease: libdwarf-20180129.tar.gz endrec: id: DW201611-004 cve: CVE-2016-9275 datereported: 2016-11-02 reportedby: Agostino Sarubbo vulnerability: Heap overflow in dwarf_skim_forms() product: libdwarf description: If a non-terminated string in a DWARF5 macro section ends a section it can result in accessing memory not in the application (out of bounds read). dwarf_macro5.c(in _dwarf_skim_forms()). datefixed: 2016-11-04 references: regressiontests/sarubbo-2/00027-libdwarf-heapoverflow-_dwarf_skim_forms gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6 tarrelease: libdwarf-20180129.tar.gz endrec: id: DW201611-003 cve: CVE-2016-9276 datereported: 2016-11-02 reportedby: Agostino Sarubbo vulnerability: Bad aranges length leads to overflow and bad pointer product: libdwarf description: in dwarf_arange.c(dwarf_get_aranges_list) an aranges header with corrupt data could, with an overflowing calculation, result in pointers to invalid or inappropriate memory being dereferenced. datefixed: 2016-11-04 references: regressiontests/sarubbo-2/00026-libdwarf-heapoverflow-dwarf_get_aranges_list gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6 tarrelease: libdwarf-20180129.tar.gz endrec: id: DW201611-002 cve: datereported: 2016-11-02 reportedby: Agostino Sarubbo vulnerability: heap overflow in get_attr_value product: libdwarf description: Libdwarf failed to check for a bogus length in dwarf_form.c (dwarf_formblock()) resulting in a pointer pointing outside of the intended memory region. Anything could happen in the subsequent use of the bogus pointer.
 0x61300000de1c is located 0 bytes to the right of 348-byte region
 [0x61300000dcc0,0x61300000de1c)
 allocated by thread T0 here:
   #0 0x4c0ad8 in malloc /var/tmp/portage/sys-devel/llvm-3.8.1-
 r2/work/llvm-3.8.1.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:52
   #1 0x7f883cfc6206 in __libelf_set_rawdata_wrlock /tmp/portage/dev-
 libs/elfutils-0.166/work/elfutils-0.166/libelf/elf_getdata.c:318
 
datefixed: 2016-11-04 references: regressiontests/sarubbo-2/00025-libdwarf-heapoverflow-get_attr_value gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6 tarrelease: libdwarf-20170416.tar.gz endrec: id: DW201611-001 cve: datereported: 2016-11-02 reportedby: Agostino Sarubbo vulnerability: Memory allocation failure in do_decompress_zlib product: libdwarf description: In decompressing a zlib compressed section if the decompressed section size is nonsense (too large) an attempted malloc will fail and could let an exception propagate to callers.
  ==27994==WARNING: AddressSanitizer failed to allocate 0x62696c2f7273752f
  bytes ==27994==AddressSanitizer's allocator is terminating the process
  instead of returning 0
  ...
   #6 0x4c0ab1 in malloc /var/tmp/portage/sys-devel/llvm-3.8.1-
r2/work/llvm-3.8.1.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:53
#7 0x5b582e in do_decompress_zlib
/tmp/dwarf-20161021/libdwarf/dwarf_init_finish.c:1085:12
   #8 0x5b582e in _dwarf_load_section
/tmp/dwarf-20161021/libdwarf/dwarf_init_finish.c:1159
   #9 0x5bb479 in dwarf_srcfiles
/tmp/dwarf-20161021/libdwarf/./dwarf_line.c:336:11
   #10 0x5145cd in print_one_die_section
 
datefixed: 2016-11-04 references: regressiontests/sarubbo-2/00024-libdwarf-memalloc-do_decompress_zlib gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6 tarrelease: libdwarf-20170416.tar.gz endrec: DW201611-001 id: DW201610-003 cve: CVE-2016-8679 datereported: 2016-10-02 reportedby: agostino vulnerability: dwarf_get_size_of_val out of bounds read product: libdwarf description: The _dwarf_get_size_of_val function in libdwarf/dwarf_util.c in Libdwarf before 20161124 allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.
  www.securityfocus.com/bid/93601
  blogs.gentoo.org/ago/2016/10/06/libdwarf-heap-based-
  buffer-overflow-in-_dwarf_get_size_of_val-dwarf_util-c/
  
datefixed: 2016-10-04 references: gitfixid: efe48cad0693d6994d9a7b561e1c3833b073a624 endrec: DW201610-003 id: DW201610-002 cve: CVE-2016-8680 datereported: 2016-10-02 reportedby: agostino vulnerability: Out of bounds read product: libdwarf description: The _dwarf_get_abbrev_for_code function in dwarf_util.c in libdwarf 20161001 and earlier allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.
  bugzilla.redhat.com/show_bug.cgi?id=1385690
  www.securityfocus.com/bid/93592
  Duplicate of CVE-2016-8681
  
datefixed: 2016-10-04 references: gitfixid: efe48cad0693d6994d9a7b561e1c3833b073a624 endrec: DW201610-002 id: DW201610-001 cve: CVE-2016-8681 datereported: 2016-10-02 reportedby: agostino vulnerability: Out of bounds read product: libdwarf description: The _dwarf_get_abbrev_for_code function in dwarf_util.c in libdwarf 20161001 and earlier allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.
  bugzilla.redhat.com/show_bug.cgi?id=1385690
  www.securityfocus.com/bid/93592
  Duplicate of CVE-2016-8680
  
datefixed: 2016-10-04 references: gitfixid: efe48cad0693d6994d9a7b561e1c3833b073a624 endrec: DW201610-001 id: DW201609-004 cve: CVE-2016-7510 datereported: 2016-09-17 reportedby: Puzzor vulnerability: libdwarf 20160613 Out-of-Bounds read product: libdwarf description: read line table program Out-of-Bounds read line_ptr in dwarf_line_table_reader_common.c:1433 Out-of-Bounds read See:
 https://bugzilla.redhat.com/show_bug.cgi?id=1377015
 https://sourceforge.net/p/libdwarf/bugs/4/
 
 # Address Sanitizer Output
 ==27763==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf4603f84 at pc 0x8408ede bp 0xffff6518 sp 0xffff6510
 READ of size 1 at 0xf4603f84 thread T0
 #0 0x8408edd in read_line_table_program /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line_table_reader_common.c:1433
 #1 0x83f716c in _dwarf_internal_srclines /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line.c:690
 #2 0x841436c in dwarf_srclines_b /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line.c:944
 #3 0x81fbc28 in print_line_numbers_this_cu /home/puzzor/test-fuzzing/code/dwarfdump/print_lines.c:763
 #4 0x815c191 in print_one_die_section /home/puzzor/test-fuzzing/code/dwarfdump/print_die.c:850
 #5 0x81565c1 in print_infos /home/puzzor/test-fuzzing/code/dwarfdump
 
datefixed: 2016-09-23 references: regressiontests/DW201609-004/poc gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252 tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201609-003 cve: CVE-2016-7410 datereported: 2016-09-13 reportedby: https://marc.info/?l=oss-security&m=147391785920048&w=2 vulnerability: libdwarf 20160613 heap-buffer-overflow product: libdwarf description: With AddressSanitizer, we found a Heap-Buffer-overflow in the latest release version of dwarfdump. The crash output is as follows:
  See also:
  https://marc.info/?l=oss-security&m=147378394815872&w=2
  The testcase poc is from this web page.
  
  ==17411==ERROR: AddressSanitizer: heap-buffer-overflow on address
  0xf3808904 at pc 0x80a6f76 bp 0xffb95e78 sp 0xffb95a5c
  READ of size 4 at 0xf3808904 thread T0
  ==17411==WARNING: Trying to symbolize code, but external symbolizer is
  not initialized!
    #0 0x80a6f75 in __interceptor_memcpy ??:?
    #1 0x8426c3b in _dwarf_read_loc_section
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc.c:919
    #2 0x84250e2 in _dwarf_get_loclist_count
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc.c:970
    #3 0x8438826 in dwarf_get_loclist_c
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc2.c:551
    #4 0x81a1be8 in get_location_list
  /home/starlab/fuzzing/dwarf-20160613/dwarfdump/print_die.c:3523
    #5 0x816e1a2 in print_attribute
  
_dwarf_get_loclist_header_start() is not cautious about values in the header being absurdly large. Unclear as yet if this is the problem but it is a potential problem (fixed for next release).
  Address Sanitizer in gcc reproduces the report.
  In _dwarf_read_loc_section() the simple calculation of
  loc_section_end was wrong, so end-of section was
  incorrect for the local reads.
  With that fixed we get DW_DLE_READ_LITTLEENDIAN_ERROR when
  libdwarf attempts to read off end of section.
  
datefixed: 2016-09-23 references: regressiontests/DW201609-003/poc gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252 tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201609-002 cve: CVE-2016-7511 datereported: 2016-09-18 reportedby: Shi Ji (@Puzzor) vulnerability: libdwarf 20160613 Integer Overflow product: libdwarf description: In dwarf_get_size_of_val() with fuzzed DWARF data we get a SEGV.
  See
  https://sourceforge.net/p/libdwarf/bugs/3/
  
  ==6825== ERROR: AddressSanitizer: SEGV on unknown address 0x0583903c (pc 0xb61f1a98 sp 0xbfa388b4 bp 0xbfa38d08 T0)
  AddressSanitizer can not provide additional info.
  #1 0xb61e3c0b (/usr/lib/i386-linux-gnu/libasan.so.0+0xdc0b)
  #2 0x80a21b1 in _dwarf_get_size_of_val /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_util.c:210
  #3 0x8054214 in _dwarf_next_die_info_ptr /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1340
  #4 0x80557a5 in dwarf_child /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1640
  #5 0x804b23f in get_die_and_siblings /home/fuzzing/fuzzing/dwarf-20160613/dwarfexample/./simplereader.c:573
  
_dwarf_make_CU_Context() is insufficiently cautious about the length of a CU being absurd. Unclear as yet if this is the problem but it is a problem and is fixed for next release. datefixed: 2016-09-23 references: regressiontests/DW201609-002/DW201609-002-poc gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252 tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201609-001 cve: datereported: 2016-09-16 reportedby: STARLAB https://sourceforge.net/p/libdwarf/bugs/2/ vulnerability: libdwarf 20160613 die_info_ptr in dwarf_die_deliv.c: 1533 Out-Of_bounds product: libdwarf description: At line 1533 of dwarf_die_deliv.c a pointer dereference is done with a pointer pointing past the end of the CU data.
 see
 https://sourceforge.net/p/libdwarf/bugs/2/
 
 ==8054==ERROR: AddressSanitizer: heap-buffer-overflow on
    address 0xf4c027ab at pc 0x819e4a4 bp 0xff88eb38 sp 0xff88eb30
 READ of size 1 at 0xf4c027ab thread T0
 #0 0x819e4a3 in dwarf_siblingof_b /home/starlab/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1533
 #1 0x8116201 in print_die_and_children_internal /home/starlab/fuzzing/dwarf-20160613/dwarfdump/print_die.c:1157
 Bug report on sourceforge.net bug list for libdwarf.
 The bad pointer dereference is due to libdwarf
 not noticing that the DWARF in that file is corrupt.
 In addition
 The code was not noticing that it could dereference
 a pointer that pointed out of bounds in the end-sibling-list
 loop.
 
 The example from the bug report (DW201609-001-poc) has
 the same problem.
 dwarfdump now reports DW_DLE_SIBLING_LIST_IMPROPER
 on both test2.o and DW201609-001-poc.
 
datefixed: 2016-09-17 references: regressiontests/DW201609-001/test2.o regressiontests/DW201609-001/DW201609-001-poc gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252 tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-019 cve: CVE-2016-5028 datereported: 2016-05-23 reportedby: Yue Liu vulnerability: Null dereference in print_frame_inst_bytes (dwarfdump) product: libdwarf description: The null dereference is due to a corrupted object file. Libdwarf was not dealing with empty (bss-like) sections since it really did not expect to see such in sections it reads! Now libdwarf catches the object error so dwarfdump sees the section as empty (as indeed it is!). datefixed: 2016-05-23 references: regressiontests/liu/NULLdeference0522c.elf gitfixid: a55b958926cc67f89a512ed30bb5a22b0adb10f4 tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-018 cve: CVE-2016-5029 datereported: 2016-05-22 reportedby: Yue Liu vulnerability: Null dereference in create_fullest_file_path(). product: libdwarf description: The null dereference in create_fullest_file_path() causes a crash. This is due to corrupted dwarf and the fix detects this corruption and if that null string pointer happens undetected a static string is substituted so readers can notice the situation.
  202             }
 203             if (dirno > 0 && fe->fi_dir_index > 0) {
 204                 inc_dir_name = (char *)
                         line_context->lc_include_directories[
 205                     fe->fi_dir_index - 1];
 206                 incdirnamelen = strlen(inc_dir_name);  <- $pc
 207             }
 208             full_name = (char *) _dwarf_get_alloc(dbg,

 #0  create_fullest_file_path (dbg=,
 fe=0x68d510, line_context=0x68c4f0, name_ptr_out=, error=0x7fffffffe2b8) at ./dwarf_line.c:206

 #1  0x00007ffff7b6d3f9 in dwarf_filename (context=, fileno_in=, ret_filename=0x7fffffffe280,
 error=0x7fffffffe2b8) at ./dwarf_line.c:1418

 #2  dwarf_linesrc (line=,
 ret_linesrc=, error=) at
 ./dwarf_line.c:1436
 
datefixed: 2016-05-22 references: regressiontests/liu/NULLdereference0522.elf gitfixid: acae971371daa23a19358bc62204007d258fbc5e tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-017 cve: CVE-2016-5030 datereported: 2016-05-19 reportedby: Yue Liu vulnerability: Null dereference bug in _dwarf_calculate_info_section_end_ptr(). product: libdwarf description: NULL dereference bug in _dwarf_calculate_info_section_end_ptr().
 1742         Dwarf_Off off2 = 0;
 1743         Dwarf_Small *dataptr = 0;
 1744
 1745         dbg = context->cc_dbg;
 1746         dataptr = context->cc_is_info? dbg->de_debug_info.dss_data:                 <- $pc
 1747             dbg->de_debug_types.dss_data;
 1748         off2 = context->cc_debug_offset;
 1749         info_start = dataptr + off2;
 1750         info_end = info_start + context->cc_length +

 #0  _dwarf_calculate_info_section_end_ptr
 (context=context@entry=0x0) at dwarf_query.c:1746

 #1  0x00002aaaaace307d in
 _dwarf_extract_string_offset_via_str_offsets
 (dbg=dbg@entry=0x655a70, info_data_ptr=0x6629f0
 "", attrnum=attrnum@entry=121,
 attrform=attrform@entry=26, cu_context=0x0,
 str_sect_offset_out=str_sect_offset_out@entry=0x7fffffffd718,
 error=error@entry=0x7fffffffd878) at dwarf_form.c:1099

 #2  0x00002aaaaacf4ed7 in dwarf_get_macro_defundef
 (macro_context=macro_context@entry=0x65b790,
 op_number=op_number@entry=1,
 line_number=line_number@entry=0x7fffffffd858,
 index=index@entry=0x7fffffffd860,
 offset=offset@entry=0x7fffffffd868,
 forms_count=forms_count@entry=0x7fffffffd7ce,
 macro_string=macro_string@entry=0x7fffffffd870,
 error=error@entry=0x7fffffffd878) at dwarf_macro5.c:557

 ------

 _dwarf_calculate_info_section_end_ptr (context=context@entry=0x0) at
   dwarf_query.c:1746
 1746        dataptr = context->cc_is_info? dbg->de_debug_info.dss_data:
 gef> p/x $rdi
 $4 = 0x0
 
datefixed: 2016-05-22 references: regressiontests/liu/NULLdereference0519.elf gitfixid: 6fa3f710ee6f21bba7966b963033a91d77c952bd tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-016 cve: datereported: 2016-05-19 reportedby: Yue Liu vulnerability: Invalid dwarf leads to dwarfdump crash in print_frame_inst_bytes. product: dwarfdump description: Corrupted dwarf crashes dwarfdump
 1297         }
 1298         len = len_in;
 1299         endpoint = instp + len;
 1300         for (; len > 0;) {
 1301             unsigned char ibyte = *instp;           <- $pc
 1302             int top = ibyte & 0xc0;
 1303             int bottom = ibyte & 0x3f;
 1304             int delta = 0;
 1305             int reg = 0;

 #0  print_frame_inst_bytes (dbg=dbg@entry=0x655ca0,
 cie_init_inst=, len_in=,
 data_alignment_factor=-4, code_alignment_factor=4,
 addr_size=addr_size@entry=4, offset_size=4, version=3,
 config_data=config_data@entry=0x63cda0 )
 at print_frames.c:1301

 #1  0x000000000041b70c in print_one_cie
 (dbg=dbg@entry=0x655ca0, cie=,
 cie_index=cie_index@entry=2, address_size=,
 config_data=config_data@entry=0x63cda0 )
 at print_frames.c:1161

 #2  0x000000000041cf52 in print_frames (dbg=0x655ca0,
 print_debug_frame=print_debug_frame@entry=1, print_eh_frame=0,
 config_data=config_data@entry=0x63cda0 )
 at print_frames.c:2229

 gef> p/x $r13
 $1 = 0x4bcad8
 gef> p/x *$r13
 Cannot access memory at address 0x4bcad8
 
datefixed: 2016-05-22 references: regressiontests/liu/OOB_READ0519.elf gitfixid: 6fa3f710ee6f21bba7966b963033a91d77c952bd tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-015 cve: CVE-2016-5031 datereported: 2016-05-17 reportedby: Yue Liu vulnerability: OOB read bug in print_frame_inst_bytes() product: libdwarf description: Test object shows an invalid read in print_frame_inst_bytes().
 1294         for (; len > 0;) {
 1295             unsigned char ibyte = *instp;           <- $pc
 1296             int top = ibyte & 0xc0;

 #0  print_frame_inst_bytes (dbg=dbg@entry=0x654c80,
    cie_init_inst=, len=503715, data_alignment_factor=-4,
    code_alignment_factor=1, addr_size=addr_size@entry=4, offset_size=4,
    version=3, config_data=config_data@entry=0x63bda0
    ) at print_frames.c:1295
 #1  0x000000000041b64c in print_one_cie (dbg=dbg@entry=0x654c80,
    cie=, cie_index=cie_index@entry=1,
    address_size=, config_data=
    config_data@entry=0x63bda0 ) at print_frames.c:1161
 #2  0x000000000041ce92 in print_frames (dbg=0x654c80,
    print_debug_frame=print_debug_frame@entry=1, print_eh_frame=0,
    config_data=config_data@entry=0x63bda0 )
    at print_frames.c:2209

 gef> x/10x $r13
 0x5e7981:       Cannot access memory at address 0x5e7981
 gef> p/x $r13
 $14 = 0x5e7981
 
datefixed: 2015-05-18 references: regressiontests/liu/OOB0517_03.elf gitfixid: ac6673e32f3443a5d36c2217cb814000930b2c54 tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-014 cve: CVE-2016-5032 datereported: 2016-05-17 reportedby: Yue Liu vulnerability: OOB read bug in dwarf_get_xu_hash_entry() product: libdwarf description: Test object shows an invalid read in dwarf_get _xu_hash_entry, lin 211.
 #0  dwarf_get_xu_hash_entry (xuhdr=xuhdr@entry=0x657360,
    index=index@entry=2897626028, hash_value=
    hash_value@entry=0x7fffffffd5b0,
    index_to_sections=index_to_sections@entry=0x7fffffffd5a8,
    err=err@entry=0x7fffffffdb08) at dwarf_xu_index.c:211
 #1  0x00002aaaaacfd05e in _dwarf_search_fission_for_key (
    dbg=0x654a50, error=0x7fffffffdb08, percu_index_out=,
    key_in=0x7fffffffd670, xuhdr=0x657360) at dwarf_xu_index.c:363
 #2  dwarf_get_debugfission_for_key (dbg=dbg@entry=0x654a50,
    key=key@entry=0x7fffffffd670, key_type=key_type@entry=0x2aaaaad15e2a
    "tu", percu_out=percu_out@entry=0x65a830,
    error=error@entry=0x7fffffffdb08) at dwarf_xu_index.c:577
 
datefixed: 2015-05-18 references: regressiontests/liu/OOB0517_02.elf gitfixid: ac6673e32f3443a5d36c2217cb814000930b2c54 tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-013 cve: CVE-2016-5033 datereported: 2016-05-17 reportedby: Yue Liu vulnerability: OOB read bug in print_exprloc_content product: libdwarf description: Test object shows an invalid write in print_exprloc_content.
 #0  print_exprloc_content (dbg=dbg@entry=0x654ea0,
    die=die@entry=0x65b110, attrib=attrib@entry=0x65b590,
    esbp=esbp@entry=0x7fffffffcef0, showhextoo=1) at print_die.c:4182
 #1  0x0000000000412fb1 in get_attr_value (dbg=dbg@entry=0x654ea0,
    tag=, die=die@entry=0x65b110,
    dieprint_cu_goffset=dieprint_cu_goffset@entry=11,
    attrib=attrib@entry=0x65b590, srcfiles=srcfiles@entry=0x0,
    cnt=cnt@entry=0, esbp=esbp@entry=0x7fffffffcef0, show_form=0,
    local_verbose=0) at print_die.c:4972
 
datefixed: 2015-05-18 references: regressiontests/liu/OOB0517_01.elf gitfixid: ac6673e32f3443a5d36c2217cb814000930b2c54 tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-012 cve: CVE-2016-5034 datereported: 2016-05-13 reportedby: Yue Liu vulnerability: OOB write. From relocation records product: libdwarf description: Test object shows an invalid write in dwarf_elf_access.c (when doing the relocations). Adding the relocation value to anything overflowed and disguised the bad relocation record. With a 32bit kernel build the test could show a double-free and coredump due to the unchecked invalid writes from relocations. datefixed: 2016-05-17 references: regressiontests/liu/HeapOverflow0513.elf gitfixid: 10ca310f64368dc083efacac87732c02ef560a92 tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-011 cve: CVE-2016-5035 datereported: 2016-05-06 reportedby: Yue Liu vulnerability: OOB read bug in _dwarf_read_line_table_header product: libdwarf description: Test object shows null dereference at line 62 of dwarf_line_table_reader.c. Frame code and linetable code was not noticing data corruption. datefixed: 2016-05-12 references: regressiontests/liu/OOB_read4.elf gitfixid: 82d8e007851805af0dcaaff41f49a2d48473334b tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-010 cve: CVE-2016-5036 datereported: 2016-05-06 reportedby: Yue Liu vulnerability: OOB read bug in dump_block product: libdwarf description: Test object shows null dereverence at line 186 of dump_block() in print_sections.c Frame code was not noticing frame data corruption. datefixed: 2016-05-12 references: regressiontests/liu/OOB_read3.elf regressiontests/liu/OOB_read3_02.elf gitfixid: 82d8e007851805af0dcaaff41f49a2d48473334b tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-009 cve: CVE-2016-5037 datereported: 2016-05-05 reportedby: Yue Liu vulnerability: NULL dereference in _dwarf_load_section product: libdwarf description: Test object shows null dereverence at line 1010 if(!strncmp("ZLIB",(const char *)src,4)) { in dwarf_init_finish.c The zlib code was not checking for a corrupted length-value. datefixed: 2016-05-06 references: regressiontests/liu/NULLderefer0505_01.elf gitfixid: b6ec2dfd850929821626ea63fb0a752076a3c08a tarrelease: libdwarf-20160507.tar.gz endrec: id: DW201605-008 cve: CVE-2016-5038 datereported: 2016-05-05 reportedby: Yue Liu vulnerability: OOB read in dwarf_get_macro_startend_file() product: libdwarf description: Test object shows out of bound read. OOB at: line 772 *src_file_name = macro_context->mc_srcfiles[trueindex]; in dwarf_macro5.c A string offset into .debug_str is outside the bounds of the .debug_str section. datefixed: 2016-05-12 references: regressiontests/liu/OOB0505_02.elf regressiontests/liu/OOB0505_02_02.elf gitfixid: 82d8e007851805af0dcaaff41f49a2d48473334b tarrelease: libdwarf-20160923.tar.gz endrec: id: DW201605-007 cve: CVE-2016-5039 datereported: 2016-05-05 reportedby: Yue Liu vulnerability: OOB read bug in get_attr_value() product: libdwarf description: Test object shows out of bound read. Object had data all-bits-on so the existing length check did not work due to wraparound. Added a check not susceptible to that error (DW_DLE_FORM_BLOCK_LENGTH_ERROR). datefixed: 2016-05-06 references: regressiontests/liu/OOB0505_01.elf gitfixid: eb1472afac95031d0c9dd8c11d527b865fe7deb8 gittag: 20160507 tarrelease: libdwarf-20160507.tar.gz endrec: id: DW201605-006 cve: datereported: 2016-05-05 reportedby: Yue Liu vulnerability: Two Heap-Overflow bug product: libdwarf description: Two test objects showing a heap overflow in libdwarf when using dwarfdump. It seems that these were fixed by the previous git update. Neither gdb nor valgrind find any errors when building with yesterday's commit. datefixed: 2016-05-04 references: regressiontests/liu/free_invalid_address.elf regressiontests/liu/heapoverflow01b.elf gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f tarrelease: libdwarf-20160507.tar.gz endrec: id: DW201605-001 cve: CVE-2016-5044 datereported: 2016-05-02 reportedby: Yue Liu vulnerability: A specially crafted DWARF section results in a duplicate free() in libdwarf and the calling application will crash. product: libdwarf description: In file dwarf_elf_access.c:1071
 WRITE_UNALIGNED(dbg,target_section + offset,
     &outval,sizeof(outval),reloc_size);
 
A crafted ELF file may lead to a large offset value, which bigger than the size of target_section heap chunk, then this WRITE_UNALIGNED() function will write the value of &outval out of the heap chunk. offset is a 64bit unsigned int value, so this is more than a heap overflow bug, but also a Out-of-Bound write bug. So WRITE_UNALIGNED() need more strictly checking to prevent this. datefixed: 2016-05-04 references: regressiontests/liu/heapoverflow01.elf
 https://bugzilla.redhat.com/show_bug.cgi?id=1332141
 
gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f gittag: 2016-05-07 tarrelease: libdwarf-20160507.tar.gz endrec: id: DW201605-002 cve: CVE-2016-5043 datereported: 2016-05-02 reportedby: Yue Liu vulnerability: A specially crafted DWARF section results in a read outside the bounds of in memory data so the calling application can crash. product: libdwarf description: Out of bound read bug in libdwarf git code. dwarf_dealloc() did not check the Dwarf_Ptr space argument before using it. This will lead to a out-of-bound read bug.
 backtrace:
 #0  dwarf_dealloc (dbg=dbg@entry=0x655f30, space=0xa0,
 alloc_type=alloc_type@entry=1) at dwarf_alloc.c:477
 #1  0x00002aaaaacf3296 in dealloc_srcfiles
 (dbg=0x655f30, srcfiles=0x66b8f0, srcfiles_count=17) at
 dwarf_macro5.c:1025 #2  0x00002aaaaacf50e6 in dealloc_srcfiles
 (srcfiles_count=, srcfiles=,
 dbg=) at dwarf_macro5.c:1021 -----

 gef> p &r->rd_dbg
 $14 = (void **) 0x90
 
datefixed: 2016-05-04 references: regressiontests/liu/outofbound01.elf
 https://bugzilla.redhat.com/show_bug.cgi?id=1332144
 
gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f tarrelease: libdwarf-20160507.tar.gz endrec: id: DW201605-003 cve: CVE-2016-5042 datereported: 2016-05-02 reportedby: Yue Liu vulnerability: A specially crafted DWARF section results in an infinite loop that eventually crashes the application. product: libdwarf description: In dwarf_get_aranges_list() an invalid count will iterate, reading from memory addresses that increase till it all fails. datefixed: 2016-05-04 references: regressiontests/liu/infiniteloop.elf
 https://bugzilla.redhat.com/show_bug.cgi?id=1332145
 
gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f tarrelease: libdwarf-20160507.tar.gz endrec: id: DW201605-004 cve: CVE-2016-5041 datereported: 2016-05-02 reportedby: Yue Liu vulnerability: A specially crafted DWARF section results in a null dereference reading debugging information entries which crashes the application. product: libdwarf description: If no DW_AT_name is present in a debugging information entry using DWARF5 macros a null dereference in dwarf_macro5.c will crash the application. datefixed: 2016-05-04 references: regressiontests/liu/null01.elf
 https://bugzilla.redhat.com/show_bug.cgi?id=1332148
 
gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f tarrelease: libdwarf-20160507.tar.gz endrec: id: DW201605-005 cve: CVE-2016-5040 datereported: 2016-05-02 reportedby: Yue Liu vulnerability: A specially crafted DWARF section results in reading a compilation unit header that crashes the application. product: libdwarf description: If the data read for a compilation unit header contains a too large length value the library will read outside of its bounds and crash the application. datefixed: 2016-05-04 references: regressiontests/liu/null02.elf
 https://bugzilla.redhat.com/show_bug.cgi?id=1332149
 
gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f tarrelease: libdwarf-20160507.tar.gz endrec: id: DW201605-020 cve: CVE-2016-5027 datereported: 2016-04-25 reportedby: Yue Liu,lieanu vulnerability: NULL dereference in _dwarf_decode_s_leb128 product: libdwarf description: dwarf_form.c in libdwarf 20160115 allows remote attackers to cause a denial of service (crash) via a crafted elf file Apparently no crafted object file presented. However the code fix is presented in the report at openwall.com. Discovered the CVE November 2021 To attack the code just pass the argument Dwarf_Word * leb128_length as a NULL pointer (that is allowed). The code was fixed in dwarf_leb.c on 2016-04-27 20:00:06.
  bugzilla.redhat.com/show_bug.cgi?id=1330237
  www.openwall.com/lists/oss-security/2016/05/24/1
  www.openwall.com/lists/oss-security/2016/05/25/1
  
datefixed: 2016-05-27 references: gitfixid: tarrelease: libdwarf-20160507.tar.gz endrec: DW201605-020 id: DW201601-001 cve: CVE-2016-2091 datereported: 2016-01-12 reportedby: Qixue Xiao vulnerability: Out of bound read in dwarf_read_cie_fde_prefix() product: libdwarf description: Crashes the calling program. Requires a crafted object file.
  *** DWARF CHECK: DW_DLE_DEBUG_FRAME_LENGTH_NOT_MULTIPLE
  len=0x00000010, len size=0x00000004, extn size=0x00000000, totl
  length=0x00000014, addr size=0x00000008, mod=0x00000004 must be zero
  in cie, offset 0x00000000. ***
  7   ==53495== Invalid read of size 2
  1 ==53495==    at 0x4C2F7E0: memcpy@@GLIBC_2.14 (in
  /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  2 ==53495==    by 0x43287F: dwarf_read_cie_fde_prefix (dwarf_frame2.c:934)
  3 ==53495==    by 0x431305: _dwarf_get_fde_list_internal (dwarf_frame2.c:268)
  4 ==53495==    by 0x42EB5F: dwarf_get_fde_list_eh (dwarf_frame.c:1101)
  5 ==53495==    by 0x41BABE: print_frames (print_frames.c:1835)
  6 ==53495==    by 0x40485B: process_one_file (dwarfdump.c:1323)
  7 ==53495==    by 0x403529: main (dwarfdump.c:630)
  www.openwall.com/lists/oss-security/2016/01/19/3
  www.openwall.com/lists/oss-security/2016/05/28/8
  
datefixed: 2016-01-21 references: regressiontests/xqx-b/awbug5.elf gitfixid: d9d40e4d802e626065ce37ff384dd69c43bc499 tarrelease: libdwarf-20160507.tar.gz endrec: DW201601-001 id: DW201601-002 cve: CVE-2016-2050 datereported: 2016-01-19 reportedby: Qixue Xiao vulnerability: Out of bound write in get_abbrev_array_info product: libdwarf description: Crashes the calling program. Requires a crafted object file.
  valgrind ./dwarfdump -ka aw.elf
  ==5358== Memcheck, a memory error detector
  ==5358== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
  ==5358== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
  ==5358== Command: ../../llvm-codes/dwarf-20151114/dwarfdump/dwarfdump -ka aw.elf
  ==5358==
  ==5358== Invalid write of size 8
  ==5358==    at 0x40DA25: get_abbrev_array_info (in
  /home/xqx/test/libdwarf-test/llvm-codes/dwarf-20151114/dwarfdump/dwarfdump)
  ==5358==    by 0x40FD92: print_one_die_section (in
  /home/xqx/test/libdwarf-test/llvm-codes/dwarf-20151114/dwarfdump/dwarfdump)
  www.openwall.com/lists/oss-security/2016/01/19/9
  www.openwall.com/lists/oss-security/2016/01/25/3
  
datefixed: 2016-01-21 references: regressiontests/xqx-b/aw.elf gitfixid: d9d40e4d802e626065ce37ff384dd69c43bc499 tarrelease: libdwarf-20160507.tar.gz endrec: DW201601-002 id: DW201512-001 cve: CVE-2015-8750 datereported: 2015-12-26 reportedby: Qixue Xiao (xqx) vulnerability: Null pointer dereference in libdwarf product: libdwarf description: libdwarf 20151114 and earlier allows remote attackers to cause a denial of service (NULL pointer dereference and crash) via a debug_abbrev section marked NOBITS in an ELF file.
  bugzilla.redhat.com/show_bug.cgi?id=1294264
  www.openwall.com/lists/oss-security/2016/01/07/11
  
datefixed: 2015-12-31 references: regressiontests/xqx-c/awbug6.elf gitfixid: tarrelease: libdwarf-20160507.tar.gz endrec: DW201512-001 id: DW201512-002 cve: CVE-2015-8538 datereported: 2015-12-14 reportedby: Adam Maris vulnerability: Out-of-bounds read in dwarf_leb.c product: libdwarf description: libdwarf 20151114 and earlier allows remote attackers to cause a denial of service (NULL pointer dereference and crash) via a debug_abbrev section marked NOBITS in an ELF file. The CVE report mentions a reproducer object file but such is not present. Due to recent tool advances (like coverity scan) we are confident this was fixed long ago.
  bugzilla.redhat.com/show_bug.cgi?id=1291299
  www.openwall.com/lists/oss-security/2015/12/10/3
  
datefixed: 2018-01-01 references: gitfixid: tarrelease: libdwarf-20160507.tar.gz endrec: DW201512-002 id: DW201412-001 cve: CVE-2014-9482 datereported: 2014-12-31 reportedby: Adam Maris vulnerability: Use after free vulnerability in Dwarfdump product: dwarfdump description: The use-after-free has no attached testcase anywhere. Due to recent tool advances (like coverity scan) we are confident this was fixed long ago.
  bugzilla.redhat.com/show_bug.cgi?id=1177758
  www.openwall.com/lists/oss-security/2014/12/31/3
  www.openwall.com/lists/oss-security/2015/01/03/14
  
datefixed: 2018-01-01 references: gitfixid: tarrelease: libdwarf-20160507.tar.gz endrec: DW201412-001 libdwarf-code-0.11.1/bugxml/dwarfbug.html000066400000000000000000005245051472336503500203040ustar00rootroot00000000000000 Libdwarf Vulnerabilities

Libdwarf Vulnerabilities

This page provides documentation of known vulnerabilities in libdwarf. We are concerned here with cases where corrupt (by accident or intention) DWARF can cause the library to get a fault (crash) which could expose the calling program to interception by malefactors. Dates (where known) are in ISO extended date format.

Some of the bugs reported here have a CVE assigned, for example CVE-2017-9052. These are reported on cve.org (or possibly the earlier cve.mitre.org). Search with "libdwarf" on cve.org for a list.

Git reference path names refer to object files in the libdwarf regression test base. The test files can be retrieved via anonymous access:
"git clone https://github.org/davea42/libdwarf-regressiontests"

A few bugs refer to https://bugzilla.redhat.com bug system entries and/or https://bugs.chromium.org in addition to showing the names of test files in the regression test base.

Vulnerabilities

Vulnerabilities listed newest-first.
Vulnerabilities listed oldest-first.

LibDwarf Vulnerabilities Newest First

as of December 2024

Record count: 189

1) DW202407-012

id: DW202407-012

cve:

fuzzer: ossfuzz id: 70763

datereported: 2024-07-28

reportedby: David Korczynski

vulnerability: InfiniteRecursion reading CUs leads to crash

product: libdwarf

description: The code added in git fix id 6b40a0ed378826273080a7b11e7274c2b61d018b two days ago involved adding code setting up compilation unit data and in find_cu_die_base_fields() we called dwarf_global_formref() whereas we must call _dwarf_internal_global_formref_b() to avoid an infinite recursion. A crash was only possible when reading corrupt DWARF.

datefixed: 2024-07-28

references: regressiontests/ossfuzz70763/fuzz_macro_dwarf5-5161075908083712

gitfixid: 1b79d618bf5aab2bda9be495c531b13e94ae056a

tarrelease:

[top]

2) DW202407-011

id: DW202407-011

cve:

fuzzer: ossfuzz id: 70753

datereported: 2024-07-28

reportedby: David Korczynski

vulnerability: InfiniteRecursion reading CUs leads to crash

product: libdwarf

description: The code added in git fix id 6b40a0ed378826273080a7b11e7274c2b61d018b two days ago involved adding code setting up compilation unit data and in find_cu_die_base_fields() we called dwarf_global_formref() whereas we must call _dwarf_internal_global_formref_b() to avoid an infinite recursion. A crash was only possible when reading corrupt DWARF.

datefixed: 2024-07-28

references: regressiontests/ossfuzz70753/fuzz_die_cu_offset-6598270743281664

gitfixid: 1b79d618bf5aab2bda9be495c531b13e94ae056a

tarrelease:

[top]

3) DW202407-010

id: DW202407-010

cve:

fuzzer: ossfuzz id: 70721

datereported: 2024-07-27

reportedby: David Korczynski

vulnerability: Heap Use After Free

product: libdwarf

description: Libdwarf was referencing freed space attempting to free up a compilation-unit DIE in the process of creating a context for a compilation-unit DIE, given a particular corruption of the DWARF data being read. This bug has been present for several years.

datefixed: 2024-07-27

references: regressiontests/ossfuzz70721/fuzz_macro_dwarf5-4907954017468416

gitfixid: 6fa96f95e043bac9b98ca6f7a9a542dae8f46cd

tarrelease:

[top]

4) DW202407-009

id: DW202407-009

cve:

fuzzer: ossfuzz id: 70287

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70287/

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

5) DW202407-008

id: DW202407-008

cve:

fuzzer: ossfuzz id: 70282

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70282/

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

6) DW202407-007

id: DW202407-007

cve:

fuzzer: ossfuzz id: 70278

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70278/

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

7) DW202407-006

id: DW202407-006

cve:

fuzzer: ossfuzz id: 70277

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70277/

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

8) DW202407-005

id: DW202407-005

cve:

fuzzer: ossfuzz id: 70266

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70266/fuzz_findfuncbypc-6093996460408832

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

9) DW202407-004

id: DW202407-004

cve:

fuzzer: ossfuzz id: 70263

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70263/fuzz_die_cu-4960441042796544

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

10) DW202407-003

id: DW202407-003

cve:

fuzzer: ossfuzz id: 70256

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70256/fuzz_rng-483822291655065

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

11) DW202407-002

id: DW202407-002

cve:

fuzzer: ossfuzz id: 70246

datereported: 2024-07-09

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70246/fuzz_macro_dwarf5-5128935898152960

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

12) DW202407-001

id: DW202407-001

cve:

fuzzer: ossfuzz id: 70244

datereported: 2024-07-09

reportedby: David Korczynski

vulnerability: Memory leaks reading rnglists

product: libdwarf

description: Libdwarf was failing to free() some allocations in reading .debug_rnglists. This bug has been present for a week or so.

datefixed: 2024-07-09

references: regressiontests/ossfuzz70244/fuzz_die_cu_attrs_loclist-4958134427254784

gitfixid: 906a4428a5d92e17948da4249cfccbe8f5ae8005

tarrelease:

[top]

13) DW202406-002

id: DW202406-002

cve:

fuzzer: ossfuzz id: 69641

datereported: 2024-06-14

reportedby: David Korczynski

vulnerability: Memory Leak reading .debug_loclists

product: libdwarf

description: During startup (reading initial fields from .debug_loclists) libdwarf was allocating an array of integers but in the normal case was failing to free the array. This bug in DWARF5 handling has been in the code for a week or so. See also DW202406-001.

datefixed: 2024-06-15

references: regressiontests/ossfuzz69641/fuzz_die_cu_attrs_loclist-6271271030030336

gitfixid: 32d832900ebe2e61ec07e82625a561415be05424

tarrelease: libdwarf-0.10.1.tar.xz

[top]

14) DW202406-001

id: DW202406-001

cve:

fuzzer: ossfuzz id: 69639

datereported: 2024-06-14

reportedby: David Korczynski

vulnerability: Memory Leak reading .debug_loclists

product: libdwarf

description: During startup (reading initial fields from .debug_loclists) libdwarf was allocating an array of integers but in the normal case was failing to free the array. This bug in DWARF5 handling has been in the code for a week or so. See also DW202406-002.

datefixed: 2024-06-15

references: regressiontests/ossfuzz69639/fuzz_die_cu_offset-6001910176350208

gitfixid: 32d832900ebe2e61ec07e82625a561415be05424

tarrelease: libdwarf-0.10.1.tar.xz

[top]

15) DW202403-001

id: DW202403-001

cve:

fuzzer: ossfuzz id: 67490

datereported: 2024-03-18

reportedby: David Korczynski

vulnerability: Reads past end of line table

product: libdwarf

description: A carefully corrupted line table header can cause libdwarf to read outside of its allowed areas in a .debug_line section reading the file names part of the header. The failure to check for end-of-section before reading past end-of-section at the very last byte in section (at a very few specific points in the line table reader code where a valid line table header would not require a test) has been present for many years.

datefixed: 2024-02-19

references: regressiontests/ossfuzz67490/fuzz_srcfiles-5195296927711232

gitfixid: 2930f3121ee6b07da405103934c329bbeca0382f

tarrelease: libdwarf-0.9.2.tar.xz

[top]

16) DW202402-003

id: DW202402-003

cve:

fuzzer: hongg

datereported: 2024-02-18

reportedby: ifygecko

vulnerability: crashes randomly reading fuzzed locllist

product: libdwarf

description: A carefully corrupted loclists entry can cause libdwarf to read outside of its allowed areas in dwarf_loclists.c due to lack of a sanity check. A segmentation error and libdwarf crash is likely. Similar code in dwarf_rnglists.c and that now has the additional checks. The bugs have been present in both since the code was created in June 2020.

datefixed: 2024-02-18

references: regressiontests/hongg2024-02-18/SIGSEGV-m.fuzz

gitfixid: 5cfbd87dff4fc3c3b595bb92ed886934945b372c

tarrelease: libdwarf-0.9.2.tar.xz

[top]

17) DW202402-002

id: DW202402-002

cve: CVE-2024-2002

fuzzer: hongg

datereported: 2024-02-16

reportedby: ifygecko

vulnerability: crashes randomly on fuzzed object

product: libdwarf

description: In a multiply-corrupted DWARF object libdwarf may try to dealloc(free) an allocation twice. Results are unpredictable and various. This has been a possibility since we added code to prevent leaks when generating 'unattached' Dwarf_Error records (where there is no Dwarf_Debug available at the point of error). The problem was introduced in libdwarf-0.1.0 in 2021.

datefixed: 2024-02-17

references: regressiontests/hongg2024-02-16/SIGABRT-a.fuzz SIGABRT-b.fuzz SIGABRT-c.fuzz SIGSEGV-d.fuzz SIGSEGV-e.fuzz SIGSEGV-f.fuzz SIGSEGV-g.fuzz SIGSEGV-h.fuzz SIGSEGV-i.fuzz SIGSEGV-k.fuzz

gitfixid: 404e6b1b14f60c81388d50b4239f81d461b3c3ad

tarrelease: libdwarf-0.9.2.tar.xz

[top]

18) DW202402-001

id: DW202402-001

cve:

fuzzer: ossfuzz id: 66646

datereported: 2024-02-12

reportedby: David Korczynski

vulnerability: Reference memory outside of section.

product: libdwarf

description: The data pointer for DW_FORM_ref1 was not being validated as pointing into the section before being dereferenced. Here reading a corrupted DWARF section. A library crash is likely. This test failure happened to be on a DW_AT_abstract_origin attribute, but the problem applies in many other situations. Nearly the other forms had checks. This check has been missing for many years. Similarly the requisite check was missing from DW_FORM_block1 for many years and that too was fixed so all the FORMs have checks now.

datefixed: 2024-02-13

references: regressiontests/ossfuzz66646/fuzz_findfuncbypc-5178544143532032

gitfixid: f21e2f7687f3dca183026a1fb72ca1f0dcf8befa

tarrelease: libdwarf-0.9.2.tar.xz

[top]

19) DW202311-002

id: DW202311-002

cve:

fuzzer: ossfuzz id: 64496

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Null dereference from dwarf_gnu_debuglink()

product: libdwarf

description: If the Dwarf_Debug was opened with dwarf_init_object_b() there is no pathname known to libdwarf and the library was dereferencing a null pointer as a result. With the library bug fixed the fuzz/fuzz_debuglink.c test case was violating the rules of use of the function resulting in memory leakage. The documentation has been improved on this function.

datefixed: 2023-11-25

references: regressiontests/ossfuzz64496/fuzz_debuglink-615437663823462

gitfixid: d76cce559b898f7059ce5ffd82f3cfd58cb392fe

tarrelease: libdwarf-0.9.0.tar.xz

[top]

20) DW202311-001

id: DW202311-001

cve:

fuzzer: ossfuzz id: 56452

datereported: 2023-11-24

reportedby: David Korczynski

vulnerability: Null dereference

product: libdwarf

description: Passing a null Dwarf_Debug to dwarf_add_debuglink_global_path() lead to library crash. The code was not checking for a valid Dwarf_Debug Argument. The bug was present when the function was created in 2021 Moreover, oss fuzz originally noted the bug on 02 March 2023 but I can find no trace of a notification of the bug arriving before 24 November 2023. Fixing this sort of thing for all functions, here is the last commit id... ef77596af000719c04bd3e40b97139247ff3efb4

datefixed: 2023-11-25

references: regressiontests/ossfuzz56452/fuzz_debuglink-cs4231a-5927365017731072

gitfixid: 1f6988307748f427566e3266695bb72d5384bf3d

tarrelease: libdwarf-0.9.0.tar.xz

[top]

21) DW202310-002

id: DW202310-002

cve:

fuzzer: ossfuzz id: 63024

datereported: 2023-10-06

reportedby: David Korczynski

vulnerability: Heap buffer overflow

product: libdwarf

description: A copy-paste error lead to a heap buffer overflow. Named the wrong struct in calling calloc(). The function with the bug was added seven days ago.

datefixed: 2023-10-07

references: regressiontests/ossfuzz63024/fuzz_init_path-5486726493372416

gitfixid: 3a658bd1dd7437948cecbf82bb9b24f5f6122a7d

tarrelease: libdwarf-0.9.0.tar.xz

[top]

22) DW202310-001

id: DW202310-001

cve:

fuzzer: ossfuzz id: 62943

datereported: 2023-10-02

reportedby: David Korczynski

vulnerability: Heap buffer overflow

product: libdwarf

description: The heap buffer overflow was due to a failure to do initial sanity checks on a universal object. The object involved was not large enough to have a complete universal header. This bug was in the public repository for three days (in all-new code, for Apple Universal Binary objects).

datefixed: 2023-10-03

references: regressiontests/ossfuzz62943/fuzz_init_path-5486726493372416

gitfixid: aea77dad8745d9aad5275c3226e4e3156effa71f

tarrelease: libdwarf-0.9.0.tar.xz

[top]

23) DW202309-004

id: DW202309-004

cve:

fuzzer: ossfuzz id: 62842

datereported: 2023-09-30

reportedby: David Korczynski

vulnerability: Heap buffer overflow

product: libdwarf

description: The heap buffer overflow in _dwarf_memcpy_swap_bytes was due a failure to check for a valid size field (a fuzzed value) in a count of array elements.. Now we check for a sensible count. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects).

datefixed: 2023-10-01

references: regressiontests/ossfuzz62842/fuzz_findfuncbypc-4964619766333440.fuzz

gitfixid: f7c7e84e5a77915bb6570215887118d8e7759122

tarrelease: libdwarf-0.9.0.tar.xz

[top]

24) DW202309-003

id: DW202309-003

cve:

fuzzer: ossfuzz id: 62834

datereported: 2023-09-30

reportedby: David Korczynski

vulnerability: Memory leak in _dwarf_macho_setup()

product: libdwarf

description: The September 29 addition of Mach-O universal binary support resulted in memory leaks due to revising memory alloc/free incompletely when fuzzed object files were encountered.. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects).

datefixed: 2023-10-01

references: regressiontests/ossfuzz62834/fuzz_init_path-4573857635500032

gitfixid: f7c7e84e5a77915bb6570215887118d8e7759122

tarrelease: libdwarf-0.9.0.tar.xz

[top]

25) DW202309-002

id: DW202309-002

cve:

fuzzer: ossfuzz id: 62833

datereported: 2023-09-30

reportedby: David Korczynski

vulnerability: Memory leak in _dwarf_macho_setup()

product: libdwarf

description: The September 29 addition of Mach-O universal binary support resulted in memory leaks due to revising memory alloc/free incompletely when fuzzed object files were encountered.. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects).

datefixed: 2023-10-01

references: regressiontests/ossfuzz62833/fuzz_set_frame_all-4521858130903040

gitfixid: gitfixid: f7c7e84e5a77915bb6570215887118d8e7759122

tarrelease: libdwarf-0.9.0.tar.xz

[top]

26) DW202309-001

id: DW202309-001

cve:

fuzzer: ossfuzz id: 62547

datereported: 2023-09-22

reportedby: David Korczynski

vulnerability: Heap use after free

product: libdwarf

description: Calling dwarf_get_fde_for_die() causes the problem as its special handling in a user calling for fde destruction is wrong when dwarf_finish() is calling for fde destruction. dwarf_finish() can refer to freed memory in trying to delete a CIE twice. The use after free has a dependence on the order nodes are seen in the de_alloc_tree tdestroy() walk of the table (the order is not predictable). Broken in release 0.8.0 and all previous releases.

datefixed: 2023-09-23

references: regressiontests/ossfuzz62547/fuzz_stack_frame_access-5263709637050368

gitfixid: cd741379bd0203a0875b413542d5f982606ae637

tarrelease: libdwarf-0.9.0.tar.xz

[top]

27) DW202308-001

id: DW202308-001

cve:

fuzzer: ossfuzz id: 59576

datereported: 2023-06-04

reportedby: David Korczynski

vulnerability: Read from outside frame section

product: libdwarf

description: A fuzzed object results in reading outside a frame section due to a comparison being > when it should have bin >= at about line 1615 in dwarf_frame2. Could result in crash or incorrect frame data returned. Somehow we lost track of this open bug. The bug has been in the code since the augmentation was first implemented in the library.

datefixed: 2023-08-26

references: regressiontests/ossfuzz59576/fuzz_set_frame_all-5867083595120640

gitfixid: e53adc90ffd6d5d0fad61546b0041990aefd970b

tarrelease: libdwarf-0.8.0.tar.xz

[top]

28) DW202307-001

id: DW202307-001

cve:

fuzzer: ossfuzz id: 60506

datereported: 2023-07-09

reportedby: David Korczynski

vulnerability: Read from outside section

product: libdwarf

description: A fuzzed object results in reading outside a line table due to a corruption in a non-standard (experimental) line table format. A corrupted offset was not checked for sanity. The bug has been in the code since the experimental line table support was added in 2015.

datefixed: 2023-07-11

references: regressiontests/ossfuzz60506/fuzz_srcfiles-6494439909228544.fuzz

gitfixid: c8c5073f35b1efdcc610ecf369c78f87fdd34714

tarrelease: libdwarf-0.8.0.tar.xz

[top]

29) DW202306-011

id: DW202306-011

cve:

fuzzer: ossfuzz id: 60090

datereported: 2023-06-24

reportedby: David Korczynski

vulnerability: Read from invalid memory address

product: libdwarf

description: A fuzzed object results in an addition overflow in reading CIE data leading to a read from an invalid address. An almost-correct check for an overflow in case of a fuzzed aug_irix_exception_table augmentation leads to a crash. The bug was incorrect coding of a test (for an absurd value) written a few weeks ago.

datefixed: 2023-06-26

references: regressiontests/ossfuzz60090/fuzz_set_frame_all-5757752673435648

gitfixid: 6f75899f1f90fa87e52da0df09ddaa2e5be778f9

tarrelease: libdwarf-0.8.0.tar.xz

[top]

30) DW202306-010

id: DW202306-010

cve:

fuzzer: ossfuzz id: 59950

datereported: 2023-06-18

reportedby: David Korczynski

vulnerability:library reads outside frame section

product: libdwarf

description: A fuzzed object results in adding a too large value (from CIE frame augmentation data) to a pointer, having failed to check the value for reasonableness. That add overflows so dereferencing the pointer in dwarf_frame.c could lead to a crash in the library or getting nonsense information returned to the caller. This bug has been present for many years.

datefixed: 2023-06-19

references: regressiontests/ossfuzz59950/fuzz_set_frame_all-6613067367317504

gitfixid: b7437c9e4923906e9b3f3860a0c8a8289cff0a91

tarrelease: libdwarf-0.8.0.tar.xz

[top]

31) DW202306-009

id: DW202306-009

cve:

fuzzer: ossfuzz id: 59775

datereported: 2023-06-11

reportedby: David Korczynski

vulnerability: Fuzzed object results in read past end of section.

product: libdwarf

description: A fuzzed object results in reading one byte past the end of a .eh_frame section in internal function _dwarf_read_loc_expr-op(). Now we check for that before we dereference a pointer (to read the particular single-byte field).

datefixed: 2023-06-13

references: regressiontests/ossfuzz59775/fuzz_die_cu_attrs_loclist-4504718844755968

gitfixid: 9cae1be75ec333d2b8ab8800df4850ed77a8b025

tarrelease: libdwarf-0.8.0.tar.xz

[top]

32) DW202306-008

id: DW202306-008

cve:

fuzzer: ossfuzz id: 59699

datereported: 2023-06-08

reportedby: David Korczynski

vulnerability: Read past end of section

product: libdwarf

description: In reading a CIE prefix of a fuzzed object we read past the end of the section due to a failure to check a byte pointer before we dereference it in _dwarf_read_cie_fde_prefix().

datefixed: 2023-05-10

references: regressiontests/ossfuzz59699/fuzz_stack_frame_access-6523659305746432

gitfixid: c5b909630bb566cdbf68fae4091f049f3b22ff11

tarrelease: libdwarf-0.8.0.tar.xz

[top]

33) DW202306-007

id: DW202306-007

cve:

fuzzer: ossfuzz id: 59602

datereported: 2023-06-04

reportedby: David Korczynski

vulnerability: Buffer overflow read

product: libdwarf

description: In _dwarf_read_loc_expr_op() we read one byte past available data as the required check for past-end was missing.

datefixed: 2023-06-10

references: regressiontests/ossfuzz59602/fuzz_die_cu_attrs_loclist-6737086749999104

gitfixid: c8c54ba5c79b0a2687f0fa2ac331479506c3210f

tarrelease: libdwarf-0.8.0.tar.xz

[top]

34) DW202306-006

id: DW202306-006

cve:

fuzzer: ossfuzz id: 59727

datereported: 2023-06-01

reportedby: David Korczynski

vulnerability: Integer Overflow

product: libdwarf

description: Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517

datefixed: 2023-06-08

references:

gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366

tarrelease: libdwarf-0.8.0.tar.xz

[top]

35) DW202306-005

id: DW202306-005

cve:

fuzzer: ossfuzz id: 59717

datereported: 2023-06-01

reportedby: David Korczynski

vulnerability: Integer Overflow

product: libdwarf

description: Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517

datefixed: 2023-06-08

references:

gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366

tarrelease: libdwarf-0.8.0.tar.xz

[top]

36) DW202306-004

id: DW202306-004

cve:

fuzzer: ossfuzz id: 59595

datereported: 2023-06-09

reportedby: shinibufa (github)

vulnerability: Signed Integer overflow

product: libdwarf

description: Signed Integer Overflow. In _dwarf_exec_frame_instr(), called by dwarf_expand_frame_instructions(), there was a DW_CFA_LLVM_def_aspace_cfa_sf and we failed to check for overflow. The test case had a overflow. Now we do that check.

datefixed: 2023-06-10

references: regressiontests/ossfuzz59595/fuzz_set_frame_all-5319697747542016

gitfixid: e8c726e2be644df2706342b7a80633d07ecd7fb4

tarrelease: libdwarf-0.8.0.tar.xz

[top]

37) DW202306-003

id: DW202306-003

cve:

fuzzer: shinibufa

datereported: 2023-06-09

reportedby: shinibufa (github)

vulnerability: use after free

product: libdwarf

description: Heap use-after-free dwarf_query.c

datefixed: 2023-05-19

references: regressiontests/shinibufa/fuzzed_input_file

gitfixid: 4017ab8b92195641e6876b388cebe2d3307634f5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

38) DW202306-002

id: DW202306-002

cve:

fuzzer: ossfuzz id: 59519

datereported: 2023-06-01

reportedby: David Korczynski

vulnerability: Integer Overflow

product: libdwarf

description: Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517

datefixed: 2023-06-08

references: regressiontests/ossfuzz59519/fuzz_set_frame_all-4670829255065600

gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366

tarrelease: libdwarf-0.8.0.tar.xz

[top]

39) DW202306-001

id: DW202306-001

cve:

fuzzer: ossfuzz id: 59517

datereported: 2023-06-01

reportedby: David Korczynski

vulnerability: Signed Integer Overflow

product: libdwarf

description: Nine different places in dwarf_frame.c multiplied a factored value by a (usually) small integer without checking if the factored value read from the object could possibly be real. So the factored value when multiplied by the factor could overflow. In some of the cases the factored value is signed, some it is unsigned. This sanity checking of factored frame offset values never existed before in the library.

datefixed: 2023-06-08

references: regressiontests/ossfuzz59517/fuzz_set_frame_all-5741671019839488

gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366

tarrelease: libdwarf-0.8.0.tar.xz

[top]

40) DW202305-010

id: DW202305-010

cve:

fuzzer: ossfuzz id: 59478

datereported: 2023-05-31

reportedby: David Korczynski

vulnerability: Memory leak in dwarf_expand_frame_instructions()

product: libdwarf

description: Fuzzing provoked one of four error cases that could leak locally allocated memory from _dwarf_exec_frame_instructor() (called by dwarf_expand_frame_instructions). The code did free(localregtab) but needed to do FREELOCALMALLOC, a macro specific to this function which cleans up all local allocations. All four places have been corrected. Called enough times with fuzzed data could result in filling memory leading to the library being unable to work for the caller and instead just returning errors. This bug has been present in the code for many years.

datefixed: 2023-05-31

references: regressiontests/ossfuzz59478/fuzz_set_frame_all-5300774457180160

gitfixid: 8ef9c8fb613e59f534e789e91a73088eaa5b8a5a

tarrelease: libdwarf-0.8.0.tar.xz

[top]

41) DW202305-009

id: DW202305-009

cve:

fuzzer: ossfuzz id: 56451

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Write to memory fails

product: libdwarf

description: One problem is a bug in the test source: fuzz/fuzz_dnames.c. It calls dwarf_dnames_abbrevtable() incorrectly. The caller is required to provide arrays dw_idxattr_array and dw_form_array and pass a pointer to such. The code was just passing in a pointer to nothing. The library code has no possible way to determine the passed in pointers are usable. In addition, dwarf_dnames_abbrevtable() did not check that pointers passed in were non-null before use, but now it does.

datefixed: 2023-05-30

references: regressiontests/ossfuzz56451/fuzz_dnames-4986494365597696

gitfixid: 12a612fc8db38fc26cd5e6064f09a6f825891c7c

tarrelease: libdwarf-0.8.0.tar.xz

[top]

42) DW202305-008

id: DW202305-008

cve:

fuzzer: ossfuzz id: 56492

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Timeout (exceeds 50 seconds)

product: fuzz testing

description: The problem is a bug in the test source: fuzz/fuzz_macro_dwarf5.c. One must not blame the fuzzer author for examplep5(), the code was based on doc/checkexamples.c and there examplep() was really just a sketch. The testcase here no longer specifies an infinite loop.

datefixed: 2023-05-23

references: regressiontests/ossfuzz56492/fuzz_macro_dwarf5-6497277180248064

gitfixid: 97a78122268c9a74701f2dd3115f902309e9a484

tarrelease: libdwarf-0.8.0.tar.xz

[top]

43) DW202305-007

id: DW202305-007

cve:

fuzzer: ossfuzz id: 56474

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Null pointer dereference.

product: libdwarf

description: Calling dwarf_highpc_b() lead to crash. The function was dereferencing an argument before the argument was checked. Now it is checked for null before any dereference. In addition, the test code, fuzz/fuzz_die_cu_attrs_loclist.c, called dwarf_highpc_b() with a Dwarf_Die that is uninitialized local variable (hence contents unpredictable). C code has no way to catch such a caller error. This is a bug in the test code. We are changed the test code local data pointer variable to be initialized with the value 0.

datefixed: 2023-05-23

references: regressiontests/ossfuzz56474/fuzz_die_cu_attrs_loclist-4719938125561856

gitfixid: b3df2530732ea515cda5a85438871e15c6723ead

tarrelease: libdwarf-0.8.0.tar.xz

[top]

44) DW202305-006

id: DW202305-006

cve:

fuzzer: ossfuzz id: 56472

datereported: 2023-02-27

reportedby: David Korczynski

vulnerability: Crash on null pointer argument.

product: libdwarf

description: A call to any dwarf_get_fission or any API entry with _xu_ in the name (functions for DWARF5 Debug Fission, called Split Dwarf in DWARF5) would crash the caller if any relevant argument was null. The problem has existed since the code was written in 2021. Once that is fixed valgrind complains about using an uninitialized value. fuzz/fuzz_simplereader_tu.c calls libdwarf with the declation being Dwarf_Die die; no initializer present. Bad behavior, even a library crash is likely.

datefixed: 2023-05-30

references: regressiontests/ossfuzz56472/fuzz_simplereader_tu-6614412934119424

gitfixid: 8b17d41a31c33e0b3b9727a8044e0093a754d6d7

tarrelease: libdwarf-0.8.0.tar.xz

[top]

45) DW202305-005

id: DW202305-005

cve:

fuzzer: ossfuzz id: 56462

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Unpredictable crash or erroneous data returned

product: libdwarf

description: A call to dwarf_set_frame_undefined_value() dwarf_set_frame_rule_initial_value() dwarf_set_frame_same_value() dwarf_set_frame_cfa_value() dwarf_set_frame_rule_table_size() with unusable values was not being caught. Now if the set of values violates the required relationships an error is returned on requesting actual frame data. The problem has existed for many years (fixed May 23). Once that is fixed valgrind shows leaks. That is because fuzz/fuzz_set_frame_all.c fails to call dwarf_finish() and, instead, simple exit()s at several places. Updated the test source to return from its functions and only exit() from main() after the dwarf_finish() call.

datefixed: 2023-05-30

references: regressiontests/ossfuzz56462/fuzz_set_frame_all-5424385441005568

gitfixid: 21b33d13024d18b09e32914ca5718a5c81d1ad67

tarrelease: libdwarf-0.8.0.tar.xz

[top]

46) DW202305-004

id: DW202305-004

cve:

fuzzer: ossfuzz id: 56446

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Incorrect section bound check

product: libdwarf test code

description: The test program fuzz_dnames.c passed a non-null pointer containing garbage content. The fix is to initialize (in fuzz_dnames.c) the local variable to null (0).

datefixed: 2023-05-23

references: regressiontests/ossfuzz56446/fuzz_dnames-4784811358420992

gitfixid: 6fac1021c67d72da6b65f99ad815978d40b4c1e8

tarrelease: libdwarf-0.8.0.tar.xz

[top]

47) DW202305-003

id: DW202305-003

cve:

fuzzer: ossfuzz id: 59091

datereported: 2023-05-19

reportedby: David Korczynski

vulnerability: Incorrect section bound check

product: libdwarf

description: A fuzzed line table in the non-standard (experimental) two-level line table format exposed a failure as the test was v > sectionend whereas it has to be v >= sectionend as end pointers are always one-past the end of the area. This was incorrect since the experimental table support was added in 2021.

datefixed: 2023-05-19

references: regressiontests/ossfuzz59091/fuzz_macro_dwarf5-5135813562990592

gitfixid: 4017ab8b92195641e6876b388cebe2d3307634f5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

48) DW202305-002

id: DW202305-002

cve:

fuzzer: ossfuzz id: 58797

datereported: 2023-05-10

reportedby: David Korczynski

vulnerability: Memory Leak reading experimental line table

product: libdwarf

description: A fuzzed line table in the non-standard (experimental) two-level line table format had several unchecked values and one was larger than made any sense, and detecting the error revealed a memory leak. Caused by the incomplete fix to DW202305-001 (yesterday). This is was a failure to run some crucial tests, which would have exposed the problem before DW202305-001 was completed. Incomplete testing.

datefixed: 2023-05-10

references: regressiontests/ossfuzz58797/fuzz_macro_dwarf5-4872686367801344

gitfixid: eeb935200f78b8509e6b1837f6825b9d551b9f7d

tarrelease: libdwarf-0.7.0.tar.xz

[top]

49) DW202305-001

id: DW202305-001

cve:

fuzzer: ossfuzz id: 58769

datereported: 2023-05-09

reportedby: David Korczynski

vulnerability: Excessive malloc reading experimental line table

product: libdwarf

description: A fuzzed line table in the non-standard (experimental) two-level line table format had several unchecked values and one was larger than made any sense. The failure was due to oss-fuzz limiting malloc to 3GB. The failure was appropriate as the fuzzed values were inappropriate. We now check for sensible values. See libdwarf/dwarf_line_table_reader_common.h The code was in libdwarf starting in 2021.

datefixed: 2023-05-09

references: regressiontests/ossfuzz58769/fuzz_macro_dwarf5-5460713058205696

gitfixid: edc241bd0bf22c94d2d496f3cb761e60f066cd14

tarrelease: libdwarf-0.7.0.tar.xz

[top]

50) DW202304-004

id: DW202304-004

cve:

fuzzer: ossfuzz id: 58026

datereported: 2023-04-15

reportedby: David Korczynski

vulnerability: Segv on unknown address reading frame data.

product: libdwarf

description: On reading a corrupt frame register number the library could crash with a segmentation violation. This bug has been present in the code for 25 years. The conversion of an impossibly large (carefully constructed) register number to a Dwarf_Half or unsigned int the result looked reasonable, invalidating some tests for reasonableness. Now we do all the tests on the full Dwarf_Unsigned register number(s) and retain the value in the long form everywhere. Fixed 2023-04-15. Once that is fixed there is still a leak found by valgrind. Tht test code fuzz/fuzz_set_frame_all.c does a local malloc and in some cases returned without free-ing it locally. Now that local malloc has the necessary local free.

datefixed: 2023-05-30

references: regressiontests/ossfuzz58026/fuzz_set_frame_all-4582976972521472.fuzz

gitfixid: 21b33d13024d18b09e32914ca5718a5c81d1ad67

tarrelease: libdwarf-0.8.0.tar.xz

[top]

51) DW202304-003

id: DW202304-003

cve:

fuzzer: ossfuzz id: 57887

datereported: 2023-04-10

reportedby: David Korczynski

vulnerability: Reading outside the intended section data.

product: libdwarf

description: Crash in libdwarf on reading .debug_addr given a bogus index entry. Due to failing to correctly check that the index is out of range. The index was close to overflowing Dwarf_Unsigned so testing values *after* arithmetic done on the incoming index was too late: so we read outside the .debug_addr table. The checks have been incomplete since this DWARF5 section code was written. libdwarf/dwarf_query.c

datefixed: 2023-04-11

references: regressiontests/ossfuzz57887/fuzz_die_cu-4866423964172288

gitfixid: 1729d9af3f690bece912ae0f625b312566d0ae25

tarrelease: libdwarf-0.7.0.tar.xz

[top]

52) DW202304-002

id: DW202304-002

cve:

fuzzer: ossfuzz id: 57766

datereported: 2023-04-07

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow

product: libdwarf

description: Crash in libdwarf on reading an attribute due to failing to check that an index into .debug_str_offsets is sane. So we read far outside the relevant table. The checks have been incomplete since this DWARF5 section code was written. Two functions in libdwarf dwarf_form.c had the same problem.

datefixed: 2023-04-09

references: regressiontests/ossfuzz57766/fuzz_die_cu_print-5295062170075136

gitfixid: 761da806fc950c6b26c1763e8989a814e9b16a59

tarrelease: libdwarf-0.7.0.tar.xz

[top]

53) DW202304-001

id: DW202304-001

cve:

fuzzer: ossfuzz id: 57711

datereported: 2023-04-04

reportedby: David Korczynski

vulnerability: dereference null pointer

product: libdwarf

description: Crash in libdwarf on dwarf_srcfiles() call. A dereference off a null pointer due to corrupt file numbers not being noticed. Any such crash left an incomplete and misleading stack trace. The large numbers treated as Dwarf_Signed were part of the problem. Now in libdwarf we check Dwarf_Signed for negative values and issue an error if the value less than 0. So later casts to Dwarf_Unsigned work as intended. The libdwarf problems have been in the library for a very long time.

datefixed: 2023-04-06

references: regressiontests/ossfuzz57711/fuzz_srcfiles-4695324781576192

gitfixid: da0d1efbeddcff23c25704bd9672e98314928b19

tarrelease: libdwarf-0.7.0.tar.xz

[top]

54) DW202303-059

id: DW202303-059

cve:

fuzzer: ossfuzz id: 57562

datereported: 2023-03-30

reportedby: David Korczynski

vulnerability: Infinite loop reading DIEs

product: libdwarf

description: Caller looping on dwarf_siblingof_b() (wanting to touch all siblings) could be put in an infinite loop. A DW_AT_sibling attribute with a corrupted attribute value meant the caller never sees the DW_DLV_NO_ENTRY return signalling all siblings have been seen.

datefixed: 2023-04-01

references: regressiontests/ossfuzz57562/fuzz_findfuncbypc-6681114772373504

gitfixid: 21b076f652992c03f145f6edeb623918e17693f8

tarrelease: libdwarf-0.7.0.tar.xz

[top]

55) DW202303-058

id: DW202303-058

cve:

fuzzer: ossfuzz id: 57527

datereported: 2023-03-29

reportedby: David Korczynski

vulnerability: reading off end of valid data can crash library

product: libdwarf

description: A line table header truncated by a fuzzer to just the right length (anywhere within a 12 byte area) would cause memory references outside of valid data. Now we check there is object data present before referring to that area and if not, return an error.

datefixed: 2023-03-30

references: regressiontests/ossfuzz57527/fuzz_srcfiles-4599045397282816

gitfixid: 36e4063ade31c9ea6ea5df973d2045b36877885b

tarrelease: libdwarf-0.7.0.tar.xz

[top]

56) DW202303-057

id: DW202303-057

cve:

fuzzer:

datereported: 2023-03-26

reportedby: Pedro Navarro

vulnerability: Unable to read large object sections

product: libdwarf

description: A section 2GB+ in size could not be read by libdwarf. Such is a Denial of Service. Simply turning the big read into however many are needed (each below 2GB) was simple to do. The limitation in the 'read' libc function (really a Linux kernel limitation) is well documented but we had not noticed before now. Few object files are so large.

datefixed: 2023-03-28

references:

gitfixid: 8bf96199a0e130483cceca6bfacfbe4127441ab1

tarrelease: libdwarf-0.7.0.tar.xz

[top]

57) DW202303-056

id: DW202303-056

cve:

fuzzer: ossfuzz id: 57516

datereported: 2023-03-28

reportedby: David Korczynski

vulnerability: Null dereference in dwarf_hasattr()

product: libdwarf

description: With a corrupted attribute dwarf_hasattr() could try to access an implicit_const abbrev value indexing off of a NULL library internal pointer. Because the abbrev section had no actual implicit const value due to the corruption, so the internal array for holding such was not present. The pointer abl_implicit_const was NULL. Now we test the pointer for NULL and if NULL report an error. This lack of a NULL check has existed for many years.

datefixed: 2023-03-29

references: regressiontests/ossfuzz57516/fuzz_die_cu_attrs-6171488289161216

gitfixid: 5dc3de5ce70331692a2700b218fb79e0d4d81c23

tarrelease: libdwarf-0.7.0.tar.xz

[top]

58) DW202303-055

id: DW202303-055

cve:

fuzzer: ossfuzz id: 57485

datereported: 2023-03-27

reportedby: David Korczynski

vulnerability:

product: None, test code bug

description: Abort in fuzz_die_cu_attrs.c The fault was in test code. Since fixed (earlier today). No code change here.

datefixed: 2023-03-28

references: regressiontests/ossfuzz57485/

gitfixid: 2b19bc239f3cedd1b2461e4265d90633277ce704

tarrelease: libdwarf-0.7.0.tar.xz

[top]

59) DW202303-054

id: DW202303-054

cve:

fuzzer: ossfuzz id: 57463

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: dereference null in test code

product: none, test code bug

description: The fault was in test code. fuzz_die_cu_attrs.c Since fixed (earlier today). No code change here.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57463/fuzz_die_cu_attrs-5158380196200448

gitfixid: e4053c9a0f25db0bed28372d9b77a50a0307dc10

tarrelease: libdwarf-0.7.0.tar.xz

[top]

60) DW202303-053

id: DW202303-053

cve:

fuzzer: ossfuzz id: 57443

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: Double free in _dwarf_read_line_table_header

product: libdwarf

description: The same bug seen earlier A double free when a particular error is in the line table header. Fixed already. gitfixid is more recent than truly required.

datefixed: 2023-03-28

references: regressiontests/ossfuzz57443/fuzz_srcfiles-6015429578719232

gitfixid: c25a14c3fd5522aff0b1d2a77d7ee66b7c529779

tarrelease: libdwarf-0.7.0.tar.xz

[top]

61) DW202303-052

id: DW202303-052

cve:

fuzzer: ossfuzz id: 57442

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: Heap buffer overflow

product: libdwarf

description: Corrupt .debug_rngslists leads to crash when a rnglists header has a length indicating a longer section than we really have. Now we check more carefully for that situation. The bug existed from 2017, when DWARF5 support was added to the library.

datefixed: 2023-03-28

references: regressiontests/ossfuzz57442/fuzz_rng-5974595378479104

gitfixid: 271b9b8367a8151fcd98723d73382ec56f05c810

tarrelease: libdwarf-0.7.0.tar.xz

[top]

62) DW202303-051

id: DW202303-051

cve:

fuzzer: ossfuzz id: 57437

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: Heap double free

product: libdwarf

description: In a specific error case reading a fuzzed object and calling dwarf_srcfiles local data was freed twice. The bug was fixed earlier, and involved src/lib/libdwarf/dwarf_line_table_reader_common.h.

datefixed: 2023-03-28

references: regressiontests/ossfuzz57437/fuzz_srcfiles-5281689109921792

gitfixid: c25a14c3fd5522aff0b1d2a77d7ee66b7c529779

tarrelease: libdwarf-0.7.0.tar.xz

[top]

63) DW202303-050

id: DW202303-050

cve:

fuzzer: ossfuzz id: 57429

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: invalid free() in test source

product: libdwarf

description: The test source violates libdwarf requirements. fuzz/fuzz_die_cu_attrs.c was doing free on a name pointer returned from dwarf_diename. The documentation clearly states that pointer should not have a free() done. fix id below is fixing the test source.

datefixed: 3023-03-28

references: regressiontests/ossfuzz57429/fuzz_die_cu_attrs-4845537731149824

gitfixid: 2b19bc239f3cedd1b2461e4265d90633277ce704

tarrelease: libdwarf-0.7.0.tar.xz

[top]

64) DW202303-049

id: DW202303-049

cve:

fuzzer: ossfuzz id: 57408

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: Stack Overflow, _dwarf_create_a_new_cu_context...

product: libdwarf

description: involves find_sig8_target_as_global_offset() and is the same problem as seen in other guises earlier. The case becomes an infinite loop, so eventually the stack gets exhausted. Fixed. See also ossfuzz id 56540. ossfuzz id 56487. ossfuzz id 56497. ossfuzz 57480

datefixed: 2023-03-26

references: regressiontests/ossfuzz57408/fuzz_die_cu-4702098356043776

gitfixid: 24f5697aecd77092de20f0f7e7d91fbc1f2b3da0

tarrelease: libdwarf-0.7.0.tar.xz

[top]

65) DW202303-048

id: DW202303-048

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Memory leak (was double free).

product: dwarfdump

description: The command: dwarfdump --file-name=<file> -kG -ka <objectfile> results in a a memory leak. In certain error cases we failed to fclose() a FILE * used to read dwarfdump.conf. Earlier changes fixed the double free, this fixes the memory leak..

datefixed: 2023-03-24

references: regressiontests/choi015/poc_file_03

gitfixid: 24f5697aecd77092de20f0f7e7d91fbc1f2b3da0

tarrelease: libdwarf-0.7.0.tar.xz

[top]

66) DW202303-047

id: DW202303-047

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Double Free

product: dwarfdump

description: The command: dwarfdump --check-unique --check-abbrev results in a double free. The table of unique errors contained makename() data, so that aspect caused a double free as makename gets destructed independently. Fixed now,letting makename destructor do the work.

datefixed: 2023-03-24

references: regressiontests/choi015/poc_file_04

gitfixid: df64db4740f1b480e602b1112107d51f0d269828

tarrelease: libdwarf-0.7.0.tar.xz

[top]

67) DW202303-046

id: DW202303-046

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: global buffer overflow

product: dwarfdump

description: The command: dwarfdump --search-regex=t[ą--]e Note the non-ascii character. The dwarfdump regex only allows ascii in search patterns, not the rest of UTF-8.

datefixed: 2023-03-26

references: regressiontests/choi012/poc_file_10

gitfixid: 9eac0c8bbae3fadb2be3d5ee15b9c44f42d2f966

tarrelease: libdwarf-0.7.0.tar.xz

[top]

68) DW202303-045

id: DW202303-045

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Heap buffer overflow, regex

product: dwarfdump

description: The command: dwarfdump --search-regex= with a simple, really long, string. (with no file named) resulted in a buffer overflow in a buffer in dd_regex.c. No object file is required for the test. The code now checks stores to the internal array holding the non-deterministic finite automata (nfa)

datefixed: 2023-03-25

references: regressiontests/baselines/choi014.base

gitfixid: bb8fab9e5e4e40b1268b31d90882c2ab93653eaf

tarrelease: libdwarf-0.7.0.tar.xz

[top]

69) DW202303-044

id: DW202303-044

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Heap buffer overflow

product: dwarfdump

description: The command: dwarfdump --search-regex=\\ (with no file named) resulted in a heap use after free. No object file is required for the test. The dd_regex.c regex compiler failed to notice when a trailing backslash caused the pattern compiler to step past the pattern string. Now we notice and issue an error.

datefixed: 2023-03-25

references: regressiontests/baselines/choi013.base

gitfixid: 3269f43d2a044bfcce71d30ce214a305473d1ea3

tarrelease: libdwarf-0.7.0.tar.xz

[top]

70) DW202303-043

id: DW202303-043

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Heap Use After Free

product: libdwarf

description: The command: dwarfdump choi012/poc_file_08 was resulting in a heap use after free. It no longer does, due to earlier libdwarf fixes.

datefixed: 2023-03-25

references: regressiontests/choi012/poc_file_08

gitfixid: 4a8a201cdb3408a2cfdc2946418b51b884140a2c

tarrelease: libdwarf-0.7.0.tar.xz

[top]

71) DW202303-042

id: DW202303-042

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Memory Leak

product: dwarfdump

description: The command: dwarfdump --check-all choi012/poc_file_07 leaked memory in dwarfdump. A single instance of print_error_and_continue() failed to return DW_DLV_ERROR when libdwarf reported an error. Before recent fixes to libdwarf this would also generate heap-use-after-free.

datefixed: 2023-03-25

references: regressiontests/choi012/poc_file_07

gitfixid: 4a8a201cdb3408a2cfdc2946418b51b884140a2c

tarrelease: libdwarf-0.7.0.tar.xz

[top]

72) DW202303-041

id: DW202303-041

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Heap Use after Free

product: dwarfdump

description: The command: dwarfdump --check-frame-extended choi012/poc_file_06 is now working, apparently fixed by earlier bug fixes in libdwarf.

datefixed: 2023-03-25

references: regressiontests/choi012/poc_file_06

gitfixid: fd92b647e5e3a524be94b3b06c9efd14a8292946

tarrelease: libdwarf-0.7.0.tar.xz

[top]

73) DW202303-040

id: DW202303-040

cve:

fuzzer: ossfuzz

datereported: 2023-03-07

reportedby: Youngseok Choi

vulnerability: Reading from zero page

product: dwarfdump

description: The command: dwarfdump --file-abi= causes big problems. Denial of service. For many of such commands with an '=' and nothing following the dwoptarg variable is not set at all, leading to a segmentation violation.

datefixed: 2023-03-25

references: regressiontests/choi011/README

gitfixid: fd92b647e5e3a524be94b3b06c9efd14a8292946

tarrelease: libdwarf-0.7.0.tar.xz

[top]

74) DW202303-039

id: DW202303-039

cve:

fuzzer: ossfuzz id: 56480

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Reading a compilation unit never finishes

product: libdwarf

description: Reading a DWARF compilation unit header in a corrupted object caused an infinite loop of repeated calls (growing the stack at each call) in libdwarf. Now the library properly reflects a NO ENTRY case avoiding the loop and the test case returns an unrelated error due to other corruption. Arguably the loop was due to corruption too, but it should not have gotten stuck in the loop (and now it will not get stuck). See also ossfuzz id 56540. ossfuzz id 56487. ossfuzz id 56497. ossfuzz 57408

datefixed: 2023-03-20

references: regressiontests/ossfuzz56480/fuzz_die_cu_print-5264022485467136

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

75) DW202303-038

id: DW202303-038

cve:

fuzzer: ossfuzz id: 57335

datereported: 2023-03-22

reportedby: David Korczynski

vulnerability: Null dereference in dwarf_hasform()

product: libdwarf

description: Passing a null dw_return_bool pointer dereferenced zero, but now, instead we return DW_DLV_ERROR with error code DW_DLE_INVALID_NULL_ARGUMENT The test driver fuzz_die_cu_attrs.c passed in a NULL argument (the test was not modified except for adding a comment) but libdwarf now checks for a null argument.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57335/fuzz_die_cu_attrs-6235345560928256.fuzz

gitfixid: e4053c9a0f25db0bed28372d9b77a50a0307dc10

tarrelease: libdwarf-0.7.0.tar.xz

[top]

76) DW202303-037

id: DW202303-037

cve:

fuzzer: ossfuzz id: 57300

datereported: 2023-03-21

reportedby: David Korczynski

vulnerability: Out of Memory

product: libdwarf

description: Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 and others listed here.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57300/fuzz_die_cu-4752724662288384

gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78

tarrelease: libdwarf-0.7.0.tar.xz

[top]

77) DW202303-036

id: DW202303-036

cve:

fuzzer: ossfuzz id: 57300

datereported: 2023-03-15

reportedby: David Korczynski

vulnerability: Out of Memory

product: libdwarf

description: Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 See DW202303-034 57149 See DW202303-034 57193 See DW202303-034 57292

datefixed: 2023-03-24

references: regressiontests/ossfuzz57300/fuzz_die_cu-4752724662288384

gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78

tarrelease: libdwarf-0.7.0.tar.xz

[top]

78) DW202303-035

id: DW202303-035

cve:

fuzzer: ossfuzz id: 57292

datereported: 2023-03-15

reportedby: David Korczynski

vulnerability: Out of Memory

product: libdwarf

description: Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 and others listed here.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57292/fuzz_die_cu_print-5412313393135616

gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78

tarrelease: libdwarf-0.7.0.tar.xz

[top]

79) DW202303-034

id: DW202303-034

cve:

fuzzer: ossfuzz id: 57193

datereported: 2023-03-15

reportedby: David Korczynski

vulnerability: Infinite loop till out of memory.

product: libdwarf

description: The infinite loop reading a fuzzed object file was caused by letting internal function _dwarf_find_CU_Context_given_sig() unconditionally do too much in the middle of setting up a CU_Context (by letting it start more CU_contexts(). The implicit infinite loop has been there a few years, depending on the correctness of object files DWARF4/DWARF5 being read. Same bug as ossfuzz 57107, ossfuzz 57149.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57193/fuzz_die_cu_offset-5215024489824256

gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78

tarrelease: libdwarf-0.7.0.tar.xz

[top]

80) DW202303-033

id: DW202303-033

cve:

fuzzer: ossfuzz id: 57149

datereported: 2023-03-15

reportedby: David Korczynski

vulnerability: Stack overflow

product: libdwarf

description: Infinite loop till out of memory Similar to 57107 DW202303-032 but revealed there were more places in find_cu_die_base_fields that needed to call the internal _dwarf_internal_global_formref_b() function. The bug was present since 2017, when DWARF5 support for new 'base' fields was created.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57149/fuzz_srcfiles-6213793811398656

gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78

tarrelease: libdwarf-0.7.0.tar.xz

[top]

81) DW202303-032

id: DW202303-032

cve:

fuzzer: ossfuzz id: 57107

datereported: 2023-03-14

reportedby: David Korczynski

vulnerability: Infinite loop till out of memory.

product: libdwarf

description: The infinite loop reading a fuzzed object file was caused by letting internal function _dwarf_find_CU_Context_given_sig() unconditionally do too much in the middle of setting up a CU_Context (by letting it start more CU_contexts(). The implicit infinite loop has been there a few years, depending on the correctness of object files DWARF4/DWARF5 being read.

datefixed: 2023-03-23

references: regressiontests/ossfuzz57107/fuzz_die_cu_attrs_loclist-4991396240293888

gitfixid: 0c92ef5b66c5bbcacae03fbf355b12713151c098

tarrelease: libdwarf-0.7.0.tar.xz

[top]

82) DW202303-031

id: DW202303-031

cve:

fuzzer: ossfuzz id: 57048

datereported: 2023-03-14

reportedby: David Korczynski

vulnerability:

product: libdwarf

description: Calling dwarf_next_cu_header_d() on a corrupted object file results in an infinite loop and (eventually) a crash in dwarf_xu_index.c attempting to resolve an 8 byte hash key. The bug existed from the first version of this source file. The same bug as DW202303-030.

datefixed: 2023-03-22

references: regressiontests/ossfuzz57048/fuzz_findfuncbypc-4647942385696768

gitfixid: 774f98e596df9dd8f3cb92ec76243caaa4287039

tarrelease: libdwarf-0.7.0.tar.xz

[top]

83) DW202303-030

id: DW202303-030

cve:

fuzzer: ossfuzz id: 57027

datereported: 2023-03-12

reportedby: David Korczynski

vulnerability: Infinite loop reading a gnu index section.

product: libdwarf

description: Calling dwarf_next_cu_header_d() on a corrupted object file results in an infinite loop and (eventually) a crash in dwarf_xu_index.c attempting to resolve an 8 byte hash key. The bug existed from the first version of this source file, which was in 2017 as the data involved DWARF5, new in 2017.

datefixed: 2023-03-22

references: regressiontests/ossfuzz57027/fuzz_stack_frame_access-5123569972805632

gitfixid: 774f98e596df9dd8f3cb92ec76243caaa4287039

tarrelease: libdwarf-0.7.0.tar.xz

[top]

84) DW202303-029

id: DW202303-029

cve:

fuzzer: ossfuzz id: 56993

datereported: 2023-03-12

reportedby: David Korczynski

vulnerability: Leaked Memory

product: libdwarf

description: Calling dwarf_get_macro_context on a particular fuzzed object file results in a memory leak when a particular error in the corrupted section is detected. The malloc was done by the line table reader code. The bug was there for many years

datefixed: 2023-03-22

references: regressiontests/ossfuzz56993/fuzz_macro_dwarf5-5770464300761088

gitfixid: 5fde5e404a98c6727889cf14d8f93ec2138a6fa

tarrelease: libdwarf-0.7.0.tar.xz

[top]

85) DW202303-028

id: DW202303-028

cve:

fuzzer: ossfuzz id: 56958

datereported: 2023-03-12

reportedby: David Korczynski

vulnerability: Out of memory crash.

product: libdwarf

description: Failing to check for error conditions in a fuzzed object correctly lead to a giant malloc that could not succeed.

datefixed: 2023-03-22

references: regressiontests/ossfuzz56958/fuzz_stack_frame_access-6097292873826304

gitfixid: b9393bb9b6399a34f8616a272d030bdd004a5ef5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

86) DW202303-027

id: DW202303-027

cve:

fuzzer: ossfuzz id: 56906

datereported: 2023-03-09

reportedby: David Korczynski

vulnerability: Heap Buffer overflow reading rnglists section.

product: libdwarf

description: Calling dwarf_get_rnglist_rle() on a corrupted object file could result in a library crash.

datefixed: 2023-03-22

references: regressiontests/ossfuzz56906/fuzz_rng-6031783801257984.fuzz

gitfixid: b9393bb9b6399a34f8616a272d030bdd004a5ef5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

87) DW202303-026

id: DW202303-026

cve:

fuzzer: ossfuzz id: 56897

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap buffer overflow reading the rnglists section

product: libdwarf

description: dwarf_get_rnglist_offset_index_value() could fail on a corrupt object due to imprecise calculations of entry offsets. Fixed by a major update of the code in dwarf_rnglists.c

datefixed: 2023-03-22

references: regressiontests/ossfuzz56897/fuzz_rng-5105415777288192

gitfixid: b9393bb9b6399a34f8616a272d030bdd004a5ef5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

88) DW202303-025

id: DW202303-025

cve:

fuzzer: ossfuzz id: 56895

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap buffer overflow reading compilation unit header.

product: libdwarf

description: Calling dwarf_next_cu_header_d() on the fuzzed test object results in a library crash in fuzz_die_cu_attrs_loclist.c due to a failure to precisely test for a too-short Compilation Unit header. Now a DW_DLV_ERROR is returned. A very old bug.

datefixed: 2023-03-24

references: regressiontests/ossfuzz56895/fuzz_macro_dwarf5-5080340952907776

gitfixid: 771cfcca1ef6a4a7eb9595d700fc72020d0ed72e

tarrelease: libdwarf-0.7.0.tar.xz

[top]

89) DW202303-024

id: DW202303-024

cve:

fuzzer: ossfuzz id: 56807

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Memory Leak in dwarf_check_lineheader_b()

product: libdwarf

description: The fuzzed test object file resulted in a memory leak calling dwarf_check_lineheader_b() as called from fuzz_srcfiles.c Two error conditions in dwarf_line_table_reader_common.h were missing a required free().

datefixed: 2023-03-24

references: regressiontests/ossfuzz56807/fuzz_srcfiles-4626047380619264

gitfixid: 484f50ef8be0506be2e4b5fbad489868db5c7985

tarrelease: libdwarf-0.7.0.tar.xz

[top]

90) DW202303-023

id: DW202303-023

cve:

fuzzer: ossfuzz id: 56568

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Test build failure

product: Test harness

description: The fuzz_dnames.c testcase build failed. A result of removing two functions from the API, dwarf_dnames_abbrev_by_code() and dwarf_dnames_abbrev_form_by_index(). Removed 2023-02-23. The test source no longer uses those two functions. The first was slow and hard to use. The second was unusable and never worked. The documentation (libdwarf.pdf) gives alternates in the library that work.

datefixed: 2023-03-20

references:

gitfixid: 2eced75af9903ab778c3b237ec7be3ddc93ea6ec

tarrelease: libdwarf-0.7.0.tar.xz

[top]

91) DW202303-022

id: DW202303-022

cve:

fuzzer: ossfuzz id: 56497

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Memory Leak

product: test harness

description: The leak was due to the test driver fuzz/fuzz_rng.c failing to call dwarf_finish at the point of returning as a result of the corrupted binary returning an error condition.

datefixed: 2023-03-20

references: regressiontests/ossfuzz56497/

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

92) DW202303-021

id: DW202303-021

cve:

fuzzer: ossfuzz id: 56487

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Memory Leak

product: testing harness

description: The leak was due to the test driver fuzz/fuzz_rng.c failing to call dwarf_finish at the point of returning as a result of the corrupted binary returning an error condition.

datefixed: 2023-03-20

references: regressiontests/ossfuzz56487/clusterfuzz-testcase-fuzz_rng-6655451078197248

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

93) DW202303-020

id: DW202303-020

cve:

fuzzer: ossfuzz id: 56458

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap buffer overflow

product: libdwarf

description: The overflow encountered when reading a corrupted line table header in read_a_name_table_header in dwarf_debugnames.c There was insufficient checking for out of bounds values.

datefixed: 2023-03-20

references: regressiontests/ossfuzz56458/fuzz_findfuncbypc-5073632331431936

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

94) DW202303-019

id: DW202303-019

cve:

fuzzer: ossfuzz id: 56454

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Stack buffer overflow

product: libdwarf

description: The overflow was in dwarf_get_version_of_die() One return failed to free a local malloc due to the particular corruption in the text object DWARF.

datefixed: 2023-03-20

references: regressiontests/ossfuzz56454/

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

95) DW202303-018

id: DW202303-018

cve:

fuzzer: ossfuzz id: 56807

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Memory leak reading line table

product: libdwarf

description: A memory leak in _dwarf_read_line_table() reading a particular corrupted object. One return failed to free a local malloc. An very old bug, encountered reading corrupted DWARF line tables.

datefixed: 2023-03-20

references: regressiontests/ossfuzz56807fuzz_srcfiles-4626047380619264

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

96) DW202303-017

id: DW202303-017

cve:

fuzzer: ossfuzz id: 56450

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Stack Buffer Overflow

product: libdwarf

description: Stack buffer overflow in dwarf_dietype_offset. Reading a corrupted object file. The bug was in the test code, not libdwarf. Having fixed that, valgrind finds that some memory is not freed by dwarf_finish(). In dwarf_alloc.c March 20 _dwarf_free_all_of_one_debug() if the Dwarf_Debug was normal we failed to call _dwarf_free_static_errlist() and that left memory allocated from a bogus earlier call to the library (a situation libdwarf should handle and now does).

datefixed: 2023-05-30

references: regressiontests/ossfuzz56450/fuzz_die_cu_attrs-4953133005799424

gitfixid:

tarrelease: libdwarf-0.8.0.tar.xz

[top]

97) DW202303-016

id: DW202303-016

cve:

fuzzer: ossfuzz id: 56476

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow in dwarf_get_rnglist_offset_value

product: libdwarf

description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files

datefixed: 2023-03-12

references: regressiontests/ossfuzz56476/fuzz_rng-5008229349588992/

gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9

tarrelease: libdwarf-0.7.0.tar.xz

[top]

98) DW202303-015

id: DW202303-015

cve:

fuzzer: ossfuzz id: 56489

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow in read_single_rle_entry

product: libdwarf

description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files

datefixed: 2023-03-12

references: regressiontests/ossfuzz56489/fuzz_srcfiles-5091530466787328

gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9

tarrelease: libdwarf-0.7.0.tar.xz

[top]

99) DW202303-014

id: DW202303-014

cve:

fuzzer: ossfuzz id: 56478

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow in read_single_rle_entry

product: libdwarf

description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files

datefixed: 2023-03-12

references: regressiontests/ossfuzz56478/fuzz_rng-5030515398017024

gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9

tarrelease: libdwarf-0.7.0.tar.xz

[top]

100) DW202303-013

id: DW202303-013

cve:

fuzzer: ossfuzz id: 56460

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow

product: libdwarf

description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files

datefixed: 2023-03-12

references: regressiontests/ossfuzz56460/fuzz_str_offsets-5376904040677376-5240324382654464

gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9

tarrelease: libdwarf-0.7.0.tar.xz

[top]

101) DW202303-012

id: DW202303-012

cve:

fuzzer: ossfuzz id: 56456

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow

product: libdwarf

description: A heap buffer overflow reading a fuzzed object file Code reading the gdbindex section was not fully checking for valid offsets and pointers Duplicate of DW202303-006

datefixed: 2023-03-14

references: regressiontests/ossfuzz56456/fuzz_gdbindex-5240324382654464

gitfixid: e564c9350c104f16eb2223d7b29082e3deb5d2fb

tarrelease: libdwarf-0.7.0.tar.xz

[top]

102) DW202303-011

id: DW202303-011

cve:

fuzzer: ossfuzz id: 56453

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Null pointer dereference

product: libdwarf

description: A null pointer dereference in reading a fuzzed object file. This is related to checks for a correct value from the READ_AREA_LENGTH macro. The missing checks have been missing a very long time.

datefixed: 2023-03-07

references: regressiontests/ossfuzz56453

gitfixid: 86671059c1c240ae56433fa94993dcd28df2ae7d

tarrelease: libdwarf-0.7.0.tar.xz

[top]

103) DW202303-010

id: DW202303-010

cve:

fuzzer: ossfuzz

datereported: 2023-03-07

reportedby: Youngseok Choi

vulnerability: Stack overflow dwarfdump

product: dwarfdump

description: A wholly corrupted speically constructed dwarfdump.conf which is entirely inappropriate ascii really made a mess of one's screen. Now after a couple lines of garbage we give up on that conf file. And we print the garbage sanitized to avoid messing up one's screen. The fix also avoids buffer overflow.

datefixed: 2023-03-25

references: regressiontests/choi010/poc_file

gitfixid: cb8dd45770f2e1f440aab60adac0256f268fc16e

tarrelease: libdwarf-0.7.0.tar.xz

[top]

104) DW202303-009

id: DW202303-009

cve:

fuzzer: oss-fuzz id: 56443

datereported: 2023-03-01

reportedby: David Korczynski

vulnerability: Denial of service with corrupt line table header

product: libdwarf

description: With any one of a small set of corrupted data fields in a line table header that were not checked for sanity the library could try to malloc a giant space, which could take a long time to succeed or fail. After that almost anything could happen. Same as ossfuzz 56548. With the bug in 56548 fixed, now we still have a bug, there is a leak from _dwarf_special_no_dbg_error_malloc() -fsanitize does not show the bug here, but valgrind does

datefixed: 2023-05-29

references: regressiontests/ossfuzz56443/fuzz_crc_32-4750941179215872

gitfixid: 241fe0cb415569975c451d1f2d62fb2b2147cd72

tarrelease: libdwarf-0.8.0.tar.xz

[top]

105) DW202303-008

id: DW202303-008

cve:

fuzzer: oss-fuzz id: 56530

datereported: 2023-03-01

reportedby: David Korczynski

vulnerability: Denial of Service with corrupt attribute

product: libdwarf

description: With a particular data corruption dwarf_attrlist() failed to return an error and the library would dereference a stale pointer. This also provoked a memory leak. Same bug as DW202303-001

datefixed: 2023-03-02

references: ossfuzz56530/fuzz_findfuncbypc-6272642689925120

gitfixid: 948352178dc791796ed574a961191844d8322493

tarrelease: libdwarf-0.7.0.tar.xz

[top]

106) DW202303-007

id: DW202303-007

cve:

fuzzer: oss-fuzz id: 56735

datereported: 2023-03-04

reportedby: David Korczynski

vulnerability: Denial of service with corrupt debug_macro section.

product: libdwarf

description: We were not checking .debug macro data for a corrupted internal macro length field. Now we check.

datefixed: 2023-03-08

references: regressiontests/ossfuzz56735/fuzz_macro_dwarf5-6718585377783808

gitfixid: bb99fe7ddb2bc6601bcb0ee30ced6a8cc8cb0564

tarrelease: libdwarf-0.7.0.tar.xz

[top]

107) DW202303-006

id: DW202303-006

cve:

fuzzer: oss-fuzz id: 56456

datereported: 2023-03-04

reportedby: David Korczynski

vulnerability: Denial of service (crash) looking for gdbindex section.

product: libdwarf

description: The logic was wrong in a couple places (fixed now) and almost nothing was checked for validity. Now we check, so to libdwarf do not result in a crash of the library. The bugs have been there since the code was written in 2014.

datefixed: 2023-03-14

references: regressiontests/ossfuzz56456/fuzz_gdbindex-5240324382654464

gitfixid: e564c9350c104f16eb2223d7b29082e3deb5d2fb

tarrelease: libdwarf-0.7.0.tar.xz

[top]

108) DW202303-005

id: DW202303-005

cve:

fuzzer: oss-fuzz id: 56676

datereported: 2023-03-04

reportedby: David Korczynski

vulnerability: Denial of service with corrupt frame section.

product: libdwarf

description: A call to dwarf_expand_frame_instructions() with corrupt data gets a segmentation violation.

datefixed: 2023-03-14

references: regressiontests/ossfuzz56676/fuzz_set_frame_all-5081006119190528.fuzz

gitfixid: e564c9350c104f16eb2223d7b29082e3deb5d2fb

tarrelease: libdwarf-0.7.0.tar.xz

[top]

109) DW202303-004

id: DW202303-004

cve:

fuzzer: oss-fuzz id: 56666

datereported: 2023-03-04

reportedby: David Korczynski

vulnerability: Denial of service with corrupt gnu_index section

product: libdwarf

description: A corrupted .debug_gnu_index header was not properly checked, and the calculation setting up the table in memory was not correctly set up.

datefixed: 2023-03-08

references: regressiontests/ossfuzz56666/fuzz_gnu_index-4803574417981440

gitfixid: 64eaaa58703258cab02896e798664a1bb11a3d5c

tarrelease: libdwarf-0.7.0.tar.xz

[top]

110) DW202303-003

id: DW202303-003

cve:

fuzzer: oss-fuzz id: 56636

datereported: 2023-03-03

reportedby: David Korczynski

vulnerability: Denial of service with corrupt .debug_addr section

product: libdwarf

description: A corrupted .debug_addr header was not properly checked, and the calculation setting up the table in memory was not correctly set up. Calling dwarf_debug_addr_by_index() could crash the calling application.

datefixed: 2023-03-03

references: regressiontests/ossfuzz56636/fuzz_debug_addr_access-4801779658522624.fuzz

gitfixid: a3ab3f16ab67f4d976561fe0d863e1ed8b71f3c6

tarrelease: libdwarf-0.7.0.tar.xz

[top]

111) DW202303-002

id: DW202303-002

cve:

fuzzer: oss-fuzz id: 56548

datereported: 2023-03-01

reportedby: David Korczynski

vulnerability: Denial of service with corrupt line table header

product: libdwarf

description: With any one of a small set of corrupted data fields in a line table header that were not checked for sanity the library could try to malloc a giant space, which could take a long time to succeed or fail. After that almost anything could happen. Same bug fix as 56443

datefixed: 2023-03-03

references: regressiontests/ossfuzz56548/fuzz_findfuncbypc-5073632331431936

gitfixid: 89d3beccd161657760585967255bbabf67e5b4c9

tarrelease: libdwarf-0.7.0.tar.xz

[top]

112) DW202303-001

id: DW202303-001

cve:

fuzzer: oss-fuzz id: 56465

datereported: 2023-03-01

reportedby: David Korczynski

vulnerability: Denial of Service with corrupt attribute

product: libdwarf

description: With a particular data corruption dwarf_attrlist() failed to return an error and the library would dereference a stale pointer. This also provoked a memory leak.

datefixed: 2023-03-02

references: regressiontests/ossfuzz56465/fuzz_die_cu_offset-5866690199289856

gitfixid: 948352178dc791796ed574a961191844d8322493

tarrelease: libdwarf-0.7.0.tar.xz

[top]

113) DW202301-001

id: DW202301-001

cve:

fuzzer:

datereported: 2023-01-24

reportedby: Steve Kaufmann

vulnerability: Denial of Service with DW_FORM_strx3

product: libdwarf

description: Any use of DW_FORM_strx3 or DW_FORM_addrx3 would get libdwarf very confused and incorrect return values and or a library crash might result.

datefixed: 2023-01-24

references: regressiontests/kaufmann2/ct-bad.o

gitfixid: 97e90eb7ab98df60b8da0bdc2ac855711c4db804

tarrelease: libdwarf-0.6.0.tar.xz

[top]

114) DW202212-001

id: DW202212-001

cve:

fuzzer: oss-fuzz

datereported: 2022-12-28

reportedby: David Korczynski

vulnerability: Denial of Service with fuzzed object.

product: libdwarf

description: The fuzzed testcase has at least four major errors which libdwarf did not catch, leading to unpredictable library behavior, possibly including crashing the calling program. Things not noticed before the fix (and now resulting in error being reported): A) The object has just 2 sections, too few to be real. at least 3 sections are needed to contain DWARF information of any kind. B) Section zero has non-zero contents, in violation of the Elf object specification. C) The header says section strings are in section zero (a violation of the Elf specification). D) Section 1 masquerades as .note.gnu.debug-id and the description size is gigantic (as is the section, which fits the description field length).

datefixed: 2023-01-09

references: regressiontests/ossfuzz54724/clusterfuzz-54724-poc

gitfixid: 45f6d778811553a835916b60845933e6dda63b7f

tarrelease: libdwarf-0.6.0.tar.xz

[top]

115) DW202208-001

id: DW202208-001

cve:

fuzzer: unspecified

datereported: 2022-08-27

reportedby: Han Zheng

vulnerability: Double free on corrupted frame data.

product: libdwarf

description: A carefully corrupted object file would cause libdwarf to do a double free in handling an error condition in dwarf_expand_frame_instructions(). (in libdwarf/dwarf_frame.c) That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service.

datefixed: 2022-08-27

references: regressiontests/hanzheng/fuzzedobject

gitfixid: 428235e3d132fb62faf7732735fdbb034d6264b4

tarrelease: libdwarf-0.5.0.tar.xz

[top]

116) DW202207-001

id: DW202207-001

cve:

fuzzer: ossfuzz

datereported: 2022-05-01

reportedby: David Korczynski

vulnerability: buffer overflow in dwarf_form.c

product: libdwarf

description: A carefully corrupted string would cause libdwarf to read outside of a buffer containing the string (one past the end) when checking the string to determine if it is a full path in processing a .gnu.debuglink section. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service.

datefixed: 2022-07-23

references: regressiontests/ossfuzz47150/clusterfuzz-testcase-minimized-fuzz_init_path-6727387238236160.fuzz

gitfixid: 24dff940cc4c71a9c3cb5475aee231b19163a12c

tarrelease: libdwarf-0.5.0.tar.xz

[top]

117) DW202206-001

id: DW202206-001

cve:

fuzzer:

datereported: 2022-06-15

reportedby: Casper Sun

vulnerability: buffer overflow in dwarf_form.c

product: libdwarf

description: A carefully corrupted .debug_info section would cause libdwarf to read outside of a buffer containing a Dwarf_Sig8 symbolic reference. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. This failure to check for buffer overflow has been present since DWARF4 when DW_FORM_ref_sig8 was added to libdwarf.

datefixed: 2022-06-15

references: regressiontests/sleicasper2/buffer-overflow-dwarf-form

gitfixid: 7ef09e1fc9ba07653dd078edb2408631c7969162

tarrelease: libdwarf-0.4.1.tar.xz

[top]

118) DW202205-001

id: DW202205-001

cve:

fuzzer:

datereported: 2022-05-26

reportedby: Casper Sun

vulnerability: buffer overflow in dwarf_globals.c

product: libdwarf

description: A carefully corrupted .debug_pubnames section would cause libdwarf to read outside of a buffer containing the section contents. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. The bug has been present for many years.

datefixed: 2022-05-29

references: regressiontests/sleicasper/bufferoverflow

gitfixid: 8151575a6ace77d005ca5bb5d71c1bfdba3f7069

tarrelease: libdwarf-0.4.1.tar.xz

[top]

119) DW202111-016

id: DW202111-016

cve:

fuzzer: oss-fuzz-41240

datereported: 2021-11-20

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_path

product: libdwarf

description: A corrupted object. The PE object section header for section .gnu_debuglink is corrupted. A very large number is in the VirtualSize field. Attempting a malloc for the section could succeed or might fail, resulting in Denial Of Service.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41240
  

datefixed: 2021-11-21

references: regressiontests/ ossfuzz41240/clusterfuzz-testcase-minimized-fuzz_init_path-5929343686148096

gitfixid: a120c808234060c3c9b1872ab9a059aa1ac70b1d

tarrelease: libdwarf-0.4.1.tar.xz

[top]

120) DW202111-015

id: DW202111-015

cve:

fuzzer: oss-fuzz-40896

datereported: 2021-11-10

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_path

product: libdwarf

description: A corrupted object. Several Elf section sizes and section offsets are larger than the file size.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40896
  

datefixed: 2021-11-12

references: regressiontests/ossfuzz40896/clusterfuzz-testcase-fuzz_init_path-5337872492789760 regressiontests/ossfuzz40896/clusterfuzz-testcase-minimized-fuzz_init_path-5337872492789760

gitfixid: b7a119dc07c502c1334bcbf8dd04ca0e4d5f6ab6

tarrelease: libdwarf-0.4.1.tar.xz

[top]

121) DW202111-014

id: DW202111-014

cve:

fuzzer: oss-fuzz-40895

datereported: 2021-11-10

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_binary

product: libdwarf

description: A corrupted object. Some Elf section sizes are larger than the file size.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40895
  

datefixed: 2021-11-12

references: regressiontests/ossfuzz40895/clusterfuzz-testcase-fuzz_init_binary-4805508242997248 regressiontests/ossfuzz40895/clusterfuzz-testcase-minimized-fuzz_init_binary-4805508242997248

gitfixid: b7a119dc07c502c1334bcbf8dd04ca0e4d5f6ab6

tarrelease: libdwarf-0.4.1.tar.xz

[top]

122) DW202111-013

id: DW202111-013

cve:

fuzzer: oss-fuzz-40802

datereported: 2021-11-07

reportedby: David Korczynski

vulnerability: Null-dereference READ in dwarf_object_init_b

product: libdwarf

description: A corrupted object. The error handling code in dwarf_object_init_b was not properly dealing with a NULL pointer Dwarf_Error *errp in the test code.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40802
  

datefixed: 2021-11-19

references: regressiontests/ossfuzz40802/ clusterfuzz-testcase-fuzz_init_binary-5538015955517440.fuzz regressiontests/ossfuzz40802/clusterfuzz-testcase-minimized-fuzz_init_binary-5538015955517440.fuzz

gitfixid: adf4dae25b39039f1821b095688c00f3010e1d37

tarrelease: libdwarf-0.4.1.tar.xz

[top]

123) DW202111-012

id: DW202111-012

cve:

fuzzer: oss-fuzz-40801

datereported: 2021-11-07

reportedby: David Korczynski

vulnerability: Timeout in fuzz_init_path

product: libdwarf

description: A corrupted object. libdwarf detects it quickly now.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40801
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz801/clusterfuzz-testcase-fuzz_init_path-5443517279764480 regressiontests/ossfuzz40801/clusterfuzz-testcase-minimized-fuzz_init_path-5443517279764480

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

124) DW202111-011

id: DW202111-011

cve:

fuzzer: oss-fuzz-40799

datereported: 2021-11-02

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_path

product: libdwarf

description: A corrupted object. Gigantic section sizes or offsets were provoking a large malloc. Now these are detected and no malloc is attempted (an error is returned).

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40799
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz40799/clusterfuzz-testcase-fuzz_init_path-5245778948390912 regressiontests/ossfuzz40799/clusterfuzz-testcase-minimized-fuzz_init_path-5245778948390912

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

125) DW202111-010

id: DW202111-010

cve:

fuzzer: oss-fuzz-40627

datereported: 2021-11-02

reportedby: David Korczynski

vulnerability: Abrt in _dwarf_error_string

product: libdwarf

description: The Elf object file has some corruption. The read now stops with an error.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40627
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz40627/clusterfuzz-testcase-fuzz_init_path-5186858573758464 regressiontests/ossfuzz40627/clusterfuzz-testcase-minimized-fuzz_init_path-5186858573758464

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

126) DW202111-009

id: DW202111-009

cve:

fuzzer: oss-fuzz-40729

datereported: 2021-11-05

reportedby: David Korczynski

vulnerability: Timeout - fuzz_init_binary

product: libdwarf

description: The object file (macho 64 bit) has some header fuzzing that was not caught reading the object until the macho reader tried a gigantic malloc.. Now the library code catches the error before malloc and returns an error code.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40729
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz40729/clusterfuzz-testcase-minimized-fuzz_init_binary-4791627277795328

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

127) DW202111-008

id: DW202111-008

cve:

fuzzer: oss-fuzz-40731

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_binary

product: libdwarf

description: The fuzzed macho64 object has corrupted headers. The library notices and reports an error.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40731
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz40731/clusterfuzz-testcase-fuzz_init_binary-5983147574034432

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

128) DW202111-005

id: DW202111-005

cve:

fuzzer: oss-fuzz-40674

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Heap-buffer-overflow in _dwarf_elf_setup_all_section_groups

product: libdwarf

description: Object file has corrupt section group information. Results in buffer overflow.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40674#c6
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz40674/clusterfuzz-testcase-minimized-fuzz_init_path-6557751518560256

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

129) DW202111-004

id: DW202111-004

cve:

fuzzer: oss-fuzz-40673

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Null-dereference READ in dwarf_object_init_b

product: libdwarf

description: The macho object has corrupted headers and now mentions that and stops. Verified as fixed by oss-fuzz 2021-11-03

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40673
  

datefixed: 2021-11-05

references: regressiontests/ossfuzz40673/clusterfuzz-testcase-minimized-fuzz_init_path-6240961391362048.fuzz

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

130) DW202111-003

id: DW202111-003

cve:

fuzzer: oss-fuzz-40671

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Direct-leak in _dwarf_get_debug

product: libdwarf

description: The test code is calling a libdwarf-internal function (which is against the rules, only libdwarf function names beginning with dwarf_ are callable. When building libdwarf as an archive there is no means to enforce this rule) doc/libdwarf.mm/pdf now documents this rule.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40671
  

datefixed: 2021-11-05

references: regressiontests/oss40671/clusterfuzz-testcase-fuzz_init_path-5455557297831936 regressiontests/oss40671/clusterfuzz-testcase-minimized-fuzz_init_path-5455557297831936

gitfixid: b40f7e291216e771185f62292dd6304b5a662926

tarrelease: libdwarf-0.4.1.tar.xz

[top]

131) DW202111-002

id: DW202111-002

cve:

fuzzer: oss-fuzz-40669

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_path

product: libdwarf

description: Corrupted MachO object can crash caller.b Two fields in the MachO file header were not checked for sanity so nonsense large values could lead to excessive malloc and or a caller segmentation violation. Fixed by DW202111-001. Verified as fixed by oss-fuzz

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40669
  

datefixed: 2021-11-04

references: regressiontests/ossfuzz40669/clusterfuzz-testcase-minimized-fuzz_init_path-5399726397194240 regressiontests/clusterfuzz-testcase-fuzz_init_path-5399726397194240

gitfixid: b40f7e291216e771185f62292dd6304b5a662926

tarrelease: libdwarf-0.4.1.tar.xz

[top]

132) DW202111-001

id: DW202111-001

cve:

fuzzer: oss-fuzz-40663

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Timeout in fuzz_init_path

product: libdwarf

description: Corrupted MachO object can crash caller Two fields in the MachO file header were not checked for sanity so nonsense large values could lead to excessive malloc and or a caller segmentation violation. Verified by oss-fuzz as fixed. The testcase has illegal libdwarf call and improper include statements.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40663
  

datefixed: 2021-11-04

references: regressiontests/ossfuzz40663/clusterfuzz-testcase-minimized-fuzz_init_path-6122542432124928

gitfixid: b40f7e291216e771185f62292dd6304b5a662926

tarrelease: libdwarf-0.4.1.tar.xz

[top]

133) DW202010-003

id: DW202010-003

cve: CVE-2020-28163

fuzzer:

datereported: 2020-10-27

reportedby: Casper Sun

vulnerability: Passing null to %s due to corrupt line table header.

product: libdwarf

description: If a DWARF5 line table header has an invalid FORM for a pathname, the fi_file_name field may be null and printing it via %s can result in referencing memory at address 0, possibly generating segmentation violation or application crash. Now in case of null we provide a fixed string of <no file name> and for the form code we print the value and <unknown form> so there are no unpredictable effects.

  This should be visible after redhat makes it public.
  Filed on bugzilla.redhat 23 November 2021.
  bugzilla.redhat.com/show_bug.cgi?id=2026000
  

datefixed: 2020-10-28

references: regressiontests/c-sun2/nullpointer

gitfixid: faf99408e3f9f706fc3809dd400e831f989778d3

tarrelease: libdwarf-0.4.1.tar.xz

[top]

134) DW202010-002

id: DW202010-002

cve: CVE-2020-28162

fuzzer:

datereported: 2020-10-27

reportedby: Casper Sun

vulnerability: dwarfdump crashes if the nest of C scopes is too deep

product: dwarfdump

description: An object file where the DIEs depth of nesting exceeds the limit of 800 levels due to corruption or a compiler bug can result in exhausting the die stack array and writing past its end. A segmentation fault is possible. The code at the point of error was not adjusting the array index properly so an invalid dereference could occur. Now the test code is correct and the array overflow is detected resulting in a normal error return. Additional places where this could occur were identified and the proper test added.

  Unable to enter in bugzilla.redhat.com
  so CVE can be completed by Fedora (as CNA)
  as dwarfdump is not part of Fedora
  

datefixed: 2020-10-28

references: regressiontests/c-sun2/globaloverflow

gitfixid: a7fa8edd640b74daf8e7a442dcec96640875b4fb

tarrelease: libdwarf-0.4.1.tar.xz

[top]

135) DW202010-001

id: DW202010-001

cve: CVE-2020-27545

fuzzer:

datereported: 2020-10-10

reportedby: Casper Sun

vulnerability: A carefully corrupted line table can crash calling app

product: libdwarf

description: A carefully crafted object with an invalid line table could cause libdwarf to dereference a pointer reading a single byte outside of the intended .debug_line section and potentially outside of memory visible to the library. A segmentation fault is possible. The code testing for the error was coded incorrectly so an invalid dereference could occur. Now the test code is correct and the error is detected resulting in a normal error return.

  This should be visible after redhat makes it public.
  Filed on bugzilla.redhat 22 November 2021.
  bugzilla.redhat.com/show_bug.cgi?id=2025694
  

datefixed: 2020-10-17

references: regressiontests/c-sun/poc

gitfixid: 95f634808c01f1c61bbec56ed2395af997f397ea

tarrelease: libdwarf-0.4.1.tar.xz

[top]

136) DW201907-001

id: DW201907-001

cve: CVE-2019-14249

fuzzer:

datereported: 2019-07-23

reportedby: unknown

vulnerability: Denial of service with zero size section group

product: libdwarf

description: dwarf_elf_load_headers.c in libdwarf before 2019-07-05 allows attackers to cause a denial of service (division by zero) via an ELF file with a zero-size section group (SHT_GROUP), as demonstrated by dwarfdump.

datefixed: 2019-07-05

references:

gitfixid: cb7198abde46c2ae29957ad460da6886eaa606ba

tarrelease: libdwarf-0.4.1.tar.xz

[top]

137) DW201801-001

id: DW201801-001

cve:

fuzzer:

datereported: 2018-01-28

reportedby: Agostino Sarubbo

vulnerability: Incorrect frame section can crash dwarfdump

product: dwarfdump

description: A carefully crafted object with an invalid frame section set of initial-instructions can crash the frame-instructions decode in dwarfdump. In addition, a couple places in libdwarf are not as careful in checking frame data as they should be. A segmentation-fault/core-dump is possible.

datefixed: 2018-01-29

references: sarubbo-11/testcase{1,2,3,4,5}.bin

gitfixid: 7af0ecddfafed88446969cbf8c888356ad485d99

tarrelease: libdwarf-20180129.tar.gz

[top]

138) DW201712-001

id: DW201712-001

cve:

fuzzer:

datereported: 2017-12-01

reportedby: Agostino Sarubbo

vulnerability: Incorrect frame section could let caller crash

product: libdwarf

description: A carefully crafted object with an invalid frame section can result in passing back data to a caller of dwarf_get_fde_augmentation_data() is erroneous and will result in the caller reference off the end of the frame section. A segmentation-fault/core-dump is possible.

datefixed: 2017-12-01

references: sarubbo-10/1.crashes.bin

gitfixid: 329ea8e56bc9550260cae6e2e9756bfbe7e2ff6d

tarrelease: libdwarf-20180129.tar.gz

[top]

139) DW201711-002

id: DW201711-002

cve:

fuzzer:

datereported: 2017-11-08

reportedby: Agostino Sarubbo

vulnerability: Incorrect line table section could crash caller

product: libdwarf

description: An carefully crafted object with a invalid line table section crafted to end early at a particular point resulted in dereferencing outside the line table from libdwarf/dwarf_line_table_reader_common.c . A segmentation-fault/core-dump is possible.

datefixed: 2017-11-08

references: regressiontests/sarubbo-9/3.crashes.bin

gitfixid: a1644f4dde7dd5990537ff7ad22a9e94b8723186

tarrelease: libdwarf-20180129.tar.gz

[top]

140) DW201711-001

id: DW201711-001

cve:

fuzzer:

datereported: 2017-11-01

reportedby: Agostino Sarubbo

vulnerability: Incorrect frame section could crash caller

product: libdwarf

description: A carefully crafted object with a resulting invalid frame section with DW_CFA_advance_loc1 implying data off-the-end-of-section will dereference an invalid pointer. A segmentation fault and core dump is possible. Corrected code checks now.

datefixed: 2017-11-02

references: regressiontests/sarubbo-8/1.crashes.bin

gitfixid: 44349d7991e44dd3751794f76537cabcf65ee28d

tarrelease: libdwarf-20180129.tar.gz

[top]

141) DW201709-001

id: DW201709-001

cve:

fuzzer:

datereported: 2017-09-19

reportedby: Agostino Sarubbo

vulnerability: Incorrect abbrev section could crash caller.

product: libdwarf

description: A fuzzed object with a resulting invalid abbrev section where the end of section follows an abbrev tag would dereference a non-existent has-child byte.

datefixed: 2017-09-26

references: regressiontests/sarubbo-3/1.crashes.bin

gitfixid: bcc2e33908e669bacd397e3c941ffd1db3005d17

tarrelease: libdwarf-20180129.tar.gz

[top]

142) DW201706-001

id: DW201706-001

cve: CVE-2017-9998

fuzzer:

datereported: 2017-06-28

reportedby: team OWL337

vulnerability: Addition overflow in libdwarf leads to segmentation violation

product: libdwarf

description: A fuzzed object with a resulting invalid value can overflow when added to a valid pointer (depending on how the runtime memory is laid out) and thereafter a dereference results in a segmentation violation).

 see
  https://bugzilla.redhat.com/show_bug.cgi?id=1465756
  for contact information of those finding the bug.
  Fabian Wolff sent email and provided
  the link to the web page.
 

datefixed: 2017-07-06

references: regressiontests/wolff/POC1

gitfixid: e91681e8841291f57386f26a90897fd1dcf92a6e

tarrelease: libdwarf-20180129.tar.gz

[top]

143) DW201703-007

id: DW201703-007

cve:

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in strncmp (libelf bug)

product: libdwarf (libelf)

description: 7/7. A heap overflow in strncmp() is due to libelf failing to check arguments to elf_ strptr. This is not a bug in libdwarf, it is a libelf bug. A pointer for being in bounds (in a few places in this function) and a failure in a check in dwarf_attr_list(). The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output with Ubuntu 14.04:
 ==180133==ERROR: AddressSanitizer: heap-buffer-overflow
   on address 0x60d00000cff1 at pc 0x0000004476f4
   bp 0x7fff87dd7dd0 sp 0x7fff87dd7590
 READ of size 8 at 0x60d00000cff1 thread T0
    #0 0x4476f3 in __interceptor_strncmp (/home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/dwarfdump+0x4476f3)
    #1 0x7992ae in this_section_dwarf_relevant /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:608:13
    #2 0x781064 in _dwarf_setup /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:722:14
    #3 0x77d59c in dwarf_object_init /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:922:20
 With Ubuntu 16.04 libelf dwarfdump gets:
 ERROR:  dwarf_elf_init:  DW_DLE_ELF_STRPTR_ERROR (30)
 a call to elf_strptr() failed trying to get a section name
 

Fix date is irrelevant, libdwarf no longer uses libelf.

datefixed: 2017-07-06

references: regressiontests/marcel/crash7

gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1

tarrelease: libdwarf-20180129.tar.gz

[top]

144) DW201703-006

id: DW201703-006

cve: CVE-2017-9052

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in dwarf_formsdata

product: libdwarf

description: 6/7. A heap overflow in dwarf_formsdata() is due to a failure to check a pointer for being in bounds (in a few places in this function) and a failure in a check in dwarf_attr_list(). The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output with Ubuntu 14.04:
 ==180130==ERROR: AddressSanitizer: heap-buffer-overflow
  on address 0x61100000589c at pc 0x0000006cab95
  bp 0x7fff749aab10 sp 0x7fff749aab08
 READ of size 1 at 0x61100000589c thread T0
    #0 0x6cab94 in dwarf_formsdata /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_form.c:937:9
    #1 0x567daf in get_small_encoding_integer_and_name /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:1533:16
    #2 0x562f28 in get_attr_value /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:5030:24
    #3 0x555f86 in print_attribute /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:3357:13
 After fixes applied dwarfdump says:
 ERROR:  dwarf_attrlist:  DW_DLE_DW_DLE_ATTR_OUTSIDE_SECTION(281)
 

datefixed: 2017-03-21

references: regressiontests/marcel/crash6

gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1

tarrelease: libdwarf-20180129.tar.gz

[top]

145) DW201703-005

id: DW201703-005

cve: CVE-2017-9053

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in _dwarf_read_loc_expr_op()

product: libdwarf

description: 5/7. A heap overflow in _dwarf_read_loc_expr_op() is due to a failure to check a pointer for being in bounds (in a few places in this function). The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output with Ubuntu 14.04:
 ==180112==ERROR: AddressSanitizer: heap-buffer-overflow
  on address 0x60800000bf72 at pc 0x00000084dd52
  bp 0x7ffc12136fd0 sp 0x7ffc12136fc8
 READ of size 1 at 0x60800000bf72 thread T0
    #0 0x84dd51 in _dwarf_read_loc_expr_op /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc.c:250:9
    #1 0x841f16 in _dwarf_get_locdesc_c /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc2.c:109:15
    #2 0x837d08 in dwarf_get_loclist_c /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc2.c:685:18
    #3 0x57dff2 in get_location_list /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:3812:16
 After fixes applied dwarfdump says:
 ERROR:  dwarf_get_loclist_c:  DW_DLE_LOCEXPR_OFF_SECTION_END
 (343) Corrupt dwarf
 

datefixed: 2017-03-21

references: regressiontests/marcel/crash5

gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1

tarrelease: libdwarf-20180129.tar.gz

[top]

146) DW201703-004

id: DW201703-004

cve:

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in set_up_section strlen

product: libdwarf (libelf)

description: 4/7. An apparent heap overflow that gives the appearance of being in libdwarf is due to libelf call elf_strptr() failing to fully check that its arguments make sense. This is not a bug in libdwarf, it is a libelf bug. The test object is intentionally corrupted (fuzzed). The submission was with Ubuntu 14.04. With Ubuntu 16.04 there is no sanitizer error report. As of 2023 libdwarf no longer calls or references libelf.

 A portion of sanitizer output with Ubuntu 14.04:
 ==180109==ERROR: AddressSanitizer: heap-buffer-overflow
   on address 0x60b00000b000 at pc 0x00000048fd12
   bp 0x7fff4ad31ef0 sp 0x7fff4ad316b0
 READ of size 16 at 0x60b00000b000 thread T0
    #0 0x48fd11 in __interceptor_strlen (/home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/dwarfdump+0x48fd11)
    #1 0x7a84a4 in set_up_section /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:285:27
    #2 0x79aaa5 in enter_section_in_de_debug_sections_array /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:355:5
    #3 0x78170b in _dwarf_setup /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:746:19
 With Ubuntu 16.04 libelf one gets:
 ERROR:  dwarf_elf_init:  DW_DLE_ELF_STRPTR_ERROR (30)
 a call to elf_strptr() failed trying to get a section name
 

datefixed:

references: regressiontests/marcel/crash4

gitfixid:

tarrelease: libdwarf-20180129.tar.gz

[top]

147) DW201703-003

id: DW201703-003

cve:

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in strcmp

product: libdwarf (libelf)

description: 3/7. An apparent heap overflow that gives the appearance of being in libdwarf is due to libelf call elf_strptr() failing to fully check that its arguments make sense. This is not a bug in libdwarf, it is a libelf bug. The test object is intentionally corrupted (fuzzed). The submission was with Ubuntu 14.04. With Ubuntu 16.04 there is no sanitizer error report. A portion of sanitizer output with Ubuntu 14.04:

  ==180106==ERROR: AddressSanitizer: heap-buffer-overflow
    on address 0x60f00000ef09 at pc 0x000000447300
    bp 0x7ffc667dce10 sp 0x7ffc667dc5d0
  READ of size 4 at 0x60f00000ef09 thread T0
    #0 0x4472ff in __interceptor_strcmp (/home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/dwarfdump+0x4472ff)
    #1 0x79938f in this_section_dwarf_relevant /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:612:12
    #2 0x781064 in _dwarf_setup /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:722:14
    #3 0x77d59c in dwarf_object_init /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:922:20
    #4 0x899d4f in dwarf_elf_init_file_ownership /
 

With Ubuntu 16.04 libelf one gets: ERROR: dwarf_elf_init: DW_DLE_ELF_STRPTR_ERROR (30) a call to elf_strptr() failed trying to get a section name Fix date is irrelevant, libdwarf no longer uses libelf.

datefixed:

references: regressiontests/marcel/crash3

gitfixid:

tarrelease: libdwarf-20180129.tar.gz

[top]

148) DW201703-002

id: DW201703-002

cve: CVE-2017-9054

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in _dwarf_decode_s_leb128_chk()

product: libdwarf

description: 2/7. In _dwarf_decode_s_leb128_chk() a byte pointer was dereferenced just before was checked as being in bounds. The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output:
  .debug_line: line number info for a single cu
  ==180103==ERROR: AddressSanitizer: heap-buffer-overflow
    on address 0x610000007ffc at pc 0x0000007b0f5b
    bp 0x7ffe06bbf510 sp 0x7ffe06bbf508
  READ of size 1 at 0x610000007ffc thread T0
    #0 0x7b0f5a in _dwarf_decode_s_leb128_chk /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_leb.c:304:9
    #1 0x7e753e in read_line_table_program /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./
       dwarf_line_table_reader_common.c:1167:17
    #2 0x7d7fe3 in _dwarf_internal_srclines /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./dwarf_line.c:690:15
    #3 0x7f9dbb in dwarf_srclines_b /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./dwarf_line.c:944:12
    #4 0x5caaa5 in print_line_numbers_this_cu /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_lines.c:762:16
  After fix applied one gets:
  ERROR:  dwarf_srclines:  DW_DLE_LEB_IMPROPER (329)
  Runs off end of section or CU
 

datefixed: 2017-03-21

references: regressiontests/marcel/crash2

gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1

tarrelease: libdwarf-20180129.tar.gz

[top]

149) DW201703-001

id: DW201703-001

cve: CVE-2017-9055

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in dwarf_formsdata

product: libdwarf

description: 1/7. In dwarf_formsdata() a few data types were not checked as being in bounds. The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output:
 LOCAL_SYMBOLS:
 < 1><0x0000002f>    DW_TAG_subprogram
 ==180088==ERROR: AddressSanitizer: heap-buffer-overflow on
  address 0x60800000bf72 at pc 0x0000006cab95 bp
  0x7fff31425830 sp 0x7fff31425828
  READ of size 1 at 0x60800000bf72 thread T0
    #0 0x6cab94 in dwarf_formsdata /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_form.c:937:9
    #1 0x567daf in get_small_encoding_integer_and_name /home/
       ubuntu/subjects/build-asan/libdwarf/dwarfdump/print_die.c:1533:16
    #2 0x576f38 in check_for_type_unsigned /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:4301:11
    #3 0x56ad8c in formxdata_print_value /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:4374:39
    #4 0x5643be in get_attr_value /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:5140:24
    #5 0x555f86 in print_attribute /home/ubuntu/subjects/build
  ...
  After fixes applied dwarfdump gets:
  ERROR:  dwarf_attrlist:  DW_DLE_DW_DLE_ATTR_OUTSIDE_SECTION(281)
 

datefixed: 2017-03-21

references: regressiontests/marcel/crash1

gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1

tarrelease: libdwarf-20180129.tar.gz

[top]

150) DW201611-008

id: DW201611-008

cve: CVE-2016-10254

fuzzer:

datereported: 2016-11-04

reportedby: Agostino Sarubbo

vulnerability: Crash libelf reading fuzzed object.

product: libdwarf

description: This is a weakness in libelf checking. Testing that current libdwarf deals with it properly, though it was never a bug in libdwarf. The CVE mentions libdwarf.

  blogs.gentoo.org/ago/2016/11/04/elfutils-memory-allocation-failure-in-allocate_elf-common-h/
  www.openwall.com/lists/oss-security/2017/03/22/2
  

Fixed in gentoo libelf by Agostino Sarubbo.

datefixed: 2016-11-04

references: regressiontests/sarubbo-b/00011-elfutils-memalloc-allocate_elf

gitfixid:

tarrelease: libdwarf-20180129.tar.gz

[top]

151) DW201611-007

id: DW201611-007

cve: CVE-2016-10255

fuzzer:

datereported: 2016-11-04

reportedby: Agostino Sarubbo

vulnerability: Crash libelf reading fuzzed object.

product: libdwarf

description: This is a weakness in libelf checking. Testing that current libdwarf deals with it properly, though it was never a bug in libdwarf. The CVE mentions libdwarf.

  bugzilla.redhat.com/show_bug.cgi?id=1387584
  www.openwall.com/lists/oss-security/2017/03/22/1
  blogs.gentoo.org/ago/2016/11/04/elfutils-memory-allocation-failure-in-__libelf_set_rawdata_wrlock-elf_getdata-c/
  

Fixed in gentoo libelf by Agostino Sarubbo.

datefixed: 2016-11-04

references: regressiontests/sarubbo-a/00031-elfutils-memalloc-__libelf_set_rawdata_wrlock

gitfixid:

tarrelease: libdwarf-20180129.tar.gz

[top]

152) DW201611-006

id: DW201611-006

cve: CVE-2016-9480

fuzzer:

datereported: 2016-11-14

reportedby: Puzzor (Shi Ji)

vulnerability: Heap buffer overflow

product: libdwarf

description: An object with corrupt contents causes a memory reference out of bounds, a heap buffer overflow reference.

 heap-buffer-overflow in dwarf_util.c:208 for val_ptr
 # Version
 bb9a3492ac5713bed9cf3ae58ddb7afa6e9e98f8
 (in regression tests here named  heap_buf_overflow.o)
 # ASAN Output
 <0> tag: 17 DW_TAG_compile_unit  name: "strstrnocase.c" FORM 0xe "DW_FORM_strp"
 <1> tag: 46 DW_TAG_subprogram  name: "is_strstrnocase" FORM 0xe "DW_FORM_strp"
 =================
 ==1666==ERROR: AddressSanitizer: heap-buffer-overflow on address
   0xb5846db9 at p
 c 0x080b3a1b bp 0xbfa75d18 sp 0xbfa75d08
 READ of size 1 at 0xb5846db9 thread T0
    #0 0x80b3a1a in _dwarf_get_size_of_val /home/puzzor/libdwarf-code/
        libdwarf/dwarf_util.c:208
    #1 0x8056602 in _dwarf_next_die_info_ptr /home/puzzor/libdwarf-code/
        libdwarf/dwarf_die_deliv.c:1353
    #2 0x8057f4b in dwarf_child /home/puzzor/libdwarf-code/libdwarf/
       dwarf_die_de liv.c:1688
    #3 0x804b5fa in get_die_and_siblings simplereader.c:637
    #4 0x804b65c in get_die_and_siblings simplereader.c:643
    #5 0x804b3f3 in read_cu_list simplereader.c:611
    #6 0x804aeae in main simplereader.c:533
    #7 0xb6ffe275 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18275)
    #8 0x80491c0  (/home/puzzor/libdwarf-code/dwarfexample/simplereader+
         0x80491c 0)
 0xb5846db9 is located 0 bytes to the right of 249-byte region
    [0xb5846cc0,0xb5846db9)
 allocated by thread T0 here:
    #0 0xb727fae4 in __interceptor_malloc (/usr/lib/i386-linux-gnu/libasan.so.
       3+ 0xc3ae4)
    #1 0xb71a9b98  (/usr/lib/i386-linux-gnu/libelf.so.1+0x9b98)
 

For the orignal bug report see

 https://sourceforge.net/p/libdwarf/bugs/5/
 

datefixed: 2016-11-16

references: regressiontests/puzzor/heap_buf_overflow.o

gitfixid: 5dd64de047cd5ec479fb11fe7ff2692fd819e5e5

tarrelease: libdwarf-20180129.tar.gz

[top]

153) DW201611-005

id: DW201611-005

cve: CVE-2016-9558

fuzzer:

datereported: 2016-11-11

reportedby: Agostino Sarubbo

vulnerability: negation of -9223372036854775808 cannot be represented in type

product: libdwarf

description: With the right bit pattern in a signed leb number the signed leb decode would execute an unary minus with undefined effect. This is not known to generate an incorrect value, but it could, one supposes.

datefixed: 2016-11-11

references: regressiontests/sarubbo-2/00050-libdwarf-negate-itself

gitfixid: 4f19e1050cd8e9ddf2cb6caa061ff2fec4c9b5f9

tarrelease: libdwarf-20180129.tar.gz

[top]

154) DW201611-004

id: DW201611-004

cve: CVE-2016-9275

fuzzer:

datereported: 2016-11-02

reportedby: Agostino Sarubbo

vulnerability: Heap overflow in dwarf_skim_forms()

product: libdwarf

description: If a non-terminated string in a DWARF5 macro section ends a section it can result in accessing memory not in the application (out of bounds read). dwarf_macro5.c(in _dwarf_skim_forms()).

datefixed: 2016-11-04

references: regressiontests/sarubbo-2/00027-libdwarf-heapoverflow-_dwarf_skim_forms

gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6

tarrelease: libdwarf-20180129.tar.gz

[top]

155) DW201611-003

id: DW201611-003

cve: CVE-2016-9276

fuzzer:

datereported: 2016-11-02

reportedby: Agostino Sarubbo

vulnerability: Bad aranges length leads to overflow and bad pointer

product: libdwarf

description: in dwarf_arange.c(dwarf_get_aranges_list) an aranges header with corrupt data could, with an overflowing calculation, result in pointers to invalid or inappropriate memory being dereferenced.

datefixed: 2016-11-04

references: regressiontests/sarubbo-2/00026-libdwarf-heapoverflow-dwarf_get_aranges_list

gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6

tarrelease: libdwarf-20180129.tar.gz

[top]

156) DW201611-002

id: DW201611-002

cve:

fuzzer:

datereported: 2016-11-02

reportedby: Agostino Sarubbo

vulnerability: heap overflow in get_attr_value

product: libdwarf

description: Libdwarf failed to check for a bogus length in dwarf_form.c (dwarf_formblock()) resulting in a pointer pointing outside of the intended memory region. Anything could happen in the subsequent use of the bogus pointer.

 0x61300000de1c is located 0 bytes to the right of 348-byte region
 [0x61300000dcc0,0x61300000de1c)
 allocated by thread T0 here:
   #0 0x4c0ad8 in malloc /var/tmp/portage/sys-devel/llvm-3.8.1-
 r2/work/llvm-3.8.1.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:52
   #1 0x7f883cfc6206 in __libelf_set_rawdata_wrlock /tmp/portage/dev-
 libs/elfutils-0.166/work/elfutils-0.166/libelf/elf_getdata.c:318
 

datefixed: 2016-11-04

references: regressiontests/sarubbo-2/00025-libdwarf-heapoverflow-get_attr_value

gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6

tarrelease: libdwarf-20170416.tar.gz

[top]

157) DW201611-001

id: DW201611-001

cve:

fuzzer:

datereported: 2016-11-02

reportedby: Agostino Sarubbo

vulnerability: Memory allocation failure in do_decompress_zlib

product: libdwarf

description: In decompressing a zlib compressed section if the decompressed section size is nonsense (too large) an attempted malloc will fail and could let an exception propagate to callers.

  ==27994==WARNING: AddressSanitizer failed to allocate 0x62696c2f7273752f
  bytes ==27994==AddressSanitizer's allocator is terminating the process
  instead of returning 0
  ...
   #6 0x4c0ab1 in malloc /var/tmp/portage/sys-devel/llvm-3.8.1-
   #8 0x5b582e in _dwarf_load_section
   #9 0x5bb479 in dwarf_srcfiles
   #10 0x5145cd in print_one_die_section
 

datefixed: 2016-11-04

references: regressiontests/sarubbo-2/00024-libdwarf-memalloc-do_decompress_zlib

gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6

tarrelease: libdwarf-20170416.tar.gz

[top]

158) DW201610-003

id: DW201610-003

cve: CVE-2016-8679

fuzzer:

datereported: 2016-10-02

reportedby: agostino

vulnerability: dwarf_get_size_of_val out of bounds read

product: libdwarf

description: The _dwarf_get_size_of_val function in libdwarf/dwarf_util.c in Libdwarf before 20161124 allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.

  www.securityfocus.com/bid/93601
  blogs.gentoo.org/ago/2016/10/06/libdwarf-heap-based-
  buffer-overflow-in-_dwarf_get_size_of_val-dwarf_util-c/
  

datefixed: 2016-10-04

references:

gitfixid: efe48cad0693d6994d9a7b561e1c3833b073a624

tarrelease:

[top]

159) DW201610-002

id: DW201610-002

cve: CVE-2016-8680

fuzzer:

datereported: 2016-10-02

reportedby: agostino

vulnerability: Out of bounds read

product: libdwarf

description: The _dwarf_get_abbrev_for_code function in dwarf_util.c in libdwarf 20161001 and earlier allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.

  bugzilla.redhat.com/show_bug.cgi?id=1385690
  www.securityfocus.com/bid/93592
  Duplicate of CVE-2016-8681
  

datefixed: 2016-10-04

references:

gitfixid: efe48cad0693d6994d9a7b561e1c3833b073a624

tarrelease:

[top]

160) DW201610-001

id: DW201610-001

cve: CVE-2016-8681

fuzzer:

datereported: 2016-10-02

reportedby: agostino

vulnerability: Out of bounds read

product: libdwarf

description: The _dwarf_get_abbrev_for_code function in dwarf_util.c in libdwarf 20161001 and earlier allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.

  bugzilla.redhat.com/show_bug.cgi?id=1385690
  www.securityfocus.com/bid/93592
  Duplicate of CVE-2016-8680
  

datefixed: 2016-10-04

references:

gitfixid: efe48cad0693d6994d9a7b561e1c3833b073a624

tarrelease:

[top]

161) DW201609-004

id: DW201609-004

cve: CVE-2016-7510

fuzzer:

datereported: 2016-09-17

reportedby: Puzzor

vulnerability: libdwarf 20160613 Out-of-Bounds read

product: libdwarf

description: read line table program Out-of-Bounds read line_ptr in dwarf_line_table_reader_common.c:1433 Out-of-Bounds read See:

 https://bugzilla.redhat.com/show_bug.cgi?id=1377015
 https://sourceforge.net/p/libdwarf/bugs/4/
 

 # Address Sanitizer Output
 ==27763==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf4603f84 at pc 0x8408ede bp 0xffff6518 sp 0xffff6510
 READ of size 1 at 0xf4603f84 thread T0
 #0 0x8408edd in read_line_table_program /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line_table_reader_common.c:1433
 #1 0x83f716c in _dwarf_internal_srclines /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line.c:690
 #2 0x841436c in dwarf_srclines_b /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line.c:944
 #3 0x81fbc28 in print_line_numbers_this_cu /home/puzzor/test-fuzzing/code/dwarfdump/print_lines.c:763
 #4 0x815c191 in print_one_die_section /home/puzzor/test-fuzzing/code/dwarfdump/print_die.c:850
 #5 0x81565c1 in print_infos /home/puzzor/test-fuzzing/code/dwarfdump
 

datefixed: 2016-09-23

references: regressiontests/DW201609-004/poc

gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252

tarrelease: libdwarf-20160923.tar.gz

[top]

162) DW201609-003

id: DW201609-003

cve: CVE-2016-7410

fuzzer:

datereported: 2016-09-13

reportedby: https://marc.info/?l=oss-security&m=147391785920048&w=2

vulnerability: libdwarf 20160613 heap-buffer-overflow

product: libdwarf

description: With AddressSanitizer, we found a Heap-Buffer-overflow in the latest release version of dwarfdump. The crash output is as follows:

  See also:
  https://marc.info/?l=oss-security&m=147378394815872&w=2
  The testcase poc is from this web page.
  

  ==17411==ERROR: AddressSanitizer: heap-buffer-overflow on address
  0xf3808904 at pc 0x80a6f76 bp 0xffb95e78 sp 0xffb95a5c
  READ of size 4 at 0xf3808904 thread T0
  ==17411==WARNING: Trying to symbolize code, but external symbolizer is
  not initialized!
    #0 0x80a6f75 in __interceptor_memcpy ??:?
    #1 0x8426c3b in _dwarf_read_loc_section
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc.c:919
    #2 0x84250e2 in _dwarf_get_loclist_count
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc.c:970
    #3 0x8438826 in dwarf_get_loclist_c
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc2.c:551
    #4 0x81a1be8 in get_location_list
  /home/starlab/fuzzing/dwarf-20160613/dwarfdump/print_die.c:3523
    #5 0x816e1a2 in print_attribute
  

_dwarf_get_loclist_header_start() is not cautious about values in the header being absurdly large. Unclear as yet if this is the problem but it is a potential problem (fixed for next release).

  Address Sanitizer in gcc reproduces the report.
  In _dwarf_read_loc_section() the simple calculation of
  loc_section_end was wrong, so end-of section was
  incorrect for the local reads.
  With that fixed we get DW_DLE_READ_LITTLEENDIAN_ERROR when
  libdwarf attempts to read off end of section.
  

datefixed: 2016-09-23

references: regressiontests/DW201609-003/poc

gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252

tarrelease: libdwarf-20160923.tar.gz

[top]

163) DW201609-002

id: DW201609-002

cve: CVE-2016-7511

fuzzer:

datereported: 2016-09-18

reportedby: Shi Ji (@Puzzor)

vulnerability: libdwarf 20160613 Integer Overflow

product: libdwarf

description: In dwarf_get_size_of_val() with fuzzed DWARF data we get a SEGV.

  See
  https://sourceforge.net/p/libdwarf/bugs/3/
  

  ==6825== ERROR: AddressSanitizer: SEGV on unknown address 0x0583903c (pc 0xb61f1a98 sp 0xbfa388b4 bp 0xbfa38d08 T0)
  AddressSanitizer can not provide additional info.
  #1 0xb61e3c0b (/usr/lib/i386-linux-gnu/libasan.so.0+0xdc0b)
  #2 0x80a21b1 in _dwarf_get_size_of_val /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_util.c:210
  #3 0x8054214 in _dwarf_next_die_info_ptr /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1340
  #4 0x80557a5 in dwarf_child /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1640
  #5 0x804b23f in get_die_and_siblings /home/fuzzing/fuzzing/dwarf-20160613/dwarfexample/./simplereader.c:573
  

_dwarf_make_CU_Context() is insufficiently cautious about the length of a CU being absurd. Unclear as yet if this is the problem but it is a problem and is fixed for next release.

datefixed: 2016-09-23

references: regressiontests/DW201609-002/DW201609-002-poc

gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252

tarrelease: libdwarf-20160923.tar.gz

[top]

164) DW201609-001

id: DW201609-001

cve:

fuzzer:

datereported: 2016-09-16

reportedby: STARLAB

vulnerability: libdwarf 20160613 die_info_ptr in dwarf_die_deliv.c: 1533 Out-Of_bounds

product: libdwarf

description: At line 1533 of dwarf_die_deliv.c a pointer dereference is done with a pointer pointing past the end of the CU data.

 see
 https://sourceforge.net/p/libdwarf/bugs/2/
 

 ==8054==ERROR: AddressSanitizer: heap-buffer-overflow on
    address 0xf4c027ab at pc 0x819e4a4 bp 0xff88eb38 sp 0xff88eb30
 READ of size 1 at 0xf4c027ab thread T0
 #0 0x819e4a3 in dwarf_siblingof_b /home/starlab/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1533
 #1 0x8116201 in print_die_and_children_internal /home/starlab/fuzzing/dwarf-20160613/dwarfdump/print_die.c:1157
 Bug report on sourceforge.net bug list for libdwarf.
 The bad pointer dereference is due to libdwarf
 not noticing that the DWARF in that file is corrupt.
 In addition
 The code was not noticing that it could dereference
 a pointer that pointed out of bounds in the end-sibling-list
 loop.
 

 The example from the bug report (DW201609-001-poc) has
 the same problem.
 dwarfdump now reports DW_DLE_SIBLING_LIST_IMPROPER
 on both test2.o and DW201609-001-poc.
 

datefixed: 2016-09-17

references: regressiontests/DW201609-001/test2.o regressiontests/DW201609-001/DW201609-001-poc

gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252

tarrelease: libdwarf-20160923.tar.gz

[top]

165) DW201605-020

id: DW201605-020

cve: CVE-2016-5027

fuzzer:

datereported: 2016-04-25

reportedby: Yue Liu,lieanu

vulnerability: NULL dereference in _dwarf_decode_s_leb128

product: libdwarf

description: dwarf_form.c in libdwarf 20160115 allows remote attackers to cause a denial of service (crash) via a crafted elf file Apparently no crafted object file presented. However the code fix is presented in the report at openwall.com. Discovered the CVE November 2021 To attack the code just pass the argument Dwarf_Word * leb128_length as a NULL pointer (that is allowed). The code was fixed in dwarf_leb.c on 2016-04-27 20:00:06.

  bugzilla.redhat.com/show_bug.cgi?id=1330237
  www.openwall.com/lists/oss-security/2016/05/24/1
  www.openwall.com/lists/oss-security/2016/05/25/1
  

datefixed: 2016-05-27

references:

gitfixid:

tarrelease: libdwarf-20160507.tar.gz

[top]

166) DW201605-019

id: DW201605-019

cve: CVE-2016-5028

fuzzer:

datereported: 2016-05-23

reportedby: Yue Liu

vulnerability: Null dereference in print_frame_inst_bytes (dwarfdump)

product: libdwarf

description: The null dereference is due to a corrupted object file. Libdwarf was not dealing with empty (bss-like) sections since it really did not expect to see such in sections it reads! Now libdwarf catches the object error so dwarfdump sees the section as empty (as indeed it is!).

datefixed: 2016-05-23

references: regressiontests/liu/NULLdeference0522c.elf

gitfixid: a55b958926cc67f89a512ed30bb5a22b0adb10f4

tarrelease: libdwarf-20160923.tar.gz

[top]

167) DW201605-018

id: DW201605-018

cve: CVE-2016-5029

fuzzer:

datereported: 2016-05-22

reportedby: Yue Liu

vulnerability: Null dereference in create_fullest_file_path().

product: libdwarf

description: The null dereference in create_fullest_file_path() causes a crash. This is due to corrupted dwarf and the fix detects this corruption and if that null string pointer happens undetected a static string is substituted so readers can notice the situation.

  202             }
 203             if (dirno > 0 && fe->fi_dir_index > 0) {
 204                 inc_dir_name = (char *)
                         line_context->lc_include_directories[
 205                     fe->fi_dir_index - 1];
 206                 incdirnamelen = strlen(inc_dir_name);  <- $pc
 207             }
 208             full_name = (char *) _dwarf_get_alloc(dbg,
 #0  create_fullest_file_path (dbg=<optimized out>,
 fe=0x68d510, line_context=0x68c4f0, name_ptr_out=<optimized
 out>, error=0x7fffffffe2b8) at ./dwarf_line.c:206
 #1  0x00007ffff7b6d3f9 in dwarf_filename (context=<optimized
 out>, fileno_in=<optimized out>, ret_filename=0x7fffffffe280,
 error=0x7fffffffe2b8) at ./dwarf_line.c:1418
 #2  dwarf_linesrc (line=<optimized out>,
 ret_linesrc=<optimized out>, error=<optimized out>) at
 ./dwarf_line.c:1436
 

datefixed: 2016-05-22

references: regressiontests/liu/NULLdereference0522.elf

gitfixid: acae971371daa23a19358bc62204007d258fbc5e

tarrelease: libdwarf-20160923.tar.gz

[top]

168) DW201605-017

id: DW201605-017

cve: CVE-2016-5030

fuzzer:

datereported: 2016-05-19

reportedby: Yue Liu

vulnerability: Null dereference bug in _dwarf_calculate_info_section_end_ptr().

product: libdwarf

description: NULL dereference bug in _dwarf_calculate_info_section_end_ptr().

 1742         Dwarf_Off off2 = 0;
 1743         Dwarf_Small *dataptr = 0;
 1744
 1745         dbg = context->cc_dbg;
 1746         dataptr = context->cc_is_info? dbg->de_debug_info.dss_data:                 <- $pc
 1747             dbg->de_debug_types.dss_data;
 1748         off2 = context->cc_debug_offset;
 1749         info_start = dataptr + off2;
 1750         info_end = info_start + context->cc_length +
 #0  _dwarf_calculate_info_section_end_ptr
 (context=context@entry=0x0) at dwarf_query.c:1746
 #1  0x00002aaaaace307d in
 _dwarf_extract_string_offset_via_str_offsets
 (dbg=dbg@entry=0x655a70, info_data_ptr=0x6629f0
 "", attrnum=attrnum@entry=121,
 attrform=attrform@entry=26, cu_context=0x0,
 str_sect_offset_out=str_sect_offset_out@entry=0x7fffffffd718,
 error=error@entry=0x7fffffffd878) at dwarf_form.c:1099
 #2  0x00002aaaaacf4ed7 in dwarf_get_macro_defundef
 (macro_context=macro_context@entry=0x65b790,
 op_number=op_number@entry=1,
 line_number=line_number@entry=0x7fffffffd858,
 index=index@entry=0x7fffffffd860,
 offset=offset@entry=0x7fffffffd868,
 forms_count=forms_count@entry=0x7fffffffd7ce,
 macro_string=macro_string@entry=0x7fffffffd870,
 error=error@entry=0x7fffffffd878) at dwarf_macro5.c:557
 ------
 _dwarf_calculate_info_section_end_ptr (context=context@entry=0x0) at
   dwarf_query.c:1746
 1746        dataptr = context->cc_is_info? dbg->de_debug_info.dss_data:
 gef> p/x $rdi
 $4 = 0x0
 

datefixed: 2016-05-22

references: regressiontests/liu/NULLdereference0519.elf

gitfixid: 6fa3f710ee6f21bba7966b963033a91d77c952bd

tarrelease: libdwarf-20160923.tar.gz

[top]

169) DW201605-016

id: DW201605-016

cve:

fuzzer:

datereported: 2016-05-19

reportedby: Yue Liu

vulnerability: Invalid dwarf leads to dwarfdump crash in print_frame_inst_bytes.

product: dwarfdump

description: Corrupted dwarf crashes dwarfdump

 1297         }
 1298         len = len_in;
 1299         endpoint = instp + len;
 1300         for (; len > 0;) {
 1301             unsigned char ibyte = *instp;           <- $pc
 1302             int top = ibyte & 0xc0;
 1303             int bottom = ibyte & 0x3f;
 1304             int delta = 0;
 1305             int reg = 0;
 #0  print_frame_inst_bytes (dbg=dbg@entry=0x655ca0,
 cie_init_inst=<optimized out>, len_in=<optimized out>,
 data_alignment_factor=-4, code_alignment_factor=4,
 addr_size=addr_size@entry=4, offset_size=4, version=3,
 config_data=config_data@entry=0x63cda0 <g_config_file_data>)
 at print_frames.c:1301
 #1  0x000000000041b70c in print_one_cie
 (dbg=dbg@entry=0x655ca0, cie=<optimized out>,
 cie_index=cie_index@entry=2, address_size=<optimized out>,
 config_data=config_data@entry=0x63cda0 <g_config_file_data>)
 at print_frames.c:1161
 #2  0x000000000041cf52 in print_frames (dbg=0x655ca0,
 print_debug_frame=print_debug_frame@entry=1, print_eh_frame=0,
 config_data=config_data@entry=0x63cda0 <g_config_file_data>)
 at print_frames.c:2229
 gef> p/x $r13
 $1 = 0x4bcad8
 gef> p/x *$r13
 Cannot access memory at address 0x4bcad8
 

datefixed: 2016-05-22

references: regressiontests/liu/OOB_READ0519.elf

gitfixid: 6fa3f710ee6f21bba7966b963033a91d77c952bd

tarrelease: libdwarf-20160923.tar.gz

[top]

170) DW201605-015

id: DW201605-015

cve: CVE-2016-5031

fuzzer:

datereported: 2016-05-17

reportedby: Yue Liu

vulnerability: OOB read bug in print_frame_inst_bytes()

product: libdwarf

description: Test object shows an invalid read in print_frame_inst_bytes().

 1294         for (; len > 0;) {
 1295             unsigned char ibyte = *instp;           <- $pc
 1296             int top = ibyte & 0xc0;
 #0  print_frame_inst_bytes (dbg=dbg@entry=0x654c80,
    cie_init_inst=<optimized out>, len=503715, data_alignment_factor=-4,
    code_alignment_factor=1, addr_size=addr_size@entry=4, offset_size=4,
    version=3, config_data=config_data@entry=0x63bda0
    <g_config_file_data>) at print_frames.c:1295
 #1  0x000000000041b64c in print_one_cie (dbg=dbg@entry=0x654c80,
    cie=<optimized out>, cie_index=cie_index@entry=1,
    address_size=<optimized out>, config_data=
    config_data@entry=0x63bda0 <g_config_file_data>) at print_frames.c:1161
 #2  0x000000000041ce92 in print_frames (dbg=0x654c80,
    print_debug_frame=print_debug_frame@entry=1, print_eh_frame=0,
    config_data=config_data@entry=0x63bda0 <g_config_file_data>)
    at print_frames.c:2209
 gef> x/10x $r13
 0x5e7981:       Cannot access memory at address 0x5e7981
 gef> p/x $r13
 $14 = 0x5e7981
 

datefixed: 2015-05-18

references: regressiontests/liu/OOB0517_03.elf

gitfixid: ac6673e32f3443a5d36c2217cb814000930b2c54

tarrelease: libdwarf-20160923.tar.gz

[top]

171) DW201605-014

id: DW201605-014

cve: CVE-2016-5032

fuzzer:

datereported: 2016-05-17

reportedby: Yue Liu

vulnerability: OOB read bug in dwarf_get_xu_hash_entry()

product: libdwarf

description: Test object shows an invalid read in dwarf_get _xu_hash_entry, lin 211.

 #0  dwarf_get_xu_hash_entry (xuhdr=xuhdr@entry=0x657360,
    index=index@entry=2897626028, hash_value=
    hash_value@entry=0x7fffffffd5b0,
    index_to_sections=index_to_sections@entry=0x7fffffffd5a8,
    err=err@entry=0x7fffffffdb08) at dwarf_xu_index.c:211
 #1  0x00002aaaaacfd05e in _dwarf_search_fission_for_key (
    dbg=0x654a50, error=0x7fffffffdb08, percu_index_out=<synthetic pointer>,
    key_in=0x7fffffffd670, xuhdr=0x657360) at dwarf_xu_index.c:363
 #2  dwarf_get_debugfission_for_key (dbg=dbg@entry=0x654a50,
    key=key@entry=0x7fffffffd670, key_type=key_type@entry=0x2aaaaad15e2a
    "tu", percu_out=percu_out@entry=0x65a830,
    error=error@entry=0x7fffffffdb08) at dwarf_xu_index.c:577
 

datefixed: 2015-05-18

references: regressiontests/liu/OOB0517_02.elf

gitfixid: ac6673e32f3443a5d36c2217cb814000930b2c54

tarrelease: libdwarf-20160923.tar.gz

[top]

172) DW201605-013

id: DW201605-013

cve: CVE-2016-5033

fuzzer:

datereported: 2016-05-17

reportedby: Yue Liu

vulnerability: OOB read bug in print_exprloc_content

product: libdwarf

description: Test object shows an invalid write in print_exprloc_content.

 #0  print_exprloc_content (dbg=dbg@entry=0x654ea0,
    die=die@entry=0x65b110, attrib=attrib@entry=0x65b590,
    esbp=esbp@entry=0x7fffffffcef0, showhextoo=1) at print_die.c:4182
 #1  0x0000000000412fb1 in get_attr_value (dbg=dbg@entry=0x654ea0,
    tag=<optimized out>, die=die@entry=0x65b110,
    dieprint_cu_goffset=dieprint_cu_goffset@entry=11,
    attrib=attrib@entry=0x65b590, srcfiles=srcfiles@entry=0x0,
    cnt=cnt@entry=0, esbp=esbp@entry=0x7fffffffcef0, show_form=0,
    local_verbose=0) at print_die.c:4972
 

datefixed: 2015-05-18

references: regressiontests/liu/OOB0517_01.elf

gitfixid: ac6673e32f3443a5d36c2217cb814000930b2c54

tarrelease: libdwarf-20160923.tar.gz

[top]

173) DW201605-012

id: DW201605-012

cve: CVE-2016-5034

fuzzer:

datereported: 2016-05-13

reportedby: Yue Liu

vulnerability: OOB write. From relocation records

product: libdwarf

description: Test object shows an invalid write in dwarf_elf_access.c (when doing the relocations). Adding the relocation value to anything overflowed and disguised the bad relocation record. With a 32bit kernel build the test could show a double-free and coredump due to the unchecked invalid writes from relocations.

datefixed: 2016-05-17

references: regressiontests/liu/HeapOverflow0513.elf

gitfixid: 10ca310f64368dc083efacac87732c02ef560a92

tarrelease: libdwarf-20160923.tar.gz

[top]

174) DW201605-011

id: DW201605-011

cve: CVE-2016-5035

fuzzer:

datereported: 2016-05-06

reportedby: Yue Liu

vulnerability: OOB read bug in _dwarf_read_line_table_header

product: libdwarf

description: Test object shows null dereference at line 62 of dwarf_line_table_reader.c. Frame code and linetable code was not noticing data corruption.

datefixed: 2016-05-12

references: regressiontests/liu/OOB_read4.elf

gitfixid: 82d8e007851805af0dcaaff41f49a2d48473334b

tarrelease: libdwarf-20160923.tar.gz

[top]

175) DW201605-010

id: DW201605-010

cve: CVE-2016-5036

fuzzer:

datereported: 2016-05-06

reportedby: Yue Liu

vulnerability: OOB read bug in dump_block

product: libdwarf

description: Test object shows null dereverence at line 186 of dump_block() in print_sections.c Frame code was not noticing frame data corruption.

datefixed: 2016-05-12

references: regressiontests/liu/OOB_read3.elf regressiontests/liu/OOB_read3_02.elf

gitfixid: 82d8e007851805af0dcaaff41f49a2d48473334b

tarrelease: libdwarf-20160923.tar.gz

[top]

176) DW201605-009

id: DW201605-009

cve: CVE-2016-5037

fuzzer:

datereported: 2016-05-05

reportedby: Yue Liu

vulnerability: NULL dereference in _dwarf_load_section

product: libdwarf

description: Test object shows null dereverence at line 1010 if(!strncmp("ZLIB",(const char *)src,4)) { in dwarf_init_finish.c The zlib code was not checking for a corrupted length-value.

datefixed: 2016-05-06

references: regressiontests/liu/NULLderefer0505_01.elf

gitfixid: b6ec2dfd850929821626ea63fb0a752076a3c08a

tarrelease: libdwarf-20160507.tar.gz

[top]

177) DW201605-008

id: DW201605-008

cve: CVE-2016-5038

fuzzer:

datereported: 2016-05-05

reportedby: Yue Liu

vulnerability: OOB read in dwarf_get_macro_startend_file()

product: libdwarf

description: Test object shows out of bound read. OOB at: line 772 *src_file_name = macro_context->mc_srcfiles[trueindex]; in dwarf_macro5.c A string offset into .debug_str is outside the bounds of the .debug_str section.

datefixed: 2016-05-12

references: regressiontests/liu/OOB0505_02.elf regressiontests/liu/OOB0505_02_02.elf

gitfixid: 82d8e007851805af0dcaaff41f49a2d48473334b

tarrelease: libdwarf-20160923.tar.gz

[top]

178) DW201605-007

id: DW201605-007

cve: CVE-2016-5039

fuzzer:

datereported: 2016-05-05

reportedby: Yue Liu

vulnerability: OOB read bug in get_attr_value()

product: libdwarf

description: Test object shows out of bound read. Object had data all-bits-on so the existing length check did not work due to wraparound. Added a check not susceptible to that error (DW_DLE_FORM_BLOCK_LENGTH_ERROR).

datefixed: 2016-05-06

references: regressiontests/liu/OOB0505_01.elf

gitfixid: eb1472afac95031d0c9dd8c11d527b865fe7deb8

tarrelease: libdwarf-20160507.tar.gz

[top]

179) DW201605-006

id: DW201605-006

cve:

fuzzer:

datereported: 2016-05-05

reportedby: Yue Liu

vulnerability: Two Heap-Overflow bug

product: libdwarf

description: Two test objects showing a heap overflow in libdwarf when using dwarfdump. It seems that these were fixed by the previous git update. Neither gdb nor valgrind find any errors when building with yesterday's commit.

datefixed: 2016-05-04

references: regressiontests/liu/free_invalid_address.elf regressiontests/liu/heapoverflow01b.elf

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

180) DW201605-005

id: DW201605-005

cve: CVE-2016-5040

fuzzer:

datereported: 2016-05-02

reportedby: Yue Liu

vulnerability: A specially crafted DWARF section results in reading a compilation unit header that crashes the application.

product: libdwarf

description: If the data read for a compilation unit header contains a too large length value the library will read outside of its bounds and crash the application.

datefixed: 2016-05-04

references: regressiontests/liu/null02.elf

 https://bugzilla.redhat.com/show_bug.cgi?id=1332149
 

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

181) DW201605-004

id: DW201605-004

cve: CVE-2016-5041

fuzzer:

datereported: 2016-05-02

reportedby: Yue Liu

vulnerability: A specially crafted DWARF section results in a null dereference reading debugging information entries which crashes the application.

product: libdwarf

description: If no DW_AT_name is present in a debugging information entry using DWARF5 macros a null dereference in dwarf_macro5.c will crash the application.

datefixed: 2016-05-04

references: regressiontests/liu/null01.elf

 https://bugzilla.redhat.com/show_bug.cgi?id=1332148
 

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

182) DW201605-003

id: DW201605-003

cve: CVE-2016-5042

fuzzer:

datereported: 2016-05-02

reportedby: Yue Liu

vulnerability: A specially crafted DWARF section results in an infinite loop that eventually crashes the application.

product: libdwarf

description: In dwarf_get_aranges_list() an invalid count will iterate, reading from memory addresses that increase till it all fails.

datefixed: 2016-05-04

references: regressiontests/liu/infiniteloop.elf

 https://bugzilla.redhat.com/show_bug.cgi?id=1332145
 

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

183) DW201605-002

id: DW201605-002

cve: CVE-2016-5043

fuzzer:

datereported: 2016-05-02

reportedby: Yue Liu

vulnerability: A specially crafted DWARF section results in a read outside the bounds of in memory data so the calling application can crash.

product: libdwarf

description: Out of bound read bug in libdwarf git code. dwarf_dealloc() did not check the Dwarf_Ptr space argument before using it. This will lead to a out-of-bound read bug.

 backtrace:
 #0  dwarf_dealloc (dbg=dbg@entry=0x655f30, space=0xa0,
 alloc_type=alloc_type@entry=1) at dwarf_alloc.c:477
 #1  0x00002aaaaacf3296 in dealloc_srcfiles
 (dbg=0x655f30, srcfiles=0x66b8f0, srcfiles_count=17) at
 dwarf_macro5.c:1025 #2  0x00002aaaaacf50e6 in dealloc_srcfiles
 (srcfiles_count=<optimized out>, srcfiles=<optimized out>,
 dbg=<optimized out>) at dwarf_macro5.c:1021 -----
 gef> p &r->rd_dbg
 $14 = (void **) 0x90
 

datefixed: 2016-05-04

references: regressiontests/liu/outofbound01.elf

 https://bugzilla.redhat.com/show_bug.cgi?id=1332144
 

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

184) DW201605-001

id: DW201605-001

cve: CVE-2016-5044

fuzzer:

datereported: 2016-05-02

reportedby: Yue Liu

vulnerability: A specially crafted DWARF section results in a duplicate free() in libdwarf and the calling application will crash.

product: libdwarf

description: In file dwarf_elf_access.c:1071

 WRITE_UNALIGNED(dbg,target_section + offset,
     &outval,sizeof(outval),reloc_size);
 

A crafted ELF file may lead to a large offset value, which bigger than the size of target_section heap chunk, then this WRITE_UNALIGNED() function will write the value of &outval out of the heap chunk. offset is a 64bit unsigned int value, so this is more than a heap overflow bug, but also a Out-of-Bound write bug. So WRITE_UNALIGNED() need more strictly checking to prevent this.

datefixed: 2016-05-04

references: regressiontests/liu/heapoverflow01.elf

 https://bugzilla.redhat.com/show_bug.cgi?id=1332141
 

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

185) DW201601-002

id: DW201601-002

cve: CVE-2016-2050

fuzzer:

datereported: 2016-01-19

reportedby: Qixue Xiao

vulnerability: Out of bound write in get_abbrev_array_info

product: libdwarf

description: Crashes the calling program. Requires a crafted object file.

  valgrind ./dwarfdump -ka aw.elf
  ==5358== Memcheck, a memory error detector
  ==5358== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
  ==5358== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
  ==5358== Command: ../../llvm-codes/dwarf-20151114/dwarfdump/dwarfdump -ka aw.elf
  ==5358==
  ==5358== Invalid write of size 8
  ==5358==    at 0x40DA25: get_abbrev_array_info (in
  /home/xqx/test/libdwarf-test/llvm-codes/dwarf-20151114/dwarfdump/dwarfdump)
  ==5358==    by 0x40FD92: print_one_die_section (in
  /home/xqx/test/libdwarf-test/llvm-codes/dwarf-20151114/dwarfdump/dwarfdump)
  www.openwall.com/lists/oss-security/2016/01/19/9
  www.openwall.com/lists/oss-security/2016/01/25/3
  

datefixed: 2016-01-21

references: regressiontests/xqx-b/aw.elf

gitfixid: d9d40e4d802e626065ce37ff384dd69c43bc499

tarrelease: libdwarf-20160507.tar.gz

[top]

186) DW201601-001

id: DW201601-001

cve: CVE-2016-2091

fuzzer:

datereported: 2016-01-12

reportedby: Qixue Xiao

vulnerability: Out of bound read in dwarf_read_cie_fde_prefix()

product: libdwarf

description: Crashes the calling program. Requires a crafted object file.

  *** DWARF CHECK: DW_DLE_DEBUG_FRAME_LENGTH_NOT_MULTIPLE
  len=0x00000010, len size=0x00000004, extn size=0x00000000, totl
  length=0x00000014, addr size=0x00000008, mod=0x00000004 must be zero
  in cie, offset 0x00000000. ***
  7   ==53495== Invalid read of size 2
  1 ==53495==    at 0x4C2F7E0: memcpy@@GLIBC_2.14 (in
  /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  2 ==53495==    by 0x43287F: dwarf_read_cie_fde_prefix (dwarf_frame2.c:934)
  3 ==53495==    by 0x431305: _dwarf_get_fde_list_internal (dwarf_frame2.c:268)
  4 ==53495==    by 0x42EB5F: dwarf_get_fde_list_eh (dwarf_frame.c:1101)
  5 ==53495==    by 0x41BABE: print_frames (print_frames.c:1835)
  6 ==53495==    by 0x40485B: process_one_file (dwarfdump.c:1323)
  7 ==53495==    by 0x403529: main (dwarfdump.c:630)
  www.openwall.com/lists/oss-security/2016/01/19/3
  www.openwall.com/lists/oss-security/2016/05/28/8
  

datefixed: 2016-01-21

references: regressiontests/xqx-b/awbug5.elf

gitfixid: d9d40e4d802e626065ce37ff384dd69c43bc499

tarrelease: libdwarf-20160507.tar.gz

[top]

187) DW201512-002

id: DW201512-002

cve: CVE-2015-8538

fuzzer:

datereported: 2015-12-14

reportedby: Adam Maris

vulnerability: Out-of-bounds read in dwarf_leb.c

product: libdwarf

description: libdwarf 20151114 and earlier allows remote attackers to cause a denial of service (NULL pointer dereference and crash) via a debug_abbrev section marked NOBITS in an ELF file. The CVE report mentions a reproducer object file but such is not present. Due to recent tool advances (like coverity scan) we are confident this was fixed long ago.

  bugzilla.redhat.com/show_bug.cgi?id=1291299
  www.openwall.com/lists/oss-security/2015/12/10/3
  

datefixed: 2018-01-01

references:

gitfixid:

tarrelease: libdwarf-20160507.tar.gz

[top]

188) DW201512-001

id: DW201512-001

cve: CVE-2015-8750

fuzzer:

datereported: 2015-12-26

reportedby: Qixue Xiao (xqx)

vulnerability: Null pointer dereference in libdwarf

product: libdwarf

description: libdwarf 20151114 and earlier allows remote attackers to cause a denial of service (NULL pointer dereference and crash) via a debug_abbrev section marked NOBITS in an ELF file.

  bugzilla.redhat.com/show_bug.cgi?id=1294264
  www.openwall.com/lists/oss-security/2016/01/07/11
  

datefixed: 2015-12-31

references: regressiontests/xqx-c/awbug6.elf

gitfixid:

tarrelease: libdwarf-20160507.tar.gz

[top]

189) DW201412-001

id: DW201412-001

cve: CVE-2014-9482

fuzzer:

datereported: 2014-12-31

reportedby: Adam Maris

vulnerability: Use after free vulnerability in Dwarfdump

product: dwarfdump

description: The use-after-free has no attached testcase anywhere. Due to recent tool advances (like coverity scan) we are confident this was fixed long ago.

  bugzilla.redhat.com/show_bug.cgi?id=1177758
  www.openwall.com/lists/oss-security/2014/12/31/3
  www.openwall.com/lists/oss-security/2015/01/03/14
  

datefixed: 2018-01-01

references:

gitfixid:

tarrelease: libdwarf-20160507.tar.gz

[top]

[top]

libdwarf-code-0.11.1/bugxml/dwarfbug.xml000066400000000000000000005361121472336503500201350ustar00rootroot00000000000000 DW202407-012 ossfuzz id: 70763 2024-07-28 David Korczynski libdwarf InfiniteRecursion reading CUs leads to crash The code added in git fix id 6b40a0ed378826273080a7b11e7274c2b61d018b two days ago involved adding code setting up compilation unit data and in find_cu_die_base_fields() we called dwarf_global_formref() whereas we must call _dwarf_internal_global_formref_b() to avoid an infinite recursion. A crash was only possible when reading corrupt DWARF. 2024-07-28 regressiontests/ossfuzz70763/fuzz_macro_dwarf5-5161075908083712 1b79d618bf5aab2bda9be495c531b13e94ae056a DW202407-011 ossfuzz id: 70753 2024-07-28 David Korczynski libdwarf InfiniteRecursion reading CUs leads to crash The code added in git fix id 6b40a0ed378826273080a7b11e7274c2b61d018b two days ago involved adding code setting up compilation unit data and in find_cu_die_base_fields() we called dwarf_global_formref() whereas we must call _dwarf_internal_global_formref_b() to avoid an infinite recursion. A crash was only possible when reading corrupt DWARF. 2024-07-28 regressiontests/ossfuzz70753/fuzz_die_cu_offset-6598270743281664 1b79d618bf5aab2bda9be495c531b13e94ae056a DW202407-010 ossfuzz id: 70721 2024-07-27 David Korczynski libdwarf Heap Use After Free Libdwarf was referencing freed space attempting to free up a compilation-unit DIE in the process of creating a context for a compilation-unit DIE, given a particular corruption of the DWARF data being read. This bug has been present for several years. 2024-07-27 regressiontests/ossfuzz70721/fuzz_macro_dwarf5-4907954017468416 6fa96f95e043bac9b98ca6f7a9a542dae8f46cd DW202407-009 ossfuzz id: 70287 2024-07-10 David Korczynski libdwarf Huge malloc request could crash caller Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. 2024-07-10 regressiontests/ossfuzz70287/ d7c4efdcc7952b38a237a36ccedf364018e0fb1c DW202407-008 ossfuzz id: 70282 2024-07-10 David Korczynski libdwarf Huge malloc request could crash caller Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. 2024-07-10 regressiontests/ossfuzz70282/ d7c4efdcc7952b38a237a36ccedf364018e0fb1c DW202407-007 ossfuzz id: 70278 2024-07-10 David Korczynski libdwarf Huge malloc request could crash caller Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. 2024-07-10 regressiontests/ossfuzz70278/ d7c4efdcc7952b38a237a36ccedf364018e0fb1c DW202407-006 ossfuzz id: 70277 2024-07-10 David Korczynski libdwarf Huge malloc request could crash caller Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. 2024-07-10 regressiontests/ossfuzz70277/ d7c4efdcc7952b38a237a36ccedf364018e0fb1c DW202407-005 ossfuzz id: 70266 2024-07-10 David Korczynski libdwarf Huge malloc request could crash caller Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. 2024-07-10 regressiontests/ossfuzz70266/fuzz_findfuncbypc-6093996460408832 d7c4efdcc7952b38a237a36ccedf364018e0fb1c DW202407-004 ossfuzz id: 70263 2024-07-10 David Korczynski libdwarf Huge malloc request could crash caller Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. 2024-07-10 regressiontests/ossfuzz70263/fuzz_die_cu-4960441042796544 d7c4efdcc7952b38a237a36ccedf364018e0fb1c DW202407-003 ossfuzz id: 70256 2024-07-10 David Korczynski libdwarf Huge malloc request could crash caller Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. 2024-07-10 regressiontests/ossfuzz70256/fuzz_rng-483822291655065 d7c4efdcc7952b38a237a36ccedf364018e0fb1c DW202407-002 ossfuzz id: 70246 2024-07-09 David Korczynski libdwarf Huge malloc request could crash caller Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so. 2024-07-10 regressiontests/ossfuzz70246/fuzz_macro_dwarf5-5128935898152960 d7c4efdcc7952b38a237a36ccedf364018e0fb1c DW202407-001 ossfuzz id: 70244 2024-07-09 David Korczynski libdwarf Memory leaks reading rnglists Libdwarf was failing to free() some allocations in reading .debug_rnglists. This bug has been present for a week or so. 2024-07-09 regressiontests/ossfuzz70244/fuzz_die_cu_attrs_loclist-4958134427254784 906a4428a5d92e17948da4249cfccbe8f5ae8005 DW202406-002 ossfuzz id: 69641 2024-06-14 David Korczynski libdwarf Memory Leak reading .debug_loclists During startup (reading initial fields from .debug_loclists) libdwarf was allocating an array of integers but in the normal case was failing to free the array. This bug in DWARF5 handling has been in the code for a week or so. See also DW202406-001. 2024-06-15 regressiontests/ossfuzz69641/fuzz_die_cu_attrs_loclist-6271271030030336 32d832900ebe2e61ec07e82625a561415be05424 libdwarf-0.10.1.tar.xz DW202406-001 ossfuzz id: 69639 2024-06-14 David Korczynski libdwarf Memory Leak reading .debug_loclists During startup (reading initial fields from .debug_loclists) libdwarf was allocating an array of integers but in the normal case was failing to free the array. This bug in DWARF5 handling has been in the code for a week or so. See also DW202406-002. 2024-06-15 regressiontests/ossfuzz69639/fuzz_die_cu_offset-6001910176350208 32d832900ebe2e61ec07e82625a561415be05424 libdwarf-0.10.1.tar.xz DW202403-001 ossfuzz id: 67490 2024-03-18 David Korczynski libdwarf Reads past end of line table A carefully corrupted line table header can cause libdwarf to read outside of its allowed areas in a .debug_line section reading the file names part of the header. The failure to check for end-of-section before reading past end-of-section at the very last byte in section (at a very few specific points in the line table reader code where a valid line table header would not require a test) has been present for many years. 2024-02-19 regressiontests/ossfuzz67490/fuzz_srcfiles-5195296927711232 2930f3121ee6b07da405103934c329bbeca0382f libdwarf-0.9.2.tar.xz DW202402-003 hongg 2024-02-18 ifygecko libdwarf crashes randomly reading fuzzed locllist A carefully corrupted loclists entry can cause libdwarf to read outside of its allowed areas in dwarf_loclists.c due to lack of a sanity check. A segmentation error and libdwarf crash is likely. Similar code in dwarf_rnglists.c and that now has the additional checks. The bugs have been present in both since the code was created in June 2020. 2024-02-18 regressiontests/hongg2024-02-18/SIGSEGV-m.fuzz 5cfbd87dff4fc3c3b595bb92ed886934945b372c libdwarf-0.9.2.tar.xz DW202402-002 CVE-2024-2002 hongg 2024-02-16 ifygecko libdwarf crashes randomly on fuzzed object In a multiply-corrupted DWARF object libdwarf may try to dealloc(free) an allocation twice. Results are unpredictable and various. This has been a possibility since we added code to prevent leaks when generating 'unattached' Dwarf_Error records (where there is no Dwarf_Debug available at the point of error). The problem was introduced in libdwarf-0.1.0 in 2021. 2024-02-17 regressiontests/hongg2024-02-16/SIGABRT-a.fuzz SIGABRT-b.fuzz SIGABRT-c.fuzz SIGSEGV-d.fuzz SIGSEGV-e.fuzz SIGSEGV-f.fuzz SIGSEGV-g.fuzz SIGSEGV-h.fuzz SIGSEGV-i.fuzz SIGSEGV-k.fuzz 404e6b1b14f60c81388d50b4239f81d461b3c3ad libdwarf-0.9.2.tar.xz DW202402-001 ossfuzz id: 66646 2024-02-12 David Korczynski libdwarf Reference memory outside of section. The data pointer for DW_FORM_ref1 was not being validated as pointing into the section before being dereferenced. Here reading a corrupted DWARF section. A library crash is likely. This test failure happened to be on a DW_AT_abstract_origin attribute, but the problem applies in many other situations. Nearly the other forms had checks. This check has been missing for many years. Similarly the requisite check was missing from DW_FORM_block1 for many years and that too was fixed so all the FORMs have checks now. 2024-02-13 regressiontests/ossfuzz66646/fuzz_findfuncbypc-5178544143532032 f21e2f7687f3dca183026a1fb72ca1f0dcf8befa libdwarf-0.9.2.tar.xz DW202311-002 ossfuzz id: 64496 2023-02-28 David Korczynski libdwarf Null dereference from dwarf_gnu_debuglink() If the Dwarf_Debug was opened with dwarf_init_object_b() there is no pathname known to libdwarf and the library was dereferencing a null pointer as a result. With the library bug fixed the fuzz/fuzz_debuglink.c test case was violating the rules of use of the function resulting in memory leakage. The documentation has been improved on this function. 2023-11-25 regressiontests/ossfuzz64496/fuzz_debuglink-615437663823462 d76cce559b898f7059ce5ffd82f3cfd58cb392fe libdwarf-0.9.0.tar.xz DW202311-001 ossfuzz id: 56452 2023-11-24 David Korczynski libdwarf Null dereference Passing a null Dwarf_Debug to dwarf_add_debuglink_global_path() lead to library crash. The code was not checking for a valid Dwarf_Debug Argument. The bug was present when the function was created in 2021 Moreover, oss fuzz originally noted the bug on 02 March 2023 but I can find no trace of a notification of the bug arriving before 24 November 2023. Fixing this sort of thing for all functions, here is the last commit id... ef77596af000719c04bd3e40b97139247ff3efb4 2023-11-25 regressiontests/ossfuzz56452/fuzz_debuglink-cs4231a-5927365017731072 1f6988307748f427566e3266695bb72d5384bf3d libdwarf-0.9.0.tar.xz DW202310-002 ossfuzz id: 63024 2023-10-06 David Korczynski libdwarf Heap buffer overflow A copy-paste error lead to a heap buffer overflow. Named the wrong struct in calling calloc(). The function with the bug was added seven days ago. 2023-10-07 regressiontests/ossfuzz63024/fuzz_init_path-5486726493372416 3a658bd1dd7437948cecbf82bb9b24f5f6122a7d libdwarf-0.9.0.tar.xz DW202310-001 ossfuzz id: 62943 2023-10-02 David Korczynski libdwarf Heap buffer overflow The heap buffer overflow was due to a failure to do initial sanity checks on a universal object. The object involved was not large enough to have a complete universal header. This bug was in the public repository for three days (in all-new code, for Apple Universal Binary objects). 2023-10-03 regressiontests/ossfuzz62943/fuzz_init_path-5486726493372416 aea77dad8745d9aad5275c3226e4e3156effa71f libdwarf-0.9.0.tar.xz DW202309-004 ossfuzz id: 62842 2023-09-30 David Korczynski libdwarf Heap buffer overflow The heap buffer overflow in _dwarf_memcpy_swap_bytes was due a failure to check for a valid size field (a fuzzed value) in a count of array elements.. Now we check for a sensible count. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects). 2023-10-01 regressiontests/ossfuzz62842/fuzz_findfuncbypc-4964619766333440.fuzz f7c7e84e5a77915bb6570215887118d8e7759122 libdwarf-0.9.0.tar.xz DW202309-003 ossfuzz id: 62834 2023-09-30 David Korczynski libdwarf Memory leak in _dwarf_macho_setup() The September 29 addition of Mach-O universal binary support resulted in memory leaks due to revising memory alloc/free incompletely when fuzzed object files were encountered.. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects). 2023-10-01 regressiontests/ossfuzz62834/fuzz_init_path-4573857635500032 f7c7e84e5a77915bb6570215887118d8e7759122 libdwarf-0.9.0.tar.xz DW202309-002 ossfuzz id: 62833 2023-09-30 David Korczynski libdwarf Memory leak in _dwarf_macho_setup() The September 29 addition of Mach-O universal binary support resulted in memory leaks due to revising memory alloc/free incompletely when fuzzed object files were encountered.. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects). 2023-10-01 regressiontests/ossfuzz62833/fuzz_set_frame_all-4521858130903040 gitfixid: f7c7e84e5a77915bb6570215887118d8e7759122 libdwarf-0.9.0.tar.xz DW202309-001 ossfuzz id: 62547 2023-09-22 David Korczynski libdwarf Heap use after free Calling dwarf_get_fde_for_die() causes the problem as its special handling in a user calling for fde destruction is wrong when dwarf_finish() is calling for fde destruction. dwarf_finish() can refer to freed memory in trying to delete a CIE twice. The use after free has a dependence on the order nodes are seen in the de_alloc_tree tdestroy() walk of the table (the order is not predictable). Broken in release 0.8.0 and all previous releases. 2023-09-23 regressiontests/ossfuzz62547/fuzz_stack_frame_access-5263709637050368 cd741379bd0203a0875b413542d5f982606ae637 libdwarf-0.9.0.tar.xz DW202308-001 ossfuzz id: 59576 2023-06-04 David Korczynski libdwarf Read from outside frame section A fuzzed object results in reading outside a frame section due to a comparison being > when it should have bin >= at about line 1615 in dwarf_frame2. Could result in crash or incorrect frame data returned. Somehow we lost track of this open bug. The bug has been in the code since the augmentation was first implemented in the library. 2023-08-26 regressiontests/ossfuzz59576/fuzz_set_frame_all-5867083595120640 e53adc90ffd6d5d0fad61546b0041990aefd970b libdwarf-0.8.0.tar.xz DW202307-001 ossfuzz id: 60506 2023-07-09 David Korczynski libdwarf Read from outside section A fuzzed object results in reading outside a line table due to a corruption in a non-standard (experimental) line table format. A corrupted offset was not checked for sanity. The bug has been in the code since the experimental line table support was added in 2015. 2023-07-11 regressiontests/ossfuzz60506/fuzz_srcfiles-6494439909228544.fuzz c8c5073f35b1efdcc610ecf369c78f87fdd34714 libdwarf-0.8.0.tar.xz DW202306-011 ossfuzz id: 60090 2023-06-24 David Korczynski libdwarf Read from invalid memory address A fuzzed object results in an addition overflow in reading CIE data leading to a read from an invalid address. An almost-correct check for an overflow in case of a fuzzed aug_irix_exception_table augmentation leads to a crash. The bug was incorrect coding of a test (for an absurd value) written a few weeks ago. 2023-06-26 regressiontests/ossfuzz60090/fuzz_set_frame_all-5757752673435648 6f75899f1f90fa87e52da0df09ddaa2e5be778f9 libdwarf-0.8.0.tar.xz DW202306-010 ossfuzz id: 59950 2023-06-18 David Korczynski libdwarf library reads outside frame section A fuzzed object results in adding a too large value (from CIE frame augmentation data) to a pointer, having failed to check the value for reasonableness. That add overflows so dereferencing the pointer in dwarf_frame.c could lead to a crash in the library or getting nonsense information returned to the caller. This bug has been present for many years. 2023-06-19 regressiontests/ossfuzz59950/fuzz_set_frame_all-6613067367317504 b7437c9e4923906e9b3f3860a0c8a8289cff0a91 libdwarf-0.8.0.tar.xz DW202306-009 ossfuzz id: 59775 2023-06-11 David Korczynski libdwarf Fuzzed object results in read past end of section. A fuzzed object results in reading one byte past the end of a .eh_frame section in internal function _dwarf_read_loc_expr-op(). Now we check for that before we dereference a pointer (to read the particular single-byte field). 2023-06-13 regressiontests/ossfuzz59775/fuzz_die_cu_attrs_loclist-4504718844755968 9cae1be75ec333d2b8ab8800df4850ed77a8b025 libdwarf-0.8.0.tar.xz DW202306-008 ossfuzz id: 59699 2023-06-08 David Korczynski libdwarf Read past end of section In reading a CIE prefix of a fuzzed object we read past the end of the section due to a failure to check a byte pointer before we dereference it in _dwarf_read_cie_fde_prefix(). 2023-05-10 regressiontests/ossfuzz59699/fuzz_stack_frame_access-6523659305746432 c5b909630bb566cdbf68fae4091f049f3b22ff11 libdwarf-0.8.0.tar.xz DW202306-007 ossfuzz id: 59602 2023-06-04 David Korczynski libdwarf Buffer overflow read In _dwarf_read_loc_expr_op() we read one byte past available data as the required check for past-end was missing. 2023-06-10 regressiontests/ossfuzz59602/fuzz_die_cu_attrs_loclist-6737086749999104 c8c54ba5c79b0a2687f0fa2ac331479506c3210f libdwarf-0.8.0.tar.xz DW202306-006 ossfuzz id: 59727 2023-06-01 David Korczynski libdwarf Integer Overflow Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517 2023-06-08 f664f93d456284130afbd3c2e35b39e5f2740366 libdwarf-0.8.0.tar.xz DW202306-005 ossfuzz id: 59717 2023-06-01 David Korczynski libdwarf Integer Overflow Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517 2023-06-08 f664f93d456284130afbd3c2e35b39e5f2740366 libdwarf-0.8.0.tar.xz DW202306-004 ossfuzz id: 59595 2023-06-09 shinibufa (github) libdwarf Signed Integer overflow Signed Integer Overflow. In _dwarf_exec_frame_instr(), called by dwarf_expand_frame_instructions(), there was a DW_CFA_LLVM_def_aspace_cfa_sf and we failed to check for overflow. The test case had a overflow. Now we do that check. 2023-06-10 regressiontests/ossfuzz59595/fuzz_set_frame_all-5319697747542016 e8c726e2be644df2706342b7a80633d07ecd7fb4 libdwarf-0.8.0.tar.xz DW202306-003 shinibufa 2023-06-09 shinibufa (github) libdwarf use after free Heap use-after-free dwarf_query.c 2023-05-19 regressiontests/shinibufa/fuzzed_input_file 4017ab8b92195641e6876b388cebe2d3307634f5 libdwarf-0.7.0.tar.xz DW202306-002 ossfuzz id: 59519 2023-06-01 David Korczynski libdwarf Integer Overflow Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517 2023-06-08 regressiontests/ossfuzz59519/fuzz_set_frame_all-4670829255065600 f664f93d456284130afbd3c2e35b39e5f2740366 libdwarf-0.8.0.tar.xz DW202306-001 ossfuzz id: 59517 2023-06-01 David Korczynski libdwarf Signed Integer Overflow Nine different places in dwarf_frame.c multiplied a factored value by a (usually) small integer without checking if the factored value read from the object could possibly be real. So the factored value when multiplied by the factor could overflow. In some of the cases the factored value is signed, some it is unsigned. This sanity checking of factored frame offset values never existed before in the library. 2023-06-08 regressiontests/ossfuzz59517/fuzz_set_frame_all-5741671019839488 f664f93d456284130afbd3c2e35b39e5f2740366 libdwarf-0.8.0.tar.xz DW202305-010 ossfuzz id: 59478 2023-05-31 David Korczynski libdwarf Memory leak in dwarf_expand_frame_instructions() Fuzzing provoked one of four error cases that could leak locally allocated memory from _dwarf_exec_frame_instructor() (called by dwarf_expand_frame_instructions). The code did free(localregtab) but needed to do FREELOCALMALLOC, a macro specific to this function which cleans up all local allocations. All four places have been corrected. Called enough times with fuzzed data could result in filling memory leading to the library being unable to work for the caller and instead just returning errors. This bug has been present in the code for many years. 2023-05-31 regressiontests/ossfuzz59478/fuzz_set_frame_all-5300774457180160 8ef9c8fb613e59f534e789e91a73088eaa5b8a5a libdwarf-0.8.0.tar.xz DW202305-009 ossfuzz id: 56451 2023-02-28 David Korczynski libdwarf Write to memory fails One problem is a bug in the test source: fuzz/fuzz_dnames.c. It calls dwarf_dnames_abbrevtable() incorrectly. The caller is required to provide arrays dw_idxattr_array and dw_form_array and pass a pointer to such. The code was just passing in a pointer to nothing. The library code has no possible way to determine the passed in pointers are usable. In addition, dwarf_dnames_abbrevtable() did not check that pointers passed in were non-null before use, but now it does. 2023-05-30 regressiontests/ossfuzz56451/fuzz_dnames-4986494365597696 12a612fc8db38fc26cd5e6064f09a6f825891c7c libdwarf-0.8.0.tar.xz DW202305-008 ossfuzz id: 56492 2023-02-28 David Korczynski fuzz testing Timeout (exceeds 50 seconds) The problem is a bug in the test source: fuzz/fuzz_macro_dwarf5.c. One must not blame the fuzzer author for examplep5(), the code was based on doc/checkexamples.c and there examplep() was really just a sketch. The testcase here no longer specifies an infinite loop. 2023-05-23 regressiontests/ossfuzz56492/fuzz_macro_dwarf5-6497277180248064 97a78122268c9a74701f2dd3115f902309e9a484 libdwarf-0.8.0.tar.xz DW202305-007 ossfuzz id: 56474 2023-02-28 David Korczynski libdwarf Null pointer dereference. Calling dwarf_highpc_b() lead to crash. The function was dereferencing an argument before the argument was checked. Now it is checked for null before any dereference. In addition, the test code, fuzz/fuzz_die_cu_attrs_loclist.c, called dwarf_highpc_b() with a Dwarf_Die that is uninitialized local variable (hence contents unpredictable). C code has no way to catch such a caller error. This is a bug in the test code. We are changed the test code local data pointer variable to be initialized with the value 0. 2023-05-23 regressiontests/ossfuzz56474/fuzz_die_cu_attrs_loclist-4719938125561856 b3df2530732ea515cda5a85438871e15c6723ead libdwarf-0.8.0.tar.xz DW202305-006 ossfuzz id: 56472 2023-02-27 David Korczynski libdwarf Crash on null pointer argument. A call to any dwarf_get_fission or any API entry with _xu_ in the name (functions for DWARF5 Debug Fission, called Split Dwarf in DWARF5) would crash the caller if any relevant argument was null. The problem has existed since the code was written in 2021. Once that is fixed valgrind complains about using an uninitialized value. fuzz/fuzz_simplereader_tu.c calls libdwarf with the declation being Dwarf_Die die; no initializer present. Bad behavior, even a library crash is likely. 2023-05-30 regressiontests/ossfuzz56472/fuzz_simplereader_tu-6614412934119424 8b17d41a31c33e0b3b9727a8044e0093a754d6d7 libdwarf-0.8.0.tar.xz DW202305-005 ossfuzz id: 56462 2023-02-28 David Korczynski libdwarf Unpredictable crash or erroneous data returned A call to dwarf_set_frame_undefined_value() dwarf_set_frame_rule_initial_value() dwarf_set_frame_same_value() dwarf_set_frame_cfa_value() dwarf_set_frame_rule_table_size() with unusable values was not being caught. Now if the set of values violates the required relationships an error is returned on requesting actual frame data. The problem has existed for many years (fixed May 23). Once that is fixed valgrind shows leaks. That is because fuzz/fuzz_set_frame_all.c fails to call dwarf_finish() and, instead, simple exit()s at several places. Updated the test source to return from its functions and only exit() from main() after the dwarf_finish() call. 2023-05-30 regressiontests/ossfuzz56462/fuzz_set_frame_all-5424385441005568 21b33d13024d18b09e32914ca5718a5c81d1ad67 libdwarf-0.8.0.tar.xz DW202305-004 ossfuzz id: 56446 2023-02-28 David Korczynski libdwarf test code Incorrect section bound check The test program fuzz_dnames.c passed a non-null pointer containing garbage content. The fix is to initialize (in fuzz_dnames.c) the local variable to null (0). 2023-05-23 regressiontests/ossfuzz56446/fuzz_dnames-4784811358420992 6fac1021c67d72da6b65f99ad815978d40b4c1e8 libdwarf-0.8.0.tar.xz DW202305-003 ossfuzz id: 59091 2023-05-19 David Korczynski libdwarf Incorrect section bound check A fuzzed line table in the non-standard (experimental) two-level line table format exposed a failure as the test was v > sectionend whereas it has to be v >= sectionend as end pointers are always one-past the end of the area. This was incorrect since the experimental table support was added in 2021. 2023-05-19 regressiontests/ossfuzz59091/fuzz_macro_dwarf5-5135813562990592 4017ab8b92195641e6876b388cebe2d3307634f5 libdwarf-0.7.0.tar.xz DW202305-002 ossfuzz id: 58797 2023-05-10 David Korczynski libdwarf Memory Leak reading experimental line table A fuzzed line table in the non-standard (experimental) two-level line table format had several unchecked values and one was larger than made any sense, and detecting the error revealed a memory leak. Caused by the incomplete fix to DW202305-001 (yesterday). This is was a failure to run some crucial tests, which would have exposed the problem before DW202305-001 was completed. Incomplete testing. 2023-05-10 regressiontests/ossfuzz58797/fuzz_macro_dwarf5-4872686367801344 eeb935200f78b8509e6b1837f6825b9d551b9f7d libdwarf-0.7.0.tar.xz DW202305-001 ossfuzz id: 58769 2023-05-09 David Korczynski libdwarf Excessive malloc reading experimental line table A fuzzed line table in the non-standard (experimental) two-level line table format had several unchecked values and one was larger than made any sense. The failure was due to oss-fuzz limiting malloc to 3GB. The failure was appropriate as the fuzzed values were inappropriate. We now check for sensible values. See libdwarf/dwarf_line_table_reader_common.h The code was in libdwarf starting in 2021. 2023-05-09 regressiontests/ossfuzz58769/fuzz_macro_dwarf5-5460713058205696 edc241bd0bf22c94d2d496f3cb761e60f066cd14 libdwarf-0.7.0.tar.xz DW202304-004 ossfuzz id: 58026 2023-04-15 David Korczynski libdwarf Segv on unknown address reading frame data. On reading a corrupt frame register number the library could crash with a segmentation violation. This bug has been present in the code for 25 years. The conversion of an impossibly large (carefully constructed) register number to a Dwarf_Half or unsigned int the result looked reasonable, invalidating some tests for reasonableness. Now we do all the tests on the full Dwarf_Unsigned register number(s) and retain the value in the long form everywhere. Fixed 2023-04-15. Once that is fixed there is still a leak found by valgrind. Tht test code fuzz/fuzz_set_frame_all.c does a local malloc and in some cases returned without free-ing it locally. Now that local malloc has the necessary local free. 2023-05-30 regressiontests/ossfuzz58026/fuzz_set_frame_all-4582976972521472.fuzz 21b33d13024d18b09e32914ca5718a5c81d1ad67 libdwarf-0.8.0.tar.xz DW202304-003 ossfuzz id: 57887 2023-04-10 David Korczynski libdwarf Reading outside the intended section data. Crash in libdwarf on reading .debug_addr given a bogus index entry. Due to failing to correctly check that the index is out of range. The index was close to overflowing Dwarf_Unsigned so testing values *after* arithmetic done on the incoming index was too late: so we read outside the .debug_addr table. The checks have been incomplete since this DWARF5 section code was written. libdwarf/dwarf_query.c 2023-04-11 regressiontests/ossfuzz57887/fuzz_die_cu-4866423964172288 1729d9af3f690bece912ae0f625b312566d0ae25 libdwarf-0.7.0.tar.xz DW202304-002 ossfuzz id: 57766 2023-04-07 David Korczynski libdwarf Heap Buffer Overflow Crash in libdwarf on reading an attribute due to failing to check that an index into .debug_str_offsets is sane. So we read far outside the relevant table. The checks have been incomplete since this DWARF5 section code was written. Two functions in libdwarf dwarf_form.c had the same problem. 2023-04-09 regressiontests/ossfuzz57766/fuzz_die_cu_print-5295062170075136 761da806fc950c6b26c1763e8989a814e9b16a59 libdwarf-0.7.0.tar.xz DW202304-001 ossfuzz id: 57711 2023-04-04 David Korczynski libdwarf dereference null pointer Crash in libdwarf on dwarf_srcfiles() call. A dereference off a null pointer due to corrupt file numbers not being noticed. Any such crash left an incomplete and misleading stack trace. The large numbers treated as Dwarf_Signed were part of the problem. Now in libdwarf we check Dwarf_Signed for negative values and issue an error if the value less than 0. So later casts to Dwarf_Unsigned work as intended. The libdwarf problems have been in the library for a very long time. 2023-04-06 regressiontests/ossfuzz57711/fuzz_srcfiles-4695324781576192 da0d1efbeddcff23c25704bd9672e98314928b19 libdwarf-0.7.0.tar.xz DW202303-059 ossfuzz id: 57562 2023-03-30 David Korczynski libdwarf Infinite loop reading DIEs Caller looping on dwarf_siblingof_b() (wanting to touch all siblings) could be put in an infinite loop. A DW_AT_sibling attribute with a corrupted attribute value meant the caller never sees the DW_DLV_NO_ENTRY return signalling all siblings have been seen. 2023-04-01 regressiontests/ossfuzz57562/fuzz_findfuncbypc-6681114772373504 21b076f652992c03f145f6edeb623918e17693f8 libdwarf-0.7.0.tar.xz DW202303-058 ossfuzz id: 57527 2023-03-29 David Korczynski libdwarf reading off end of valid data can crash library A line table header truncated by a fuzzer to just the right length (anywhere within a 12 byte area) would cause memory references outside of valid data. Now we check there is object data present before referring to that area and if not, return an error. 2023-03-30 regressiontests/ossfuzz57527/fuzz_srcfiles-4599045397282816 36e4063ade31c9ea6ea5df973d2045b36877885b libdwarf-0.7.0.tar.xz DW202303-057 2023-03-26 Pedro Navarro libdwarf Unable to read large object sections A section 2GB+ in size could not be read by libdwarf. Such is a Denial of Service. Simply turning the big read into however many are needed (each below 2GB) was simple to do. The limitation in the 'read' libc function (really a Linux kernel limitation) is well documented but we had not noticed before now. Few object files are so large. 2023-03-28 8bf96199a0e130483cceca6bfacfbe4127441ab1 libdwarf-0.7.0.tar.xz DW202303-056 ossfuzz id: 57516 2023-03-28 David Korczynski libdwarf Null dereference in dwarf_hasattr() With a corrupted attribute dwarf_hasattr() could try to access an implicit_const abbrev value indexing off of a NULL library internal pointer. Because the abbrev section had no actual implicit const value due to the corruption, so the internal array for holding such was not present. The pointer abl_implicit_const was NULL. Now we test the pointer for NULL and if NULL report an error. This lack of a NULL check has existed for many years. 2023-03-29 regressiontests/ossfuzz57516/fuzz_die_cu_attrs-6171488289161216 5dc3de5ce70331692a2700b218fb79e0d4d81c23 libdwarf-0.7.0.tar.xz DW202303-055 ossfuzz id: 57485 2023-03-27 David Korczynski None, test code bug Abort in fuzz_die_cu_attrs.c The fault was in test code. Since fixed (earlier today). No code change here. 2023-03-28 regressiontests/ossfuzz57485/ 2b19bc239f3cedd1b2461e4265d90633277ce704 libdwarf-0.7.0.tar.xz DW202303-054 ossfuzz id: 57463 2023-03-24 David Korczynski none, test code bug dereference null in test code The fault was in test code. fuzz_die_cu_attrs.c Since fixed (earlier today). No code change here. 2023-03-24 regressiontests/ossfuzz57463/fuzz_die_cu_attrs-5158380196200448 e4053c9a0f25db0bed28372d9b77a50a0307dc10 libdwarf-0.7.0.tar.xz DW202303-053 ossfuzz id: 57443 2023-03-24 David Korczynski libdwarf Double free in _dwarf_read_line_table_header The same bug seen earlier A double free when a particular error is in the line table header. Fixed already. gitfixid is more recent than truly required. 2023-03-28 regressiontests/ossfuzz57443/fuzz_srcfiles-6015429578719232 c25a14c3fd5522aff0b1d2a77d7ee66b7c529779 libdwarf-0.7.0.tar.xz DW202303-052 ossfuzz id: 57442 2023-03-24 David Korczynski libdwarf Heap buffer overflow Corrupt .debug_rngslists leads to crash when a rnglists header has a length indicating a longer section than we really have. Now we check more carefully for that situation. The bug existed from 2017, when DWARF5 support was added to the library. 2023-03-28 regressiontests/ossfuzz57442/fuzz_rng-5974595378479104 271b9b8367a8151fcd98723d73382ec56f05c810 libdwarf-0.7.0.tar.xz DW202303-051 ossfuzz id: 57437 2023-03-24 David Korczynski libdwarf Heap double free In a specific error case reading a fuzzed object and calling dwarf_srcfiles local data was freed twice. The bug was fixed earlier, and involved src/lib/libdwarf/dwarf_line_table_reader_common.h. 2023-03-28 regressiontests/ossfuzz57437/fuzz_srcfiles-5281689109921792 c25a14c3fd5522aff0b1d2a77d7ee66b7c529779 libdwarf-0.7.0.tar.xz DW202303-050 ossfuzz id: 57429 2023-03-24 David Korczynski libdwarf invalid free() in test source The test source violates libdwarf requirements. fuzz/fuzz_die_cu_attrs.c was doing free on a name pointer returned from dwarf_diename. The documentation clearly states that pointer should not have a free() done. fix id below is fixing the test source. 3023-03-28 regressiontests/ossfuzz57429/fuzz_die_cu_attrs-4845537731149824 2b19bc239f3cedd1b2461e4265d90633277ce704 libdwarf-0.7.0.tar.xz DW202303-049 ossfuzz id: 57408 2023-03-24 David Korczynski libdwarf Stack Overflow, _dwarf_create_a_new_cu_context... involves find_sig8_target_as_global_offset() and is the same problem as seen in other guises earlier. The case becomes an infinite loop, so eventually the stack gets exhausted. Fixed. See also ossfuzz id 56540. ossfuzz id 56487. ossfuzz id 56497. ossfuzz 57480 2023-03-26 regressiontests/ossfuzz57408/fuzz_die_cu-4702098356043776 24f5697aecd77092de20f0f7e7d91fbc1f2b3da0 libdwarf-0.7.0.tar.xz DW202303-048 ossfuzz 2023-03-08 Youngseok Choi dwarfdump Memory leak (was double free). The command: dwarfdump --file-name=<file> -kG -ka <objectfile> results in a a memory leak. In certain error cases we failed to fclose() a FILE * used to read dwarfdump.conf. Earlier changes fixed the double free, this fixes the memory leak.. 2023-03-24 regressiontests/choi015/poc_file_03 24f5697aecd77092de20f0f7e7d91fbc1f2b3da0 libdwarf-0.7.0.tar.xz DW202303-047 ossfuzz 2023-03-08 Youngseok Choi dwarfdump Double Free The command: dwarfdump --check-unique --check-abbrev results in a double free. The table of unique errors contained makename() data, so that aspect caused a double free as makename gets destructed independently. Fixed now,letting makename destructor do the work. 2023-03-24 regressiontests/choi015/poc_file_04 df64db4740f1b480e602b1112107d51f0d269828 libdwarf-0.7.0.tar.xz DW202303-046 ossfuzz 2023-03-08 Youngseok Choi dwarfdump global buffer overflow The command: dwarfdump --search-regex=t[ą--]e Note the non-ascii character. The dwarfdump regex only allows ascii in search patterns, not the rest of UTF-8. 2023-03-26 regressiontests/choi012/poc_file_10 9eac0c8bbae3fadb2be3d5ee15b9c44f42d2f966 libdwarf-0.7.0.tar.xz DW202303-045 ossfuzz 2023-03-08 Youngseok Choi dwarfdump Heap buffer overflow, regex The command: dwarfdump --search-regex= with a simple, really long, string. (with no file named) resulted in a buffer overflow in a buffer in dd_regex.c. No object file is required for the test. The code now checks stores to the internal array holding the non-deterministic finite automata (nfa) 2023-03-25 regressiontests/baselines/choi014.base bb8fab9e5e4e40b1268b31d90882c2ab93653eaf libdwarf-0.7.0.tar.xz DW202303-044 ossfuzz 2023-03-08 Youngseok Choi dwarfdump Heap buffer overflow The command: dwarfdump --search-regex=\\ (with no file named) resulted in a heap use after free. No object file is required for the test. The dd_regex.c regex compiler failed to notice when a trailing backslash caused the pattern compiler to step past the pattern string. Now we notice and issue an error. 2023-03-25 regressiontests/baselines/choi013.base 3269f43d2a044bfcce71d30ce214a305473d1ea3 libdwarf-0.7.0.tar.xz DW202303-043 ossfuzz 2023-03-08 Youngseok Choi libdwarf Heap Use After Free The command: dwarfdump choi012/poc_file_08 was resulting in a heap use after free. It no longer does, due to earlier libdwarf fixes. 2023-03-25 regressiontests/choi012/poc_file_08 4a8a201cdb3408a2cfdc2946418b51b884140a2c libdwarf-0.7.0.tar.xz DW202303-042 ossfuzz 2023-03-08 Youngseok Choi dwarfdump Memory Leak The command: dwarfdump --check-all choi012/poc_file_07 leaked memory in dwarfdump. A single instance of print_error_and_continue() failed to return DW_DLV_ERROR when libdwarf reported an error. Before recent fixes to libdwarf this would also generate heap-use-after-free. 2023-03-25 regressiontests/choi012/poc_file_07 4a8a201cdb3408a2cfdc2946418b51b884140a2c libdwarf-0.7.0.tar.xz DW202303-041 ossfuzz 2023-03-08 Youngseok Choi dwarfdump Heap Use after Free The command: dwarfdump --check-frame-extended choi012/poc_file_06 is now working, apparently fixed by earlier bug fixes in libdwarf. 2023-03-25 regressiontests/choi012/poc_file_06 fd92b647e5e3a524be94b3b06c9efd14a8292946 libdwarf-0.7.0.tar.xz DW202303-040 ossfuzz 2023-03-07 Youngseok Choi dwarfdump Reading from zero page The command: dwarfdump --file-abi= causes big problems. Denial of service. For many of such commands with an '=' and nothing following the dwoptarg variable is not set at all, leading to a segmentation violation. 2023-03-25 regressiontests/choi011/README fd92b647e5e3a524be94b3b06c9efd14a8292946 libdwarf-0.7.0.tar.xz DW202303-039 ossfuzz id: 56480 2023-02-28 David Korczynski libdwarf Reading a compilation unit never finishes Reading a DWARF compilation unit header in a corrupted object caused an infinite loop of repeated calls (growing the stack at each call) in libdwarf. Now the library properly reflects a NO ENTRY case avoiding the loop and the test case returns an unrelated error due to other corruption. Arguably the loop was due to corruption too, but it should not have gotten stuck in the loop (and now it will not get stuck). See also ossfuzz id 56540. ossfuzz id 56487. ossfuzz id 56497. ossfuzz 57408 2023-03-20 regressiontests/ossfuzz56480/fuzz_die_cu_print-5264022485467136 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 libdwarf-0.7.0.tar.xz DW202303-038 ossfuzz id: 57335 2023-03-22 David Korczynski libdwarf Null dereference in dwarf_hasform() Passing a null dw_return_bool pointer dereferenced zero, but now, instead we return DW_DLV_ERROR with error code DW_DLE_INVALID_NULL_ARGUMENT The test driver fuzz_die_cu_attrs.c passed in a NULL argument (the test was not modified except for adding a comment) but libdwarf now checks for a null argument. 2023-03-24 regressiontests/ossfuzz57335/fuzz_die_cu_attrs-6235345560928256.fuzz e4053c9a0f25db0bed28372d9b77a50a0307dc10 libdwarf-0.7.0.tar.xz DW202303-037 ossfuzz id: 57300 2023-03-21 David Korczynski libdwarf Out of Memory Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 and others listed here. 2023-03-24 regressiontests/ossfuzz57300/fuzz_die_cu-4752724662288384 7165918c8594061c3f5ba7dd4df7c4555c68ec78 libdwarf-0.7.0.tar.xz DW202303-036 ossfuzz id: 57300 2023-03-15 David Korczynski libdwarf Out of Memory Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 See DW202303-034 57149 See DW202303-034 57193 See DW202303-034 57292 2023-03-24 regressiontests/ossfuzz57300/fuzz_die_cu-4752724662288384 7165918c8594061c3f5ba7dd4df7c4555c68ec78 libdwarf-0.7.0.tar.xz DW202303-035 ossfuzz id: 57292 2023-03-15 David Korczynski libdwarf Out of Memory Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 and others listed here. 2023-03-24 regressiontests/ossfuzz57292/fuzz_die_cu_print-5412313393135616 7165918c8594061c3f5ba7dd4df7c4555c68ec78 libdwarf-0.7.0.tar.xz DW202303-034 ossfuzz id: 57193 2023-03-15 David Korczynski libdwarf Infinite loop till out of memory. The infinite loop reading a fuzzed object file was caused by letting internal function _dwarf_find_CU_Context_given_sig() unconditionally do too much in the middle of setting up a CU_Context (by letting it start more CU_contexts(). The implicit infinite loop has been there a few years, depending on the correctness of object files DWARF4/DWARF5 being read. Same bug as ossfuzz 57107, ossfuzz 57149. 2023-03-24 regressiontests/ossfuzz57193/fuzz_die_cu_offset-5215024489824256 7165918c8594061c3f5ba7dd4df7c4555c68ec78 libdwarf-0.7.0.tar.xz DW202303-033 ossfuzz id: 57149 2023-03-15 David Korczynski libdwarf Stack overflow Infinite loop till out of memory Similar to 57107 DW202303-032 but revealed there were more places in find_cu_die_base_fields that needed to call the internal _dwarf_internal_global_formref_b() function. The bug was present since 2017, when DWARF5 support for new 'base' fields was created. 2023-03-24 regressiontests/ossfuzz57149/fuzz_srcfiles-6213793811398656 7165918c8594061c3f5ba7dd4df7c4555c68ec78 libdwarf-0.7.0.tar.xz DW202303-032 ossfuzz id: 57107 2023-03-14 David Korczynski libdwarf Infinite loop till out of memory. The infinite loop reading a fuzzed object file was caused by letting internal function _dwarf_find_CU_Context_given_sig() unconditionally do too much in the middle of setting up a CU_Context (by letting it start more CU_contexts(). The implicit infinite loop has been there a few years, depending on the correctness of object files DWARF4/DWARF5 being read. 2023-03-23 regressiontests/ossfuzz57107/fuzz_die_cu_attrs_loclist-4991396240293888 0c92ef5b66c5bbcacae03fbf355b12713151c098 libdwarf-0.7.0.tar.xz DW202303-031 ossfuzz id: 57048 2023-03-14 David Korczynski libdwarf Calling dwarf_next_cu_header_d() on a corrupted object file results in an infinite loop and (eventually) a crash in dwarf_xu_index.c attempting to resolve an 8 byte hash key. The bug existed from the first version of this source file. The same bug as DW202303-030. 2023-03-22 regressiontests/ossfuzz57048/fuzz_findfuncbypc-4647942385696768 774f98e596df9dd8f3cb92ec76243caaa4287039 libdwarf-0.7.0.tar.xz DW202303-030 ossfuzz id: 57027 2023-03-12 David Korczynski libdwarf Infinite loop reading a gnu index section. Calling dwarf_next_cu_header_d() on a corrupted object file results in an infinite loop and (eventually) a crash in dwarf_xu_index.c attempting to resolve an 8 byte hash key. The bug existed from the first version of this source file, which was in 2017 as the data involved DWARF5, new in 2017. 2023-03-22 regressiontests/ossfuzz57027/fuzz_stack_frame_access-5123569972805632 774f98e596df9dd8f3cb92ec76243caaa4287039 libdwarf-0.7.0.tar.xz DW202303-029 ossfuzz id: 56993 2023-03-12 David Korczynski libdwarf Leaked Memory Calling dwarf_get_macro_context on a particular fuzzed object file results in a memory leak when a particular error in the corrupted section is detected. The malloc was done by the line table reader code. The bug was there for many years 2023-03-22 regressiontests/ossfuzz56993/fuzz_macro_dwarf5-5770464300761088 5fde5e404a98c6727889cf14d8f93ec2138a6fa libdwarf-0.7.0.tar.xz DW202303-028 ossfuzz id: 56958 2023-03-12 David Korczynski libdwarf Out of memory crash. Failing to check for error conditions in a fuzzed object correctly lead to a giant malloc that could not succeed. 2023-03-22 regressiontests/ossfuzz56958/fuzz_stack_frame_access-6097292873826304 b9393bb9b6399a34f8616a272d030bdd004a5ef5 libdwarf-0.7.0.tar.xz DW202303-027 ossfuzz id: 56906 2023-03-09 David Korczynski libdwarf Heap Buffer overflow reading rnglists section. Calling dwarf_get_rnglist_rle() on a corrupted object file could result in a library crash. 2023-03-22 regressiontests/ossfuzz56906/fuzz_rng-6031783801257984.fuzz b9393bb9b6399a34f8616a272d030bdd004a5ef5 libdwarf-0.7.0.tar.xz DW202303-026 ossfuzz id: 56897 2023-02-28 David Korczynski libdwarf Heap buffer overflow reading the rnglists section dwarf_get_rnglist_offset_index_value() could fail on a corrupt object due to imprecise calculations of entry offsets. Fixed by a major update of the code in dwarf_rnglists.c 2023-03-22 regressiontests/ossfuzz56897/fuzz_rng-5105415777288192 b9393bb9b6399a34f8616a272d030bdd004a5ef5 libdwarf-0.7.0.tar.xz DW202303-025 ossfuzz id: 56895 2023-02-28 David Korczynski libdwarf Heap buffer overflow reading compilation unit header. Calling dwarf_next_cu_header_d() on the fuzzed test object results in a library crash in fuzz_die_cu_attrs_loclist.c due to a failure to precisely test for a too-short Compilation Unit header. Now a DW_DLV_ERROR is returned. A very old bug. 2023-03-24 regressiontests/ossfuzz56895/fuzz_macro_dwarf5-5080340952907776 771cfcca1ef6a4a7eb9595d700fc72020d0ed72e libdwarf-0.7.0.tar.xz DW202303-024 ossfuzz id: 56807 2023-02-28 David Korczynski libdwarf Memory Leak in dwarf_check_lineheader_b() The fuzzed test object file resulted in a memory leak calling dwarf_check_lineheader_b() as called from fuzz_srcfiles.c Two error conditions in dwarf_line_table_reader_common.h were missing a required free(). 2023-03-24 regressiontests/ossfuzz56807/fuzz_srcfiles-4626047380619264 484f50ef8be0506be2e4b5fbad489868db5c7985 libdwarf-0.7.0.tar.xz DW202303-023 ossfuzz id: 56568 2023-02-28 David Korczynski Test harness Test build failure The fuzz_dnames.c testcase build failed. A result of removing two functions from the API, dwarf_dnames_abbrev_by_code() and dwarf_dnames_abbrev_form_by_index(). Removed 2023-02-23. The test source no longer uses those two functions. The first was slow and hard to use. The second was unusable and never worked. The documentation (libdwarf.pdf) gives alternates in the library that work. 2023-03-20 2eced75af9903ab778c3b237ec7be3ddc93ea6ec libdwarf-0.7.0.tar.xz DW202303-022 ossfuzz id: 56497 2023-02-28 David Korczynski test harness Memory Leak The leak was due to the test driver fuzz/fuzz_rng.c failing to call dwarf_finish at the point of returning as a result of the corrupted binary returning an error condition. 2023-03-20 regressiontests/ossfuzz56497/ 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 libdwarf-0.7.0.tar.xz DW202303-021 ossfuzz id: 56487 2023-02-28 David Korczynski testing harness Memory Leak The leak was due to the test driver fuzz/fuzz_rng.c failing to call dwarf_finish at the point of returning as a result of the corrupted binary returning an error condition. 2023-03-20 regressiontests/ossfuzz56487/clusterfuzz-testcase-fuzz_rng-6655451078197248 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 libdwarf-0.7.0.tar.xz DW202303-020 ossfuzz id: 56458 2023-02-28 David Korczynski libdwarf Heap buffer overflow The overflow encountered when reading a corrupted line table header in read_a_name_table_header in dwarf_debugnames.c There was insufficient checking for out of bounds values. 2023-03-20 regressiontests/ossfuzz56458/fuzz_findfuncbypc-5073632331431936 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 libdwarf-0.7.0.tar.xz DW202303-019 ossfuzz id: 56454 2023-02-28 David Korczynski libdwarf Stack buffer overflow The overflow was in dwarf_get_version_of_die() One return failed to free a local malloc due to the particular corruption in the text object DWARF. 2023-03-20 regressiontests/ossfuzz56454/ 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 libdwarf-0.7.0.tar.xz DW202303-018 ossfuzz id: 56807 2023-02-28 David Korczynski libdwarf Memory leak reading line table A memory leak in _dwarf_read_line_table() reading a particular corrupted object. One return failed to free a local malloc. An very old bug, encountered reading corrupted DWARF line tables. 2023-03-20 regressiontests/ossfuzz56807fuzz_srcfiles-4626047380619264 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5 libdwarf-0.7.0.tar.xz DW202303-017 ossfuzz id: 56450 2023-02-28 David Korczynski libdwarf Stack Buffer Overflow Stack buffer overflow in dwarf_dietype_offset. Reading a corrupted object file. The bug was in the test code, not libdwarf. Having fixed that, valgrind finds that some memory is not freed by dwarf_finish(). In dwarf_alloc.c March 20 _dwarf_free_all_of_one_debug() if the Dwarf_Debug was normal we failed to call _dwarf_free_static_errlist() and that left memory allocated from a bogus earlier call to the library (a situation libdwarf should handle and now does). 2023-05-30 regressiontests/ossfuzz56450/fuzz_die_cu_attrs-4953133005799424 libdwarf-0.8.0.tar.xz DW202303-016 ossfuzz id: 56476 2023-02-28 David Korczynski libdwarf Heap Buffer Overflow in dwarf_get_rnglist_offset_value A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files 2023-03-12 regressiontests/ossfuzz56476/fuzz_rng-5008229349588992/ 0343c63bd04d387924974e6da60d8471fdf945a9 libdwarf-0.7.0.tar.xz DW202303-015 ossfuzz id: 56489 2023-02-28 David Korczynski libdwarf Heap Buffer Overflow in read_single_rle_entry A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files 2023-03-12 regressiontests/ossfuzz56489/fuzz_srcfiles-5091530466787328 0343c63bd04d387924974e6da60d8471fdf945a9 libdwarf-0.7.0.tar.xz DW202303-014 ossfuzz id: 56478 2023-02-28 David Korczynski libdwarf Heap Buffer Overflow in read_single_rle_entry A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files 2023-03-12 regressiontests/ossfuzz56478/fuzz_rng-5030515398017024 0343c63bd04d387924974e6da60d8471fdf945a9 libdwarf-0.7.0.tar.xz DW202303-013 ossfuzz id: 56460 2023-02-28 David Korczynski libdwarf Heap Buffer Overflow A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files 2023-03-12 regressiontests/ossfuzz56460/fuzz_str_offsets-5376904040677376-5240324382654464 0343c63bd04d387924974e6da60d8471fdf945a9 libdwarf-0.7.0.tar.xz DW202303-012 ossfuzz id: 56456 2023-02-28 David Korczynski libdwarf Heap Buffer Overflow A heap buffer overflow reading a fuzzed object file Code reading the gdbindex section was not fully checking for valid offsets and pointers Duplicate of DW202303-006 2023-03-14 regressiontests/ossfuzz56456/fuzz_gdbindex-5240324382654464 e564c9350c104f16eb2223d7b29082e3deb5d2fb libdwarf-0.7.0.tar.xz DW202303-011 ossfuzz id: 56453 2023-02-28 David Korczynski libdwarf Null pointer dereference A null pointer dereference in reading a fuzzed object file. This is related to checks for a correct value from the READ_AREA_LENGTH macro. The missing checks have been missing a very long time. 2023-03-07 regressiontests/ossfuzz56453 86671059c1c240ae56433fa94993dcd28df2ae7d libdwarf-0.7.0.tar.xz DW202303-010 ossfuzz 2023-03-07 Youngseok Choi dwarfdump Stack overflow dwarfdump A wholly corrupted speically constructed dwarfdump.conf which is entirely inappropriate ascii really made a mess of one's screen. Now after a couple lines of garbage we give up on that conf file. And we print the garbage sanitized to avoid messing up one's screen. The fix also avoids buffer overflow. 2023-03-25 regressiontests/choi010/poc_file cb8dd45770f2e1f440aab60adac0256f268fc16e libdwarf-0.7.0.tar.xz DW202303-009 oss-fuzz id: 56443 2023-03-01 David Korczynski libdwarf Denial of service with corrupt line table header With any one of a small set of corrupted data fields in a line table header that were not checked for sanity the library could try to malloc a giant space, which could take a long time to succeed or fail. After that almost anything could happen. Same as ossfuzz 56548. With the bug in 56548 fixed, now we still have a bug, there is a leak from _dwarf_special_no_dbg_error_malloc() -fsanitize does not show the bug here, but valgrind does 2023-05-29 regressiontests/ossfuzz56443/fuzz_crc_32-4750941179215872 241fe0cb415569975c451d1f2d62fb2b2147cd72 libdwarf-0.8.0.tar.xz DW202303-008 oss-fuzz id: 56530 2023-03-01 David Korczynski libdwarf Denial of Service with corrupt attribute With a particular data corruption dwarf_attrlist() failed to return an error and the library would dereference a stale pointer. This also provoked a memory leak. Same bug as DW202303-001 2023-03-02 ossfuzz56530/fuzz_findfuncbypc-6272642689925120 948352178dc791796ed574a961191844d8322493 libdwarf-0.7.0.tar.xz DW202303-007 oss-fuzz id: 56735 2023-03-04 David Korczynski libdwarf Denial of service with corrupt debug_macro section. We were not checking .debug macro data for a corrupted internal macro length field. Now we check. 2023-03-08 regressiontests/ossfuzz56735/fuzz_macro_dwarf5-6718585377783808 bb99fe7ddb2bc6601bcb0ee30ced6a8cc8cb0564 libdwarf-0.7.0.tar.xz DW202303-006 oss-fuzz id: 56456 2023-03-04 David Korczynski libdwarf Denial of service (crash) looking for gdbindex section. The logic was wrong in a couple places (fixed now) and almost nothing was checked for validity. Now we check, so to libdwarf do not result in a crash of the library. The bugs have been there since the code was written in 2014. 2023-03-14 regressiontests/ossfuzz56456/fuzz_gdbindex-5240324382654464 e564c9350c104f16eb2223d7b29082e3deb5d2fb libdwarf-0.7.0.tar.xz DW202303-005 oss-fuzz id: 56676 2023-03-04 David Korczynski libdwarf Denial of service with corrupt frame section. A call to dwarf_expand_frame_instructions() with corrupt data gets a segmentation violation. 2023-03-14 regressiontests/ossfuzz56676/fuzz_set_frame_all-5081006119190528.fuzz e564c9350c104f16eb2223d7b29082e3deb5d2fb libdwarf-0.7.0.tar.xz DW202303-004 oss-fuzz id: 56666 2023-03-04 David Korczynski libdwarf Denial of service with corrupt gnu_index section A corrupted .debug_gnu_index header was not properly checked, and the calculation setting up the table in memory was not correctly set up. 2023-03-08 regressiontests/ossfuzz56666/fuzz_gnu_index-4803574417981440 64eaaa58703258cab02896e798664a1bb11a3d5c libdwarf-0.7.0.tar.xz DW202303-003 oss-fuzz id: 56636 2023-03-03 David Korczynski libdwarf Denial of service with corrupt .debug_addr section A corrupted .debug_addr header was not properly checked, and the calculation setting up the table in memory was not correctly set up. Calling dwarf_debug_addr_by_index() could crash the calling application. 2023-03-03 regressiontests/ossfuzz56636/fuzz_debug_addr_access-4801779658522624.fuzz a3ab3f16ab67f4d976561fe0d863e1ed8b71f3c6 libdwarf-0.7.0.tar.xz DW202303-002 oss-fuzz id: 56548 2023-03-01 David Korczynski libdwarf Denial of service with corrupt line table header With any one of a small set of corrupted data fields in a line table header that were not checked for sanity the library could try to malloc a giant space, which could take a long time to succeed or fail. After that almost anything could happen. Same bug fix as 56443 2023-03-03 regressiontests/ossfuzz56548/fuzz_findfuncbypc-5073632331431936 89d3beccd161657760585967255bbabf67e5b4c9 libdwarf-0.7.0.tar.xz DW202303-001 oss-fuzz id: 56465 2023-03-01 David Korczynski libdwarf Denial of Service with corrupt attribute With a particular data corruption dwarf_attrlist() failed to return an error and the library would dereference a stale pointer. This also provoked a memory leak. 2023-03-02 regressiontests/ossfuzz56465/fuzz_die_cu_offset-5866690199289856 948352178dc791796ed574a961191844d8322493 libdwarf-0.7.0.tar.xz DW202301-001 2023-01-24 Steve Kaufmann libdwarf Denial of Service with DW_FORM_strx3 Any use of DW_FORM_strx3 or DW_FORM_addrx3 would get libdwarf very confused and incorrect return values and or a library crash might result. 2023-01-24 regressiontests/kaufmann2/ct-bad.o 97e90eb7ab98df60b8da0bdc2ac855711c4db804 libdwarf-0.6.0.tar.xz DW202212-001 oss-fuzz 2022-12-28 David Korczynski libdwarf Denial of Service with fuzzed object. The fuzzed testcase has at least four major errors which libdwarf did not catch, leading to unpredictable library behavior, possibly including crashing the calling program. Things not noticed before the fix (and now resulting in error being reported): A) The object has just 2 sections, too few to be real. at least 3 sections are needed to contain DWARF information of any kind. B) Section zero has non-zero contents, in violation of the Elf object specification. C) The header says section strings are in section zero (a violation of the Elf specification). D) Section 1 masquerades as .note.gnu.debug-id and the description size is gigantic (as is the section, which fits the description field length). 2023-01-09 regressiontests/ossfuzz54724/clusterfuzz-54724-poc 45f6d778811553a835916b60845933e6dda63b7f libdwarf-0.6.0.tar.xz DW202208-001 unspecified 2022-08-27 Han Zheng libdwarf Double free on corrupted frame data. A carefully corrupted object file would cause libdwarf to do a double free in handling an error condition in dwarf_expand_frame_instructions(). (in libdwarf/dwarf_frame.c) That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. 2022-08-27 regressiontests/hanzheng/fuzzedobject 428235e3d132fb62faf7732735fdbb034d6264b4 libdwarf-0.5.0.tar.xz DW202207-001 ossfuzz 2022-05-01 David Korczynski libdwarf buffer overflow in dwarf_form.c A carefully corrupted string would cause libdwarf to read outside of a buffer containing the string (one past the end) when checking the string to determine if it is a full path in processing a .gnu.debuglink section. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. 2022-07-23 regressiontests/ossfuzz47150/clusterfuzz-testcase-minimized-fuzz_init_path-6727387238236160.fuzz 24dff940cc4c71a9c3cb5475aee231b19163a12c libdwarf-0.5.0.tar.xz DW202206-001 2022-06-15 Casper Sun libdwarf buffer overflow in dwarf_form.c A carefully corrupted .debug_info section would cause libdwarf to read outside of a buffer containing a Dwarf_Sig8 symbolic reference. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. This failure to check for buffer overflow has been present since DWARF4 when DW_FORM_ref_sig8 was added to libdwarf. 2022-06-15 regressiontests/sleicasper2/buffer-overflow-dwarf-form 7ef09e1fc9ba07653dd078edb2408631c7969162 libdwarf-0.4.1.tar.xz DW202205-001 2022-05-26 Casper Sun libdwarf buffer overflow in dwarf_globals.c A carefully corrupted .debug_pubnames section would cause libdwarf to read outside of a buffer containing the section contents. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. The bug has been present for many years. 2022-05-29 regressiontests/sleicasper/bufferoverflow 8151575a6ace77d005ca5bb5d71c1bfdba3f7069 libdwarf-0.4.1.tar.xz DW202111-016 oss-fuzz-41240 2021-11-20 David Korczynski libdwarf Out-of-memory in fuzz_init_path A corrupted object. The PE object section header for section .gnu_debuglink is corrupted. A very large number is in the VirtualSize field. Attempting a malloc for the section could succeed or might fail, resulting in Denial Of Service.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41240
  
2021-11-21 regressiontests/ ossfuzz41240/clusterfuzz-testcase-minimized-fuzz_init_path-5929343686148096 a120c808234060c3c9b1872ab9a059aa1ac70b1d libdwarf-0.4.1.tar.xz
DW202111-015 oss-fuzz-40896 2021-11-10 David Korczynski libdwarf Out-of-memory in fuzz_init_path A corrupted object. Several Elf section sizes and section offsets are larger than the file size.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40896
  
2021-11-12 regressiontests/ossfuzz40896/clusterfuzz-testcase-fuzz_init_path-5337872492789760 regressiontests/ossfuzz40896/clusterfuzz-testcase-minimized-fuzz_init_path-5337872492789760 b7a119dc07c502c1334bcbf8dd04ca0e4d5f6ab6 libdwarf-0.4.1.tar.xz
DW202111-014 oss-fuzz-40895 2021-11-10 David Korczynski libdwarf Out-of-memory in fuzz_init_binary A corrupted object. Some Elf section sizes are larger than the file size.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40895
  
2021-11-12 regressiontests/ossfuzz40895/clusterfuzz-testcase-fuzz_init_binary-4805508242997248 regressiontests/ossfuzz40895/clusterfuzz-testcase-minimized-fuzz_init_binary-4805508242997248 b7a119dc07c502c1334bcbf8dd04ca0e4d5f6ab6 libdwarf-0.4.1.tar.xz
DW202111-013 oss-fuzz-40802 2021-11-07 David Korczynski libdwarf Null-dereference READ in dwarf_object_init_b A corrupted object. The error handling code in dwarf_object_init_b was not properly dealing with a NULL pointer Dwarf_Error *errp in the test code.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40802
  
2021-11-19 regressiontests/ossfuzz40802/ clusterfuzz-testcase-fuzz_init_binary-5538015955517440.fuzz regressiontests/ossfuzz40802/clusterfuzz-testcase-minimized-fuzz_init_binary-5538015955517440.fuzz adf4dae25b39039f1821b095688c00f3010e1d37 libdwarf-0.4.1.tar.xz
DW202111-012 oss-fuzz-40801 2021-11-07 David Korczynski libdwarf Timeout in fuzz_init_path A corrupted object. libdwarf detects it quickly now.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40801
  
2021-11-07 regressiontests/ossfuzz801/clusterfuzz-testcase-fuzz_init_path-5443517279764480 regressiontests/ossfuzz40801/clusterfuzz-testcase-minimized-fuzz_init_path-5443517279764480 94dece3ce0f030d06da442a103bd6a5301410b25 libdwarf-0.4.1.tar.xz
DW202111-011 oss-fuzz-40799 2021-11-02 David Korczynski libdwarf Out-of-memory in fuzz_init_path A corrupted object. Gigantic section sizes or offsets were provoking a large malloc. Now these are detected and no malloc is attempted (an error is returned).
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40799
  
2021-11-07 regressiontests/ossfuzz40799/clusterfuzz-testcase-fuzz_init_path-5245778948390912 regressiontests/ossfuzz40799/clusterfuzz-testcase-minimized-fuzz_init_path-5245778948390912 94dece3ce0f030d06da442a103bd6a5301410b25 libdwarf-0.4.1.tar.xz
DW202111-010 oss-fuzz-40627 2021-11-02 David Korczynski libdwarf Abrt in _dwarf_error_string The Elf object file has some corruption. The read now stops with an error.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40627
  
2021-11-07 regressiontests/ossfuzz40627/clusterfuzz-testcase-fuzz_init_path-5186858573758464 regressiontests/ossfuzz40627/clusterfuzz-testcase-minimized-fuzz_init_path-5186858573758464 94dece3ce0f030d06da442a103bd6a5301410b25 libdwarf-0.4.1.tar.xz
DW202111-009 oss-fuzz-40729 2021-11-05 David Korczynski libdwarf Timeout - fuzz_init_binary The object file (macho 64 bit) has some header fuzzing that was not caught reading the object until the macho reader tried a gigantic malloc.. Now the library code catches the error before malloc and returns an error code.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40729
  
2021-11-07 regressiontests/ossfuzz40729/clusterfuzz-testcase-minimized-fuzz_init_binary-4791627277795328 94dece3ce0f030d06da442a103bd6a5301410b25 libdwarf-0.4.1.tar.xz
DW202111-008 oss-fuzz-40731 2021-11-03 David Korczynski libdwarf Out-of-memory in fuzz_init_binary The fuzzed macho64 object has corrupted headers. The library notices and reports an error.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40731
  
2021-11-07 regressiontests/ossfuzz40731/clusterfuzz-testcase-fuzz_init_binary-5983147574034432 94dece3ce0f030d06da442a103bd6a5301410b25 libdwarf-0.4.1.tar.xz
DW202111-005 oss-fuzz-40674 2021-11-03 David Korczynski libdwarf Heap-buffer-overflow in _dwarf_elf_setup_all_section_groups Object file has corrupt section group information. Results in buffer overflow.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40674#c6
  
2021-11-07 regressiontests/ossfuzz40674/clusterfuzz-testcase-minimized-fuzz_init_path-6557751518560256 94dece3ce0f030d06da442a103bd6a5301410b25 libdwarf-0.4.1.tar.xz
DW202111-004 oss-fuzz-40673 2021-11-03 David Korczynski libdwarf Null-dereference READ in dwarf_object_init_b The macho object has corrupted headers and now mentions that and stops. Verified as fixed by oss-fuzz 2021-11-03
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40673
  
2021-11-05 regressiontests/ossfuzz40673/clusterfuzz-testcase-minimized-fuzz_init_path-6240961391362048.fuzz 94dece3ce0f030d06da442a103bd6a5301410b25 libdwarf-0.4.1.tar.xz
DW202111-003 oss-fuzz-40671 2021-11-03 David Korczynski libdwarf Direct-leak in _dwarf_get_debug The test code is calling a libdwarf-internal function (which is against the rules, only libdwarf function names beginning with dwarf_ are callable. When building libdwarf as an archive there is no means to enforce this rule) doc/libdwarf.mm/pdf now documents this rule.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40671
  
2021-11-05 regressiontests/oss40671/clusterfuzz-testcase-fuzz_init_path-5455557297831936 regressiontests/oss40671/clusterfuzz-testcase-minimized-fuzz_init_path-5455557297831936 b40f7e291216e771185f62292dd6304b5a662926 libdwarf-0.4.1.tar.xz
DW202111-002 oss-fuzz-40669 2021-11-03 David Korczynski libdwarf Out-of-memory in fuzz_init_path Corrupted MachO object can crash caller.b Two fields in the MachO file header were not checked for sanity so nonsense large values could lead to excessive malloc and or a caller segmentation violation. Fixed by DW202111-001. Verified as fixed by oss-fuzz
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40669
  
2021-11-04 regressiontests/ossfuzz40669/clusterfuzz-testcase-minimized-fuzz_init_path-5399726397194240 regressiontests/clusterfuzz-testcase-fuzz_init_path-5399726397194240 b40f7e291216e771185f62292dd6304b5a662926 libdwarf-0.4.1.tar.xz
DW202111-001 oss-fuzz-40663 2021-11-03 David Korczynski libdwarf Timeout in fuzz_init_path Corrupted MachO object can crash caller Two fields in the MachO file header were not checked for sanity so nonsense large values could lead to excessive malloc and or a caller segmentation violation. Verified by oss-fuzz as fixed. The testcase has illegal libdwarf call and improper include statements.
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40663
  
2021-11-04 regressiontests/ossfuzz40663/clusterfuzz-testcase-minimized-fuzz_init_path-6122542432124928 b40f7e291216e771185f62292dd6304b5a662926 libdwarf-0.4.1.tar.xz
DW202010-003 CVE-2020-28163 2020-10-27 Casper Sun libdwarf Passing null to %s due to corrupt line table header. If a DWARF5 line table header has an invalid FORM for a pathname, the fi_file_name field may be null and printing it via %s can result in referencing memory at address 0, possibly generating segmentation violation or application crash. Now in case of null we provide a fixed string of <no file name> and for the form code we print the value and <unknown form> so there are no unpredictable effects.
  This should be visible after redhat makes it public.
  Filed on bugzilla.redhat 23 November 2021.
  bugzilla.redhat.com/show_bug.cgi?id=2026000
  
2020-10-28 regressiontests/c-sun2/nullpointer faf99408e3f9f706fc3809dd400e831f989778d3 libdwarf-0.4.1.tar.xz
DW202010-002 CVE-2020-28162 2020-10-27 Casper Sun dwarfdump dwarfdump crashes if the nest of C scopes is too deep An object file where the DIEs depth of nesting exceeds the limit of 800 levels due to corruption or a compiler bug can result in exhausting the die stack array and writing past its end. A segmentation fault is possible. The code at the point of error was not adjusting the array index properly so an invalid dereference could occur. Now the test code is correct and the array overflow is detected resulting in a normal error return. Additional places where this could occur were identified and the proper test added.
  Unable to enter in bugzilla.redhat.com
  so CVE can be completed by Fedora (as CNA)
  as dwarfdump is not part of Fedora
  
2020-10-28 regressiontests/c-sun2/globaloverflow a7fa8edd640b74daf8e7a442dcec96640875b4fb libdwarf-0.4.1.tar.xz
DW202010-001 CVE-2020-27545 2020-10-10 Casper Sun libdwarf A carefully corrupted line table can crash calling app A carefully crafted object with an invalid line table could cause libdwarf to dereference a pointer reading a single byte outside of the intended .debug_line section and potentially outside of memory visible to the library. A segmentation fault is possible. The code testing for the error was coded incorrectly so an invalid dereference could occur. Now the test code is correct and the error is detected resulting in a normal error return.
  This should be visible after redhat makes it public.
  Filed on bugzilla.redhat 22 November 2021.
  bugzilla.redhat.com/show_bug.cgi?id=2025694
  
2020-10-17 regressiontests/c-sun/poc 95f634808c01f1c61bbec56ed2395af997f397ea libdwarf-0.4.1.tar.xz
DW201907-001 CVE-2019-14249 2019-07-23 unknown libdwarf Denial of service with zero size section group dwarf_elf_load_headers.c in libdwarf before 2019-07-05 allows attackers to cause a denial of service (division by zero) via an ELF file with a zero-size section group (SHT_GROUP), as demonstrated by dwarfdump. 2019-07-05 cb7198abde46c2ae29957ad460da6886eaa606ba libdwarf-0.4.1.tar.xz DW201801-001 2018-01-28 Agostino Sarubbo dwarfdump Incorrect frame section can crash dwarfdump A carefully crafted object with an invalid frame section set of initial-instructions can crash the frame-instructions decode in dwarfdump. In addition, a couple places in libdwarf are not as careful in checking frame data as they should be. A segmentation-fault/core-dump is possible. 2018-01-29 sarubbo-11/testcase{1,2,3,4,5}.bin 7af0ecddfafed88446969cbf8c888356ad485d99 libdwarf-20180129.tar.gz DW201712-001 2017-12-01 Agostino Sarubbo libdwarf Incorrect frame section could let caller crash A carefully crafted object with an invalid frame section can result in passing back data to a caller of dwarf_get_fde_augmentation_data() is erroneous and will result in the caller reference off the end of the frame section. A segmentation-fault/core-dump is possible. 2017-12-01 sarubbo-10/1.crashes.bin 329ea8e56bc9550260cae6e2e9756bfbe7e2ff6d libdwarf-20180129.tar.gz DW201711-002 2017-11-08 Agostino Sarubbo libdwarf Incorrect line table section could crash caller An carefully crafted object with a invalid line table section crafted to end early at a particular point resulted in dereferencing outside the line table from libdwarf/dwarf_line_table_reader_common.c . A segmentation-fault/core-dump is possible. 2017-11-08 regressiontests/sarubbo-9/3.crashes.bin a1644f4dde7dd5990537ff7ad22a9e94b8723186 libdwarf-20180129.tar.gz DW201711-001 2017-11-01 Agostino Sarubbo libdwarf Incorrect frame section could crash caller A carefully crafted object with a resulting invalid frame section with DW_CFA_advance_loc1 implying data off-the-end-of-section will dereference an invalid pointer. A segmentation fault and core dump is possible. Corrected code checks now. 2017-11-02 regressiontests/sarubbo-8/1.crashes.bin 44349d7991e44dd3751794f76537cabcf65ee28d libdwarf-20180129.tar.gz DW201709-001 2017-09-19 Agostino Sarubbo libdwarf Incorrect abbrev section could crash caller. A fuzzed object with a resulting invalid abbrev section where the end of section follows an abbrev tag would dereference a non-existent has-child byte. 2017-09-26 regressiontests/sarubbo-3/1.crashes.bin bcc2e33908e669bacd397e3c941ffd1db3005d17 libdwarf-20180129.tar.gz DW201706-001 CVE-2017-9998 2017-06-28 team OWL337 libdwarf Addition overflow in libdwarf leads to segmentation violation A fuzzed object with a resulting invalid value can overflow when added to a valid pointer (depending on how the runtime memory is laid out) and thereafter a dereference results in a segmentation violation).
 see
  https://bugzilla.redhat.com/show_bug.cgi?id=1465756
  for contact information of those finding the bug.
  Fabian Wolff sent email and provided
  the link to the web page.
 
2017-07-06 regressiontests/wolff/POC1 e91681e8841291f57386f26a90897fd1dcf92a6e libdwarf-20180129.tar.gz
DW201703-007 2017-03-21 Marcel Bohme and Van-Thuan Pham libdwarf (libelf) Heap overflow in strncmp (libelf bug) 7/7. A heap overflow in strncmp() is due to libelf failing to check arguments to elf_ strptr. This is not a bug in libdwarf, it is a libelf bug. A pointer for being in bounds (in a few places in this function) and a failure in a check in dwarf_attr_list(). The test object is intentionally corrupted (fuzzed).
 A portion of sanitizer output with Ubuntu 14.04:
 ==180133==ERROR: AddressSanitizer: heap-buffer-overflow
   on address 0x60d00000cff1 at pc 0x0000004476f4
   bp 0x7fff87dd7dd0 sp 0x7fff87dd7590
 READ of size 8 at 0x60d00000cff1 thread T0
    #0 0x4476f3 in __interceptor_strncmp (/home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/dwarfdump+0x4476f3)
    #1 0x7992ae in this_section_dwarf_relevant /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:608:13
    #2 0x781064 in _dwarf_setup /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:722:14
    #3 0x77d59c in dwarf_object_init /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:922:20
 With Ubuntu 16.04 libelf dwarfdump gets:
 ERROR:  dwarf_elf_init:  DW_DLE_ELF_STRPTR_ERROR (30)
 a call to elf_strptr() failed trying to get a section name
 
Fix date is irrelevant, libdwarf no longer uses libelf.
2017-07-06 regressiontests/marcel/crash7 cc37d6917011733d776ae228af4e5d6abe9613c1 libdwarf-20180129.tar.gz
DW201703-006 CVE-2017-9052 2017-03-21 Marcel Bohme and Van-Thuan Pham libdwarf Heap overflow in dwarf_formsdata 6/7. A heap overflow in dwarf_formsdata() is due to a failure to check a pointer for being in bounds (in a few places in this function) and a failure in a check in dwarf_attr_list(). The test object is intentionally corrupted (fuzzed).
 A portion of sanitizer output with Ubuntu 14.04:
 ==180130==ERROR: AddressSanitizer: heap-buffer-overflow
  on address 0x61100000589c at pc 0x0000006cab95
  bp 0x7fff749aab10 sp 0x7fff749aab08
 READ of size 1 at 0x61100000589c thread T0
    #0 0x6cab94 in dwarf_formsdata /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_form.c:937:9
    #1 0x567daf in get_small_encoding_integer_and_name /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:1533:16
    #2 0x562f28 in get_attr_value /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:5030:24
    #3 0x555f86 in print_attribute /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:3357:13
 After fixes applied dwarfdump says:
 ERROR:  dwarf_attrlist:  DW_DLE_DW_DLE_ATTR_OUTSIDE_SECTION(281)
 
2017-03-21 regressiontests/marcel/crash6 cc37d6917011733d776ae228af4e5d6abe9613c1 libdwarf-20180129.tar.gz
DW201703-005 CVE-2017-9053 2017-03-21 Marcel Bohme and Van-Thuan Pham libdwarf Heap overflow in _dwarf_read_loc_expr_op() 5/7. A heap overflow in _dwarf_read_loc_expr_op() is due to a failure to check a pointer for being in bounds (in a few places in this function). The test object is intentionally corrupted (fuzzed).
 A portion of sanitizer output with Ubuntu 14.04:
 ==180112==ERROR: AddressSanitizer: heap-buffer-overflow
  on address 0x60800000bf72 at pc 0x00000084dd52
  bp 0x7ffc12136fd0 sp 0x7ffc12136fc8
 READ of size 1 at 0x60800000bf72 thread T0
    #0 0x84dd51 in _dwarf_read_loc_expr_op /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc.c:250:9
    #1 0x841f16 in _dwarf_get_locdesc_c /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc2.c:109:15
    #2 0x837d08 in dwarf_get_loclist_c /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc2.c:685:18
    #3 0x57dff2 in get_location_list /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:3812:16
 After fixes applied dwarfdump says:
 ERROR:  dwarf_get_loclist_c:  DW_DLE_LOCEXPR_OFF_SECTION_END
 (343) Corrupt dwarf
 
2017-03-21 regressiontests/marcel/crash5 cc37d6917011733d776ae228af4e5d6abe9613c1 libdwarf-20180129.tar.gz
DW201703-004 2017-03-21 Marcel Bohme and Van-Thuan Pham libdwarf (libelf) Heap overflow in set_up_section strlen 4/7. An apparent heap overflow that gives the appearance of being in libdwarf is due to libelf call elf_strptr() failing to fully check that its arguments make sense. This is not a bug in libdwarf, it is a libelf bug. The test object is intentionally corrupted (fuzzed). The submission was with Ubuntu 14.04. With Ubuntu 16.04 there is no sanitizer error report. As of 2023 libdwarf no longer calls or references libelf.
 A portion of sanitizer output with Ubuntu 14.04:
 ==180109==ERROR: AddressSanitizer: heap-buffer-overflow
   on address 0x60b00000b000 at pc 0x00000048fd12
   bp 0x7fff4ad31ef0 sp 0x7fff4ad316b0
 READ of size 16 at 0x60b00000b000 thread T0
    #0 0x48fd11 in __interceptor_strlen (/home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/dwarfdump+0x48fd11)
    #1 0x7a84a4 in set_up_section /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:285:27
    #2 0x79aaa5 in enter_section_in_de_debug_sections_array /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:355:5
    #3 0x78170b in _dwarf_setup /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:746:19
 With Ubuntu 16.04 libelf one gets:
 ERROR:  dwarf_elf_init:  DW_DLE_ELF_STRPTR_ERROR (30)
 a call to elf_strptr() failed trying to get a section name
 
regressiontests/marcel/crash4 libdwarf-20180129.tar.gz
DW201703-003 2017-03-21 Marcel Bohme and Van-Thuan Pham libdwarf (libelf) Heap overflow in strcmp 3/7. An apparent heap overflow that gives the appearance of being in libdwarf is due to libelf call elf_strptr() failing to fully check that its arguments make sense. This is not a bug in libdwarf, it is a libelf bug. The test object is intentionally corrupted (fuzzed). The submission was with Ubuntu 14.04. With Ubuntu 16.04 there is no sanitizer error report. A portion of sanitizer output with Ubuntu 14.04:
  ==180106==ERROR: AddressSanitizer: heap-buffer-overflow
    on address 0x60f00000ef09 at pc 0x000000447300
    bp 0x7ffc667dce10 sp 0x7ffc667dc5d0
  READ of size 4 at 0x60f00000ef09 thread T0
    #0 0x4472ff in __interceptor_strcmp (/home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/dwarfdump+0x4472ff)
    #1 0x79938f in this_section_dwarf_relevant /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:612:12
    #2 0x781064 in _dwarf_setup /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:722:14
    #3 0x77d59c in dwarf_object_init /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:922:20
    #4 0x899d4f in dwarf_elf_init_file_ownership /
 
With Ubuntu 16.04 libelf one gets: ERROR: dwarf_elf_init: DW_DLE_ELF_STRPTR_ERROR (30) a call to elf_strptr() failed trying to get a section name Fix date is irrelevant, libdwarf no longer uses libelf.
regressiontests/marcel/crash3 libdwarf-20180129.tar.gz
DW201703-002 CVE-2017-9054 2017-03-21 Marcel Bohme and Van-Thuan Pham libdwarf Heap overflow in _dwarf_decode_s_leb128_chk() 2/7. In _dwarf_decode_s_leb128_chk() a byte pointer was dereferenced just before was checked as being in bounds. The test object is intentionally corrupted (fuzzed).
 A portion of sanitizer output:
  .debug_line: line number info for a single cu
  ==180103==ERROR: AddressSanitizer: heap-buffer-overflow
    on address 0x610000007ffc at pc 0x0000007b0f5b
    bp 0x7ffe06bbf510 sp 0x7ffe06bbf508
  READ of size 1 at 0x610000007ffc thread T0
    #0 0x7b0f5a in _dwarf_decode_s_leb128_chk /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_leb.c:304:9
    #1 0x7e753e in read_line_table_program /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./
       dwarf_line_table_reader_common.c:1167:17
    #2 0x7d7fe3 in _dwarf_internal_srclines /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./dwarf_line.c:690:15
    #3 0x7f9dbb in dwarf_srclines_b /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./dwarf_line.c:944:12
    #4 0x5caaa5 in print_line_numbers_this_cu /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_lines.c:762:16
  After fix applied one gets:
  ERROR:  dwarf_srclines:  DW_DLE_LEB_IMPROPER (329)
  Runs off end of section or CU
 
2017-03-21 regressiontests/marcel/crash2 cc37d6917011733d776ae228af4e5d6abe9613c1 libdwarf-20180129.tar.gz
DW201703-001 CVE-2017-9055 2017-03-21 Marcel Bohme and Van-Thuan Pham libdwarf Heap overflow in dwarf_formsdata 1/7. In dwarf_formsdata() a few data types were not checked as being in bounds. The test object is intentionally corrupted (fuzzed).
 A portion of sanitizer output:
 LOCAL_SYMBOLS:
 < 1><0x0000002f>    DW_TAG_subprogram
 ==180088==ERROR: AddressSanitizer: heap-buffer-overflow on
  address 0x60800000bf72 at pc 0x0000006cab95 bp
  0x7fff31425830 sp 0x7fff31425828
  READ of size 1 at 0x60800000bf72 thread T0
    #0 0x6cab94 in dwarf_formsdata /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_form.c:937:9
    #1 0x567daf in get_small_encoding_integer_and_name /home/
       ubuntu/subjects/build-asan/libdwarf/dwarfdump/print_die.c:1533:16
    #2 0x576f38 in check_for_type_unsigned /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:4301:11
    #3 0x56ad8c in formxdata_print_value /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:4374:39
    #4 0x5643be in get_attr_value /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:5140:24
    #5 0x555f86 in print_attribute /home/ubuntu/subjects/build
  ...
  After fixes applied dwarfdump gets:
  ERROR:  dwarf_attrlist:  DW_DLE_DW_DLE_ATTR_OUTSIDE_SECTION(281)
 
2017-03-21 regressiontests/marcel/crash1 cc37d6917011733d776ae228af4e5d6abe9613c1 libdwarf-20180129.tar.gz
DW201611-008 CVE-2016-10254 2016-11-04 Agostino Sarubbo libdwarf Crash libelf reading fuzzed object. This is a weakness in libelf checking. Testing that current libdwarf deals with it properly, though it was never a bug in libdwarf. The CVE mentions libdwarf.
  blogs.gentoo.org/ago/2016/11/04/elfutils-memory-allocation-failure-in-allocate_elf-common-h/
  www.openwall.com/lists/oss-security/2017/03/22/2
  
Fixed in gentoo libelf by Agostino Sarubbo.
2016-11-04 regressiontests/sarubbo-b/00011-elfutils-memalloc-allocate_elf libdwarf-20180129.tar.gz
DW201611-007 CVE-2016-10255 2016-11-04 Agostino Sarubbo libdwarf Crash libelf reading fuzzed object. This is a weakness in libelf checking. Testing that current libdwarf deals with it properly, though it was never a bug in libdwarf. The CVE mentions libdwarf.
  bugzilla.redhat.com/show_bug.cgi?id=1387584
  www.openwall.com/lists/oss-security/2017/03/22/1
  blogs.gentoo.org/ago/2016/11/04/elfutils-memory-allocation-failure-in-__libelf_set_rawdata_wrlock-elf_getdata-c/
  
Fixed in gentoo libelf by Agostino Sarubbo.
2016-11-04 regressiontests/sarubbo-a/00031-elfutils-memalloc-__libelf_set_rawdata_wrlock libdwarf-20180129.tar.gz
DW201611-006 CVE-2016-9480 2016-11-14 Puzzor (Shi Ji) libdwarf Heap buffer overflow An object with corrupt contents causes a memory reference out of bounds, a heap buffer overflow reference.
 heap-buffer-overflow in dwarf_util.c:208 for val_ptr
 # Version
 bb9a3492ac5713bed9cf3ae58ddb7afa6e9e98f8
 (in regression tests here named  heap_buf_overflow.o)
 # ASAN Output
 <0> tag: 17 DW_TAG_compile_unit  name: "strstrnocase.c" FORM 0xe "DW_FORM_strp"
 <1> tag: 46 DW_TAG_subprogram  name: "is_strstrnocase" FORM 0xe "DW_FORM_strp"
 =================
 ==1666==ERROR: AddressSanitizer: heap-buffer-overflow on address
   0xb5846db9 at p
 c 0x080b3a1b bp 0xbfa75d18 sp 0xbfa75d08
 READ of size 1 at 0xb5846db9 thread T0
    #0 0x80b3a1a in _dwarf_get_size_of_val /home/puzzor/libdwarf-code/
        libdwarf/dwarf_util.c:208
    #1 0x8056602 in _dwarf_next_die_info_ptr /home/puzzor/libdwarf-code/
        libdwarf/dwarf_die_deliv.c:1353
    #2 0x8057f4b in dwarf_child /home/puzzor/libdwarf-code/libdwarf/
       dwarf_die_de liv.c:1688
    #3 0x804b5fa in get_die_and_siblings simplereader.c:637
    #4 0x804b65c in get_die_and_siblings simplereader.c:643
    #5 0x804b3f3 in read_cu_list simplereader.c:611
    #6 0x804aeae in main simplereader.c:533
    #7 0xb6ffe275 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18275)
    #8 0x80491c0  (/home/puzzor/libdwarf-code/dwarfexample/simplereader+
         0x80491c 0)
 0xb5846db9 is located 0 bytes to the right of 249-byte region
    [0xb5846cc0,0xb5846db9)
 allocated by thread T0 here:
    #0 0xb727fae4 in __interceptor_malloc (/usr/lib/i386-linux-gnu/libasan.so.
       3+ 0xc3ae4)
    #1 0xb71a9b98  (/usr/lib/i386-linux-gnu/libelf.so.1+0x9b98)
 
For the orignal bug report see
 https://sourceforge.net/p/libdwarf/bugs/5/
 
2016-11-16 regressiontests/puzzor/heap_buf_overflow.o 5dd64de047cd5ec479fb11fe7ff2692fd819e5e5 libdwarf-20180129.tar.gz
DW201611-005 CVE-2016-9558 2016-11-11 Agostino Sarubbo libdwarf negation of -9223372036854775808 cannot be represented in type With the right bit pattern in a signed leb number the signed leb decode would execute an unary minus with undefined effect. This is not known to generate an incorrect value, but it could, one supposes. 2016-11-11 regressiontests/sarubbo-2/00050-libdwarf-negate-itself 4f19e1050cd8e9ddf2cb6caa061ff2fec4c9b5f9 libdwarf-20180129.tar.gz DW201611-004 CVE-2016-9275 2016-11-02 Agostino Sarubbo libdwarf Heap overflow in dwarf_skim_forms() If a non-terminated string in a DWARF5 macro section ends a section it can result in accessing memory not in the application (out of bounds read). dwarf_macro5.c(in _dwarf_skim_forms()). 2016-11-04 regressiontests/sarubbo-2/00027-libdwarf-heapoverflow-_dwarf_skim_forms 583f8834083b5ef834c497f5b47797e16101a9a6 libdwarf-20180129.tar.gz DW201611-003 CVE-2016-9276 2016-11-02 Agostino Sarubbo libdwarf Bad aranges length leads to overflow and bad pointer in dwarf_arange.c(dwarf_get_aranges_list) an aranges header with corrupt data could, with an overflowing calculation, result in pointers to invalid or inappropriate memory being dereferenced. 2016-11-04 regressiontests/sarubbo-2/00026-libdwarf-heapoverflow-dwarf_get_aranges_list 583f8834083b5ef834c497f5b47797e16101a9a6 libdwarf-20180129.tar.gz DW201611-002 2016-11-02 Agostino Sarubbo libdwarf heap overflow in get_attr_value Libdwarf failed to check for a bogus length in dwarf_form.c (dwarf_formblock()) resulting in a pointer pointing outside of the intended memory region. Anything could happen in the subsequent use of the bogus pointer.
 0x61300000de1c is located 0 bytes to the right of 348-byte region
 [0x61300000dcc0,0x61300000de1c)
 allocated by thread T0 here:
   #0 0x4c0ad8 in malloc /var/tmp/portage/sys-devel/llvm-3.8.1-
 r2/work/llvm-3.8.1.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:52
   #1 0x7f883cfc6206 in __libelf_set_rawdata_wrlock /tmp/portage/dev-
 libs/elfutils-0.166/work/elfutils-0.166/libelf/elf_getdata.c:318
 
2016-11-04 regressiontests/sarubbo-2/00025-libdwarf-heapoverflow-get_attr_value 583f8834083b5ef834c497f5b47797e16101a9a6 libdwarf-20170416.tar.gz
DW201611-001 2016-11-02 Agostino Sarubbo libdwarf Memory allocation failure in do_decompress_zlib In decompressing a zlib compressed section if the decompressed section size is nonsense (too large) an attempted malloc will fail and could let an exception propagate to callers.
  ==27994==WARNING: AddressSanitizer failed to allocate 0x62696c2f7273752f
  bytes ==27994==AddressSanitizer's allocator is terminating the process
  instead of returning 0
  ...
   #6 0x4c0ab1 in malloc /var/tmp/portage/sys-devel/llvm-3.8.1-
   #8 0x5b582e in _dwarf_load_section
   #9 0x5bb479 in dwarf_srcfiles
   #10 0x5145cd in print_one_die_section
 
2016-11-04 regressiontests/sarubbo-2/00024-libdwarf-memalloc-do_decompress_zlib 583f8834083b5ef834c497f5b47797e16101a9a6 libdwarf-20170416.tar.gz
DW201610-003 CVE-2016-8679 2016-10-02 agostino libdwarf dwarf_get_size_of_val out of bounds read The _dwarf_get_size_of_val function in libdwarf/dwarf_util.c in Libdwarf before 20161124 allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.
  www.securityfocus.com/bid/93601
  blogs.gentoo.org/ago/2016/10/06/libdwarf-heap-based-
  buffer-overflow-in-_dwarf_get_size_of_val-dwarf_util-c/
  
2016-10-04 efe48cad0693d6994d9a7b561e1c3833b073a624
DW201610-002 CVE-2016-8680 2016-10-02 agostino libdwarf Out of bounds read The _dwarf_get_abbrev_for_code function in dwarf_util.c in libdwarf 20161001 and earlier allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.
  bugzilla.redhat.com/show_bug.cgi?id=1385690
  www.securityfocus.com/bid/93592
  Duplicate of CVE-2016-8681
  
2016-10-04 efe48cad0693d6994d9a7b561e1c3833b073a624
DW201610-001 CVE-2016-8681 2016-10-02 agostino libdwarf Out of bounds read The _dwarf_get_abbrev_for_code function in dwarf_util.c in libdwarf 20161001 and earlier allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.
  bugzilla.redhat.com/show_bug.cgi?id=1385690
  www.securityfocus.com/bid/93592
  Duplicate of CVE-2016-8680
  
2016-10-04 efe48cad0693d6994d9a7b561e1c3833b073a624
DW201609-004 CVE-2016-7510 2016-09-17 Puzzor libdwarf libdwarf 20160613 Out-of-Bounds read read line table program Out-of-Bounds read line_ptr in dwarf_line_table_reader_common.c:1433 Out-of-Bounds read See:
 https://bugzilla.redhat.com/show_bug.cgi?id=1377015
 https://sourceforge.net/p/libdwarf/bugs/4/
 
 # Address Sanitizer Output
 ==27763==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf4603f84 at pc 0x8408ede bp 0xffff6518 sp 0xffff6510
 READ of size 1 at 0xf4603f84 thread T0
 #0 0x8408edd in read_line_table_program /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line_table_reader_common.c:1433
 #1 0x83f716c in _dwarf_internal_srclines /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line.c:690
 #2 0x841436c in dwarf_srclines_b /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line.c:944
 #3 0x81fbc28 in print_line_numbers_this_cu /home/puzzor/test-fuzzing/code/dwarfdump/print_lines.c:763
 #4 0x815c191 in print_one_die_section /home/puzzor/test-fuzzing/code/dwarfdump/print_die.c:850
 #5 0x81565c1 in print_infos /home/puzzor/test-fuzzing/code/dwarfdump
 
2016-09-23 regressiontests/DW201609-004/poc 3767305debcba8bd7e1c483ae48c509d25399252 libdwarf-20160923.tar.gz
DW201609-003 CVE-2016-7410 2016-09-13 https://marc.info/?l=oss-security&m=147391785920048&w=2 libdwarf libdwarf 20160613 heap-buffer-overflow With AddressSanitizer, we found a Heap-Buffer-overflow in the latest release version of dwarfdump. The crash output is as follows:
  See also:
  https://marc.info/?l=oss-security&m=147378394815872&w=2
  The testcase poc is from this web page.
  
  ==17411==ERROR: AddressSanitizer: heap-buffer-overflow on address
  0xf3808904 at pc 0x80a6f76 bp 0xffb95e78 sp 0xffb95a5c
  READ of size 4 at 0xf3808904 thread T0
  ==17411==WARNING: Trying to symbolize code, but external symbolizer is
  not initialized!
    #0 0x80a6f75 in __interceptor_memcpy ??:?
    #1 0x8426c3b in _dwarf_read_loc_section
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc.c:919
    #2 0x84250e2 in _dwarf_get_loclist_count
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc.c:970
    #3 0x8438826 in dwarf_get_loclist_c
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc2.c:551
    #4 0x81a1be8 in get_location_list
  /home/starlab/fuzzing/dwarf-20160613/dwarfdump/print_die.c:3523
    #5 0x816e1a2 in print_attribute
  
_dwarf_get_loclist_header_start() is not cautious about values in the header being absurdly large. Unclear as yet if this is the problem but it is a potential problem (fixed for next release).
  Address Sanitizer in gcc reproduces the report.
  In _dwarf_read_loc_section() the simple calculation of
  loc_section_end was wrong, so end-of section was
  incorrect for the local reads.
  With that fixed we get DW_DLE_READ_LITTLEENDIAN_ERROR when
  libdwarf attempts to read off end of section.
  
2016-09-23 regressiontests/DW201609-003/poc 3767305debcba8bd7e1c483ae48c509d25399252 libdwarf-20160923.tar.gz
DW201609-002 CVE-2016-7511 2016-09-18 Shi Ji (@Puzzor) libdwarf libdwarf 20160613 Integer Overflow In dwarf_get_size_of_val() with fuzzed DWARF data we get a SEGV.
  See
  https://sourceforge.net/p/libdwarf/bugs/3/
  
  ==6825== ERROR: AddressSanitizer: SEGV on unknown address 0x0583903c (pc 0xb61f1a98 sp 0xbfa388b4 bp 0xbfa38d08 T0)
  AddressSanitizer can not provide additional info.
  #1 0xb61e3c0b (/usr/lib/i386-linux-gnu/libasan.so.0+0xdc0b)
  #2 0x80a21b1 in _dwarf_get_size_of_val /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_util.c:210
  #3 0x8054214 in _dwarf_next_die_info_ptr /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1340
  #4 0x80557a5 in dwarf_child /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1640
  #5 0x804b23f in get_die_and_siblings /home/fuzzing/fuzzing/dwarf-20160613/dwarfexample/./simplereader.c:573
  
_dwarf_make_CU_Context() is insufficiently cautious about the length of a CU being absurd. Unclear as yet if this is the problem but it is a problem and is fixed for next release.
2016-09-23 regressiontests/DW201609-002/DW201609-002-poc 3767305debcba8bd7e1c483ae48c509d25399252 libdwarf-20160923.tar.gz
DW201609-001 2016-09-16 STARLAB libdwarf libdwarf 20160613 die_info_ptr in dwarf_die_deliv.c: 1533 Out-Of_bounds At line 1533 of dwarf_die_deliv.c a pointer dereference is done with a pointer pointing past the end of the CU data.
 see
 https://sourceforge.net/p/libdwarf/bugs/2/
 
 ==8054==ERROR: AddressSanitizer: heap-buffer-overflow on
    address 0xf4c027ab at pc 0x819e4a4 bp 0xff88eb38 sp 0xff88eb30
 READ of size 1 at 0xf4c027ab thread T0
 #0 0x819e4a3 in dwarf_siblingof_b /home/starlab/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1533
 #1 0x8116201 in print_die_and_children_internal /home/starlab/fuzzing/dwarf-20160613/dwarfdump/print_die.c:1157
 Bug report on sourceforge.net bug list for libdwarf.
 The bad pointer dereference is due to libdwarf
 not noticing that the DWARF in that file is corrupt.
 In addition
 The code was not noticing that it could dereference
 a pointer that pointed out of bounds in the end-sibling-list
 loop.
 
 The example from the bug report (DW201609-001-poc) has
 the same problem.
 dwarfdump now reports DW_DLE_SIBLING_LIST_IMPROPER
 on both test2.o and DW201609-001-poc.
 
2016-09-17 regressiontests/DW201609-001/test2.o regressiontests/DW201609-001/DW201609-001-poc 3767305debcba8bd7e1c483ae48c509d25399252 libdwarf-20160923.tar.gz
DW201605-020 CVE-2016-5027 2016-04-25 Yue Liu,lieanu libdwarf NULL dereference in _dwarf_decode_s_leb128 dwarf_form.c in libdwarf 20160115 allows remote attackers to cause a denial of service (crash) via a crafted elf file Apparently no crafted object file presented. However the code fix is presented in the report at openwall.com. Discovered the CVE November 2021 To attack the code just pass the argument Dwarf_Word * leb128_length as a NULL pointer (that is allowed). The code was fixed in dwarf_leb.c on 2016-04-27 20:00:06.
  bugzilla.redhat.com/show_bug.cgi?id=1330237
  www.openwall.com/lists/oss-security/2016/05/24/1
  www.openwall.com/lists/oss-security/2016/05/25/1
  
2016-05-27 libdwarf-20160507.tar.gz
DW201605-019 CVE-2016-5028 2016-05-23 Yue Liu libdwarf Null dereference in print_frame_inst_bytes (dwarfdump) The null dereference is due to a corrupted object file. Libdwarf was not dealing with empty (bss-like) sections since it really did not expect to see such in sections it reads! Now libdwarf catches the object error so dwarfdump sees the section as empty (as indeed it is!). 2016-05-23 regressiontests/liu/NULLdeference0522c.elf a55b958926cc67f89a512ed30bb5a22b0adb10f4 libdwarf-20160923.tar.gz DW201605-018 CVE-2016-5029 2016-05-22 Yue Liu libdwarf Null dereference in create_fullest_file_path(). The null dereference in create_fullest_file_path() causes a crash. This is due to corrupted dwarf and the fix detects this corruption and if that null string pointer happens undetected a static string is substituted so readers can notice the situation.
  202             }
 203             if (dirno > 0 && fe->fi_dir_index > 0) {
 204                 inc_dir_name = (char *)
                         line_context->lc_include_directories[
 205                     fe->fi_dir_index - 1];
 206                 incdirnamelen = strlen(inc_dir_name);  <- $pc
 207             }
 208             full_name = (char *) _dwarf_get_alloc(dbg,
 #0  create_fullest_file_path (dbg=<optimized out>,
 fe=0x68d510, line_context=0x68c4f0, name_ptr_out=<optimized
 out>, error=0x7fffffffe2b8) at ./dwarf_line.c:206
 #1  0x00007ffff7b6d3f9 in dwarf_filename (context=<optimized
 out>, fileno_in=<optimized out>, ret_filename=0x7fffffffe280,
 error=0x7fffffffe2b8) at ./dwarf_line.c:1418
 #2  dwarf_linesrc (line=<optimized out>,
 ret_linesrc=<optimized out>, error=<optimized out>) at
 ./dwarf_line.c:1436
 
2016-05-22 regressiontests/liu/NULLdereference0522.elf acae971371daa23a19358bc62204007d258fbc5e libdwarf-20160923.tar.gz
DW201605-017 CVE-2016-5030 2016-05-19 Yue Liu libdwarf Null dereference bug in _dwarf_calculate_info_section_end_ptr(). NULL dereference bug in _dwarf_calculate_info_section_end_ptr().
 1742         Dwarf_Off off2 = 0;
 1743         Dwarf_Small *dataptr = 0;
 1744
 1745         dbg = context->cc_dbg;
 1746         dataptr = context->cc_is_info? dbg->de_debug_info.dss_data:                 <- $pc
 1747             dbg->de_debug_types.dss_data;
 1748         off2 = context->cc_debug_offset;
 1749         info_start = dataptr + off2;
 1750         info_end = info_start + context->cc_length +
 #0  _dwarf_calculate_info_section_end_ptr
 (context=context@entry=0x0) at dwarf_query.c:1746
 #1  0x00002aaaaace307d in
 _dwarf_extract_string_offset_via_str_offsets
 (dbg=dbg@entry=0x655a70, info_data_ptr=0x6629f0
 "", attrnum=attrnum@entry=121,
 attrform=attrform@entry=26, cu_context=0x0,
 str_sect_offset_out=str_sect_offset_out@entry=0x7fffffffd718,
 error=error@entry=0x7fffffffd878) at dwarf_form.c:1099
 #2  0x00002aaaaacf4ed7 in dwarf_get_macro_defundef
 (macro_context=macro_context@entry=0x65b790,
 op_number=op_number@entry=1,
 line_number=line_number@entry=0x7fffffffd858,
 index=index@entry=0x7fffffffd860,
 offset=offset@entry=0x7fffffffd868,
 forms_count=forms_count@entry=0x7fffffffd7ce,
 macro_string=macro_string@entry=0x7fffffffd870,
 error=error@entry=0x7fffffffd878) at dwarf_macro5.c:557
 ------
 _dwarf_calculate_info_section_end_ptr (context=context@entry=0x0) at
   dwarf_query.c:1746
 1746        dataptr = context->cc_is_info? dbg->de_debug_info.dss_data:
 gef> p/x $rdi
 $4 = 0x0
 
2016-05-22 regressiontests/liu/NULLdereference0519.elf 6fa3f710ee6f21bba7966b963033a91d77c952bd libdwarf-20160923.tar.gz
DW201605-016 2016-05-19 Yue Liu dwarfdump Invalid dwarf leads to dwarfdump crash in print_frame_inst_bytes. Corrupted dwarf crashes dwarfdump
 1297         }
 1298         len = len_in;
 1299         endpoint = instp + len;
 1300         for (; len > 0;) {
 1301             unsigned char ibyte = *instp;           <- $pc
 1302             int top = ibyte & 0xc0;
 1303             int bottom = ibyte & 0x3f;
 1304             int delta = 0;
 1305             int reg = 0;
 #0  print_frame_inst_bytes (dbg=dbg@entry=0x655ca0,
 cie_init_inst=<optimized out>, len_in=<optimized out>,
 data_alignment_factor=-4, code_alignment_factor=4,
 addr_size=addr_size@entry=4, offset_size=4, version=3,
 config_data=config_data@entry=0x63cda0 <g_config_file_data>)
 at print_frames.c:1301
 #1  0x000000000041b70c in print_one_cie
 (dbg=dbg@entry=0x655ca0, cie=<optimized out>,
 cie_index=cie_index@entry=2, address_size=<optimized out>,
 config_data=config_data@entry=0x63cda0 <g_config_file_data>)
 at print_frames.c:1161
 #2  0x000000000041cf52 in print_frames (dbg=0x655ca0,
 print_debug_frame=print_debug_frame@entry=1, print_eh_frame=0,
 config_data=config_data@entry=0x63cda0 <g_config_file_data>)
 at print_frames.c:2229
 gef> p/x $r13
 $1 = 0x4bcad8
 gef> p/x *$r13
 Cannot access memory at address 0x4bcad8
 
2016-05-22 regressiontests/liu/OOB_READ0519.elf 6fa3f710ee6f21bba7966b963033a91d77c952bd libdwarf-20160923.tar.gz
DW201605-015 CVE-2016-5031 2016-05-17 Yue Liu libdwarf OOB read bug in print_frame_inst_bytes() Test object shows an invalid read in print_frame_inst_bytes().
 1294         for (; len > 0;) {
 1295             unsigned char ibyte = *instp;           <- $pc
 1296             int top = ibyte & 0xc0;
 #0  print_frame_inst_bytes (dbg=dbg@entry=0x654c80,
    cie_init_inst=<optimized out>, len=503715, data_alignment_factor=-4,
    code_alignment_factor=1, addr_size=addr_size@entry=4, offset_size=4,
    version=3, config_data=config_data@entry=0x63bda0
    <g_config_file_data>) at print_frames.c:1295
 #1  0x000000000041b64c in print_one_cie (dbg=dbg@entry=0x654c80,
    cie=<optimized out>, cie_index=cie_index@entry=1,
    address_size=<optimized out>, config_data=
    config_data@entry=0x63bda0 <g_config_file_data>) at print_frames.c:1161
 #2  0x000000000041ce92 in print_frames (dbg=0x654c80,
    print_debug_frame=print_debug_frame@entry=1, print_eh_frame=0,
    config_data=config_data@entry=0x63bda0 <g_config_file_data>)
    at print_frames.c:2209
 gef> x/10x $r13
 0x5e7981:       Cannot access memory at address 0x5e7981
 gef> p/x $r13
 $14 = 0x5e7981
 
2015-05-18 regressiontests/liu/OOB0517_03.elf ac6673e32f3443a5d36c2217cb814000930b2c54 libdwarf-20160923.tar.gz
DW201605-014 CVE-2016-5032 2016-05-17 Yue Liu libdwarf OOB read bug in dwarf_get_xu_hash_entry() Test object shows an invalid read in dwarf_get _xu_hash_entry, lin 211.
 #0  dwarf_get_xu_hash_entry (xuhdr=xuhdr@entry=0x657360,
    index=index@entry=2897626028, hash_value=
    hash_value@entry=0x7fffffffd5b0,
    index_to_sections=index_to_sections@entry=0x7fffffffd5a8,
    err=err@entry=0x7fffffffdb08) at dwarf_xu_index.c:211
 #1  0x00002aaaaacfd05e in _dwarf_search_fission_for_key (
    dbg=0x654a50, error=0x7fffffffdb08, percu_index_out=<synthetic pointer>,
    key_in=0x7fffffffd670, xuhdr=0x657360) at dwarf_xu_index.c:363
 #2  dwarf_get_debugfission_for_key (dbg=dbg@entry=0x654a50,
    key=key@entry=0x7fffffffd670, key_type=key_type@entry=0x2aaaaad15e2a
    "tu", percu_out=percu_out@entry=0x65a830,
    error=error@entry=0x7fffffffdb08) at dwarf_xu_index.c:577
 
2015-05-18 regressiontests/liu/OOB0517_02.elf ac6673e32f3443a5d36c2217cb814000930b2c54 libdwarf-20160923.tar.gz
DW201605-013 CVE-2016-5033 2016-05-17 Yue Liu libdwarf OOB read bug in print_exprloc_content Test object shows an invalid write in print_exprloc_content.
 #0  print_exprloc_content (dbg=dbg@entry=0x654ea0,
    die=die@entry=0x65b110, attrib=attrib@entry=0x65b590,
    esbp=esbp@entry=0x7fffffffcef0, showhextoo=1) at print_die.c:4182
 #1  0x0000000000412fb1 in get_attr_value (dbg=dbg@entry=0x654ea0,
    tag=<optimized out>, die=die@entry=0x65b110,
    dieprint_cu_goffset=dieprint_cu_goffset@entry=11,
    attrib=attrib@entry=0x65b590, srcfiles=srcfiles@entry=0x0,
    cnt=cnt@entry=0, esbp=esbp@entry=0x7fffffffcef0, show_form=0,
    local_verbose=0) at print_die.c:4972
 
2015-05-18 regressiontests/liu/OOB0517_01.elf ac6673e32f3443a5d36c2217cb814000930b2c54 libdwarf-20160923.tar.gz
DW201605-012 CVE-2016-5034 2016-05-13 Yue Liu libdwarf OOB write. From relocation records Test object shows an invalid write in dwarf_elf_access.c (when doing the relocations). Adding the relocation value to anything overflowed and disguised the bad relocation record. With a 32bit kernel build the test could show a double-free and coredump due to the unchecked invalid writes from relocations. 2016-05-17 regressiontests/liu/HeapOverflow0513.elf 10ca310f64368dc083efacac87732c02ef560a92 libdwarf-20160923.tar.gz DW201605-011 CVE-2016-5035 2016-05-06 Yue Liu libdwarf OOB read bug in _dwarf_read_line_table_header Test object shows null dereference at line 62 of dwarf_line_table_reader.c. Frame code and linetable code was not noticing data corruption. 2016-05-12 regressiontests/liu/OOB_read4.elf 82d8e007851805af0dcaaff41f49a2d48473334b libdwarf-20160923.tar.gz DW201605-010 CVE-2016-5036 2016-05-06 Yue Liu libdwarf OOB read bug in dump_block Test object shows null dereverence at line 186 of dump_block() in print_sections.c Frame code was not noticing frame data corruption. 2016-05-12 regressiontests/liu/OOB_read3.elf regressiontests/liu/OOB_read3_02.elf 82d8e007851805af0dcaaff41f49a2d48473334b libdwarf-20160923.tar.gz DW201605-009 CVE-2016-5037 2016-05-05 Yue Liu libdwarf NULL dereference in _dwarf_load_section Test object shows null dereverence at line 1010 if(!strncmp("ZLIB",(const char *)src,4)) { in dwarf_init_finish.c The zlib code was not checking for a corrupted length-value. 2016-05-06 regressiontests/liu/NULLderefer0505_01.elf b6ec2dfd850929821626ea63fb0a752076a3c08a libdwarf-20160507.tar.gz DW201605-008 CVE-2016-5038 2016-05-05 Yue Liu libdwarf OOB read in dwarf_get_macro_startend_file() Test object shows out of bound read. OOB at: line 772 *src_file_name = macro_context->mc_srcfiles[trueindex]; in dwarf_macro5.c A string offset into .debug_str is outside the bounds of the .debug_str section. 2016-05-12 regressiontests/liu/OOB0505_02.elf regressiontests/liu/OOB0505_02_02.elf 82d8e007851805af0dcaaff41f49a2d48473334b libdwarf-20160923.tar.gz DW201605-007 CVE-2016-5039 2016-05-05 Yue Liu libdwarf OOB read bug in get_attr_value() Test object shows out of bound read. Object had data all-bits-on so the existing length check did not work due to wraparound. Added a check not susceptible to that error (DW_DLE_FORM_BLOCK_LENGTH_ERROR). 2016-05-06 regressiontests/liu/OOB0505_01.elf eb1472afac95031d0c9dd8c11d527b865fe7deb8 libdwarf-20160507.tar.gz DW201605-006 2016-05-05 Yue Liu libdwarf Two Heap-Overflow bug Two test objects showing a heap overflow in libdwarf when using dwarfdump. It seems that these were fixed by the previous git update. Neither gdb nor valgrind find any errors when building with yesterday's commit. 2016-05-04 regressiontests/liu/free_invalid_address.elf regressiontests/liu/heapoverflow01b.elf 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f libdwarf-20160507.tar.gz DW201605-005 CVE-2016-5040 2016-05-02 Yue Liu libdwarf A specially crafted DWARF section results in reading a compilation unit header that crashes the application. If the data read for a compilation unit header contains a too large length value the library will read outside of its bounds and crash the application. 2016-05-04 regressiontests/liu/null02.elf
 https://bugzilla.redhat.com/show_bug.cgi?id=1332149
 
98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f libdwarf-20160507.tar.gz
DW201605-004 CVE-2016-5041 2016-05-02 Yue Liu libdwarf A specially crafted DWARF section results in a null dereference reading debugging information entries which crashes the application. If no DW_AT_name is present in a debugging information entry using DWARF5 macros a null dereference in dwarf_macro5.c will crash the application. 2016-05-04 regressiontests/liu/null01.elf
 https://bugzilla.redhat.com/show_bug.cgi?id=1332148
 
98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f libdwarf-20160507.tar.gz
DW201605-003 CVE-2016-5042 2016-05-02 Yue Liu libdwarf A specially crafted DWARF section results in an infinite loop that eventually crashes the application. In dwarf_get_aranges_list() an invalid count will iterate, reading from memory addresses that increase till it all fails. 2016-05-04 regressiontests/liu/infiniteloop.elf
 https://bugzilla.redhat.com/show_bug.cgi?id=1332145
 
98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f libdwarf-20160507.tar.gz
DW201605-002 CVE-2016-5043 2016-05-02 Yue Liu libdwarf A specially crafted DWARF section results in a read outside the bounds of in memory data so the calling application can crash. Out of bound read bug in libdwarf git code. dwarf_dealloc() did not check the Dwarf_Ptr space argument before using it. This will lead to a out-of-bound read bug.
 backtrace:
 #0  dwarf_dealloc (dbg=dbg@entry=0x655f30, space=0xa0,
 alloc_type=alloc_type@entry=1) at dwarf_alloc.c:477
 #1  0x00002aaaaacf3296 in dealloc_srcfiles
 (dbg=0x655f30, srcfiles=0x66b8f0, srcfiles_count=17) at
 dwarf_macro5.c:1025 #2  0x00002aaaaacf50e6 in dealloc_srcfiles
 (srcfiles_count=<optimized out>, srcfiles=<optimized out>,
 dbg=<optimized out>) at dwarf_macro5.c:1021 -----
 gef> p &r->rd_dbg
 $14 = (void **) 0x90
 
2016-05-04 regressiontests/liu/outofbound01.elf
 https://bugzilla.redhat.com/show_bug.cgi?id=1332144
 
98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f libdwarf-20160507.tar.gz
DW201605-001 CVE-2016-5044 2016-05-02 Yue Liu libdwarf A specially crafted DWARF section results in a duplicate free() in libdwarf and the calling application will crash. In file dwarf_elf_access.c:1071
 WRITE_UNALIGNED(dbg,target_section + offset,
     &outval,sizeof(outval),reloc_size);
 
A crafted ELF file may lead to a large offset value, which bigger than the size of target_section heap chunk, then this WRITE_UNALIGNED() function will write the value of &outval out of the heap chunk. offset is a 64bit unsigned int value, so this is more than a heap overflow bug, but also a Out-of-Bound write bug. So WRITE_UNALIGNED() need more strictly checking to prevent this.
2016-05-04 regressiontests/liu/heapoverflow01.elf
 https://bugzilla.redhat.com/show_bug.cgi?id=1332141
 
98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f libdwarf-20160507.tar.gz
DW201601-002 CVE-2016-2050 2016-01-19 Qixue Xiao libdwarf Out of bound write in get_abbrev_array_info Crashes the calling program. Requires a crafted object file.
  valgrind ./dwarfdump -ka aw.elf
  ==5358== Memcheck, a memory error detector
  ==5358== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
  ==5358== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
  ==5358== Command: ../../llvm-codes/dwarf-20151114/dwarfdump/dwarfdump -ka aw.elf
  ==5358==
  ==5358== Invalid write of size 8
  ==5358==    at 0x40DA25: get_abbrev_array_info (in
  /home/xqx/test/libdwarf-test/llvm-codes/dwarf-20151114/dwarfdump/dwarfdump)
  ==5358==    by 0x40FD92: print_one_die_section (in
  /home/xqx/test/libdwarf-test/llvm-codes/dwarf-20151114/dwarfdump/dwarfdump)
  www.openwall.com/lists/oss-security/2016/01/19/9
  www.openwall.com/lists/oss-security/2016/01/25/3
  
2016-01-21 regressiontests/xqx-b/aw.elf d9d40e4d802e626065ce37ff384dd69c43bc499 libdwarf-20160507.tar.gz
DW201601-001 CVE-2016-2091 2016-01-12 Qixue Xiao libdwarf Out of bound read in dwarf_read_cie_fde_prefix() Crashes the calling program. Requires a crafted object file.
  *** DWARF CHECK: DW_DLE_DEBUG_FRAME_LENGTH_NOT_MULTIPLE
  len=0x00000010, len size=0x00000004, extn size=0x00000000, totl
  length=0x00000014, addr size=0x00000008, mod=0x00000004 must be zero
  in cie, offset 0x00000000. ***
  7   ==53495== Invalid read of size 2
  1 ==53495==    at 0x4C2F7E0: memcpy@@GLIBC_2.14 (in
  /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  2 ==53495==    by 0x43287F: dwarf_read_cie_fde_prefix (dwarf_frame2.c:934)
  3 ==53495==    by 0x431305: _dwarf_get_fde_list_internal (dwarf_frame2.c:268)
  4 ==53495==    by 0x42EB5F: dwarf_get_fde_list_eh (dwarf_frame.c:1101)
  5 ==53495==    by 0x41BABE: print_frames (print_frames.c:1835)
  6 ==53495==    by 0x40485B: process_one_file (dwarfdump.c:1323)
  7 ==53495==    by 0x403529: main (dwarfdump.c:630)
  www.openwall.com/lists/oss-security/2016/01/19/3
  www.openwall.com/lists/oss-security/2016/05/28/8
  
2016-01-21 regressiontests/xqx-b/awbug5.elf d9d40e4d802e626065ce37ff384dd69c43bc499 libdwarf-20160507.tar.gz
DW201512-002 CVE-2015-8538 2015-12-14 Adam Maris libdwarf Out-of-bounds read in dwarf_leb.c libdwarf 20151114 and earlier allows remote attackers to cause a denial of service (NULL pointer dereference and crash) via a debug_abbrev section marked NOBITS in an ELF file. The CVE report mentions a reproducer object file but such is not present. Due to recent tool advances (like coverity scan) we are confident this was fixed long ago.
  bugzilla.redhat.com/show_bug.cgi?id=1291299
  www.openwall.com/lists/oss-security/2015/12/10/3
  
2018-01-01 libdwarf-20160507.tar.gz
DW201512-001 CVE-2015-8750 2015-12-26 Qixue Xiao (xqx) libdwarf Null pointer dereference in libdwarf libdwarf 20151114 and earlier allows remote attackers to cause a denial of service (NULL pointer dereference and crash) via a debug_abbrev section marked NOBITS in an ELF file.
  bugzilla.redhat.com/show_bug.cgi?id=1294264
  www.openwall.com/lists/oss-security/2016/01/07/11
  
2015-12-31 regressiontests/xqx-c/awbug6.elf libdwarf-20160507.tar.gz
DW201412-001 CVE-2014-9482 2014-12-31 Adam Maris dwarfdump Use after free vulnerability in Dwarfdump The use-after-free has no attached testcase anywhere. Due to recent tool advances (like coverity scan) we are confident this was fixed long ago.
  bugzilla.redhat.com/show_bug.cgi?id=1177758
  www.openwall.com/lists/oss-security/2014/12/31/3
  www.openwall.com/lists/oss-security/2015/01/03/14
  
2018-01-01 libdwarf-20160507.tar.gz
libdwarf-code-0.11.1/bugxml/dwarfbuglohi.html000066400000000000000000005245051472336503500211600ustar00rootroot00000000000000 Libdwarf Vulnerabilities

Libdwarf Vulnerabilities

This page provides documentation of known vulnerabilities in libdwarf. We are concerned here with cases where corrupt (by accident or intention) DWARF can cause the library to get a fault (crash) which could expose the calling program to interception by malefactors. Dates (where known) are in ISO extended date format.

Some of the bugs reported here have a CVE assigned, for example CVE-2017-9052. These are reported on cve.org (or possibly the earlier cve.mitre.org). Search with "libdwarf" on cve.org for a list.

Git reference path names refer to object files in the libdwarf regression test base. The test files can be retrieved via anonymous access:
"git clone https://github.org/davea42/libdwarf-regressiontests"

A few bugs refer to https://bugzilla.redhat.com bug system entries and/or https://bugs.chromium.org in addition to showing the names of test files in the regression test base.

Vulnerabilities

Vulnerabilities listed newest-first.
Vulnerabilities listed oldest-first.

LibDwarf Vulnerabilities Oldest First

as of December 2024

Record count: 189

1) DW201412-001

id: DW201412-001

cve: CVE-2014-9482

fuzzer:

datereported: 2014-12-31

reportedby: Adam Maris

vulnerability: Use after free vulnerability in Dwarfdump

product: dwarfdump

description: The use-after-free has no attached testcase anywhere. Due to recent tool advances (like coverity scan) we are confident this was fixed long ago.

  bugzilla.redhat.com/show_bug.cgi?id=1177758
  www.openwall.com/lists/oss-security/2014/12/31/3
  www.openwall.com/lists/oss-security/2015/01/03/14
  

datefixed: 2018-01-01

references:

gitfixid:

tarrelease: libdwarf-20160507.tar.gz

[top]

2) DW201512-001

id: DW201512-001

cve: CVE-2015-8750

fuzzer:

datereported: 2015-12-26

reportedby: Qixue Xiao (xqx)

vulnerability: Null pointer dereference in libdwarf

product: libdwarf

description: libdwarf 20151114 and earlier allows remote attackers to cause a denial of service (NULL pointer dereference and crash) via a debug_abbrev section marked NOBITS in an ELF file.

  bugzilla.redhat.com/show_bug.cgi?id=1294264
  www.openwall.com/lists/oss-security/2016/01/07/11
  

datefixed: 2015-12-31

references: regressiontests/xqx-c/awbug6.elf

gitfixid:

tarrelease: libdwarf-20160507.tar.gz

[top]

3) DW201512-002

id: DW201512-002

cve: CVE-2015-8538

fuzzer:

datereported: 2015-12-14

reportedby: Adam Maris

vulnerability: Out-of-bounds read in dwarf_leb.c

product: libdwarf

description: libdwarf 20151114 and earlier allows remote attackers to cause a denial of service (NULL pointer dereference and crash) via a debug_abbrev section marked NOBITS in an ELF file. The CVE report mentions a reproducer object file but such is not present. Due to recent tool advances (like coverity scan) we are confident this was fixed long ago.

  bugzilla.redhat.com/show_bug.cgi?id=1291299
  www.openwall.com/lists/oss-security/2015/12/10/3
  

datefixed: 2018-01-01

references:

gitfixid:

tarrelease: libdwarf-20160507.tar.gz

[top]

4) DW201601-001

id: DW201601-001

cve: CVE-2016-2091

fuzzer:

datereported: 2016-01-12

reportedby: Qixue Xiao

vulnerability: Out of bound read in dwarf_read_cie_fde_prefix()

product: libdwarf

description: Crashes the calling program. Requires a crafted object file.

  *** DWARF CHECK: DW_DLE_DEBUG_FRAME_LENGTH_NOT_MULTIPLE
  len=0x00000010, len size=0x00000004, extn size=0x00000000, totl
  length=0x00000014, addr size=0x00000008, mod=0x00000004 must be zero
  in cie, offset 0x00000000. ***
  7   ==53495== Invalid read of size 2
  1 ==53495==    at 0x4C2F7E0: memcpy@@GLIBC_2.14 (in
  /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  2 ==53495==    by 0x43287F: dwarf_read_cie_fde_prefix (dwarf_frame2.c:934)
  3 ==53495==    by 0x431305: _dwarf_get_fde_list_internal (dwarf_frame2.c:268)
  4 ==53495==    by 0x42EB5F: dwarf_get_fde_list_eh (dwarf_frame.c:1101)
  5 ==53495==    by 0x41BABE: print_frames (print_frames.c:1835)
  6 ==53495==    by 0x40485B: process_one_file (dwarfdump.c:1323)
  7 ==53495==    by 0x403529: main (dwarfdump.c:630)
  www.openwall.com/lists/oss-security/2016/01/19/3
  www.openwall.com/lists/oss-security/2016/05/28/8
  

datefixed: 2016-01-21

references: regressiontests/xqx-b/awbug5.elf

gitfixid: d9d40e4d802e626065ce37ff384dd69c43bc499

tarrelease: libdwarf-20160507.tar.gz

[top]

5) DW201601-002

id: DW201601-002

cve: CVE-2016-2050

fuzzer:

datereported: 2016-01-19

reportedby: Qixue Xiao

vulnerability: Out of bound write in get_abbrev_array_info

product: libdwarf

description: Crashes the calling program. Requires a crafted object file.

  valgrind ./dwarfdump -ka aw.elf
  ==5358== Memcheck, a memory error detector
  ==5358== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
  ==5358== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
  ==5358== Command: ../../llvm-codes/dwarf-20151114/dwarfdump/dwarfdump -ka aw.elf
  ==5358==
  ==5358== Invalid write of size 8
  ==5358==    at 0x40DA25: get_abbrev_array_info (in
  /home/xqx/test/libdwarf-test/llvm-codes/dwarf-20151114/dwarfdump/dwarfdump)
  ==5358==    by 0x40FD92: print_one_die_section (in
  /home/xqx/test/libdwarf-test/llvm-codes/dwarf-20151114/dwarfdump/dwarfdump)
  www.openwall.com/lists/oss-security/2016/01/19/9
  www.openwall.com/lists/oss-security/2016/01/25/3
  

datefixed: 2016-01-21

references: regressiontests/xqx-b/aw.elf

gitfixid: d9d40e4d802e626065ce37ff384dd69c43bc499

tarrelease: libdwarf-20160507.tar.gz

[top]

6) DW201605-001

id: DW201605-001

cve: CVE-2016-5044

fuzzer:

datereported: 2016-05-02

reportedby: Yue Liu

vulnerability: A specially crafted DWARF section results in a duplicate free() in libdwarf and the calling application will crash.

product: libdwarf

description: In file dwarf_elf_access.c:1071

 WRITE_UNALIGNED(dbg,target_section + offset,
     &outval,sizeof(outval),reloc_size);
 

A crafted ELF file may lead to a large offset value, which bigger than the size of target_section heap chunk, then this WRITE_UNALIGNED() function will write the value of &outval out of the heap chunk. offset is a 64bit unsigned int value, so this is more than a heap overflow bug, but also a Out-of-Bound write bug. So WRITE_UNALIGNED() need more strictly checking to prevent this.

datefixed: 2016-05-04

references: regressiontests/liu/heapoverflow01.elf

 https://bugzilla.redhat.com/show_bug.cgi?id=1332141
 

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

7) DW201605-002

id: DW201605-002

cve: CVE-2016-5043

fuzzer:

datereported: 2016-05-02

reportedby: Yue Liu

vulnerability: A specially crafted DWARF section results in a read outside the bounds of in memory data so the calling application can crash.

product: libdwarf

description: Out of bound read bug in libdwarf git code. dwarf_dealloc() did not check the Dwarf_Ptr space argument before using it. This will lead to a out-of-bound read bug.

 backtrace:
 #0  dwarf_dealloc (dbg=dbg@entry=0x655f30, space=0xa0,
 alloc_type=alloc_type@entry=1) at dwarf_alloc.c:477
 #1  0x00002aaaaacf3296 in dealloc_srcfiles
 (dbg=0x655f30, srcfiles=0x66b8f0, srcfiles_count=17) at
 dwarf_macro5.c:1025 #2  0x00002aaaaacf50e6 in dealloc_srcfiles
 (srcfiles_count=<optimized out>, srcfiles=<optimized out>,
 dbg=<optimized out>) at dwarf_macro5.c:1021 -----
 gef> p &r->rd_dbg
 $14 = (void **) 0x90
 

datefixed: 2016-05-04

references: regressiontests/liu/outofbound01.elf

 https://bugzilla.redhat.com/show_bug.cgi?id=1332144
 

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

8) DW201605-003

id: DW201605-003

cve: CVE-2016-5042

fuzzer:

datereported: 2016-05-02

reportedby: Yue Liu

vulnerability: A specially crafted DWARF section results in an infinite loop that eventually crashes the application.

product: libdwarf

description: In dwarf_get_aranges_list() an invalid count will iterate, reading from memory addresses that increase till it all fails.

datefixed: 2016-05-04

references: regressiontests/liu/infiniteloop.elf

 https://bugzilla.redhat.com/show_bug.cgi?id=1332145
 

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

9) DW201605-004

id: DW201605-004

cve: CVE-2016-5041

fuzzer:

datereported: 2016-05-02

reportedby: Yue Liu

vulnerability: A specially crafted DWARF section results in a null dereference reading debugging information entries which crashes the application.

product: libdwarf

description: If no DW_AT_name is present in a debugging information entry using DWARF5 macros a null dereference in dwarf_macro5.c will crash the application.

datefixed: 2016-05-04

references: regressiontests/liu/null01.elf

 https://bugzilla.redhat.com/show_bug.cgi?id=1332148
 

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

10) DW201605-005

id: DW201605-005

cve: CVE-2016-5040

fuzzer:

datereported: 2016-05-02

reportedby: Yue Liu

vulnerability: A specially crafted DWARF section results in reading a compilation unit header that crashes the application.

product: libdwarf

description: If the data read for a compilation unit header contains a too large length value the library will read outside of its bounds and crash the application.

datefixed: 2016-05-04

references: regressiontests/liu/null02.elf

 https://bugzilla.redhat.com/show_bug.cgi?id=1332149
 

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

11) DW201605-006

id: DW201605-006

cve:

fuzzer:

datereported: 2016-05-05

reportedby: Yue Liu

vulnerability: Two Heap-Overflow bug

product: libdwarf

description: Two test objects showing a heap overflow in libdwarf when using dwarfdump. It seems that these were fixed by the previous git update. Neither gdb nor valgrind find any errors when building with yesterday's commit.

datefixed: 2016-05-04

references: regressiontests/liu/free_invalid_address.elf regressiontests/liu/heapoverflow01b.elf

gitfixid: 98a3da1e8237fe0d45b67ef77f3fa5ed9ff0215f

tarrelease: libdwarf-20160507.tar.gz

[top]

12) DW201605-007

id: DW201605-007

cve: CVE-2016-5039

fuzzer:

datereported: 2016-05-05

reportedby: Yue Liu

vulnerability: OOB read bug in get_attr_value()

product: libdwarf

description: Test object shows out of bound read. Object had data all-bits-on so the existing length check did not work due to wraparound. Added a check not susceptible to that error (DW_DLE_FORM_BLOCK_LENGTH_ERROR).

datefixed: 2016-05-06

references: regressiontests/liu/OOB0505_01.elf

gitfixid: eb1472afac95031d0c9dd8c11d527b865fe7deb8

tarrelease: libdwarf-20160507.tar.gz

[top]

13) DW201605-008

id: DW201605-008

cve: CVE-2016-5038

fuzzer:

datereported: 2016-05-05

reportedby: Yue Liu

vulnerability: OOB read in dwarf_get_macro_startend_file()

product: libdwarf

description: Test object shows out of bound read. OOB at: line 772 *src_file_name = macro_context->mc_srcfiles[trueindex]; in dwarf_macro5.c A string offset into .debug_str is outside the bounds of the .debug_str section.

datefixed: 2016-05-12

references: regressiontests/liu/OOB0505_02.elf regressiontests/liu/OOB0505_02_02.elf

gitfixid: 82d8e007851805af0dcaaff41f49a2d48473334b

tarrelease: libdwarf-20160923.tar.gz

[top]

14) DW201605-009

id: DW201605-009

cve: CVE-2016-5037

fuzzer:

datereported: 2016-05-05

reportedby: Yue Liu

vulnerability: NULL dereference in _dwarf_load_section

product: libdwarf

description: Test object shows null dereverence at line 1010 if(!strncmp("ZLIB",(const char *)src,4)) { in dwarf_init_finish.c The zlib code was not checking for a corrupted length-value.

datefixed: 2016-05-06

references: regressiontests/liu/NULLderefer0505_01.elf

gitfixid: b6ec2dfd850929821626ea63fb0a752076a3c08a

tarrelease: libdwarf-20160507.tar.gz

[top]

15) DW201605-010

id: DW201605-010

cve: CVE-2016-5036

fuzzer:

datereported: 2016-05-06

reportedby: Yue Liu

vulnerability: OOB read bug in dump_block

product: libdwarf

description: Test object shows null dereverence at line 186 of dump_block() in print_sections.c Frame code was not noticing frame data corruption.

datefixed: 2016-05-12

references: regressiontests/liu/OOB_read3.elf regressiontests/liu/OOB_read3_02.elf

gitfixid: 82d8e007851805af0dcaaff41f49a2d48473334b

tarrelease: libdwarf-20160923.tar.gz

[top]

16) DW201605-011

id: DW201605-011

cve: CVE-2016-5035

fuzzer:

datereported: 2016-05-06

reportedby: Yue Liu

vulnerability: OOB read bug in _dwarf_read_line_table_header

product: libdwarf

description: Test object shows null dereference at line 62 of dwarf_line_table_reader.c. Frame code and linetable code was not noticing data corruption.

datefixed: 2016-05-12

references: regressiontests/liu/OOB_read4.elf

gitfixid: 82d8e007851805af0dcaaff41f49a2d48473334b

tarrelease: libdwarf-20160923.tar.gz

[top]

17) DW201605-012

id: DW201605-012

cve: CVE-2016-5034

fuzzer:

datereported: 2016-05-13

reportedby: Yue Liu

vulnerability: OOB write. From relocation records

product: libdwarf

description: Test object shows an invalid write in dwarf_elf_access.c (when doing the relocations). Adding the relocation value to anything overflowed and disguised the bad relocation record. With a 32bit kernel build the test could show a double-free and coredump due to the unchecked invalid writes from relocations.

datefixed: 2016-05-17

references: regressiontests/liu/HeapOverflow0513.elf

gitfixid: 10ca310f64368dc083efacac87732c02ef560a92

tarrelease: libdwarf-20160923.tar.gz

[top]

18) DW201605-013

id: DW201605-013

cve: CVE-2016-5033

fuzzer:

datereported: 2016-05-17

reportedby: Yue Liu

vulnerability: OOB read bug in print_exprloc_content

product: libdwarf

description: Test object shows an invalid write in print_exprloc_content.

 #0  print_exprloc_content (dbg=dbg@entry=0x654ea0,
    die=die@entry=0x65b110, attrib=attrib@entry=0x65b590,
    esbp=esbp@entry=0x7fffffffcef0, showhextoo=1) at print_die.c:4182
 #1  0x0000000000412fb1 in get_attr_value (dbg=dbg@entry=0x654ea0,
    tag=<optimized out>, die=die@entry=0x65b110,
    dieprint_cu_goffset=dieprint_cu_goffset@entry=11,
    attrib=attrib@entry=0x65b590, srcfiles=srcfiles@entry=0x0,
    cnt=cnt@entry=0, esbp=esbp@entry=0x7fffffffcef0, show_form=0,
    local_verbose=0) at print_die.c:4972
 

datefixed: 2015-05-18

references: regressiontests/liu/OOB0517_01.elf

gitfixid: ac6673e32f3443a5d36c2217cb814000930b2c54

tarrelease: libdwarf-20160923.tar.gz

[top]

19) DW201605-014

id: DW201605-014

cve: CVE-2016-5032

fuzzer:

datereported: 2016-05-17

reportedby: Yue Liu

vulnerability: OOB read bug in dwarf_get_xu_hash_entry()

product: libdwarf

description: Test object shows an invalid read in dwarf_get _xu_hash_entry, lin 211.

 #0  dwarf_get_xu_hash_entry (xuhdr=xuhdr@entry=0x657360,
    index=index@entry=2897626028, hash_value=
    hash_value@entry=0x7fffffffd5b0,
    index_to_sections=index_to_sections@entry=0x7fffffffd5a8,
    err=err@entry=0x7fffffffdb08) at dwarf_xu_index.c:211
 #1  0x00002aaaaacfd05e in _dwarf_search_fission_for_key (
    dbg=0x654a50, error=0x7fffffffdb08, percu_index_out=<synthetic pointer>,
    key_in=0x7fffffffd670, xuhdr=0x657360) at dwarf_xu_index.c:363
 #2  dwarf_get_debugfission_for_key (dbg=dbg@entry=0x654a50,
    key=key@entry=0x7fffffffd670, key_type=key_type@entry=0x2aaaaad15e2a
    "tu", percu_out=percu_out@entry=0x65a830,
    error=error@entry=0x7fffffffdb08) at dwarf_xu_index.c:577
 

datefixed: 2015-05-18

references: regressiontests/liu/OOB0517_02.elf

gitfixid: ac6673e32f3443a5d36c2217cb814000930b2c54

tarrelease: libdwarf-20160923.tar.gz

[top]

20) DW201605-015

id: DW201605-015

cve: CVE-2016-5031

fuzzer:

datereported: 2016-05-17

reportedby: Yue Liu

vulnerability: OOB read bug in print_frame_inst_bytes()

product: libdwarf

description: Test object shows an invalid read in print_frame_inst_bytes().

 1294         for (; len > 0;) {
 1295             unsigned char ibyte = *instp;           <- $pc
 1296             int top = ibyte & 0xc0;
 #0  print_frame_inst_bytes (dbg=dbg@entry=0x654c80,
    cie_init_inst=<optimized out>, len=503715, data_alignment_factor=-4,
    code_alignment_factor=1, addr_size=addr_size@entry=4, offset_size=4,
    version=3, config_data=config_data@entry=0x63bda0
    <g_config_file_data>) at print_frames.c:1295
 #1  0x000000000041b64c in print_one_cie (dbg=dbg@entry=0x654c80,
    cie=<optimized out>, cie_index=cie_index@entry=1,
    address_size=<optimized out>, config_data=
    config_data@entry=0x63bda0 <g_config_file_data>) at print_frames.c:1161
 #2  0x000000000041ce92 in print_frames (dbg=0x654c80,
    print_debug_frame=print_debug_frame@entry=1, print_eh_frame=0,
    config_data=config_data@entry=0x63bda0 <g_config_file_data>)
    at print_frames.c:2209
 gef> x/10x $r13
 0x5e7981:       Cannot access memory at address 0x5e7981
 gef> p/x $r13
 $14 = 0x5e7981
 

datefixed: 2015-05-18

references: regressiontests/liu/OOB0517_03.elf

gitfixid: ac6673e32f3443a5d36c2217cb814000930b2c54

tarrelease: libdwarf-20160923.tar.gz

[top]

21) DW201605-016

id: DW201605-016

cve:

fuzzer:

datereported: 2016-05-19

reportedby: Yue Liu

vulnerability: Invalid dwarf leads to dwarfdump crash in print_frame_inst_bytes.

product: dwarfdump

description: Corrupted dwarf crashes dwarfdump

 1297         }
 1298         len = len_in;
 1299         endpoint = instp + len;
 1300         for (; len > 0;) {
 1301             unsigned char ibyte = *instp;           <- $pc
 1302             int top = ibyte & 0xc0;
 1303             int bottom = ibyte & 0x3f;
 1304             int delta = 0;
 1305             int reg = 0;
 #0  print_frame_inst_bytes (dbg=dbg@entry=0x655ca0,
 cie_init_inst=<optimized out>, len_in=<optimized out>,
 data_alignment_factor=-4, code_alignment_factor=4,
 addr_size=addr_size@entry=4, offset_size=4, version=3,
 config_data=config_data@entry=0x63cda0 <g_config_file_data>)
 at print_frames.c:1301
 #1  0x000000000041b70c in print_one_cie
 (dbg=dbg@entry=0x655ca0, cie=<optimized out>,
 cie_index=cie_index@entry=2, address_size=<optimized out>,
 config_data=config_data@entry=0x63cda0 <g_config_file_data>)
 at print_frames.c:1161
 #2  0x000000000041cf52 in print_frames (dbg=0x655ca0,
 print_debug_frame=print_debug_frame@entry=1, print_eh_frame=0,
 config_data=config_data@entry=0x63cda0 <g_config_file_data>)
 at print_frames.c:2229
 gef> p/x $r13
 $1 = 0x4bcad8
 gef> p/x *$r13
 Cannot access memory at address 0x4bcad8
 

datefixed: 2016-05-22

references: regressiontests/liu/OOB_READ0519.elf

gitfixid: 6fa3f710ee6f21bba7966b963033a91d77c952bd

tarrelease: libdwarf-20160923.tar.gz

[top]

22) DW201605-017

id: DW201605-017

cve: CVE-2016-5030

fuzzer:

datereported: 2016-05-19

reportedby: Yue Liu

vulnerability: Null dereference bug in _dwarf_calculate_info_section_end_ptr().

product: libdwarf

description: NULL dereference bug in _dwarf_calculate_info_section_end_ptr().

 1742         Dwarf_Off off2 = 0;
 1743         Dwarf_Small *dataptr = 0;
 1744
 1745         dbg = context->cc_dbg;
 1746         dataptr = context->cc_is_info? dbg->de_debug_info.dss_data:                 <- $pc
 1747             dbg->de_debug_types.dss_data;
 1748         off2 = context->cc_debug_offset;
 1749         info_start = dataptr + off2;
 1750         info_end = info_start + context->cc_length +
 #0  _dwarf_calculate_info_section_end_ptr
 (context=context@entry=0x0) at dwarf_query.c:1746
 #1  0x00002aaaaace307d in
 _dwarf_extract_string_offset_via_str_offsets
 (dbg=dbg@entry=0x655a70, info_data_ptr=0x6629f0
 "", attrnum=attrnum@entry=121,
 attrform=attrform@entry=26, cu_context=0x0,
 str_sect_offset_out=str_sect_offset_out@entry=0x7fffffffd718,
 error=error@entry=0x7fffffffd878) at dwarf_form.c:1099
 #2  0x00002aaaaacf4ed7 in dwarf_get_macro_defundef
 (macro_context=macro_context@entry=0x65b790,
 op_number=op_number@entry=1,
 line_number=line_number@entry=0x7fffffffd858,
 index=index@entry=0x7fffffffd860,
 offset=offset@entry=0x7fffffffd868,
 forms_count=forms_count@entry=0x7fffffffd7ce,
 macro_string=macro_string@entry=0x7fffffffd870,
 error=error@entry=0x7fffffffd878) at dwarf_macro5.c:557
 ------
 _dwarf_calculate_info_section_end_ptr (context=context@entry=0x0) at
   dwarf_query.c:1746
 1746        dataptr = context->cc_is_info? dbg->de_debug_info.dss_data:
 gef> p/x $rdi
 $4 = 0x0
 

datefixed: 2016-05-22

references: regressiontests/liu/NULLdereference0519.elf

gitfixid: 6fa3f710ee6f21bba7966b963033a91d77c952bd

tarrelease: libdwarf-20160923.tar.gz

[top]

23) DW201605-018

id: DW201605-018

cve: CVE-2016-5029

fuzzer:

datereported: 2016-05-22

reportedby: Yue Liu

vulnerability: Null dereference in create_fullest_file_path().

product: libdwarf

description: The null dereference in create_fullest_file_path() causes a crash. This is due to corrupted dwarf and the fix detects this corruption and if that null string pointer happens undetected a static string is substituted so readers can notice the situation.

  202             }
 203             if (dirno > 0 && fe->fi_dir_index > 0) {
 204                 inc_dir_name = (char *)
                         line_context->lc_include_directories[
 205                     fe->fi_dir_index - 1];
 206                 incdirnamelen = strlen(inc_dir_name);  <- $pc
 207             }
 208             full_name = (char *) _dwarf_get_alloc(dbg,
 #0  create_fullest_file_path (dbg=<optimized out>,
 fe=0x68d510, line_context=0x68c4f0, name_ptr_out=<optimized
 out>, error=0x7fffffffe2b8) at ./dwarf_line.c:206
 #1  0x00007ffff7b6d3f9 in dwarf_filename (context=<optimized
 out>, fileno_in=<optimized out>, ret_filename=0x7fffffffe280,
 error=0x7fffffffe2b8) at ./dwarf_line.c:1418
 #2  dwarf_linesrc (line=<optimized out>,
 ret_linesrc=<optimized out>, error=<optimized out>) at
 ./dwarf_line.c:1436
 

datefixed: 2016-05-22

references: regressiontests/liu/NULLdereference0522.elf

gitfixid: acae971371daa23a19358bc62204007d258fbc5e

tarrelease: libdwarf-20160923.tar.gz

[top]

24) DW201605-019

id: DW201605-019

cve: CVE-2016-5028

fuzzer:

datereported: 2016-05-23

reportedby: Yue Liu

vulnerability: Null dereference in print_frame_inst_bytes (dwarfdump)

product: libdwarf

description: The null dereference is due to a corrupted object file. Libdwarf was not dealing with empty (bss-like) sections since it really did not expect to see such in sections it reads! Now libdwarf catches the object error so dwarfdump sees the section as empty (as indeed it is!).

datefixed: 2016-05-23

references: regressiontests/liu/NULLdeference0522c.elf

gitfixid: a55b958926cc67f89a512ed30bb5a22b0adb10f4

tarrelease: libdwarf-20160923.tar.gz

[top]

25) DW201605-020

id: DW201605-020

cve: CVE-2016-5027

fuzzer:

datereported: 2016-04-25

reportedby: Yue Liu,lieanu

vulnerability: NULL dereference in _dwarf_decode_s_leb128

product: libdwarf

description: dwarf_form.c in libdwarf 20160115 allows remote attackers to cause a denial of service (crash) via a crafted elf file Apparently no crafted object file presented. However the code fix is presented in the report at openwall.com. Discovered the CVE November 2021 To attack the code just pass the argument Dwarf_Word * leb128_length as a NULL pointer (that is allowed). The code was fixed in dwarf_leb.c on 2016-04-27 20:00:06.

  bugzilla.redhat.com/show_bug.cgi?id=1330237
  www.openwall.com/lists/oss-security/2016/05/24/1
  www.openwall.com/lists/oss-security/2016/05/25/1
  

datefixed: 2016-05-27

references:

gitfixid:

tarrelease: libdwarf-20160507.tar.gz

[top]

26) DW201609-001

id: DW201609-001

cve:

fuzzer:

datereported: 2016-09-16

reportedby: STARLAB

vulnerability: libdwarf 20160613 die_info_ptr in dwarf_die_deliv.c: 1533 Out-Of_bounds

product: libdwarf

description: At line 1533 of dwarf_die_deliv.c a pointer dereference is done with a pointer pointing past the end of the CU data.

 see
 https://sourceforge.net/p/libdwarf/bugs/2/
 

 ==8054==ERROR: AddressSanitizer: heap-buffer-overflow on
    address 0xf4c027ab at pc 0x819e4a4 bp 0xff88eb38 sp 0xff88eb30
 READ of size 1 at 0xf4c027ab thread T0
 #0 0x819e4a3 in dwarf_siblingof_b /home/starlab/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1533
 #1 0x8116201 in print_die_and_children_internal /home/starlab/fuzzing/dwarf-20160613/dwarfdump/print_die.c:1157
 Bug report on sourceforge.net bug list for libdwarf.
 The bad pointer dereference is due to libdwarf
 not noticing that the DWARF in that file is corrupt.
 In addition
 The code was not noticing that it could dereference
 a pointer that pointed out of bounds in the end-sibling-list
 loop.
 

 The example from the bug report (DW201609-001-poc) has
 the same problem.
 dwarfdump now reports DW_DLE_SIBLING_LIST_IMPROPER
 on both test2.o and DW201609-001-poc.
 

datefixed: 2016-09-17

references: regressiontests/DW201609-001/test2.o regressiontests/DW201609-001/DW201609-001-poc

gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252

tarrelease: libdwarf-20160923.tar.gz

[top]

27) DW201609-002

id: DW201609-002

cve: CVE-2016-7511

fuzzer:

datereported: 2016-09-18

reportedby: Shi Ji (@Puzzor)

vulnerability: libdwarf 20160613 Integer Overflow

product: libdwarf

description: In dwarf_get_size_of_val() with fuzzed DWARF data we get a SEGV.

  See
  https://sourceforge.net/p/libdwarf/bugs/3/
  

  ==6825== ERROR: AddressSanitizer: SEGV on unknown address 0x0583903c (pc 0xb61f1a98 sp 0xbfa388b4 bp 0xbfa38d08 T0)
  AddressSanitizer can not provide additional info.
  #1 0xb61e3c0b (/usr/lib/i386-linux-gnu/libasan.so.0+0xdc0b)
  #2 0x80a21b1 in _dwarf_get_size_of_val /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_util.c:210
  #3 0x8054214 in _dwarf_next_die_info_ptr /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1340
  #4 0x80557a5 in dwarf_child /home/fuzzing/fuzzing/dwarf-20160613/libdwarf/dwarf_die_deliv.c:1640
  #5 0x804b23f in get_die_and_siblings /home/fuzzing/fuzzing/dwarf-20160613/dwarfexample/./simplereader.c:573
  

_dwarf_make_CU_Context() is insufficiently cautious about the length of a CU being absurd. Unclear as yet if this is the problem but it is a problem and is fixed for next release.

datefixed: 2016-09-23

references: regressiontests/DW201609-002/DW201609-002-poc

gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252

tarrelease: libdwarf-20160923.tar.gz

[top]

28) DW201609-003

id: DW201609-003

cve: CVE-2016-7410

fuzzer:

datereported: 2016-09-13

reportedby: https://marc.info/?l=oss-security&m=147391785920048&w=2

vulnerability: libdwarf 20160613 heap-buffer-overflow

product: libdwarf

description: With AddressSanitizer, we found a Heap-Buffer-overflow in the latest release version of dwarfdump. The crash output is as follows:

  See also:
  https://marc.info/?l=oss-security&m=147378394815872&w=2
  The testcase poc is from this web page.
  

  ==17411==ERROR: AddressSanitizer: heap-buffer-overflow on address
  0xf3808904 at pc 0x80a6f76 bp 0xffb95e78 sp 0xffb95a5c
  READ of size 4 at 0xf3808904 thread T0
  ==17411==WARNING: Trying to symbolize code, but external symbolizer is
  not initialized!
    #0 0x80a6f75 in __interceptor_memcpy ??:?
    #1 0x8426c3b in _dwarf_read_loc_section
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc.c:919
    #2 0x84250e2 in _dwarf_get_loclist_count
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc.c:970
    #3 0x8438826 in dwarf_get_loclist_c
  /home/starlab/fuzzing/dwarf-20160613/libdwarf/./dwarf_loc2.c:551
    #4 0x81a1be8 in get_location_list
  /home/starlab/fuzzing/dwarf-20160613/dwarfdump/print_die.c:3523
    #5 0x816e1a2 in print_attribute
  

_dwarf_get_loclist_header_start() is not cautious about values in the header being absurdly large. Unclear as yet if this is the problem but it is a potential problem (fixed for next release).

  Address Sanitizer in gcc reproduces the report.
  In _dwarf_read_loc_section() the simple calculation of
  loc_section_end was wrong, so end-of section was
  incorrect for the local reads.
  With that fixed we get DW_DLE_READ_LITTLEENDIAN_ERROR when
  libdwarf attempts to read off end of section.
  

datefixed: 2016-09-23

references: regressiontests/DW201609-003/poc

gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252

tarrelease: libdwarf-20160923.tar.gz

[top]

29) DW201609-004

id: DW201609-004

cve: CVE-2016-7510

fuzzer:

datereported: 2016-09-17

reportedby: Puzzor

vulnerability: libdwarf 20160613 Out-of-Bounds read

product: libdwarf

description: read line table program Out-of-Bounds read line_ptr in dwarf_line_table_reader_common.c:1433 Out-of-Bounds read See:

 https://bugzilla.redhat.com/show_bug.cgi?id=1377015
 https://sourceforge.net/p/libdwarf/bugs/4/
 

 # Address Sanitizer Output
 ==27763==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf4603f84 at pc 0x8408ede bp 0xffff6518 sp 0xffff6510
 READ of size 1 at 0xf4603f84 thread T0
 #0 0x8408edd in read_line_table_program /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line_table_reader_common.c:1433
 #1 0x83f716c in _dwarf_internal_srclines /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line.c:690
 #2 0x841436c in dwarf_srclines_b /home/puzzor/test-fuzzing/code/libdwarf/./dwarf_line.c:944
 #3 0x81fbc28 in print_line_numbers_this_cu /home/puzzor/test-fuzzing/code/dwarfdump/print_lines.c:763
 #4 0x815c191 in print_one_die_section /home/puzzor/test-fuzzing/code/dwarfdump/print_die.c:850
 #5 0x81565c1 in print_infos /home/puzzor/test-fuzzing/code/dwarfdump
 

datefixed: 2016-09-23

references: regressiontests/DW201609-004/poc

gitfixid: 3767305debcba8bd7e1c483ae48c509d25399252

tarrelease: libdwarf-20160923.tar.gz

[top]

30) DW201610-001

id: DW201610-001

cve: CVE-2016-8681

fuzzer:

datereported: 2016-10-02

reportedby: agostino

vulnerability: Out of bounds read

product: libdwarf

description: The _dwarf_get_abbrev_for_code function in dwarf_util.c in libdwarf 20161001 and earlier allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.

  bugzilla.redhat.com/show_bug.cgi?id=1385690
  www.securityfocus.com/bid/93592
  Duplicate of CVE-2016-8680
  

datefixed: 2016-10-04

references:

gitfixid: efe48cad0693d6994d9a7b561e1c3833b073a624

tarrelease:

[top]

31) DW201610-002

id: DW201610-002

cve: CVE-2016-8680

fuzzer:

datereported: 2016-10-02

reportedby: agostino

vulnerability: Out of bounds read

product: libdwarf

description: The _dwarf_get_abbrev_for_code function in dwarf_util.c in libdwarf 20161001 and earlier allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.

  bugzilla.redhat.com/show_bug.cgi?id=1385690
  www.securityfocus.com/bid/93592
  Duplicate of CVE-2016-8681
  

datefixed: 2016-10-04

references:

gitfixid: efe48cad0693d6994d9a7b561e1c3833b073a624

tarrelease:

[top]

32) DW201610-003

id: DW201610-003

cve: CVE-2016-8679

fuzzer:

datereported: 2016-10-02

reportedby: agostino

vulnerability: dwarf_get_size_of_val out of bounds read

product: libdwarf

description: The _dwarf_get_size_of_val function in libdwarf/dwarf_util.c in Libdwarf before 20161124 allows remote attackers to cause a denial of service (out-of-bounds read) by calling the dwarfdump command on a crafted file.

  www.securityfocus.com/bid/93601
  blogs.gentoo.org/ago/2016/10/06/libdwarf-heap-based-
  buffer-overflow-in-_dwarf_get_size_of_val-dwarf_util-c/
  

datefixed: 2016-10-04

references:

gitfixid: efe48cad0693d6994d9a7b561e1c3833b073a624

tarrelease:

[top]

33) DW201611-001

id: DW201611-001

cve:

fuzzer:

datereported: 2016-11-02

reportedby: Agostino Sarubbo

vulnerability: Memory allocation failure in do_decompress_zlib

product: libdwarf

description: In decompressing a zlib compressed section if the decompressed section size is nonsense (too large) an attempted malloc will fail and could let an exception propagate to callers.

  ==27994==WARNING: AddressSanitizer failed to allocate 0x62696c2f7273752f
  bytes ==27994==AddressSanitizer's allocator is terminating the process
  instead of returning 0
  ...
   #6 0x4c0ab1 in malloc /var/tmp/portage/sys-devel/llvm-3.8.1-
   #8 0x5b582e in _dwarf_load_section
   #9 0x5bb479 in dwarf_srcfiles
   #10 0x5145cd in print_one_die_section
 

datefixed: 2016-11-04

references: regressiontests/sarubbo-2/00024-libdwarf-memalloc-do_decompress_zlib

gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6

tarrelease: libdwarf-20170416.tar.gz

[top]

34) DW201611-002

id: DW201611-002

cve:

fuzzer:

datereported: 2016-11-02

reportedby: Agostino Sarubbo

vulnerability: heap overflow in get_attr_value

product: libdwarf

description: Libdwarf failed to check for a bogus length in dwarf_form.c (dwarf_formblock()) resulting in a pointer pointing outside of the intended memory region. Anything could happen in the subsequent use of the bogus pointer.

 0x61300000de1c is located 0 bytes to the right of 348-byte region
 [0x61300000dcc0,0x61300000de1c)
 allocated by thread T0 here:
   #0 0x4c0ad8 in malloc /var/tmp/portage/sys-devel/llvm-3.8.1-
 r2/work/llvm-3.8.1.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:52
   #1 0x7f883cfc6206 in __libelf_set_rawdata_wrlock /tmp/portage/dev-
 libs/elfutils-0.166/work/elfutils-0.166/libelf/elf_getdata.c:318
 

datefixed: 2016-11-04

references: regressiontests/sarubbo-2/00025-libdwarf-heapoverflow-get_attr_value

gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6

tarrelease: libdwarf-20170416.tar.gz

[top]

35) DW201611-003

id: DW201611-003

cve: CVE-2016-9276

fuzzer:

datereported: 2016-11-02

reportedby: Agostino Sarubbo

vulnerability: Bad aranges length leads to overflow and bad pointer

product: libdwarf

description: in dwarf_arange.c(dwarf_get_aranges_list) an aranges header with corrupt data could, with an overflowing calculation, result in pointers to invalid or inappropriate memory being dereferenced.

datefixed: 2016-11-04

references: regressiontests/sarubbo-2/00026-libdwarf-heapoverflow-dwarf_get_aranges_list

gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6

tarrelease: libdwarf-20180129.tar.gz

[top]

36) DW201611-004

id: DW201611-004

cve: CVE-2016-9275

fuzzer:

datereported: 2016-11-02

reportedby: Agostino Sarubbo

vulnerability: Heap overflow in dwarf_skim_forms()

product: libdwarf

description: If a non-terminated string in a DWARF5 macro section ends a section it can result in accessing memory not in the application (out of bounds read). dwarf_macro5.c(in _dwarf_skim_forms()).

datefixed: 2016-11-04

references: regressiontests/sarubbo-2/00027-libdwarf-heapoverflow-_dwarf_skim_forms

gitfixid: 583f8834083b5ef834c497f5b47797e16101a9a6

tarrelease: libdwarf-20180129.tar.gz

[top]

37) DW201611-005

id: DW201611-005

cve: CVE-2016-9558

fuzzer:

datereported: 2016-11-11

reportedby: Agostino Sarubbo

vulnerability: negation of -9223372036854775808 cannot be represented in type

product: libdwarf

description: With the right bit pattern in a signed leb number the signed leb decode would execute an unary minus with undefined effect. This is not known to generate an incorrect value, but it could, one supposes.

datefixed: 2016-11-11

references: regressiontests/sarubbo-2/00050-libdwarf-negate-itself

gitfixid: 4f19e1050cd8e9ddf2cb6caa061ff2fec4c9b5f9

tarrelease: libdwarf-20180129.tar.gz

[top]

38) DW201611-006

id: DW201611-006

cve: CVE-2016-9480

fuzzer:

datereported: 2016-11-14

reportedby: Puzzor (Shi Ji)

vulnerability: Heap buffer overflow

product: libdwarf

description: An object with corrupt contents causes a memory reference out of bounds, a heap buffer overflow reference.

 heap-buffer-overflow in dwarf_util.c:208 for val_ptr
 # Version
 bb9a3492ac5713bed9cf3ae58ddb7afa6e9e98f8
 (in regression tests here named  heap_buf_overflow.o)
 # ASAN Output
 <0> tag: 17 DW_TAG_compile_unit  name: "strstrnocase.c" FORM 0xe "DW_FORM_strp"
 <1> tag: 46 DW_TAG_subprogram  name: "is_strstrnocase" FORM 0xe "DW_FORM_strp"
 =================
 ==1666==ERROR: AddressSanitizer: heap-buffer-overflow on address
   0xb5846db9 at p
 c 0x080b3a1b bp 0xbfa75d18 sp 0xbfa75d08
 READ of size 1 at 0xb5846db9 thread T0
    #0 0x80b3a1a in _dwarf_get_size_of_val /home/puzzor/libdwarf-code/
        libdwarf/dwarf_util.c:208
    #1 0x8056602 in _dwarf_next_die_info_ptr /home/puzzor/libdwarf-code/
        libdwarf/dwarf_die_deliv.c:1353
    #2 0x8057f4b in dwarf_child /home/puzzor/libdwarf-code/libdwarf/
       dwarf_die_de liv.c:1688
    #3 0x804b5fa in get_die_and_siblings simplereader.c:637
    #4 0x804b65c in get_die_and_siblings simplereader.c:643
    #5 0x804b3f3 in read_cu_list simplereader.c:611
    #6 0x804aeae in main simplereader.c:533
    #7 0xb6ffe275 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18275)
    #8 0x80491c0  (/home/puzzor/libdwarf-code/dwarfexample/simplereader+
         0x80491c 0)
 0xb5846db9 is located 0 bytes to the right of 249-byte region
    [0xb5846cc0,0xb5846db9)
 allocated by thread T0 here:
    #0 0xb727fae4 in __interceptor_malloc (/usr/lib/i386-linux-gnu/libasan.so.
       3+ 0xc3ae4)
    #1 0xb71a9b98  (/usr/lib/i386-linux-gnu/libelf.so.1+0x9b98)
 

For the orignal bug report see

 https://sourceforge.net/p/libdwarf/bugs/5/
 

datefixed: 2016-11-16

references: regressiontests/puzzor/heap_buf_overflow.o

gitfixid: 5dd64de047cd5ec479fb11fe7ff2692fd819e5e5

tarrelease: libdwarf-20180129.tar.gz

[top]

39) DW201611-007

id: DW201611-007

cve: CVE-2016-10255

fuzzer:

datereported: 2016-11-04

reportedby: Agostino Sarubbo

vulnerability: Crash libelf reading fuzzed object.

product: libdwarf

description: This is a weakness in libelf checking. Testing that current libdwarf deals with it properly, though it was never a bug in libdwarf. The CVE mentions libdwarf.

  bugzilla.redhat.com/show_bug.cgi?id=1387584
  www.openwall.com/lists/oss-security/2017/03/22/1
  blogs.gentoo.org/ago/2016/11/04/elfutils-memory-allocation-failure-in-__libelf_set_rawdata_wrlock-elf_getdata-c/
  

Fixed in gentoo libelf by Agostino Sarubbo.

datefixed: 2016-11-04

references: regressiontests/sarubbo-a/00031-elfutils-memalloc-__libelf_set_rawdata_wrlock

gitfixid:

tarrelease: libdwarf-20180129.tar.gz

[top]

40) DW201611-008

id: DW201611-008

cve: CVE-2016-10254

fuzzer:

datereported: 2016-11-04

reportedby: Agostino Sarubbo

vulnerability: Crash libelf reading fuzzed object.

product: libdwarf

description: This is a weakness in libelf checking. Testing that current libdwarf deals with it properly, though it was never a bug in libdwarf. The CVE mentions libdwarf.

  blogs.gentoo.org/ago/2016/11/04/elfutils-memory-allocation-failure-in-allocate_elf-common-h/
  www.openwall.com/lists/oss-security/2017/03/22/2
  

Fixed in gentoo libelf by Agostino Sarubbo.

datefixed: 2016-11-04

references: regressiontests/sarubbo-b/00011-elfutils-memalloc-allocate_elf

gitfixid:

tarrelease: libdwarf-20180129.tar.gz

[top]

41) DW201703-001

id: DW201703-001

cve: CVE-2017-9055

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in dwarf_formsdata

product: libdwarf

description: 1/7. In dwarf_formsdata() a few data types were not checked as being in bounds. The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output:
 LOCAL_SYMBOLS:
 < 1><0x0000002f>    DW_TAG_subprogram
 ==180088==ERROR: AddressSanitizer: heap-buffer-overflow on
  address 0x60800000bf72 at pc 0x0000006cab95 bp
  0x7fff31425830 sp 0x7fff31425828
  READ of size 1 at 0x60800000bf72 thread T0
    #0 0x6cab94 in dwarf_formsdata /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_form.c:937:9
    #1 0x567daf in get_small_encoding_integer_and_name /home/
       ubuntu/subjects/build-asan/libdwarf/dwarfdump/print_die.c:1533:16
    #2 0x576f38 in check_for_type_unsigned /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:4301:11
    #3 0x56ad8c in formxdata_print_value /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:4374:39
    #4 0x5643be in get_attr_value /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_die.c:5140:24
    #5 0x555f86 in print_attribute /home/ubuntu/subjects/build
  ...
  After fixes applied dwarfdump gets:
  ERROR:  dwarf_attrlist:  DW_DLE_DW_DLE_ATTR_OUTSIDE_SECTION(281)
 

datefixed: 2017-03-21

references: regressiontests/marcel/crash1

gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1

tarrelease: libdwarf-20180129.tar.gz

[top]

42) DW201703-002

id: DW201703-002

cve: CVE-2017-9054

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in _dwarf_decode_s_leb128_chk()

product: libdwarf

description: 2/7. In _dwarf_decode_s_leb128_chk() a byte pointer was dereferenced just before was checked as being in bounds. The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output:
  .debug_line: line number info for a single cu
  ==180103==ERROR: AddressSanitizer: heap-buffer-overflow
    on address 0x610000007ffc at pc 0x0000007b0f5b
    bp 0x7ffe06bbf510 sp 0x7ffe06bbf508
  READ of size 1 at 0x610000007ffc thread T0
    #0 0x7b0f5a in _dwarf_decode_s_leb128_chk /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_leb.c:304:9
    #1 0x7e753e in read_line_table_program /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./
       dwarf_line_table_reader_common.c:1167:17
    #2 0x7d7fe3 in _dwarf_internal_srclines /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./dwarf_line.c:690:15
    #3 0x7f9dbb in dwarf_srclines_b /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/./dwarf_line.c:944:12
    #4 0x5caaa5 in print_line_numbers_this_cu /home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/print_lines.c:762:16
  After fix applied one gets:
  ERROR:  dwarf_srclines:  DW_DLE_LEB_IMPROPER (329)
  Runs off end of section or CU
 

datefixed: 2017-03-21

references: regressiontests/marcel/crash2

gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1

tarrelease: libdwarf-20180129.tar.gz

[top]

43) DW201703-003

id: DW201703-003

cve:

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in strcmp

product: libdwarf (libelf)

description: 3/7. An apparent heap overflow that gives the appearance of being in libdwarf is due to libelf call elf_strptr() failing to fully check that its arguments make sense. This is not a bug in libdwarf, it is a libelf bug. The test object is intentionally corrupted (fuzzed). The submission was with Ubuntu 14.04. With Ubuntu 16.04 there is no sanitizer error report. A portion of sanitizer output with Ubuntu 14.04:

  ==180106==ERROR: AddressSanitizer: heap-buffer-overflow
    on address 0x60f00000ef09 at pc 0x000000447300
    bp 0x7ffc667dce10 sp 0x7ffc667dc5d0
  READ of size 4 at 0x60f00000ef09 thread T0
    #0 0x4472ff in __interceptor_strcmp (/home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/dwarfdump+0x4472ff)
    #1 0x79938f in this_section_dwarf_relevant /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:612:12
    #2 0x781064 in _dwarf_setup /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:722:14
    #3 0x77d59c in dwarf_object_init /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:922:20
    #4 0x899d4f in dwarf_elf_init_file_ownership /
 

With Ubuntu 16.04 libelf one gets: ERROR: dwarf_elf_init: DW_DLE_ELF_STRPTR_ERROR (30) a call to elf_strptr() failed trying to get a section name Fix date is irrelevant, libdwarf no longer uses libelf.

datefixed:

references: regressiontests/marcel/crash3

gitfixid:

tarrelease: libdwarf-20180129.tar.gz

[top]

44) DW201703-004

id: DW201703-004

cve:

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in set_up_section strlen

product: libdwarf (libelf)

description: 4/7. An apparent heap overflow that gives the appearance of being in libdwarf is due to libelf call elf_strptr() failing to fully check that its arguments make sense. This is not a bug in libdwarf, it is a libelf bug. The test object is intentionally corrupted (fuzzed). The submission was with Ubuntu 14.04. With Ubuntu 16.04 there is no sanitizer error report. As of 2023 libdwarf no longer calls or references libelf.

 A portion of sanitizer output with Ubuntu 14.04:
 ==180109==ERROR: AddressSanitizer: heap-buffer-overflow
   on address 0x60b00000b000 at pc 0x00000048fd12
   bp 0x7fff4ad31ef0 sp 0x7fff4ad316b0
 READ of size 16 at 0x60b00000b000 thread T0
    #0 0x48fd11 in __interceptor_strlen (/home/ubuntu/
       subjects/build-asan/libdwarf/dwarfdump/dwarfdump+0x48fd11)
    #1 0x7a84a4 in set_up_section /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:285:27
    #2 0x79aaa5 in enter_section_in_de_debug_sections_array /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:355:5
    #3 0x78170b in _dwarf_setup /home/ubuntu/
       subjects/build-asan/libdwarf/libdwarf/dwarf_init_finish.c:746:19
 With Ubuntu 16.04 libelf one gets:
 ERROR:  dwarf_elf_init:  DW_DLE_ELF_STRPTR_ERROR (30)
 a call to elf_strptr() failed trying to get a section name
 

datefixed:

references: regressiontests/marcel/crash4

gitfixid:

tarrelease: libdwarf-20180129.tar.gz

[top]

45) DW201703-005

id: DW201703-005

cve: CVE-2017-9053

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in _dwarf_read_loc_expr_op()

product: libdwarf

description: 5/7. A heap overflow in _dwarf_read_loc_expr_op() is due to a failure to check a pointer for being in bounds (in a few places in this function). The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output with Ubuntu 14.04:
 ==180112==ERROR: AddressSanitizer: heap-buffer-overflow
  on address 0x60800000bf72 at pc 0x00000084dd52
  bp 0x7ffc12136fd0 sp 0x7ffc12136fc8
 READ of size 1 at 0x60800000bf72 thread T0
    #0 0x84dd51 in _dwarf_read_loc_expr_op /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc.c:250:9
    #1 0x841f16 in _dwarf_get_locdesc_c /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc2.c:109:15
    #2 0x837d08 in dwarf_get_loclist_c /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/./dwarf_loc2.c:685:18
    #3 0x57dff2 in get_location_list /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:3812:16
 After fixes applied dwarfdump says:
 ERROR:  dwarf_get_loclist_c:  DW_DLE_LOCEXPR_OFF_SECTION_END
 (343) Corrupt dwarf
 

datefixed: 2017-03-21

references: regressiontests/marcel/crash5

gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1

tarrelease: libdwarf-20180129.tar.gz

[top]

46) DW201703-006

id: DW201703-006

cve: CVE-2017-9052

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in dwarf_formsdata

product: libdwarf

description: 6/7. A heap overflow in dwarf_formsdata() is due to a failure to check a pointer for being in bounds (in a few places in this function) and a failure in a check in dwarf_attr_list(). The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output with Ubuntu 14.04:
 ==180130==ERROR: AddressSanitizer: heap-buffer-overflow
  on address 0x61100000589c at pc 0x0000006cab95
  bp 0x7fff749aab10 sp 0x7fff749aab08
 READ of size 1 at 0x61100000589c thread T0
    #0 0x6cab94 in dwarf_formsdata /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_form.c:937:9
    #1 0x567daf in get_small_encoding_integer_and_name /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:1533:16
    #2 0x562f28 in get_attr_value /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:5030:24
    #3 0x555f86 in print_attribute /home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/print_die.c:3357:13
 After fixes applied dwarfdump says:
 ERROR:  dwarf_attrlist:  DW_DLE_DW_DLE_ATTR_OUTSIDE_SECTION(281)
 

datefixed: 2017-03-21

references: regressiontests/marcel/crash6

gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1

tarrelease: libdwarf-20180129.tar.gz

[top]

47) DW201703-007

id: DW201703-007

cve:

fuzzer:

datereported: 2017-03-21

reportedby: Marcel Bohme and Van-Thuan Pham

vulnerability: Heap overflow in strncmp (libelf bug)

product: libdwarf (libelf)

description: 7/7. A heap overflow in strncmp() is due to libelf failing to check arguments to elf_ strptr. This is not a bug in libdwarf, it is a libelf bug. A pointer for being in bounds (in a few places in this function) and a failure in a check in dwarf_attr_list(). The test object is intentionally corrupted (fuzzed).

 A portion of sanitizer output with Ubuntu 14.04:
 ==180133==ERROR: AddressSanitizer: heap-buffer-overflow
   on address 0x60d00000cff1 at pc 0x0000004476f4
   bp 0x7fff87dd7dd0 sp 0x7fff87dd7590
 READ of size 8 at 0x60d00000cff1 thread T0
    #0 0x4476f3 in __interceptor_strncmp (/home/ubuntu/subjects/
       build-asan/libdwarf/dwarfdump/dwarfdump+0x4476f3)
    #1 0x7992ae in this_section_dwarf_relevant /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:608:13
    #2 0x781064 in _dwarf_setup /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:722:14
    #3 0x77d59c in dwarf_object_init /home/ubuntu/subjects/
       build-asan/libdwarf/libdwarf/dwarf_init_finish.c:922:20
 With Ubuntu 16.04 libelf dwarfdump gets:
 ERROR:  dwarf_elf_init:  DW_DLE_ELF_STRPTR_ERROR (30)
 a call to elf_strptr() failed trying to get a section name
 

Fix date is irrelevant, libdwarf no longer uses libelf.

datefixed: 2017-07-06

references: regressiontests/marcel/crash7

gitfixid: cc37d6917011733d776ae228af4e5d6abe9613c1

tarrelease: libdwarf-20180129.tar.gz

[top]

48) DW201706-001

id: DW201706-001

cve: CVE-2017-9998

fuzzer:

datereported: 2017-06-28

reportedby: team OWL337

vulnerability: Addition overflow in libdwarf leads to segmentation violation

product: libdwarf

description: A fuzzed object with a resulting invalid value can overflow when added to a valid pointer (depending on how the runtime memory is laid out) and thereafter a dereference results in a segmentation violation).

 see
  https://bugzilla.redhat.com/show_bug.cgi?id=1465756
  for contact information of those finding the bug.
  Fabian Wolff sent email and provided
  the link to the web page.
 

datefixed: 2017-07-06

references: regressiontests/wolff/POC1

gitfixid: e91681e8841291f57386f26a90897fd1dcf92a6e

tarrelease: libdwarf-20180129.tar.gz

[top]

49) DW201709-001

id: DW201709-001

cve:

fuzzer:

datereported: 2017-09-19

reportedby: Agostino Sarubbo

vulnerability: Incorrect abbrev section could crash caller.

product: libdwarf

description: A fuzzed object with a resulting invalid abbrev section where the end of section follows an abbrev tag would dereference a non-existent has-child byte.

datefixed: 2017-09-26

references: regressiontests/sarubbo-3/1.crashes.bin

gitfixid: bcc2e33908e669bacd397e3c941ffd1db3005d17

tarrelease: libdwarf-20180129.tar.gz

[top]

50) DW201711-001

id: DW201711-001

cve:

fuzzer:

datereported: 2017-11-01

reportedby: Agostino Sarubbo

vulnerability: Incorrect frame section could crash caller

product: libdwarf

description: A carefully crafted object with a resulting invalid frame section with DW_CFA_advance_loc1 implying data off-the-end-of-section will dereference an invalid pointer. A segmentation fault and core dump is possible. Corrected code checks now.

datefixed: 2017-11-02

references: regressiontests/sarubbo-8/1.crashes.bin

gitfixid: 44349d7991e44dd3751794f76537cabcf65ee28d

tarrelease: libdwarf-20180129.tar.gz

[top]

51) DW201711-002

id: DW201711-002

cve:

fuzzer:

datereported: 2017-11-08

reportedby: Agostino Sarubbo

vulnerability: Incorrect line table section could crash caller

product: libdwarf

description: An carefully crafted object with a invalid line table section crafted to end early at a particular point resulted in dereferencing outside the line table from libdwarf/dwarf_line_table_reader_common.c . A segmentation-fault/core-dump is possible.

datefixed: 2017-11-08

references: regressiontests/sarubbo-9/3.crashes.bin

gitfixid: a1644f4dde7dd5990537ff7ad22a9e94b8723186

tarrelease: libdwarf-20180129.tar.gz

[top]

52) DW201712-001

id: DW201712-001

cve:

fuzzer:

datereported: 2017-12-01

reportedby: Agostino Sarubbo

vulnerability: Incorrect frame section could let caller crash

product: libdwarf

description: A carefully crafted object with an invalid frame section can result in passing back data to a caller of dwarf_get_fde_augmentation_data() is erroneous and will result in the caller reference off the end of the frame section. A segmentation-fault/core-dump is possible.

datefixed: 2017-12-01

references: sarubbo-10/1.crashes.bin

gitfixid: 329ea8e56bc9550260cae6e2e9756bfbe7e2ff6d

tarrelease: libdwarf-20180129.tar.gz

[top]

53) DW201801-001

id: DW201801-001

cve:

fuzzer:

datereported: 2018-01-28

reportedby: Agostino Sarubbo

vulnerability: Incorrect frame section can crash dwarfdump

product: dwarfdump

description: A carefully crafted object with an invalid frame section set of initial-instructions can crash the frame-instructions decode in dwarfdump. In addition, a couple places in libdwarf are not as careful in checking frame data as they should be. A segmentation-fault/core-dump is possible.

datefixed: 2018-01-29

references: sarubbo-11/testcase{1,2,3,4,5}.bin

gitfixid: 7af0ecddfafed88446969cbf8c888356ad485d99

tarrelease: libdwarf-20180129.tar.gz

[top]

54) DW201907-001

id: DW201907-001

cve: CVE-2019-14249

fuzzer:

datereported: 2019-07-23

reportedby: unknown

vulnerability: Denial of service with zero size section group

product: libdwarf

description: dwarf_elf_load_headers.c in libdwarf before 2019-07-05 allows attackers to cause a denial of service (division by zero) via an ELF file with a zero-size section group (SHT_GROUP), as demonstrated by dwarfdump.

datefixed: 2019-07-05

references:

gitfixid: cb7198abde46c2ae29957ad460da6886eaa606ba

tarrelease: libdwarf-0.4.1.tar.xz

[top]

55) DW202010-001

id: DW202010-001

cve: CVE-2020-27545

fuzzer:

datereported: 2020-10-10

reportedby: Casper Sun

vulnerability: A carefully corrupted line table can crash calling app

product: libdwarf

description: A carefully crafted object with an invalid line table could cause libdwarf to dereference a pointer reading a single byte outside of the intended .debug_line section and potentially outside of memory visible to the library. A segmentation fault is possible. The code testing for the error was coded incorrectly so an invalid dereference could occur. Now the test code is correct and the error is detected resulting in a normal error return.

  This should be visible after redhat makes it public.
  Filed on bugzilla.redhat 22 November 2021.
  bugzilla.redhat.com/show_bug.cgi?id=2025694
  

datefixed: 2020-10-17

references: regressiontests/c-sun/poc

gitfixid: 95f634808c01f1c61bbec56ed2395af997f397ea

tarrelease: libdwarf-0.4.1.tar.xz

[top]

56) DW202010-002

id: DW202010-002

cve: CVE-2020-28162

fuzzer:

datereported: 2020-10-27

reportedby: Casper Sun

vulnerability: dwarfdump crashes if the nest of C scopes is too deep

product: dwarfdump

description: An object file where the DIEs depth of nesting exceeds the limit of 800 levels due to corruption or a compiler bug can result in exhausting the die stack array and writing past its end. A segmentation fault is possible. The code at the point of error was not adjusting the array index properly so an invalid dereference could occur. Now the test code is correct and the array overflow is detected resulting in a normal error return. Additional places where this could occur were identified and the proper test added.

  Unable to enter in bugzilla.redhat.com
  so CVE can be completed by Fedora (as CNA)
  as dwarfdump is not part of Fedora
  

datefixed: 2020-10-28

references: regressiontests/c-sun2/globaloverflow

gitfixid: a7fa8edd640b74daf8e7a442dcec96640875b4fb

tarrelease: libdwarf-0.4.1.tar.xz

[top]

57) DW202010-003

id: DW202010-003

cve: CVE-2020-28163

fuzzer:

datereported: 2020-10-27

reportedby: Casper Sun

vulnerability: Passing null to %s due to corrupt line table header.

product: libdwarf

description: If a DWARF5 line table header has an invalid FORM for a pathname, the fi_file_name field may be null and printing it via %s can result in referencing memory at address 0, possibly generating segmentation violation or application crash. Now in case of null we provide a fixed string of <no file name> and for the form code we print the value and <unknown form> so there are no unpredictable effects.

  This should be visible after redhat makes it public.
  Filed on bugzilla.redhat 23 November 2021.
  bugzilla.redhat.com/show_bug.cgi?id=2026000
  

datefixed: 2020-10-28

references: regressiontests/c-sun2/nullpointer

gitfixid: faf99408e3f9f706fc3809dd400e831f989778d3

tarrelease: libdwarf-0.4.1.tar.xz

[top]

58) DW202111-001

id: DW202111-001

cve:

fuzzer: oss-fuzz-40663

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Timeout in fuzz_init_path

product: libdwarf

description: Corrupted MachO object can crash caller Two fields in the MachO file header were not checked for sanity so nonsense large values could lead to excessive malloc and or a caller segmentation violation. Verified by oss-fuzz as fixed. The testcase has illegal libdwarf call and improper include statements.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40663
  

datefixed: 2021-11-04

references: regressiontests/ossfuzz40663/clusterfuzz-testcase-minimized-fuzz_init_path-6122542432124928

gitfixid: b40f7e291216e771185f62292dd6304b5a662926

tarrelease: libdwarf-0.4.1.tar.xz

[top]

59) DW202111-002

id: DW202111-002

cve:

fuzzer: oss-fuzz-40669

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_path

product: libdwarf

description: Corrupted MachO object can crash caller.b Two fields in the MachO file header were not checked for sanity so nonsense large values could lead to excessive malloc and or a caller segmentation violation. Fixed by DW202111-001. Verified as fixed by oss-fuzz

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40669
  

datefixed: 2021-11-04

references: regressiontests/ossfuzz40669/clusterfuzz-testcase-minimized-fuzz_init_path-5399726397194240 regressiontests/clusterfuzz-testcase-fuzz_init_path-5399726397194240

gitfixid: b40f7e291216e771185f62292dd6304b5a662926

tarrelease: libdwarf-0.4.1.tar.xz

[top]

60) DW202111-003

id: DW202111-003

cve:

fuzzer: oss-fuzz-40671

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Direct-leak in _dwarf_get_debug

product: libdwarf

description: The test code is calling a libdwarf-internal function (which is against the rules, only libdwarf function names beginning with dwarf_ are callable. When building libdwarf as an archive there is no means to enforce this rule) doc/libdwarf.mm/pdf now documents this rule.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40671
  

datefixed: 2021-11-05

references: regressiontests/oss40671/clusterfuzz-testcase-fuzz_init_path-5455557297831936 regressiontests/oss40671/clusterfuzz-testcase-minimized-fuzz_init_path-5455557297831936

gitfixid: b40f7e291216e771185f62292dd6304b5a662926

tarrelease: libdwarf-0.4.1.tar.xz

[top]

61) DW202111-004

id: DW202111-004

cve:

fuzzer: oss-fuzz-40673

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Null-dereference READ in dwarf_object_init_b

product: libdwarf

description: The macho object has corrupted headers and now mentions that and stops. Verified as fixed by oss-fuzz 2021-11-03

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40673
  

datefixed: 2021-11-05

references: regressiontests/ossfuzz40673/clusterfuzz-testcase-minimized-fuzz_init_path-6240961391362048.fuzz

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

62) DW202111-005

id: DW202111-005

cve:

fuzzer: oss-fuzz-40674

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Heap-buffer-overflow in _dwarf_elf_setup_all_section_groups

product: libdwarf

description: Object file has corrupt section group information. Results in buffer overflow.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40674#c6
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz40674/clusterfuzz-testcase-minimized-fuzz_init_path-6557751518560256

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

63) DW202111-008

id: DW202111-008

cve:

fuzzer: oss-fuzz-40731

datereported: 2021-11-03

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_binary

product: libdwarf

description: The fuzzed macho64 object has corrupted headers. The library notices and reports an error.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40731
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz40731/clusterfuzz-testcase-fuzz_init_binary-5983147574034432

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

64) DW202111-009

id: DW202111-009

cve:

fuzzer: oss-fuzz-40729

datereported: 2021-11-05

reportedby: David Korczynski

vulnerability: Timeout - fuzz_init_binary

product: libdwarf

description: The object file (macho 64 bit) has some header fuzzing that was not caught reading the object until the macho reader tried a gigantic malloc.. Now the library code catches the error before malloc and returns an error code.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40729
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz40729/clusterfuzz-testcase-minimized-fuzz_init_binary-4791627277795328

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

65) DW202111-010

id: DW202111-010

cve:

fuzzer: oss-fuzz-40627

datereported: 2021-11-02

reportedby: David Korczynski

vulnerability: Abrt in _dwarf_error_string

product: libdwarf

description: The Elf object file has some corruption. The read now stops with an error.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40627
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz40627/clusterfuzz-testcase-fuzz_init_path-5186858573758464 regressiontests/ossfuzz40627/clusterfuzz-testcase-minimized-fuzz_init_path-5186858573758464

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

66) DW202111-011

id: DW202111-011

cve:

fuzzer: oss-fuzz-40799

datereported: 2021-11-02

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_path

product: libdwarf

description: A corrupted object. Gigantic section sizes or offsets were provoking a large malloc. Now these are detected and no malloc is attempted (an error is returned).

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40799
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz40799/clusterfuzz-testcase-fuzz_init_path-5245778948390912 regressiontests/ossfuzz40799/clusterfuzz-testcase-minimized-fuzz_init_path-5245778948390912

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

67) DW202111-012

id: DW202111-012

cve:

fuzzer: oss-fuzz-40801

datereported: 2021-11-07

reportedby: David Korczynski

vulnerability: Timeout in fuzz_init_path

product: libdwarf

description: A corrupted object. libdwarf detects it quickly now.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40801
  

datefixed: 2021-11-07

references: regressiontests/ossfuzz801/clusterfuzz-testcase-fuzz_init_path-5443517279764480 regressiontests/ossfuzz40801/clusterfuzz-testcase-minimized-fuzz_init_path-5443517279764480

gitfixid: 94dece3ce0f030d06da442a103bd6a5301410b25

tarrelease: libdwarf-0.4.1.tar.xz

[top]

68) DW202111-013

id: DW202111-013

cve:

fuzzer: oss-fuzz-40802

datereported: 2021-11-07

reportedby: David Korczynski

vulnerability: Null-dereference READ in dwarf_object_init_b

product: libdwarf

description: A corrupted object. The error handling code in dwarf_object_init_b was not properly dealing with a NULL pointer Dwarf_Error *errp in the test code.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40802
  

datefixed: 2021-11-19

references: regressiontests/ossfuzz40802/ clusterfuzz-testcase-fuzz_init_binary-5538015955517440.fuzz regressiontests/ossfuzz40802/clusterfuzz-testcase-minimized-fuzz_init_binary-5538015955517440.fuzz

gitfixid: adf4dae25b39039f1821b095688c00f3010e1d37

tarrelease: libdwarf-0.4.1.tar.xz

[top]

69) DW202111-014

id: DW202111-014

cve:

fuzzer: oss-fuzz-40895

datereported: 2021-11-10

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_binary

product: libdwarf

description: A corrupted object. Some Elf section sizes are larger than the file size.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40895
  

datefixed: 2021-11-12

references: regressiontests/ossfuzz40895/clusterfuzz-testcase-fuzz_init_binary-4805508242997248 regressiontests/ossfuzz40895/clusterfuzz-testcase-minimized-fuzz_init_binary-4805508242997248

gitfixid: b7a119dc07c502c1334bcbf8dd04ca0e4d5f6ab6

tarrelease: libdwarf-0.4.1.tar.xz

[top]

70) DW202111-015

id: DW202111-015

cve:

fuzzer: oss-fuzz-40896

datereported: 2021-11-10

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_path

product: libdwarf

description: A corrupted object. Several Elf section sizes and section offsets are larger than the file size.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40896
  

datefixed: 2021-11-12

references: regressiontests/ossfuzz40896/clusterfuzz-testcase-fuzz_init_path-5337872492789760 regressiontests/ossfuzz40896/clusterfuzz-testcase-minimized-fuzz_init_path-5337872492789760

gitfixid: b7a119dc07c502c1334bcbf8dd04ca0e4d5f6ab6

tarrelease: libdwarf-0.4.1.tar.xz

[top]

71) DW202111-016

id: DW202111-016

cve:

fuzzer: oss-fuzz-41240

datereported: 2021-11-20

reportedby: David Korczynski

vulnerability: Out-of-memory in fuzz_init_path

product: libdwarf

description: A corrupted object. The PE object section header for section .gnu_debuglink is corrupted. A very large number is in the VirtualSize field. Attempting a malloc for the section could succeed or might fail, resulting in Denial Of Service.

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41240
  

datefixed: 2021-11-21

references: regressiontests/ ossfuzz41240/clusterfuzz-testcase-minimized-fuzz_init_path-5929343686148096

gitfixid: a120c808234060c3c9b1872ab9a059aa1ac70b1d

tarrelease: libdwarf-0.4.1.tar.xz

[top]

72) DW202205-001

id: DW202205-001

cve:

fuzzer:

datereported: 2022-05-26

reportedby: Casper Sun

vulnerability: buffer overflow in dwarf_globals.c

product: libdwarf

description: A carefully corrupted .debug_pubnames section would cause libdwarf to read outside of a buffer containing the section contents. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. The bug has been present for many years.

datefixed: 2022-05-29

references: regressiontests/sleicasper/bufferoverflow

gitfixid: 8151575a6ace77d005ca5bb5d71c1bfdba3f7069

tarrelease: libdwarf-0.4.1.tar.xz

[top]

73) DW202206-001

id: DW202206-001

cve:

fuzzer:

datereported: 2022-06-15

reportedby: Casper Sun

vulnerability: buffer overflow in dwarf_form.c

product: libdwarf

description: A carefully corrupted .debug_info section would cause libdwarf to read outside of a buffer containing a Dwarf_Sig8 symbolic reference. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service. This failure to check for buffer overflow has been present since DWARF4 when DW_FORM_ref_sig8 was added to libdwarf.

datefixed: 2022-06-15

references: regressiontests/sleicasper2/buffer-overflow-dwarf-form

gitfixid: 7ef09e1fc9ba07653dd078edb2408631c7969162

tarrelease: libdwarf-0.4.1.tar.xz

[top]

74) DW202207-001

id: DW202207-001

cve:

fuzzer: ossfuzz

datereported: 2022-05-01

reportedby: David Korczynski

vulnerability: buffer overflow in dwarf_form.c

product: libdwarf

description: A carefully corrupted string would cause libdwarf to read outside of a buffer containing the string (one past the end) when checking the string to determine if it is a full path in processing a .gnu.debuglink section. That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service.

datefixed: 2022-07-23

references: regressiontests/ossfuzz47150/clusterfuzz-testcase-minimized-fuzz_init_path-6727387238236160.fuzz

gitfixid: 24dff940cc4c71a9c3cb5475aee231b19163a12c

tarrelease: libdwarf-0.5.0.tar.xz

[top]

75) DW202208-001

id: DW202208-001

cve:

fuzzer: unspecified

datereported: 2022-08-27

reportedby: Han Zheng

vulnerability: Double free on corrupted frame data.

product: libdwarf

description: A carefully corrupted object file would cause libdwarf to do a double free in handling an error condition in dwarf_expand_frame_instructions(). (in libdwarf/dwarf_frame.c) That could cause a segmentation violation or other major error, terminating the calling application and resulting in Denial Of Service.

datefixed: 2022-08-27

references: regressiontests/hanzheng/fuzzedobject

gitfixid: 428235e3d132fb62faf7732735fdbb034d6264b4

tarrelease: libdwarf-0.5.0.tar.xz

[top]

76) DW202212-001

id: DW202212-001

cve:

fuzzer: oss-fuzz

datereported: 2022-12-28

reportedby: David Korczynski

vulnerability: Denial of Service with fuzzed object.

product: libdwarf

description: The fuzzed testcase has at least four major errors which libdwarf did not catch, leading to unpredictable library behavior, possibly including crashing the calling program. Things not noticed before the fix (and now resulting in error being reported): A) The object has just 2 sections, too few to be real. at least 3 sections are needed to contain DWARF information of any kind. B) Section zero has non-zero contents, in violation of the Elf object specification. C) The header says section strings are in section zero (a violation of the Elf specification). D) Section 1 masquerades as .note.gnu.debug-id and the description size is gigantic (as is the section, which fits the description field length).

datefixed: 2023-01-09

references: regressiontests/ossfuzz54724/clusterfuzz-54724-poc

gitfixid: 45f6d778811553a835916b60845933e6dda63b7f

tarrelease: libdwarf-0.6.0.tar.xz

[top]

77) DW202301-001

id: DW202301-001

cve:

fuzzer:

datereported: 2023-01-24

reportedby: Steve Kaufmann

vulnerability: Denial of Service with DW_FORM_strx3

product: libdwarf

description: Any use of DW_FORM_strx3 or DW_FORM_addrx3 would get libdwarf very confused and incorrect return values and or a library crash might result.

datefixed: 2023-01-24

references: regressiontests/kaufmann2/ct-bad.o

gitfixid: 97e90eb7ab98df60b8da0bdc2ac855711c4db804

tarrelease: libdwarf-0.6.0.tar.xz

[top]

78) DW202303-001

id: DW202303-001

cve:

fuzzer: oss-fuzz id: 56465

datereported: 2023-03-01

reportedby: David Korczynski

vulnerability: Denial of Service with corrupt attribute

product: libdwarf

description: With a particular data corruption dwarf_attrlist() failed to return an error and the library would dereference a stale pointer. This also provoked a memory leak.

datefixed: 2023-03-02

references: regressiontests/ossfuzz56465/fuzz_die_cu_offset-5866690199289856

gitfixid: 948352178dc791796ed574a961191844d8322493

tarrelease: libdwarf-0.7.0.tar.xz

[top]

79) DW202303-002

id: DW202303-002

cve:

fuzzer: oss-fuzz id: 56548

datereported: 2023-03-01

reportedby: David Korczynski

vulnerability: Denial of service with corrupt line table header

product: libdwarf

description: With any one of a small set of corrupted data fields in a line table header that were not checked for sanity the library could try to malloc a giant space, which could take a long time to succeed or fail. After that almost anything could happen. Same bug fix as 56443

datefixed: 2023-03-03

references: regressiontests/ossfuzz56548/fuzz_findfuncbypc-5073632331431936

gitfixid: 89d3beccd161657760585967255bbabf67e5b4c9

tarrelease: libdwarf-0.7.0.tar.xz

[top]

80) DW202303-003

id: DW202303-003

cve:

fuzzer: oss-fuzz id: 56636

datereported: 2023-03-03

reportedby: David Korczynski

vulnerability: Denial of service with corrupt .debug_addr section

product: libdwarf

description: A corrupted .debug_addr header was not properly checked, and the calculation setting up the table in memory was not correctly set up. Calling dwarf_debug_addr_by_index() could crash the calling application.

datefixed: 2023-03-03

references: regressiontests/ossfuzz56636/fuzz_debug_addr_access-4801779658522624.fuzz

gitfixid: a3ab3f16ab67f4d976561fe0d863e1ed8b71f3c6

tarrelease: libdwarf-0.7.0.tar.xz

[top]

81) DW202303-004

id: DW202303-004

cve:

fuzzer: oss-fuzz id: 56666

datereported: 2023-03-04

reportedby: David Korczynski

vulnerability: Denial of service with corrupt gnu_index section

product: libdwarf

description: A corrupted .debug_gnu_index header was not properly checked, and the calculation setting up the table in memory was not correctly set up.

datefixed: 2023-03-08

references: regressiontests/ossfuzz56666/fuzz_gnu_index-4803574417981440

gitfixid: 64eaaa58703258cab02896e798664a1bb11a3d5c

tarrelease: libdwarf-0.7.0.tar.xz

[top]

82) DW202303-005

id: DW202303-005

cve:

fuzzer: oss-fuzz id: 56676

datereported: 2023-03-04

reportedby: David Korczynski

vulnerability: Denial of service with corrupt frame section.

product: libdwarf

description: A call to dwarf_expand_frame_instructions() with corrupt data gets a segmentation violation.

datefixed: 2023-03-14

references: regressiontests/ossfuzz56676/fuzz_set_frame_all-5081006119190528.fuzz

gitfixid: e564c9350c104f16eb2223d7b29082e3deb5d2fb

tarrelease: libdwarf-0.7.0.tar.xz

[top]

83) DW202303-006

id: DW202303-006

cve:

fuzzer: oss-fuzz id: 56456

datereported: 2023-03-04

reportedby: David Korczynski

vulnerability: Denial of service (crash) looking for gdbindex section.

product: libdwarf

description: The logic was wrong in a couple places (fixed now) and almost nothing was checked for validity. Now we check, so to libdwarf do not result in a crash of the library. The bugs have been there since the code was written in 2014.

datefixed: 2023-03-14

references: regressiontests/ossfuzz56456/fuzz_gdbindex-5240324382654464

gitfixid: e564c9350c104f16eb2223d7b29082e3deb5d2fb

tarrelease: libdwarf-0.7.0.tar.xz

[top]

84) DW202303-007

id: DW202303-007

cve:

fuzzer: oss-fuzz id: 56735

datereported: 2023-03-04

reportedby: David Korczynski

vulnerability: Denial of service with corrupt debug_macro section.

product: libdwarf

description: We were not checking .debug macro data for a corrupted internal macro length field. Now we check.

datefixed: 2023-03-08

references: regressiontests/ossfuzz56735/fuzz_macro_dwarf5-6718585377783808

gitfixid: bb99fe7ddb2bc6601bcb0ee30ced6a8cc8cb0564

tarrelease: libdwarf-0.7.0.tar.xz

[top]

85) DW202303-008

id: DW202303-008

cve:

fuzzer: oss-fuzz id: 56530

datereported: 2023-03-01

reportedby: David Korczynski

vulnerability: Denial of Service with corrupt attribute

product: libdwarf

description: With a particular data corruption dwarf_attrlist() failed to return an error and the library would dereference a stale pointer. This also provoked a memory leak. Same bug as DW202303-001

datefixed: 2023-03-02

references: ossfuzz56530/fuzz_findfuncbypc-6272642689925120

gitfixid: 948352178dc791796ed574a961191844d8322493

tarrelease: libdwarf-0.7.0.tar.xz

[top]

86) DW202303-009

id: DW202303-009

cve:

fuzzer: oss-fuzz id: 56443

datereported: 2023-03-01

reportedby: David Korczynski

vulnerability: Denial of service with corrupt line table header

product: libdwarf

description: With any one of a small set of corrupted data fields in a line table header that were not checked for sanity the library could try to malloc a giant space, which could take a long time to succeed or fail. After that almost anything could happen. Same as ossfuzz 56548. With the bug in 56548 fixed, now we still have a bug, there is a leak from _dwarf_special_no_dbg_error_malloc() -fsanitize does not show the bug here, but valgrind does

datefixed: 2023-05-29

references: regressiontests/ossfuzz56443/fuzz_crc_32-4750941179215872

gitfixid: 241fe0cb415569975c451d1f2d62fb2b2147cd72

tarrelease: libdwarf-0.8.0.tar.xz

[top]

87) DW202303-010

id: DW202303-010

cve:

fuzzer: ossfuzz

datereported: 2023-03-07

reportedby: Youngseok Choi

vulnerability: Stack overflow dwarfdump

product: dwarfdump

description: A wholly corrupted speically constructed dwarfdump.conf which is entirely inappropriate ascii really made a mess of one's screen. Now after a couple lines of garbage we give up on that conf file. And we print the garbage sanitized to avoid messing up one's screen. The fix also avoids buffer overflow.

datefixed: 2023-03-25

references: regressiontests/choi010/poc_file

gitfixid: cb8dd45770f2e1f440aab60adac0256f268fc16e

tarrelease: libdwarf-0.7.0.tar.xz

[top]

88) DW202303-011

id: DW202303-011

cve:

fuzzer: ossfuzz id: 56453

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Null pointer dereference

product: libdwarf

description: A null pointer dereference in reading a fuzzed object file. This is related to checks for a correct value from the READ_AREA_LENGTH macro. The missing checks have been missing a very long time.

datefixed: 2023-03-07

references: regressiontests/ossfuzz56453

gitfixid: 86671059c1c240ae56433fa94993dcd28df2ae7d

tarrelease: libdwarf-0.7.0.tar.xz

[top]

89) DW202303-012

id: DW202303-012

cve:

fuzzer: ossfuzz id: 56456

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow

product: libdwarf

description: A heap buffer overflow reading a fuzzed object file Code reading the gdbindex section was not fully checking for valid offsets and pointers Duplicate of DW202303-006

datefixed: 2023-03-14

references: regressiontests/ossfuzz56456/fuzz_gdbindex-5240324382654464

gitfixid: e564c9350c104f16eb2223d7b29082e3deb5d2fb

tarrelease: libdwarf-0.7.0.tar.xz

[top]

90) DW202303-013

id: DW202303-013

cve:

fuzzer: ossfuzz id: 56460

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow

product: libdwarf

description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files

datefixed: 2023-03-12

references: regressiontests/ossfuzz56460/fuzz_str_offsets-5376904040677376-5240324382654464

gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9

tarrelease: libdwarf-0.7.0.tar.xz

[top]

91) DW202303-014

id: DW202303-014

cve:

fuzzer: ossfuzz id: 56478

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow in read_single_rle_entry

product: libdwarf

description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files

datefixed: 2023-03-12

references: regressiontests/ossfuzz56478/fuzz_rng-5030515398017024

gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9

tarrelease: libdwarf-0.7.0.tar.xz

[top]

92) DW202303-015

id: DW202303-015

cve:

fuzzer: ossfuzz id: 56489

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow in read_single_rle_entry

product: libdwarf

description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files

datefixed: 2023-03-12

references: regressiontests/ossfuzz56489/fuzz_srcfiles-5091530466787328

gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9

tarrelease: libdwarf-0.7.0.tar.xz

[top]

93) DW202303-016

id: DW202303-016

cve:

fuzzer: ossfuzz id: 56476

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow in dwarf_get_rnglist_offset_value

product: libdwarf

description: A heap buffer overflow reading a fuzzed object file A revision of dwarf_str_offsets (which was new in DWARF5) affected several source files

datefixed: 2023-03-12

references: regressiontests/ossfuzz56476/fuzz_rng-5008229349588992/

gitfixid: 0343c63bd04d387924974e6da60d8471fdf945a9

tarrelease: libdwarf-0.7.0.tar.xz

[top]

94) DW202303-017

id: DW202303-017

cve:

fuzzer: ossfuzz id: 56450

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Stack Buffer Overflow

product: libdwarf

description: Stack buffer overflow in dwarf_dietype_offset. Reading a corrupted object file. The bug was in the test code, not libdwarf. Having fixed that, valgrind finds that some memory is not freed by dwarf_finish(). In dwarf_alloc.c March 20 _dwarf_free_all_of_one_debug() if the Dwarf_Debug was normal we failed to call _dwarf_free_static_errlist() and that left memory allocated from a bogus earlier call to the library (a situation libdwarf should handle and now does).

datefixed: 2023-05-30

references: regressiontests/ossfuzz56450/fuzz_die_cu_attrs-4953133005799424

gitfixid:

tarrelease: libdwarf-0.8.0.tar.xz

[top]

95) DW202303-018

id: DW202303-018

cve:

fuzzer: ossfuzz id: 56807

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Memory leak reading line table

product: libdwarf

description: A memory leak in _dwarf_read_line_table() reading a particular corrupted object. One return failed to free a local malloc. An very old bug, encountered reading corrupted DWARF line tables.

datefixed: 2023-03-20

references: regressiontests/ossfuzz56807fuzz_srcfiles-4626047380619264

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

96) DW202303-019

id: DW202303-019

cve:

fuzzer: ossfuzz id: 56454

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Stack buffer overflow

product: libdwarf

description: The overflow was in dwarf_get_version_of_die() One return failed to free a local malloc due to the particular corruption in the text object DWARF.

datefixed: 2023-03-20

references: regressiontests/ossfuzz56454/

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

97) DW202303-020

id: DW202303-020

cve:

fuzzer: ossfuzz id: 56458

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap buffer overflow

product: libdwarf

description: The overflow encountered when reading a corrupted line table header in read_a_name_table_header in dwarf_debugnames.c There was insufficient checking for out of bounds values.

datefixed: 2023-03-20

references: regressiontests/ossfuzz56458/fuzz_findfuncbypc-5073632331431936

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

98) DW202303-021

id: DW202303-021

cve:

fuzzer: ossfuzz id: 56487

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Memory Leak

product: testing harness

description: The leak was due to the test driver fuzz/fuzz_rng.c failing to call dwarf_finish at the point of returning as a result of the corrupted binary returning an error condition.

datefixed: 2023-03-20

references: regressiontests/ossfuzz56487/clusterfuzz-testcase-fuzz_rng-6655451078197248

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

99) DW202303-022

id: DW202303-022

cve:

fuzzer: ossfuzz id: 56497

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Memory Leak

product: test harness

description: The leak was due to the test driver fuzz/fuzz_rng.c failing to call dwarf_finish at the point of returning as a result of the corrupted binary returning an error condition.

datefixed: 2023-03-20

references: regressiontests/ossfuzz56497/

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

100) DW202303-023

id: DW202303-023

cve:

fuzzer: ossfuzz id: 56568

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Test build failure

product: Test harness

description: The fuzz_dnames.c testcase build failed. A result of removing two functions from the API, dwarf_dnames_abbrev_by_code() and dwarf_dnames_abbrev_form_by_index(). Removed 2023-02-23. The test source no longer uses those two functions. The first was slow and hard to use. The second was unusable and never worked. The documentation (libdwarf.pdf) gives alternates in the library that work.

datefixed: 2023-03-20

references:

gitfixid: 2eced75af9903ab778c3b237ec7be3ddc93ea6ec

tarrelease: libdwarf-0.7.0.tar.xz

[top]

101) DW202303-024

id: DW202303-024

cve:

fuzzer: ossfuzz id: 56807

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Memory Leak in dwarf_check_lineheader_b()

product: libdwarf

description: The fuzzed test object file resulted in a memory leak calling dwarf_check_lineheader_b() as called from fuzz_srcfiles.c Two error conditions in dwarf_line_table_reader_common.h were missing a required free().

datefixed: 2023-03-24

references: regressiontests/ossfuzz56807/fuzz_srcfiles-4626047380619264

gitfixid: 484f50ef8be0506be2e4b5fbad489868db5c7985

tarrelease: libdwarf-0.7.0.tar.xz

[top]

102) DW202303-025

id: DW202303-025

cve:

fuzzer: ossfuzz id: 56895

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap buffer overflow reading compilation unit header.

product: libdwarf

description: Calling dwarf_next_cu_header_d() on the fuzzed test object results in a library crash in fuzz_die_cu_attrs_loclist.c due to a failure to precisely test for a too-short Compilation Unit header. Now a DW_DLV_ERROR is returned. A very old bug.

datefixed: 2023-03-24

references: regressiontests/ossfuzz56895/fuzz_macro_dwarf5-5080340952907776

gitfixid: 771cfcca1ef6a4a7eb9595d700fc72020d0ed72e

tarrelease: libdwarf-0.7.0.tar.xz

[top]

103) DW202303-026

id: DW202303-026

cve:

fuzzer: ossfuzz id: 56897

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Heap buffer overflow reading the rnglists section

product: libdwarf

description: dwarf_get_rnglist_offset_index_value() could fail on a corrupt object due to imprecise calculations of entry offsets. Fixed by a major update of the code in dwarf_rnglists.c

datefixed: 2023-03-22

references: regressiontests/ossfuzz56897/fuzz_rng-5105415777288192

gitfixid: b9393bb9b6399a34f8616a272d030bdd004a5ef5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

104) DW202303-027

id: DW202303-027

cve:

fuzzer: ossfuzz id: 56906

datereported: 2023-03-09

reportedby: David Korczynski

vulnerability: Heap Buffer overflow reading rnglists section.

product: libdwarf

description: Calling dwarf_get_rnglist_rle() on a corrupted object file could result in a library crash.

datefixed: 2023-03-22

references: regressiontests/ossfuzz56906/fuzz_rng-6031783801257984.fuzz

gitfixid: b9393bb9b6399a34f8616a272d030bdd004a5ef5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

105) DW202303-028

id: DW202303-028

cve:

fuzzer: ossfuzz id: 56958

datereported: 2023-03-12

reportedby: David Korczynski

vulnerability: Out of memory crash.

product: libdwarf

description: Failing to check for error conditions in a fuzzed object correctly lead to a giant malloc that could not succeed.

datefixed: 2023-03-22

references: regressiontests/ossfuzz56958/fuzz_stack_frame_access-6097292873826304

gitfixid: b9393bb9b6399a34f8616a272d030bdd004a5ef5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

106) DW202303-029

id: DW202303-029

cve:

fuzzer: ossfuzz id: 56993

datereported: 2023-03-12

reportedby: David Korczynski

vulnerability: Leaked Memory

product: libdwarf

description: Calling dwarf_get_macro_context on a particular fuzzed object file results in a memory leak when a particular error in the corrupted section is detected. The malloc was done by the line table reader code. The bug was there for many years

datefixed: 2023-03-22

references: regressiontests/ossfuzz56993/fuzz_macro_dwarf5-5770464300761088

gitfixid: 5fde5e404a98c6727889cf14d8f93ec2138a6fa

tarrelease: libdwarf-0.7.0.tar.xz

[top]

107) DW202303-030

id: DW202303-030

cve:

fuzzer: ossfuzz id: 57027

datereported: 2023-03-12

reportedby: David Korczynski

vulnerability: Infinite loop reading a gnu index section.

product: libdwarf

description: Calling dwarf_next_cu_header_d() on a corrupted object file results in an infinite loop and (eventually) a crash in dwarf_xu_index.c attempting to resolve an 8 byte hash key. The bug existed from the first version of this source file, which was in 2017 as the data involved DWARF5, new in 2017.

datefixed: 2023-03-22

references: regressiontests/ossfuzz57027/fuzz_stack_frame_access-5123569972805632

gitfixid: 774f98e596df9dd8f3cb92ec76243caaa4287039

tarrelease: libdwarf-0.7.0.tar.xz

[top]

108) DW202303-031

id: DW202303-031

cve:

fuzzer: ossfuzz id: 57048

datereported: 2023-03-14

reportedby: David Korczynski

vulnerability:

product: libdwarf

description: Calling dwarf_next_cu_header_d() on a corrupted object file results in an infinite loop and (eventually) a crash in dwarf_xu_index.c attempting to resolve an 8 byte hash key. The bug existed from the first version of this source file. The same bug as DW202303-030.

datefixed: 2023-03-22

references: regressiontests/ossfuzz57048/fuzz_findfuncbypc-4647942385696768

gitfixid: 774f98e596df9dd8f3cb92ec76243caaa4287039

tarrelease: libdwarf-0.7.0.tar.xz

[top]

109) DW202303-032

id: DW202303-032

cve:

fuzzer: ossfuzz id: 57107

datereported: 2023-03-14

reportedby: David Korczynski

vulnerability: Infinite loop till out of memory.

product: libdwarf

description: The infinite loop reading a fuzzed object file was caused by letting internal function _dwarf_find_CU_Context_given_sig() unconditionally do too much in the middle of setting up a CU_Context (by letting it start more CU_contexts(). The implicit infinite loop has been there a few years, depending on the correctness of object files DWARF4/DWARF5 being read.

datefixed: 2023-03-23

references: regressiontests/ossfuzz57107/fuzz_die_cu_attrs_loclist-4991396240293888

gitfixid: 0c92ef5b66c5bbcacae03fbf355b12713151c098

tarrelease: libdwarf-0.7.0.tar.xz

[top]

110) DW202303-033

id: DW202303-033

cve:

fuzzer: ossfuzz id: 57149

datereported: 2023-03-15

reportedby: David Korczynski

vulnerability: Stack overflow

product: libdwarf

description: Infinite loop till out of memory Similar to 57107 DW202303-032 but revealed there were more places in find_cu_die_base_fields that needed to call the internal _dwarf_internal_global_formref_b() function. The bug was present since 2017, when DWARF5 support for new 'base' fields was created.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57149/fuzz_srcfiles-6213793811398656

gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78

tarrelease: libdwarf-0.7.0.tar.xz

[top]

111) DW202303-034

id: DW202303-034

cve:

fuzzer: ossfuzz id: 57193

datereported: 2023-03-15

reportedby: David Korczynski

vulnerability: Infinite loop till out of memory.

product: libdwarf

description: The infinite loop reading a fuzzed object file was caused by letting internal function _dwarf_find_CU_Context_given_sig() unconditionally do too much in the middle of setting up a CU_Context (by letting it start more CU_contexts(). The implicit infinite loop has been there a few years, depending on the correctness of object files DWARF4/DWARF5 being read. Same bug as ossfuzz 57107, ossfuzz 57149.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57193/fuzz_die_cu_offset-5215024489824256

gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78

tarrelease: libdwarf-0.7.0.tar.xz

[top]

112) DW202303-035

id: DW202303-035

cve:

fuzzer: ossfuzz id: 57292

datereported: 2023-03-15

reportedby: David Korczynski

vulnerability: Out of Memory

product: libdwarf

description: Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 and others listed here.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57292/fuzz_die_cu_print-5412313393135616

gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78

tarrelease: libdwarf-0.7.0.tar.xz

[top]

113) DW202303-036

id: DW202303-036

cve:

fuzzer: ossfuzz id: 57300

datereported: 2023-03-15

reportedby: David Korczynski

vulnerability: Out of Memory

product: libdwarf

description: Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 See DW202303-034 57149 See DW202303-034 57193 See DW202303-034 57292

datefixed: 2023-03-24

references: regressiontests/ossfuzz57300/fuzz_die_cu-4752724662288384

gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78

tarrelease: libdwarf-0.7.0.tar.xz

[top]

114) DW202303-037

id: DW202303-037

cve:

fuzzer: ossfuzz id: 57300

datereported: 2023-03-21

reportedby: David Korczynski

vulnerability: Out of Memory

product: libdwarf

description: Another case of the infinite loop due to _dwarf_find_CU_Context_given_sig(). See DW202303-034 57193 and others listed here.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57300/fuzz_die_cu-4752724662288384

gitfixid: 7165918c8594061c3f5ba7dd4df7c4555c68ec78

tarrelease: libdwarf-0.7.0.tar.xz

[top]

115) DW202303-038

id: DW202303-038

cve:

fuzzer: ossfuzz id: 57335

datereported: 2023-03-22

reportedby: David Korczynski

vulnerability: Null dereference in dwarf_hasform()

product: libdwarf

description: Passing a null dw_return_bool pointer dereferenced zero, but now, instead we return DW_DLV_ERROR with error code DW_DLE_INVALID_NULL_ARGUMENT The test driver fuzz_die_cu_attrs.c passed in a NULL argument (the test was not modified except for adding a comment) but libdwarf now checks for a null argument.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57335/fuzz_die_cu_attrs-6235345560928256.fuzz

gitfixid: e4053c9a0f25db0bed28372d9b77a50a0307dc10

tarrelease: libdwarf-0.7.0.tar.xz

[top]

116) DW202303-039

id: DW202303-039

cve:

fuzzer: ossfuzz id: 56480

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Reading a compilation unit never finishes

product: libdwarf

description: Reading a DWARF compilation unit header in a corrupted object caused an infinite loop of repeated calls (growing the stack at each call) in libdwarf. Now the library properly reflects a NO ENTRY case avoiding the loop and the test case returns an unrelated error due to other corruption. Arguably the loop was due to corruption too, but it should not have gotten stuck in the loop (and now it will not get stuck). See also ossfuzz id 56540. ossfuzz id 56487. ossfuzz id 56497. ossfuzz 57408

datefixed: 2023-03-20

references: regressiontests/ossfuzz56480/fuzz_die_cu_print-5264022485467136

gitfixid: 1ff4365bd64a4e4f9ab717b3f62589c2ba6637a5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

117) DW202303-040

id: DW202303-040

cve:

fuzzer: ossfuzz

datereported: 2023-03-07

reportedby: Youngseok Choi

vulnerability: Reading from zero page

product: dwarfdump

description: The command: dwarfdump --file-abi= causes big problems. Denial of service. For many of such commands with an '=' and nothing following the dwoptarg variable is not set at all, leading to a segmentation violation.

datefixed: 2023-03-25

references: regressiontests/choi011/README

gitfixid: fd92b647e5e3a524be94b3b06c9efd14a8292946

tarrelease: libdwarf-0.7.0.tar.xz

[top]

118) DW202303-041

id: DW202303-041

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Heap Use after Free

product: dwarfdump

description: The command: dwarfdump --check-frame-extended choi012/poc_file_06 is now working, apparently fixed by earlier bug fixes in libdwarf.

datefixed: 2023-03-25

references: regressiontests/choi012/poc_file_06

gitfixid: fd92b647e5e3a524be94b3b06c9efd14a8292946

tarrelease: libdwarf-0.7.0.tar.xz

[top]

119) DW202303-042

id: DW202303-042

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Memory Leak

product: dwarfdump

description: The command: dwarfdump --check-all choi012/poc_file_07 leaked memory in dwarfdump. A single instance of print_error_and_continue() failed to return DW_DLV_ERROR when libdwarf reported an error. Before recent fixes to libdwarf this would also generate heap-use-after-free.

datefixed: 2023-03-25

references: regressiontests/choi012/poc_file_07

gitfixid: 4a8a201cdb3408a2cfdc2946418b51b884140a2c

tarrelease: libdwarf-0.7.0.tar.xz

[top]

120) DW202303-043

id: DW202303-043

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Heap Use After Free

product: libdwarf

description: The command: dwarfdump choi012/poc_file_08 was resulting in a heap use after free. It no longer does, due to earlier libdwarf fixes.

datefixed: 2023-03-25

references: regressiontests/choi012/poc_file_08

gitfixid: 4a8a201cdb3408a2cfdc2946418b51b884140a2c

tarrelease: libdwarf-0.7.0.tar.xz

[top]

121) DW202303-044

id: DW202303-044

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Heap buffer overflow

product: dwarfdump

description: The command: dwarfdump --search-regex=\\ (with no file named) resulted in a heap use after free. No object file is required for the test. The dd_regex.c regex compiler failed to notice when a trailing backslash caused the pattern compiler to step past the pattern string. Now we notice and issue an error.

datefixed: 2023-03-25

references: regressiontests/baselines/choi013.base

gitfixid: 3269f43d2a044bfcce71d30ce214a305473d1ea3

tarrelease: libdwarf-0.7.0.tar.xz

[top]

122) DW202303-045

id: DW202303-045

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Heap buffer overflow, regex

product: dwarfdump

description: The command: dwarfdump --search-regex= with a simple, really long, string. (with no file named) resulted in a buffer overflow in a buffer in dd_regex.c. No object file is required for the test. The code now checks stores to the internal array holding the non-deterministic finite automata (nfa)

datefixed: 2023-03-25

references: regressiontests/baselines/choi014.base

gitfixid: bb8fab9e5e4e40b1268b31d90882c2ab93653eaf

tarrelease: libdwarf-0.7.0.tar.xz

[top]

123) DW202303-046

id: DW202303-046

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: global buffer overflow

product: dwarfdump

description: The command: dwarfdump --search-regex=t[ą--]e Note the non-ascii character. The dwarfdump regex only allows ascii in search patterns, not the rest of UTF-8.

datefixed: 2023-03-26

references: regressiontests/choi012/poc_file_10

gitfixid: 9eac0c8bbae3fadb2be3d5ee15b9c44f42d2f966

tarrelease: libdwarf-0.7.0.tar.xz

[top]

124) DW202303-047

id: DW202303-047

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Double Free

product: dwarfdump

description: The command: dwarfdump --check-unique --check-abbrev results in a double free. The table of unique errors contained makename() data, so that aspect caused a double free as makename gets destructed independently. Fixed now,letting makename destructor do the work.

datefixed: 2023-03-24

references: regressiontests/choi015/poc_file_04

gitfixid: df64db4740f1b480e602b1112107d51f0d269828

tarrelease: libdwarf-0.7.0.tar.xz

[top]

125) DW202303-048

id: DW202303-048

cve:

fuzzer: ossfuzz

datereported: 2023-03-08

reportedby: Youngseok Choi

vulnerability: Memory leak (was double free).

product: dwarfdump

description: The command: dwarfdump --file-name=<file> -kG -ka <objectfile> results in a a memory leak. In certain error cases we failed to fclose() a FILE * used to read dwarfdump.conf. Earlier changes fixed the double free, this fixes the memory leak..

datefixed: 2023-03-24

references: regressiontests/choi015/poc_file_03

gitfixid: 24f5697aecd77092de20f0f7e7d91fbc1f2b3da0

tarrelease: libdwarf-0.7.0.tar.xz

[top]

126) DW202303-049

id: DW202303-049

cve:

fuzzer: ossfuzz id: 57408

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: Stack Overflow, _dwarf_create_a_new_cu_context...

product: libdwarf

description: involves find_sig8_target_as_global_offset() and is the same problem as seen in other guises earlier. The case becomes an infinite loop, so eventually the stack gets exhausted. Fixed. See also ossfuzz id 56540. ossfuzz id 56487. ossfuzz id 56497. ossfuzz 57480

datefixed: 2023-03-26

references: regressiontests/ossfuzz57408/fuzz_die_cu-4702098356043776

gitfixid: 24f5697aecd77092de20f0f7e7d91fbc1f2b3da0

tarrelease: libdwarf-0.7.0.tar.xz

[top]

127) DW202303-050

id: DW202303-050

cve:

fuzzer: ossfuzz id: 57429

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: invalid free() in test source

product: libdwarf

description: The test source violates libdwarf requirements. fuzz/fuzz_die_cu_attrs.c was doing free on a name pointer returned from dwarf_diename. The documentation clearly states that pointer should not have a free() done. fix id below is fixing the test source.

datefixed: 3023-03-28

references: regressiontests/ossfuzz57429/fuzz_die_cu_attrs-4845537731149824

gitfixid: 2b19bc239f3cedd1b2461e4265d90633277ce704

tarrelease: libdwarf-0.7.0.tar.xz

[top]

128) DW202303-051

id: DW202303-051

cve:

fuzzer: ossfuzz id: 57437

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: Heap double free

product: libdwarf

description: In a specific error case reading a fuzzed object and calling dwarf_srcfiles local data was freed twice. The bug was fixed earlier, and involved src/lib/libdwarf/dwarf_line_table_reader_common.h.

datefixed: 2023-03-28

references: regressiontests/ossfuzz57437/fuzz_srcfiles-5281689109921792

gitfixid: c25a14c3fd5522aff0b1d2a77d7ee66b7c529779

tarrelease: libdwarf-0.7.0.tar.xz

[top]

129) DW202303-052

id: DW202303-052

cve:

fuzzer: ossfuzz id: 57442

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: Heap buffer overflow

product: libdwarf

description: Corrupt .debug_rngslists leads to crash when a rnglists header has a length indicating a longer section than we really have. Now we check more carefully for that situation. The bug existed from 2017, when DWARF5 support was added to the library.

datefixed: 2023-03-28

references: regressiontests/ossfuzz57442/fuzz_rng-5974595378479104

gitfixid: 271b9b8367a8151fcd98723d73382ec56f05c810

tarrelease: libdwarf-0.7.0.tar.xz

[top]

130) DW202303-053

id: DW202303-053

cve:

fuzzer: ossfuzz id: 57443

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: Double free in _dwarf_read_line_table_header

product: libdwarf

description: The same bug seen earlier A double free when a particular error is in the line table header. Fixed already. gitfixid is more recent than truly required.

datefixed: 2023-03-28

references: regressiontests/ossfuzz57443/fuzz_srcfiles-6015429578719232

gitfixid: c25a14c3fd5522aff0b1d2a77d7ee66b7c529779

tarrelease: libdwarf-0.7.0.tar.xz

[top]

131) DW202303-054

id: DW202303-054

cve:

fuzzer: ossfuzz id: 57463

datereported: 2023-03-24

reportedby: David Korczynski

vulnerability: dereference null in test code

product: none, test code bug

description: The fault was in test code. fuzz_die_cu_attrs.c Since fixed (earlier today). No code change here.

datefixed: 2023-03-24

references: regressiontests/ossfuzz57463/fuzz_die_cu_attrs-5158380196200448

gitfixid: e4053c9a0f25db0bed28372d9b77a50a0307dc10

tarrelease: libdwarf-0.7.0.tar.xz

[top]

132) DW202303-055

id: DW202303-055

cve:

fuzzer: ossfuzz id: 57485

datereported: 2023-03-27

reportedby: David Korczynski

vulnerability:

product: None, test code bug

description: Abort in fuzz_die_cu_attrs.c The fault was in test code. Since fixed (earlier today). No code change here.

datefixed: 2023-03-28

references: regressiontests/ossfuzz57485/

gitfixid: 2b19bc239f3cedd1b2461e4265d90633277ce704

tarrelease: libdwarf-0.7.0.tar.xz

[top]

133) DW202303-056

id: DW202303-056

cve:

fuzzer: ossfuzz id: 57516

datereported: 2023-03-28

reportedby: David Korczynski

vulnerability: Null dereference in dwarf_hasattr()

product: libdwarf

description: With a corrupted attribute dwarf_hasattr() could try to access an implicit_const abbrev value indexing off of a NULL library internal pointer. Because the abbrev section had no actual implicit const value due to the corruption, so the internal array for holding such was not present. The pointer abl_implicit_const was NULL. Now we test the pointer for NULL and if NULL report an error. This lack of a NULL check has existed for many years.

datefixed: 2023-03-29

references: regressiontests/ossfuzz57516/fuzz_die_cu_attrs-6171488289161216

gitfixid: 5dc3de5ce70331692a2700b218fb79e0d4d81c23

tarrelease: libdwarf-0.7.0.tar.xz

[top]

134) DW202303-057

id: DW202303-057

cve:

fuzzer:

datereported: 2023-03-26

reportedby: Pedro Navarro

vulnerability: Unable to read large object sections

product: libdwarf

description: A section 2GB+ in size could not be read by libdwarf. Such is a Denial of Service. Simply turning the big read into however many are needed (each below 2GB) was simple to do. The limitation in the 'read' libc function (really a Linux kernel limitation) is well documented but we had not noticed before now. Few object files are so large.

datefixed: 2023-03-28

references:

gitfixid: 8bf96199a0e130483cceca6bfacfbe4127441ab1

tarrelease: libdwarf-0.7.0.tar.xz

[top]

135) DW202303-058

id: DW202303-058

cve:

fuzzer: ossfuzz id: 57527

datereported: 2023-03-29

reportedby: David Korczynski

vulnerability: reading off end of valid data can crash library

product: libdwarf

description: A line table header truncated by a fuzzer to just the right length (anywhere within a 12 byte area) would cause memory references outside of valid data. Now we check there is object data present before referring to that area and if not, return an error.

datefixed: 2023-03-30

references: regressiontests/ossfuzz57527/fuzz_srcfiles-4599045397282816

gitfixid: 36e4063ade31c9ea6ea5df973d2045b36877885b

tarrelease: libdwarf-0.7.0.tar.xz

[top]

136) DW202303-059

id: DW202303-059

cve:

fuzzer: ossfuzz id: 57562

datereported: 2023-03-30

reportedby: David Korczynski

vulnerability: Infinite loop reading DIEs

product: libdwarf

description: Caller looping on dwarf_siblingof_b() (wanting to touch all siblings) could be put in an infinite loop. A DW_AT_sibling attribute with a corrupted attribute value meant the caller never sees the DW_DLV_NO_ENTRY return signalling all siblings have been seen.

datefixed: 2023-04-01

references: regressiontests/ossfuzz57562/fuzz_findfuncbypc-6681114772373504

gitfixid: 21b076f652992c03f145f6edeb623918e17693f8

tarrelease: libdwarf-0.7.0.tar.xz

[top]

137) DW202304-001

id: DW202304-001

cve:

fuzzer: ossfuzz id: 57711

datereported: 2023-04-04

reportedby: David Korczynski

vulnerability: dereference null pointer

product: libdwarf

description: Crash in libdwarf on dwarf_srcfiles() call. A dereference off a null pointer due to corrupt file numbers not being noticed. Any such crash left an incomplete and misleading stack trace. The large numbers treated as Dwarf_Signed were part of the problem. Now in libdwarf we check Dwarf_Signed for negative values and issue an error if the value less than 0. So later casts to Dwarf_Unsigned work as intended. The libdwarf problems have been in the library for a very long time.

datefixed: 2023-04-06

references: regressiontests/ossfuzz57711/fuzz_srcfiles-4695324781576192

gitfixid: da0d1efbeddcff23c25704bd9672e98314928b19

tarrelease: libdwarf-0.7.0.tar.xz

[top]

138) DW202304-002

id: DW202304-002

cve:

fuzzer: ossfuzz id: 57766

datereported: 2023-04-07

reportedby: David Korczynski

vulnerability: Heap Buffer Overflow

product: libdwarf

description: Crash in libdwarf on reading an attribute due to failing to check that an index into .debug_str_offsets is sane. So we read far outside the relevant table. The checks have been incomplete since this DWARF5 section code was written. Two functions in libdwarf dwarf_form.c had the same problem.

datefixed: 2023-04-09

references: regressiontests/ossfuzz57766/fuzz_die_cu_print-5295062170075136

gitfixid: 761da806fc950c6b26c1763e8989a814e9b16a59

tarrelease: libdwarf-0.7.0.tar.xz

[top]

139) DW202304-003

id: DW202304-003

cve:

fuzzer: ossfuzz id: 57887

datereported: 2023-04-10

reportedby: David Korczynski

vulnerability: Reading outside the intended section data.

product: libdwarf

description: Crash in libdwarf on reading .debug_addr given a bogus index entry. Due to failing to correctly check that the index is out of range. The index was close to overflowing Dwarf_Unsigned so testing values *after* arithmetic done on the incoming index was too late: so we read outside the .debug_addr table. The checks have been incomplete since this DWARF5 section code was written. libdwarf/dwarf_query.c

datefixed: 2023-04-11

references: regressiontests/ossfuzz57887/fuzz_die_cu-4866423964172288

gitfixid: 1729d9af3f690bece912ae0f625b312566d0ae25

tarrelease: libdwarf-0.7.0.tar.xz

[top]

140) DW202304-004

id: DW202304-004

cve:

fuzzer: ossfuzz id: 58026

datereported: 2023-04-15

reportedby: David Korczynski

vulnerability: Segv on unknown address reading frame data.

product: libdwarf

description: On reading a corrupt frame register number the library could crash with a segmentation violation. This bug has been present in the code for 25 years. The conversion of an impossibly large (carefully constructed) register number to a Dwarf_Half or unsigned int the result looked reasonable, invalidating some tests for reasonableness. Now we do all the tests on the full Dwarf_Unsigned register number(s) and retain the value in the long form everywhere. Fixed 2023-04-15. Once that is fixed there is still a leak found by valgrind. Tht test code fuzz/fuzz_set_frame_all.c does a local malloc and in some cases returned without free-ing it locally. Now that local malloc has the necessary local free.

datefixed: 2023-05-30

references: regressiontests/ossfuzz58026/fuzz_set_frame_all-4582976972521472.fuzz

gitfixid: 21b33d13024d18b09e32914ca5718a5c81d1ad67

tarrelease: libdwarf-0.8.0.tar.xz

[top]

141) DW202305-001

id: DW202305-001

cve:

fuzzer: ossfuzz id: 58769

datereported: 2023-05-09

reportedby: David Korczynski

vulnerability: Excessive malloc reading experimental line table

product: libdwarf

description: A fuzzed line table in the non-standard (experimental) two-level line table format had several unchecked values and one was larger than made any sense. The failure was due to oss-fuzz limiting malloc to 3GB. The failure was appropriate as the fuzzed values were inappropriate. We now check for sensible values. See libdwarf/dwarf_line_table_reader_common.h The code was in libdwarf starting in 2021.

datefixed: 2023-05-09

references: regressiontests/ossfuzz58769/fuzz_macro_dwarf5-5460713058205696

gitfixid: edc241bd0bf22c94d2d496f3cb761e60f066cd14

tarrelease: libdwarf-0.7.0.tar.xz

[top]

142) DW202305-002

id: DW202305-002

cve:

fuzzer: ossfuzz id: 58797

datereported: 2023-05-10

reportedby: David Korczynski

vulnerability: Memory Leak reading experimental line table

product: libdwarf

description: A fuzzed line table in the non-standard (experimental) two-level line table format had several unchecked values and one was larger than made any sense, and detecting the error revealed a memory leak. Caused by the incomplete fix to DW202305-001 (yesterday). This is was a failure to run some crucial tests, which would have exposed the problem before DW202305-001 was completed. Incomplete testing.

datefixed: 2023-05-10

references: regressiontests/ossfuzz58797/fuzz_macro_dwarf5-4872686367801344

gitfixid: eeb935200f78b8509e6b1837f6825b9d551b9f7d

tarrelease: libdwarf-0.7.0.tar.xz

[top]

143) DW202305-003

id: DW202305-003

cve:

fuzzer: ossfuzz id: 59091

datereported: 2023-05-19

reportedby: David Korczynski

vulnerability: Incorrect section bound check

product: libdwarf

description: A fuzzed line table in the non-standard (experimental) two-level line table format exposed a failure as the test was v > sectionend whereas it has to be v >= sectionend as end pointers are always one-past the end of the area. This was incorrect since the experimental table support was added in 2021.

datefixed: 2023-05-19

references: regressiontests/ossfuzz59091/fuzz_macro_dwarf5-5135813562990592

gitfixid: 4017ab8b92195641e6876b388cebe2d3307634f5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

144) DW202305-004

id: DW202305-004

cve:

fuzzer: ossfuzz id: 56446

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Incorrect section bound check

product: libdwarf test code

description: The test program fuzz_dnames.c passed a non-null pointer containing garbage content. The fix is to initialize (in fuzz_dnames.c) the local variable to null (0).

datefixed: 2023-05-23

references: regressiontests/ossfuzz56446/fuzz_dnames-4784811358420992

gitfixid: 6fac1021c67d72da6b65f99ad815978d40b4c1e8

tarrelease: libdwarf-0.8.0.tar.xz

[top]

145) DW202305-005

id: DW202305-005

cve:

fuzzer: ossfuzz id: 56462

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Unpredictable crash or erroneous data returned

product: libdwarf

description: A call to dwarf_set_frame_undefined_value() dwarf_set_frame_rule_initial_value() dwarf_set_frame_same_value() dwarf_set_frame_cfa_value() dwarf_set_frame_rule_table_size() with unusable values was not being caught. Now if the set of values violates the required relationships an error is returned on requesting actual frame data. The problem has existed for many years (fixed May 23). Once that is fixed valgrind shows leaks. That is because fuzz/fuzz_set_frame_all.c fails to call dwarf_finish() and, instead, simple exit()s at several places. Updated the test source to return from its functions and only exit() from main() after the dwarf_finish() call.

datefixed: 2023-05-30

references: regressiontests/ossfuzz56462/fuzz_set_frame_all-5424385441005568

gitfixid: 21b33d13024d18b09e32914ca5718a5c81d1ad67

tarrelease: libdwarf-0.8.0.tar.xz

[top]

146) DW202305-006

id: DW202305-006

cve:

fuzzer: ossfuzz id: 56472

datereported: 2023-02-27

reportedby: David Korczynski

vulnerability: Crash on null pointer argument.

product: libdwarf

description: A call to any dwarf_get_fission or any API entry with _xu_ in the name (functions for DWARF5 Debug Fission, called Split Dwarf in DWARF5) would crash the caller if any relevant argument was null. The problem has existed since the code was written in 2021. Once that is fixed valgrind complains about using an uninitialized value. fuzz/fuzz_simplereader_tu.c calls libdwarf with the declation being Dwarf_Die die; no initializer present. Bad behavior, even a library crash is likely.

datefixed: 2023-05-30

references: regressiontests/ossfuzz56472/fuzz_simplereader_tu-6614412934119424

gitfixid: 8b17d41a31c33e0b3b9727a8044e0093a754d6d7

tarrelease: libdwarf-0.8.0.tar.xz

[top]

147) DW202305-007

id: DW202305-007

cve:

fuzzer: ossfuzz id: 56474

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Null pointer dereference.

product: libdwarf

description: Calling dwarf_highpc_b() lead to crash. The function was dereferencing an argument before the argument was checked. Now it is checked for null before any dereference. In addition, the test code, fuzz/fuzz_die_cu_attrs_loclist.c, called dwarf_highpc_b() with a Dwarf_Die that is uninitialized local variable (hence contents unpredictable). C code has no way to catch such a caller error. This is a bug in the test code. We are changed the test code local data pointer variable to be initialized with the value 0.

datefixed: 2023-05-23

references: regressiontests/ossfuzz56474/fuzz_die_cu_attrs_loclist-4719938125561856

gitfixid: b3df2530732ea515cda5a85438871e15c6723ead

tarrelease: libdwarf-0.8.0.tar.xz

[top]

148) DW202305-008

id: DW202305-008

cve:

fuzzer: ossfuzz id: 56492

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Timeout (exceeds 50 seconds)

product: fuzz testing

description: The problem is a bug in the test source: fuzz/fuzz_macro_dwarf5.c. One must not blame the fuzzer author for examplep5(), the code was based on doc/checkexamples.c and there examplep() was really just a sketch. The testcase here no longer specifies an infinite loop.

datefixed: 2023-05-23

references: regressiontests/ossfuzz56492/fuzz_macro_dwarf5-6497277180248064

gitfixid: 97a78122268c9a74701f2dd3115f902309e9a484

tarrelease: libdwarf-0.8.0.tar.xz

[top]

149) DW202305-009

id: DW202305-009

cve:

fuzzer: ossfuzz id: 56451

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Write to memory fails

product: libdwarf

description: One problem is a bug in the test source: fuzz/fuzz_dnames.c. It calls dwarf_dnames_abbrevtable() incorrectly. The caller is required to provide arrays dw_idxattr_array and dw_form_array and pass a pointer to such. The code was just passing in a pointer to nothing. The library code has no possible way to determine the passed in pointers are usable. In addition, dwarf_dnames_abbrevtable() did not check that pointers passed in were non-null before use, but now it does.

datefixed: 2023-05-30

references: regressiontests/ossfuzz56451/fuzz_dnames-4986494365597696

gitfixid: 12a612fc8db38fc26cd5e6064f09a6f825891c7c

tarrelease: libdwarf-0.8.0.tar.xz

[top]

150) DW202305-010

id: DW202305-010

cve:

fuzzer: ossfuzz id: 59478

datereported: 2023-05-31

reportedby: David Korczynski

vulnerability: Memory leak in dwarf_expand_frame_instructions()

product: libdwarf

description: Fuzzing provoked one of four error cases that could leak locally allocated memory from _dwarf_exec_frame_instructor() (called by dwarf_expand_frame_instructions). The code did free(localregtab) but needed to do FREELOCALMALLOC, a macro specific to this function which cleans up all local allocations. All four places have been corrected. Called enough times with fuzzed data could result in filling memory leading to the library being unable to work for the caller and instead just returning errors. This bug has been present in the code for many years.

datefixed: 2023-05-31

references: regressiontests/ossfuzz59478/fuzz_set_frame_all-5300774457180160

gitfixid: 8ef9c8fb613e59f534e789e91a73088eaa5b8a5a

tarrelease: libdwarf-0.8.0.tar.xz

[top]

151) DW202306-001

id: DW202306-001

cve:

fuzzer: ossfuzz id: 59517

datereported: 2023-06-01

reportedby: David Korczynski

vulnerability: Signed Integer Overflow

product: libdwarf

description: Nine different places in dwarf_frame.c multiplied a factored value by a (usually) small integer without checking if the factored value read from the object could possibly be real. So the factored value when multiplied by the factor could overflow. In some of the cases the factored value is signed, some it is unsigned. This sanity checking of factored frame offset values never existed before in the library.

datefixed: 2023-06-08

references: regressiontests/ossfuzz59517/fuzz_set_frame_all-5741671019839488

gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366

tarrelease: libdwarf-0.8.0.tar.xz

[top]

152) DW202306-002

id: DW202306-002

cve:

fuzzer: ossfuzz id: 59519

datereported: 2023-06-01

reportedby: David Korczynski

vulnerability: Integer Overflow

product: libdwarf

description: Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517

datefixed: 2023-06-08

references: regressiontests/ossfuzz59519/fuzz_set_frame_all-4670829255065600

gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366

tarrelease: libdwarf-0.8.0.tar.xz

[top]

153) DW202306-003

id: DW202306-003

cve:

fuzzer: shinibufa

datereported: 2023-06-09

reportedby: shinibufa (github)

vulnerability: use after free

product: libdwarf

description: Heap use-after-free dwarf_query.c

datefixed: 2023-05-19

references: regressiontests/shinibufa/fuzzed_input_file

gitfixid: 4017ab8b92195641e6876b388cebe2d3307634f5

tarrelease: libdwarf-0.7.0.tar.xz

[top]

154) DW202306-004

id: DW202306-004

cve:

fuzzer: ossfuzz id: 59595

datereported: 2023-06-09

reportedby: shinibufa (github)

vulnerability: Signed Integer overflow

product: libdwarf

description: Signed Integer Overflow. In _dwarf_exec_frame_instr(), called by dwarf_expand_frame_instructions(), there was a DW_CFA_LLVM_def_aspace_cfa_sf and we failed to check for overflow. The test case had a overflow. Now we do that check.

datefixed: 2023-06-10

references: regressiontests/ossfuzz59595/fuzz_set_frame_all-5319697747542016

gitfixid: e8c726e2be644df2706342b7a80633d07ecd7fb4

tarrelease: libdwarf-0.8.0.tar.xz

[top]

155) DW202306-005

id: DW202306-005

cve:

fuzzer: ossfuzz id: 59717

datereported: 2023-06-01

reportedby: David Korczynski

vulnerability: Integer Overflow

product: libdwarf

description: Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517

datefixed: 2023-06-08

references:

gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366

tarrelease: libdwarf-0.8.0.tar.xz

[top]

156) DW202306-006

id: DW202306-006

cve:

fuzzer: ossfuzz id: 59727

datereported: 2023-06-01

reportedby: David Korczynski

vulnerability: Integer Overflow

product: libdwarf

description: Integer Overflow in _dwarf_exec_frame_instr() called by dwarf_expand_frame_instructions. We now check for overflows in add and multiply here. Similar to ossfuzz 59517

datefixed: 2023-06-08

references:

gitfixid: f664f93d456284130afbd3c2e35b39e5f2740366

tarrelease: libdwarf-0.8.0.tar.xz

[top]

157) DW202306-007

id: DW202306-007

cve:

fuzzer: ossfuzz id: 59602

datereported: 2023-06-04

reportedby: David Korczynski

vulnerability: Buffer overflow read

product: libdwarf

description: In _dwarf_read_loc_expr_op() we read one byte past available data as the required check for past-end was missing.

datefixed: 2023-06-10

references: regressiontests/ossfuzz59602/fuzz_die_cu_attrs_loclist-6737086749999104

gitfixid: c8c54ba5c79b0a2687f0fa2ac331479506c3210f

tarrelease: libdwarf-0.8.0.tar.xz

[top]

158) DW202306-008

id: DW202306-008

cve:

fuzzer: ossfuzz id: 59699

datereported: 2023-06-08

reportedby: David Korczynski

vulnerability: Read past end of section

product: libdwarf

description: In reading a CIE prefix of a fuzzed object we read past the end of the section due to a failure to check a byte pointer before we dereference it in _dwarf_read_cie_fde_prefix().

datefixed: 2023-05-10

references: regressiontests/ossfuzz59699/fuzz_stack_frame_access-6523659305746432

gitfixid: c5b909630bb566cdbf68fae4091f049f3b22ff11

tarrelease: libdwarf-0.8.0.tar.xz

[top]

159) DW202306-009

id: DW202306-009

cve:

fuzzer: ossfuzz id: 59775

datereported: 2023-06-11

reportedby: David Korczynski

vulnerability: Fuzzed object results in read past end of section.

product: libdwarf

description: A fuzzed object results in reading one byte past the end of a .eh_frame section in internal function _dwarf_read_loc_expr-op(). Now we check for that before we dereference a pointer (to read the particular single-byte field).

datefixed: 2023-06-13

references: regressiontests/ossfuzz59775/fuzz_die_cu_attrs_loclist-4504718844755968

gitfixid: 9cae1be75ec333d2b8ab8800df4850ed77a8b025

tarrelease: libdwarf-0.8.0.tar.xz

[top]

160) DW202306-010

id: DW202306-010

cve:

fuzzer: ossfuzz id: 59950

datereported: 2023-06-18

reportedby: David Korczynski

vulnerability:library reads outside frame section

product: libdwarf

description: A fuzzed object results in adding a too large value (from CIE frame augmentation data) to a pointer, having failed to check the value for reasonableness. That add overflows so dereferencing the pointer in dwarf_frame.c could lead to a crash in the library or getting nonsense information returned to the caller. This bug has been present for many years.

datefixed: 2023-06-19

references: regressiontests/ossfuzz59950/fuzz_set_frame_all-6613067367317504

gitfixid: b7437c9e4923906e9b3f3860a0c8a8289cff0a91

tarrelease: libdwarf-0.8.0.tar.xz

[top]

161) DW202306-011

id: DW202306-011

cve:

fuzzer: ossfuzz id: 60090

datereported: 2023-06-24

reportedby: David Korczynski

vulnerability: Read from invalid memory address

product: libdwarf

description: A fuzzed object results in an addition overflow in reading CIE data leading to a read from an invalid address. An almost-correct check for an overflow in case of a fuzzed aug_irix_exception_table augmentation leads to a crash. The bug was incorrect coding of a test (for an absurd value) written a few weeks ago.

datefixed: 2023-06-26

references: regressiontests/ossfuzz60090/fuzz_set_frame_all-5757752673435648

gitfixid: 6f75899f1f90fa87e52da0df09ddaa2e5be778f9

tarrelease: libdwarf-0.8.0.tar.xz

[top]

162) DW202307-001

id: DW202307-001

cve:

fuzzer: ossfuzz id: 60506

datereported: 2023-07-09

reportedby: David Korczynski

vulnerability: Read from outside section

product: libdwarf

description: A fuzzed object results in reading outside a line table due to a corruption in a non-standard (experimental) line table format. A corrupted offset was not checked for sanity. The bug has been in the code since the experimental line table support was added in 2015.

datefixed: 2023-07-11

references: regressiontests/ossfuzz60506/fuzz_srcfiles-6494439909228544.fuzz

gitfixid: c8c5073f35b1efdcc610ecf369c78f87fdd34714

tarrelease: libdwarf-0.8.0.tar.xz

[top]

163) DW202308-001

id: DW202308-001

cve:

fuzzer: ossfuzz id: 59576

datereported: 2023-06-04

reportedby: David Korczynski

vulnerability: Read from outside frame section

product: libdwarf

description: A fuzzed object results in reading outside a frame section due to a comparison being > when it should have bin >= at about line 1615 in dwarf_frame2. Could result in crash or incorrect frame data returned. Somehow we lost track of this open bug. The bug has been in the code since the augmentation was first implemented in the library.

datefixed: 2023-08-26

references: regressiontests/ossfuzz59576/fuzz_set_frame_all-5867083595120640

gitfixid: e53adc90ffd6d5d0fad61546b0041990aefd970b

tarrelease: libdwarf-0.8.0.tar.xz

[top]

164) DW202309-001

id: DW202309-001

cve:

fuzzer: ossfuzz id: 62547

datereported: 2023-09-22

reportedby: David Korczynski

vulnerability: Heap use after free

product: libdwarf

description: Calling dwarf_get_fde_for_die() causes the problem as its special handling in a user calling for fde destruction is wrong when dwarf_finish() is calling for fde destruction. dwarf_finish() can refer to freed memory in trying to delete a CIE twice. The use after free has a dependence on the order nodes are seen in the de_alloc_tree tdestroy() walk of the table (the order is not predictable). Broken in release 0.8.0 and all previous releases.

datefixed: 2023-09-23

references: regressiontests/ossfuzz62547/fuzz_stack_frame_access-5263709637050368

gitfixid: cd741379bd0203a0875b413542d5f982606ae637

tarrelease: libdwarf-0.9.0.tar.xz

[top]

165) DW202309-002

id: DW202309-002

cve:

fuzzer: ossfuzz id: 62833

datereported: 2023-09-30

reportedby: David Korczynski

vulnerability: Memory leak in _dwarf_macho_setup()

product: libdwarf

description: The September 29 addition of Mach-O universal binary support resulted in memory leaks due to revising memory alloc/free incompletely when fuzzed object files were encountered.. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects).

datefixed: 2023-10-01

references: regressiontests/ossfuzz62833/fuzz_set_frame_all-4521858130903040

gitfixid: gitfixid: f7c7e84e5a77915bb6570215887118d8e7759122

tarrelease: libdwarf-0.9.0.tar.xz

[top]

166) DW202309-003

id: DW202309-003

cve:

fuzzer: ossfuzz id: 62834

datereported: 2023-09-30

reportedby: David Korczynski

vulnerability: Memory leak in _dwarf_macho_setup()

product: libdwarf

description: The September 29 addition of Mach-O universal binary support resulted in memory leaks due to revising memory alloc/free incompletely when fuzzed object files were encountered.. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects).

datefixed: 2023-10-01

references: regressiontests/ossfuzz62834/fuzz_init_path-4573857635500032

gitfixid: f7c7e84e5a77915bb6570215887118d8e7759122

tarrelease: libdwarf-0.9.0.tar.xz

[top]

167) DW202309-004

id: DW202309-004

cve:

fuzzer: ossfuzz id: 62842

datereported: 2023-09-30

reportedby: David Korczynski

vulnerability: Heap buffer overflow

product: libdwarf

description: The heap buffer overflow in _dwarf_memcpy_swap_bytes was due a failure to check for a valid size field (a fuzzed value) in a count of array elements.. Now we check for a sensible count. This bug was in the public repository for two days (in all-new code, for Apple Universal Binary objects).

datefixed: 2023-10-01

references: regressiontests/ossfuzz62842/fuzz_findfuncbypc-4964619766333440.fuzz

gitfixid: f7c7e84e5a77915bb6570215887118d8e7759122

tarrelease: libdwarf-0.9.0.tar.xz

[top]

168) DW202310-001

id: DW202310-001

cve:

fuzzer: ossfuzz id: 62943

datereported: 2023-10-02

reportedby: David Korczynski

vulnerability: Heap buffer overflow

product: libdwarf

description: The heap buffer overflow was due to a failure to do initial sanity checks on a universal object. The object involved was not large enough to have a complete universal header. This bug was in the public repository for three days (in all-new code, for Apple Universal Binary objects).

datefixed: 2023-10-03

references: regressiontests/ossfuzz62943/fuzz_init_path-5486726493372416

gitfixid: aea77dad8745d9aad5275c3226e4e3156effa71f

tarrelease: libdwarf-0.9.0.tar.xz

[top]

169) DW202310-002

id: DW202310-002

cve:

fuzzer: ossfuzz id: 63024

datereported: 2023-10-06

reportedby: David Korczynski

vulnerability: Heap buffer overflow

product: libdwarf

description: A copy-paste error lead to a heap buffer overflow. Named the wrong struct in calling calloc(). The function with the bug was added seven days ago.

datefixed: 2023-10-07

references: regressiontests/ossfuzz63024/fuzz_init_path-5486726493372416

gitfixid: 3a658bd1dd7437948cecbf82bb9b24f5f6122a7d

tarrelease: libdwarf-0.9.0.tar.xz

[top]

170) DW202311-001

id: DW202311-001

cve:

fuzzer: ossfuzz id: 56452

datereported: 2023-11-24

reportedby: David Korczynski

vulnerability: Null dereference

product: libdwarf

description: Passing a null Dwarf_Debug to dwarf_add_debuglink_global_path() lead to library crash. The code was not checking for a valid Dwarf_Debug Argument. The bug was present when the function was created in 2021 Moreover, oss fuzz originally noted the bug on 02 March 2023 but I can find no trace of a notification of the bug arriving before 24 November 2023. Fixing this sort of thing for all functions, here is the last commit id... ef77596af000719c04bd3e40b97139247ff3efb4

datefixed: 2023-11-25

references: regressiontests/ossfuzz56452/fuzz_debuglink-cs4231a-5927365017731072

gitfixid: 1f6988307748f427566e3266695bb72d5384bf3d

tarrelease: libdwarf-0.9.0.tar.xz

[top]

171) DW202311-002

id: DW202311-002

cve:

fuzzer: ossfuzz id: 64496

datereported: 2023-02-28

reportedby: David Korczynski

vulnerability: Null dereference from dwarf_gnu_debuglink()

product: libdwarf

description: If the Dwarf_Debug was opened with dwarf_init_object_b() there is no pathname known to libdwarf and the library was dereferencing a null pointer as a result. With the library bug fixed the fuzz/fuzz_debuglink.c test case was violating the rules of use of the function resulting in memory leakage. The documentation has been improved on this function.

datefixed: 2023-11-25

references: regressiontests/ossfuzz64496/fuzz_debuglink-615437663823462

gitfixid: d76cce559b898f7059ce5ffd82f3cfd58cb392fe

tarrelease: libdwarf-0.9.0.tar.xz

[top]

172) DW202402-001

id: DW202402-001

cve:

fuzzer: ossfuzz id: 66646

datereported: 2024-02-12

reportedby: David Korczynski

vulnerability: Reference memory outside of section.

product: libdwarf

description: The data pointer for DW_FORM_ref1 was not being validated as pointing into the section before being dereferenced. Here reading a corrupted DWARF section. A library crash is likely. This test failure happened to be on a DW_AT_abstract_origin attribute, but the problem applies in many other situations. Nearly the other forms had checks. This check has been missing for many years. Similarly the requisite check was missing from DW_FORM_block1 for many years and that too was fixed so all the FORMs have checks now.

datefixed: 2024-02-13

references: regressiontests/ossfuzz66646/fuzz_findfuncbypc-5178544143532032

gitfixid: f21e2f7687f3dca183026a1fb72ca1f0dcf8befa

tarrelease: libdwarf-0.9.2.tar.xz

[top]

173) DW202402-002

id: DW202402-002

cve: CVE-2024-2002

fuzzer: hongg

datereported: 2024-02-16

reportedby: ifygecko

vulnerability: crashes randomly on fuzzed object

product: libdwarf

description: In a multiply-corrupted DWARF object libdwarf may try to dealloc(free) an allocation twice. Results are unpredictable and various. This has been a possibility since we added code to prevent leaks when generating 'unattached' Dwarf_Error records (where there is no Dwarf_Debug available at the point of error). The problem was introduced in libdwarf-0.1.0 in 2021.

datefixed: 2024-02-17

references: regressiontests/hongg2024-02-16/SIGABRT-a.fuzz SIGABRT-b.fuzz SIGABRT-c.fuzz SIGSEGV-d.fuzz SIGSEGV-e.fuzz SIGSEGV-f.fuzz SIGSEGV-g.fuzz SIGSEGV-h.fuzz SIGSEGV-i.fuzz SIGSEGV-k.fuzz

gitfixid: 404e6b1b14f60c81388d50b4239f81d461b3c3ad

tarrelease: libdwarf-0.9.2.tar.xz

[top]

174) DW202402-003

id: DW202402-003

cve:

fuzzer: hongg

datereported: 2024-02-18

reportedby: ifygecko

vulnerability: crashes randomly reading fuzzed locllist

product: libdwarf

description: A carefully corrupted loclists entry can cause libdwarf to read outside of its allowed areas in dwarf_loclists.c due to lack of a sanity check. A segmentation error and libdwarf crash is likely. Similar code in dwarf_rnglists.c and that now has the additional checks. The bugs have been present in both since the code was created in June 2020.

datefixed: 2024-02-18

references: regressiontests/hongg2024-02-18/SIGSEGV-m.fuzz

gitfixid: 5cfbd87dff4fc3c3b595bb92ed886934945b372c

tarrelease: libdwarf-0.9.2.tar.xz

[top]

175) DW202403-001

id: DW202403-001

cve:

fuzzer: ossfuzz id: 67490

datereported: 2024-03-18

reportedby: David Korczynski

vulnerability: Reads past end of line table

product: libdwarf

description: A carefully corrupted line table header can cause libdwarf to read outside of its allowed areas in a .debug_line section reading the file names part of the header. The failure to check for end-of-section before reading past end-of-section at the very last byte in section (at a very few specific points in the line table reader code where a valid line table header would not require a test) has been present for many years.

datefixed: 2024-02-19

references: regressiontests/ossfuzz67490/fuzz_srcfiles-5195296927711232

gitfixid: 2930f3121ee6b07da405103934c329bbeca0382f

tarrelease: libdwarf-0.9.2.tar.xz

[top]

176) DW202406-001

id: DW202406-001

cve:

fuzzer: ossfuzz id: 69639

datereported: 2024-06-14

reportedby: David Korczynski

vulnerability: Memory Leak reading .debug_loclists

product: libdwarf

description: During startup (reading initial fields from .debug_loclists) libdwarf was allocating an array of integers but in the normal case was failing to free the array. This bug in DWARF5 handling has been in the code for a week or so. See also DW202406-002.

datefixed: 2024-06-15

references: regressiontests/ossfuzz69639/fuzz_die_cu_offset-6001910176350208

gitfixid: 32d832900ebe2e61ec07e82625a561415be05424

tarrelease: libdwarf-0.10.1.tar.xz

[top]

177) DW202406-002

id: DW202406-002

cve:

fuzzer: ossfuzz id: 69641

datereported: 2024-06-14

reportedby: David Korczynski

vulnerability: Memory Leak reading .debug_loclists

product: libdwarf

description: During startup (reading initial fields from .debug_loclists) libdwarf was allocating an array of integers but in the normal case was failing to free the array. This bug in DWARF5 handling has been in the code for a week or so. See also DW202406-001.

datefixed: 2024-06-15

references: regressiontests/ossfuzz69641/fuzz_die_cu_attrs_loclist-6271271030030336

gitfixid: 32d832900ebe2e61ec07e82625a561415be05424

tarrelease: libdwarf-0.10.1.tar.xz

[top]

178) DW202407-001

id: DW202407-001

cve:

fuzzer: ossfuzz id: 70244

datereported: 2024-07-09

reportedby: David Korczynski

vulnerability: Memory leaks reading rnglists

product: libdwarf

description: Libdwarf was failing to free() some allocations in reading .debug_rnglists. This bug has been present for a week or so.

datefixed: 2024-07-09

references: regressiontests/ossfuzz70244/fuzz_die_cu_attrs_loclist-4958134427254784

gitfixid: 906a4428a5d92e17948da4249cfccbe8f5ae8005

tarrelease:

[top]

179) DW202407-002

id: DW202407-002

cve:

fuzzer: ossfuzz id: 70246

datereported: 2024-07-09

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70246/fuzz_macro_dwarf5-5128935898152960

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

180) DW202407-003

id: DW202407-003

cve:

fuzzer: ossfuzz id: 70256

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70256/fuzz_rng-483822291655065

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

181) DW202407-004

id: DW202407-004

cve:

fuzzer: ossfuzz id: 70263

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70263/fuzz_die_cu-4960441042796544

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

182) DW202407-005

id: DW202407-005

cve:

fuzzer: ossfuzz id: 70266

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70266/fuzz_findfuncbypc-6093996460408832

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

183) DW202407-006

id: DW202407-006

cve:

fuzzer: ossfuzz id: 70277

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70277/

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

184) DW202407-007

id: DW202407-007

cve:

fuzzer: ossfuzz id: 70278

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70278/

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

185) DW202407-008

id: DW202407-008

cve:

fuzzer: ossfuzz id: 70282

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70282/

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

186) DW202407-009

id: DW202407-009

cve:

fuzzer: ossfuzz id: 70287

datereported: 2024-07-10

reportedby: David Korczynski

vulnerability: Huge malloc request could crash caller

product: libdwarf

description: Libdwarf was not checking a field in a .debug_rnglists header for sanity before doing a malloc based on the field value. This bug has been present for a week or so.

datefixed: 2024-07-10

references: regressiontests/ossfuzz70287/

gitfixid: d7c4efdcc7952b38a237a36ccedf364018e0fb1c

tarrelease:

[top]

187) DW202407-010

id: DW202407-010

cve:

fuzzer: ossfuzz id: 70721

datereported: 2024-07-27

reportedby: David Korczynski

vulnerability: Heap Use After Free

product: libdwarf

description: Libdwarf was referencing freed space attempting to free up a compilation-unit DIE in the process of creating a context for a compilation-unit DIE, given a particular corruption of the DWARF data being read. This bug has been present for several years.

datefixed: 2024-07-27

references: regressiontests/ossfuzz70721/fuzz_macro_dwarf5-4907954017468416

gitfixid: 6fa96f95e043bac9b98ca6f7a9a542dae8f46cd

tarrelease:

[top]

188) DW202407-011

id: DW202407-011

cve:

fuzzer: ossfuzz id: 70753

datereported: 2024-07-28

reportedby: David Korczynski

vulnerability: InfiniteRecursion reading CUs leads to crash

product: libdwarf

description: The code added in git fix id 6b40a0ed378826273080a7b11e7274c2b61d018b two days ago involved adding code setting up compilation unit data and in find_cu_die_base_fields() we called dwarf_global_formref() whereas we must call _dwarf_internal_global_formref_b() to avoid an infinite recursion. A crash was only possible when reading corrupt DWARF.

datefixed: 2024-07-28

references: regressiontests/ossfuzz70753/fuzz_die_cu_offset-6598270743281664

gitfixid: 1b79d618bf5aab2bda9be495c531b13e94ae056a

tarrelease:

[top]

189) DW202407-012

id: DW202407-012

cve:

fuzzer: ossfuzz id: 70763

datereported: 2024-07-28

reportedby: David Korczynski

vulnerability: InfiniteRecursion reading CUs leads to crash

product: libdwarf

description: The code added in git fix id 6b40a0ed378826273080a7b11e7274c2b61d018b two days ago involved adding code setting up compilation unit data and in find_cu_die_base_fields() we called dwarf_global_formref() whereas we must call _dwarf_internal_global_formref_b() to avoid an infinite recursion. A crash was only possible when reading corrupt DWARF.

datefixed: 2024-07-28

references: regressiontests/ossfuzz70763/fuzz_macro_dwarf5-5161075908083712

gitfixid: 1b79d618bf5aab2bda9be495c531b13e94ae056a

tarrelease:

[top]

[top]

libdwarf-code-0.11.1/bugxml/readbugs.py000077500000000000000000000242101472336503500177520ustar00rootroot00000000000000#!/usr/bin/python3 # Copyright (c) 2016-2023 David Anderson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of the example nor the # names of its contributors may be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY David Anderson ''AS IS'' AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL David Anderson BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY # OF SUCH DAMAGE. import os import sys from datetime import datetime # Happens to be the usual location of bugxml # so the import works. path="/home/davea/dwarf/code/bugxml" mytz="PST" sys.path.append(os.path.abspath(path)) import bugrecord def ignore_this_line(d, inrecord): if len(d) < 1: if inrecord == "y": return "n" else: return "y" s = str(d) if s[0] == "#": return "y" return "n" def closeouttext(bugrec, intext, text, linecount): if intext == "d": bugrec.setdescription(text) return elif intext == "v": bugrec.setvulnerability(text) return elif intext == "r": bugrec.setreferences(text) return if intext == "": return print("bogus closeout line at line ", linecount) sys.exit(1) def readbugs(iname): name = iname if len(name) == 0: name = "/home/davea/dwarf/code/bugxml/data.txt" try: file = open(name, "r") except IOError as message: print("failed to open ", name, message) inrecord = "n" linecount = 0 text = [] usedid = {} intext = "" bugrec = "" buglist = [] while 1: try: rec = file.readline() except EOFError: break if len(rec) < 1: # eof break linecount += 1 if ignore_this_line(rec, inrecord) == "y": continue rec = rec.rstrip() if inrecord == "n": if len(rec) == 0: continue if rec.find(":") == -1: print("bogus non-blank line at line ", linecount) sys.exit(1) if inrecord == "y" and len(rec) > 0: # A multi line entry may have ":" in it. if intext != "" and rec[0] == " ": s3 = "".join(rec) text += [s3] continue low = rec.find(":") fldname = rec[0 : low + 1] fldval = rec[low + 1 :] if fldname == "id:": if inrecord == "y": print("bogus id: at line ", linecount) sys.exit(1) inrecord = "y" f = fldval.strip() if f in usedid: print("Duplicate Key:", f, "Giving up.") sys.exit(1) usedid[f] = 1 s4 = "".join(fldval) bugrec = bugrecord.bugrecord(s4) elif fldname == "cve:": closeouttext(bugrec, intext, text, linecount), intext = "" text = [] s4 = "".join(fldval) bugrec.setcve(s4) elif fldname == "fuzzer:": closeouttext(bugrec, intext, text, linecount), intext = "" text = [] s4 = "".join(fldval) bugrec.setfuzzer(s4) elif fldname == "datereported:": closeouttext(bugrec, intext, text, linecount), intext = "" text = [] s4 = "".join(fldval) bugrec.setdatereported(s4) elif fldname == "reportedby:": closeouttext(bugrec, intext, text, linecount), intext = "" text = [] s4 = "".join(fldval) bugrec.setreportedby(s4) elif fldname == "vulnerability:": closeouttext(bugrec, intext, text, linecount), intext = "v" text = [] if len(fldval) > 0: s4 = "".join(fldval) text = [s4] elif fldname == "product:": closeouttext(bugrec, intext, text, linecount), intext = "" text = [] s4 = "".join(fldval) bugrec.setproduct(s4) elif fldname == "description:": closeouttext(bugrec, intext, text, linecount), text = [] intext = "d" if len(fldval) > 0: s4 = "".join(fldval) text = [s4] elif fldname == "datefixed:": closeouttext(bugrec, intext, text, linecount), text = [] intext = "" s4 = "".join(fldval) bugrec.setdatefixed(s4) elif fldname == "references:": closeouttext(bugrec, intext, text, linecount), text = [] intext = "r" if len(fldval) > 0: s4 = "".join(fldval) text = [s4] elif fldname == "gitfixid:": closeouttext(bugrec, intext, text, linecount), text = [] intext = "" s4 = "".join(fldval) bugrec.setgitfixid(s4) elif fldname == "tarrelease:": closeouttext(bugrec, intext, text, linecount), text = [] intext = "" s4 = "".join(fldval) bugrec.settarrelease(s4) elif fldname == "endrec:": closeouttext(bugrec, intext, text, linecount), text = [] if inrecord == "n": print("bogus endrec: at line ", linecount) sys.exit(1) buglist += [bugrec] inrecord = "n" text = [] intext = "" inrecord = "n" file.close() return buglist def sort_by_id(myl): """Sort the list of objects by name.""" auxiliary = [(x._id, x) for x in myl] auxiliary.sort() return [x[1] for x in auxiliary] def write_line(file, l): file.write(l + "\n") def write_all_lines(file, txt): for t in txt: write_line(file, t) headtext = [ '', '', '', ' ', 'Libdwarf Vulnerabilities', ' ', ' ', '', '', '

Libdwarf Vulnerabilities

', '

', 'This page provides', 'documentation of known vulnerabilities', 'in libdwarf.', 'We are concerned here with', 'cases where corrupt (by accident or intention)', 'DWARF can cause the library to get', 'a fault (crash) which', 'could expose the calling program', 'to interception by malefactors.', 'Dates (where known) are in ISO extended date format.', '

', '

', 'Some of the bugs reported here have a CVE assigned,', 'for example CVE-2017-9052.', 'These are reported on cve.org (or possibly the earlier', 'cve.mitre.org).', 'Search with "libdwarf" on cve.org for a list.', '

', '

', 'Git reference path names refer to object files', 'in the libdwarf regression test base.', 'The test files can be retrieved via anonymous access:', '
', '"git clone https://github.org/davea42/libdwarf-regressiontests"', '

', '

', 'A few bugs refer to https://bugzilla.redhat.com', 'bug system entries', 'and/or https://bugs.chromium.org', 'in addition to showing the names of test files in', 'the regression test base.', '

', '

Vulnerabilities

', '

', 'Vulnerabilities listed newest-first.', '
', 'Vulnerabilities listed oldest-first.', '

', ] def writeheader(file,headname): dt = datetime.today() for l in headtext: write_line(file,l) hl='

%s

'%(headname) write_line(file,hl) #tm='

as of %s %s

'%(dt.strftime("%Y-%m-%d %H:%M "),mytz) tm='

as of %s

'%(dt.strftime("%B %Y")) write_line(file,tm) def generatehtml(list2,headname, name): try: file = open(name, "w") except IOError as message: print("failed to open ", name, message) sys.exit(1) writeheader(file,headname) write_line(file,"

Record count: %d

"%(len(list2))) for i,b in enumerate(list2): num = int(i) +1 txt = b.generate_html(num) write_all_lines(file, txt) write_line(file,'

[top]

') write_line(file, "") write_line(file, "") file.close() def generatexml(list2, name): try: file = open(name, "w") except IOError as message: print("failed to open ", name, message) sys.exit(1) t = '' write_line(file, t) write_line(file, "") for b in list2: txt = b.generate_xml() write_all_lines(file, txt) write_line(file, "") file.close() if __name__ == "__main__": list = readbugs("") list2 = sort_by_id(list) list2.reverse() #for b in list2: # b.printbug() targlo="LibDwarf Vulnerabilities Newest First" generatehtml(list2,targlo,"dwarfbug.html") generatexml(list2,"dwarfbug.xml") list2.reverse() targhi="LibDwarf Vulnerabilities Oldest First" generatehtml(list2,targhi,"dwarfbuglohi.html") libdwarf-code-0.11.1/cmake/000077500000000000000000000000001472336503500153645ustar00rootroot00000000000000libdwarf-code-0.11.1/cmake/Findzstd.cmake000066400000000000000000000041001472336503500201460ustar00rootroot00000000000000# Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. # All rights reserved. # # This is licensed as LGPL 2.1 by the authors. # For the licensing terms see COPYING and # libdwarf/LIBDWARFCOPYRIGHT # or https://github.com/root-project/root/blob/master/LICENSE # For the list of contributors in the project that # created this cmake file see # https://github.com/root-project/root/blob/master/README/CREDITS #.rst: # FindZSTD # ----------- # # Find the ZSTD library header and define variables. # # Imported Targets # ^^^^^^^^^^^^^^^^ # # This module defines :prop_tgt:`IMPORTED` target ``ZSTD::ZSTD``, # if ZSTD has been found # # Result Variables # ^^^^^^^^^^^^^^^^ # # This module defines the following variables: # # :: # # zstd_FOUND - True if ZSTD is found. # ZSTD_INCLUDE_DIRS - Where to find zstd.h # # Finds the Zstandard library. This module defines: # - ZSTD_INCLUDE_DIR, directory containing headers # - ZSTD_LIBRARIES, the Zstandard library path # - zstd_FOUND, whether Zstandard has been found # Find header files find_path(ZSTD_INCLUDE_DIR zstd.h) # Find a ZSTD version if (ZSTD_INCLUDE_DIR AND EXISTS "${ZSTD_INCLUDE_DIR}/zstd.h") file(READ "${ZSTD_INCLUDE_DIR}/zstd.h" CONTENT) string(REGEX MATCH ".*define ZSTD_VERSION_MAJOR *([0-9]+).*define ZSTD_VERSION_MINOR *([0-9]+).*define ZSTD_VERSION_RELEASE *([0-9]+)" VERSION_REGEX "${CONTENT}") set(ZSTD_VERSION_MAJOR ${CMAKE_MATCH_1}) set(ZSTD_VERSION_MINOR ${CMAKE_MATCH_2}) set(ZSTD_VERSION_RELEASE ${CMAKE_MATCH_3}) set(ZSTD_VERSION "${ZSTD_VERSION_MAJOR}.${ZSTD_VERSION_MINOR}.${ZSTD_VERSION_RELEASE}") endif () # Find library find_library(ZSTD_LIBRARIES NAMES zstd) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(zstd REQUIRED_VARS ZSTD_LIBRARIES ZSTD_INCLUDE_DIR ZSTD_VERSION VERSION_VAR ZSTD_VERSION) if (zstd_FOUND) if (NOT TARGET ZSTD::ZSTD) add_library(ZSTD::ZSTD UNKNOWN IMPORTED) set_target_properties(ZSTD::ZSTD PROPERTIES IMPORTED_LOCATION "${ZSTD_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${ZSTD_INCLUDE_DIR}") endif () endif () libdwarf-code-0.11.1/cmake/config.h.in000066400000000000000000000061241472336503500174120ustar00rootroot00000000000000 /* Define if building universal (internal helper macro) */ #cmakedefine AC_APPLE_UNIVERSAL_BUILD 1 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #cmakedefine CRAY_STACKSEG_END 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_DLFCN_H 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_FCNTL_H 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_MALLOC_H 1 /* Set to 1 if big endian . */ #cmakedefine WORDS_BIGENDIAN 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_TYPES_H 1 /* Define to the uintptr_t to the type of an unsigned integer type wide enough to hold a pointer if the system does not define it. */ #cmakedefine uintptr_t ${uintptr_t} #cmakedefine intptr_t ${intptr_t} /* Define to 1 if you have the header file. */ #cmakedefine HAVE_UNISTD_H 1 /* Set to 1 if zlib decompression is available. */ #cmakedefine HAVE_ZLIB 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_ZLIB_H 1 /* Set to 1 if zstd decompression is available. */ #cmakedefine HAVE_ZSTD 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_ZSTD_H 1 /* Define to the sub-directory where libtool stores uninstalled libraries. */ #cmakedefine LT_OBJDIR 1 /* Name of package */ #cmakedefine PACKAGE #define PACKAGE_VERSION "@PROJECT_VERSION@" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" /* Define to the full name of this package. */ #define PACKAGE_NAME "@PROJECT_NAME@" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "@PACKAGE_STRING@" /* Define to the one symbol short name of this package. */ #cmakedefine PACKAGE_TARNAME /* Define to the home page for this package. */ #define PACKAGE_URL "@PROJECT_HOMEPAGE_URL@" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #cmakedefine STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #cmakedefine STDC_HEADERS 1 /* Define to the version of this package. */ #cmakedefine PACKAGE_VERSION ${PACKAGE_VERSION} /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # cmakedefine WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to `unsigned int' if does not define. */ #undef size_t libdwarf-code-0.11.1/configure.ac000066400000000000000000000334641472336503500166040ustar00rootroot00000000000000###Copyright (C) 2018 Vincent Torri ###This code is public domain and can be freely used or copied. dnl defines the version name of the libdwarf.so m4_define([v_maj], [0]) m4_define([v_min], [11]) m4_define([v_mic], [1]) m4_define([v_ver], [v_maj.v_min.v_mic]) m4_define([v_rel], []) m4_define([lt_cur], [m4_eval(v_maj + v_min)]) m4_define([lt_rev], [v_mic]) m4_define([lt_age], [v_min]) ### Sets the release name. ###m4_define([v_date], [m4_esyscmd_s([date "+%Y%m%d"])]) ###Also SET (VERSION ..) in CMakeLists.txt AC_PREREQ([2.52]) ### 2nd arg to AC_INIT is the version 'number'. AC_INIT([libdwarf], [v_ver], [libdwarf -at- linuxmail -dot- org]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIRS([m4]) ### The following for libdwarf.pc.in AC_SUBST([PROJECT_VERSION],[v_ver]) ### not yet, will be used before long. ###AM_PATH_PYTHON([3.0]) ### Additional options to configure AC_ARG_ENABLE([dwarfgen], [AS_HELP_STRING([--enable-dwarfgen], [enable dwarfgen compilation @<:@default=no@:>@])], [ AS_IF( [test "x${enableval}" = "xyes"], [enable_dwarfgen="yes" ], [enable_dwarfgen="no"]) ], [enable_dwarfgen="no"]) AM_CONDITIONAL([HAVE_DWARFGEN], [test "x${enable_dwarfgen}" = "xyes"]) AC_ARG_ENABLE([dwarfexample], [AS_HELP_STRING([--enable-dwarfexample], [enable dwarfexample compilation @<:@default=no@:>@])], [ AS_IF( [test "x${enableval}" = "xyes"], [enable_dwarfexample="yes"], [enable_dwarfexample="no"]) ], [enable_dwarfexample="no"]) AM_CONDITIONAL([HAVE_DWARFEXAMPLE], [test "x${enable_dwarfexample}" = "xyes"]) AC_ARG_ENABLE([sanitize], [AS_HELP_STRING([--enable-sanitize], [enable sanitize compiler option @<:@default=no@:>@])], [ AS_IF( [test "x${enableval}" = "xyes"], [enable_sanitize="yes"], [enable_sanitize="no"]) ], [enable_sanitize="no"]) AC_ARG_ENABLE([decompression], [AS_HELP_STRING([--enable-decompression], [enable decompressing sections @<:@default=yes@:>@])], [ AS_IF( [test "x${enableval}" = "xno"], [enable_decompression="no"], [enable_decompression="yes"]) ], [enable_decompression="yes"]) AC_ARG_ENABLE([wall], [AS_HELP_STRING([--enable-wall], [enable -Wall and other options @<:@default=no@:>@])], [ AS_IF( [test "x${enableval}" = "xyes"], [enable_wall="yes"], [enable_wall="no"]) ], [enable_wall="no"]) AC_ARG_ENABLE([doc], [AS_HELP_STRING([--enable-doc], [build and install Doxygen documentation @<:@default=no@:>@])], [ AS_IF( [test "x${enableval}" = "xyes"], [enable_doc="yes"], [enable_doc="no"]) ], [enable_doc="no"]) ### Default options with respect to host AC_CANONICAL_HOST have_win32="no" case "$host_os" in mingw*) have_win32="yes" ;; esac ### supress debuglink tests if windows. AM_CONDITIONAL([HAVE_DEBUGLINK], [test "x${have_win32}" = "xno"]) ### Checks for programs AM_PROG_AR ### We don't use dist-xz *.xz output from make dist, ### so don't mention it. AM_INIT_AUTOMAKE([1.6 dist-xz subdir-objects]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AS_IF( [test "x${have_win32}" = "xyes"], [lt_cv_deplibs_check_method=pass_all]) LT_INIT([win32-dll disable-shared static]) AS_IF( [test "x${have_win32}" = "xyes" && test "x${enable_static}" = "xyes"], [AC_MSG_ERROR([Static library is not supported on Windows])]) version_info="lt_cur:lt_rev:lt_age" release_info="v_rel" AC_SUBST([version_info]) AC_SUBST([release_info]) VMAJ=v_maj AC_SUBST([VMAJ]) AC_PROG_CC AC_PROG_CXX AC_PROG_CC_C_O PKG_PROG_PKG_CONFIG AC_ARG_VAR([DOXYGEN], [Doxygen documentation generation program]) AS_IF( [test "x${enable_doc}" = "xyes"], [ AC_CHECK_PROGS([DOXYGEN], [doxygen], [no]) AS_IF( [test "x${DOXYGEN}" = "xno"], [enable_doc="no" ], [enable_doc="yes"]) ], [enable_doc="no"]) AM_CONDITIONAL([HAVE_DOC], [test "x${enable_doc}" = "xyes"]) ### Checks for libraries requirements_libdwarf_pc= AS_IF( [test "x${enable_decompression}" = "xyes"], [ PKG_CHECK_MODULES([ZLIB], [zlib], [ have_zlib="yes" have_pc_zlib="yes" requirements_libdwarf_pc=zlib ], [ have_zlib="no" have_pc_zlib="no" ]) PKG_CHECK_MODULES([ZSTD], [libzstd], [ have_zstd="yes" have_pc_zstd="yes" requirements_libdwarf_pc="${requirements_libdwarf_pc} libzstd" ], [ have_zstd="no" have_pc_zstd="no" ]) ], [ have_zstd="no" have_pc_zstd="no" have_zlib="no" have_pc_zlib="no" ]) AC_SUBST([requirements_libdwarf_pc]) AC_SUBST([DWARFGEN_LIBS]) AC_ARG_VAR([DWARFGEN_LIBS], [extra linker flags when linking dwarfgen]) AC_SUBST([DWARF_LIBS]) AC_ARG_VAR([DWARF_LIBS], [extra linker flags when linking dwarfdump]) ### Checks for header files ### MacOS does not have malloc.h AC_CHECK_HEADERS([unistd.h sys/types.h malloc.h]) ### for uintptr_t and open and open argument defines AC_CHECK_HEADERS([stdint.h inttypes.h stddef.h fcntl.h]) AS_IF( [test "x${enable_decompression}" = "xyes"], [ AS_IF( [test "x${have_zlib}" = "xno"], [AC_CHECK_HEADERS([zlib.h], [have_zlib="yes"], [have_zlib="no"])]) AS_IF( [test "x${have_zstd}" = "xno"], [AC_CHECK_HEADERS([zstd.h], [have_zstd="yes"], [have_zstd="no"])]) ], [ have_zstd="no" have_pc_zstd="no" have_zlib="no" have_pc_zlib="no" ]) ### for use in casts to uint to avoid 32bit warnings. ### Also needed by C++ cstdint AC_TYPE_UINTPTR_T AC_TYPE_INTPTR_T AC_TYPE_UINT32_T dnl Needed for hash calculation ### Now we know uintptr_t is either in stdint.h or ### is defined in config.h by configure. ### Checks for compiler characteristics AC_C_BIGENDIAN AC_SUBST([DWARF_BIGENDIAN],[${ac_cv_c_bigendian}]) AC_ARG_VAR([DWARF_BIGENDIAN], [big endian yes/no needed various places]) # gcc accepts even totally bogus -Wno flags. Other compilers..no # -Wno-long-long suppresses warnings on 'long long' # -Wno-pedantic-ms-format (which only exists in mingw) # suppresses warnings about I64 printf format. # -Wnostringop_overread is to avoid a build fail with # some versions of gcc when building with -fsanitize # (and some other flags). See, in libdwarf/dwarf_init_finish.c # around line 330. # one such gcc: Alpine 12.2.1_git20220924-r4) 12.2.1 20220924 # error: 'strcmp' reading 1 or more bytes from a region of # size 0 [-Werror=stringop-overread] # !strcmp(postzprefix,targname+DPREFIXLEN) c_common_flags="-Wall -Wextra -Wpointer-arith -Wmissing-declarations -Wcomment -Wformat -Wpedantic -Wuninitialized -Wshadow -Werror -Wno-long-long" AS_IF( [ test "x$enable_wall" = "xyes" ], [ cxx_compiler_flags="$c_common_flags " c_compiler_flags="$c_common_flags -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wnested-externs -Wredundant-decls -Wsign-compare" #-Wnull-dereference causes bogus warnings. #-Wbad-function-cast removes useful warnings #-Wnostringop-overread removes useful warnings #-Wbad-function-cast removes useful warnings #-Wmissing-parameter-type removes useful warnings ] ) AS_IF( [ test "x$have_win32" = "xyes" ], [ cxx_compiler_flags="$cxx_compiler_flags -Wno-pedantic-ms-format" c_compiler_flags="$c_compiler_flags -Wno-pedantic-ms-format" ] ) DWARF_CHECK_CXX_COMPILER_FLAGS([${cxx_compiler_flags}]) DWARF_CHECK_C_COMPILER_FLAGS([${c_compiler_flags}]) # If we can compile then the runtime can do the # setlocal itself. # We do not run this since the C compiler needs # the C locale to compile correctly. AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[ #include #include #include #include ]], [[ char * langinfo = 0; setlocale(LC_CTYPE, ""); setlocale(LC_NUMERIC, ""); langinfo = nl_langinfo(CODESET); printf("Lang: %s\n",langinfo); if (strcmp(langinfo,"UTF-8") && strcmp(langinfo,"UTF8")) { return 1; } ]] ) ], [ have_utf8="yes" AC_DEFINE( [HAVE_UTF8], [1], [Set to 1 as utf8 is fully printable]) ], [ have_utf8="no" AC_MSG_WARN([utf8 printed uri-style]) ] ) # unused attribute AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ static unsigned int foo(unsigned int x, __attribute__ ((unused)) int y){ unsigned int x2 = x + 1; return x2; } int goo() { unsigned int y = 0; y = foo(12, y); } ]], [[ ]]) ], [ have_unused="yes" AC_DEFINE( [HAVE_UNUSED_ATTRIBUTE], [1], [Set to 1 if __attribute__ ((unused)) is available.]) ], [have_unused="no"]) AC_MSG_CHECKING([whether "unused" attribute is available]) AC_MSG_RESULT([${have_unused}]) # sanitize AS_IF( [test "x${enable_sanitize}" = "xyes"], [ CFLAGS_save=${CFLAGS} CFLAGS="${CFLAGS} -fsanitize=address -fsanitize=leak -fsanitize=undefined -fno-omit-frame-pointer" AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]], [[]])], [ enable_sanitize="yes" DWARF_CFLAGS="$DWARF_CFLAGS -fsanitize=address -fsanitize=leak -fsanitize=undefined -fno-omit-frame-pointer" LDFLAGS="$LDFLAGS -fsanitize=address -fsanitize=leak -fsanitize=undefined -fno-omit-frame-pointer" ], [enable_sanitize="no"]) CFLAGS="${CFLAGS_save} ${DWARF_CFLAGS}" ]) AC_MSG_CHECKING([whether sanitize options are used]) AC_MSG_RESULT([${enable_sanitize}]) # -fvisibility AS_IF( [test "x${enable_shared}" = "xyes" && test "x${have_win32}" = "xno"], [ CFLAGS_save=${CFLAGS} CFLAGS="${CFLAGS} -fvisibility=hidden -fno-omit-frame-pointer" AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]], [[]])], [ DWARF_CFLAGS="$DWARF_CFLAGS -fvisibility=hidden -fno-omit-frame-pointer" LDFLAGS="$LDFLAGS -fvisibility=hidden -fno-omit-frame-pointer" ], [AC_MSG_NOTICE([Option -fvisibility is ignored. Not supported.])]) CFLAGS="${CFLAGS_save} ${DWARF_CFLAGS}" ]) ### Checks for linker characteristics ### Checks for library functions AC_FUNC_ALLOCA requirements_libdwarf_libs= AS_IF( [test "x${enable_decompression}" = "xyes"], [ AS_IF( echo "dadebug zlib ${have_pc_zlib} ${have_zlib}" [test "x${have_pc_zlib}" = "xno" -a "x${have_zlib}" = "xyes"], [ AC_SEARCH_LIBS( [uncompress], [z], [ ZLIB_LIBS="-lz" requirements_libdwarf_libs="-lz" echo "dadebug req set lz" ], [have_zlib="no"]) ]) ], [ have_zlib="no" ]) AS_IF( [test "x${enable_decompression}" = "xyes"], [ AS_IF( echo "dadebug zstd ${have_pc_zstd} ${have_zstd}" [test "x${have_pc_zstd}" = "xno" -a "x${have_zstd}" = "xyes"], [ AC_SEARCH_LIBS( [ZSTD_decompress], [zstd], [ ZSTD_LIBS="-lzstd" echo "dadebug req set zstd" requirements_libdwarf_libs="${requirements_libdwarf_libs} -lzstd" ], [have_zstd="no"]) ]) ], [ have_zstd="no" ]) AS_IF( [test "x${have_zlib}" = "xyes"], [ AC_DEFINE([HAVE_ZLIB], [1], [Set to 1 if zlib decompression is available.]) AC_DEFINE([HAVE_ZLIB_H], [1], [Set to 1 if zlib.h header file is available.]) ]) AS_IF( [test "x${have_zstd}" = "xyes"], [ AC_DEFINE([HAVE_ZSTD], [1], [Set to 1 if zstd decompression is available.]) AC_DEFINE([HAVE_ZSTD_H], [1], [Set to 1 if zstd.h header file is available.]) ]) AC_SUBST([requirements_libdwarf_libs]) ### Checks for system services AC_CONFIG_FILES([ Makefile src/lib/libdwarf/Makefile src/lib/libdwarfp/Makefile src/bin/dwarfdump/Makefile src/bin/dwarfgen/Makefile src/bin/dwarfexample/Makefile src/bin/gennames/Makefile src/bin/tag_attr/Makefile src/bin/tag_tree/Makefile src/bin/attr_form/Makefile src/bin/buildopstab/Makefile src/bin/builduritable/Makefile test/Makefile fuzz/Makefile doc/Makefile libdwarf.pc libdwarfp.pc ]) AC_OUTPUT echo echo "$PACKAGE $VERSION" echo echo "Configuration Options Summary:" echo echo " BuildOS..............: ${build_os}" echo " HostOS...............: ${host_os}" echo echo " shared library.......: ${enable_shared}" echo " static library.......: ${enable_static}" echo echo " zlib support.........: ${have_zlib}" echo " zstd support.........: ${have_zstd}" echo " sanitize support.....: ${enable_sanitize}" echo " documentation........: ${enable_doc}" echo " BuildOS-BigEndian....: ${ac_cv_c_bigendian}" echo echo " libdwarf.............: always" echo " dwarfdump............: always" echo " dwarfdump print utf-8: ${have_utf8}" echo " dwarfgen.............: ${enable_dwarfgen}" echo " dwarfexample.........: ${enable_dwarfexample}" echo echo "Compilation............: make (or gmake)" echo " CPPFLAGS.............: $CPPFLAGS" echo " CFLAGS...............: $CFLAGS ${c_compiler_flags}" echo " LDFLAGS..............: $LDFLAGS" echo " LIBS.................: $LIBS" echo " ZLIB_LIBS............: $ZLIB_LIBS" echo " ZSTD_LIBS............: $ZSTD_LIBS" echo " DWARF_CFLAGS.........: $DWARF_CFLAGS" echo " DWARF_LIBS...........: $DWARF_LIBS" echo " DWARFGEN_LIBS........: $DWARFGEN_LIBS" echo echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')" echo " prefix...............: $prefix" echo libdwarf-code-0.11.1/doc/000077500000000000000000000000001472336503500150515ustar00rootroot00000000000000libdwarf-code-0.11.1/doc/CMakeLists.txt000066400000000000000000000003311472336503500176060ustar00rootroot00000000000000 if ( BUILD_DWARFDUMP ) install(FILES dwarfdump.1 DESTINATION "${CMAKE_INSTALL_MANDIR}/man1") endif() if ( BUILD_DWARFGEN ) install(FILES dwarfgen.1 DESTINATION "${CMAKE_INSTALL_MANDIR}/man1") endif() libdwarf-code-0.11.1/doc/ChangeLog000066400000000000000000000000771472336503500166270ustar00rootroot00000000000000empty placeholder beginning 2022. See base directory ChangeLog libdwarf-code-0.11.1/doc/ChangesToLibdwarf.odt000066400000000000000000000355551472336503500211240ustar00rootroot00000000000000PKhR^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKhRConfigurations2/toolbar/PKhRConfigurations2/floater/PKhRConfigurations2/menubar/PKhRConfigurations2/popupmenu/PKhRConfigurations2/accelerator/PKhRConfigurations2/toolpanel/PKhRConfigurations2/progressbar/PKhRConfigurations2/statusbar/PKhRConfigurations2/images/Bitmaps/PKhR manifest.rdf͓n0 #i.UokᚵGlpzNRΫ&t]vqM PŠZ>o(i#Q42kK[c|z fYLlխg@TB0s w1;/! CL狅#ZRI+i0#զFOrp7;jU E"( 6J*%( Q I:׊3r-ͶQB܇ ' ̴] 2z+=On*U)`>#Js&HB!zx=] ®6U0 pXyu+7+0*ws }h} fhih}X3lB f0rlwV45e 5EPK)PKhR settings.xmlZKs9pqw;~QSC 8M4F=%i 8 =[!]%o c7Akd,-8GKm%B=BftE WU^xf'3%Ma\Z)4b]-EėL{3TX\~Y~cTsR]a%RDZtnM\y0}Za{W ?n? p{R*.;Fҥ|te&|YG+dON˧QOpڃ `8 ]u&x4uBcF}$ݙq"ccAVY}̿Cn滩m:#Y'r/..sȶh9?:ߗCO6Dt{½aBAxv d3ٞ ԺMи\s\U>^"rh6\sMaAWuD{x3סD:RH?|fFm/rǻgŃG.A)i;=px}0}V8ܚr` ®PHn*yKMDOcjLzCH)UFsuI a!$uaClWqx{Iرh%+ ËφPj]% 0mQOED'd'ې:~|xMVTHc#I[p7, uBKD^55zT&kBܟ[#T{uLR~dd崿_AP["i vֽ $K%f]⣣bLQQN{@pؤGom+*+dkj槛 "0e#e a-Rό!S a)' wKeB5tycF:]f]mfwt"0k|j@s-щO)PmƅuҒаzݿ쮗55g3HYj=UhhϪBv~}Q4  2L wԕapljQ1O$xlYlQc#~X0cX0cX0cX07 ?;ьwcv'q:cDF1S^;mfhv߶v7ܥ[{9pIqt!!۾_'!Nm؏.V\|ݶY޶q G,[G-Cdlx/O +N")X5 9'miTCFlч6e|(9J4r Q/cYc0rP/=}b ݔLzmZ_{œ}*^5*p $le%В-щ IEb% ' c#KU0 B ٪SAՄ {& 5% 6թ_#>XP`ż6YS,N;&D|F}V(AmMSp v6CZcؚSX5)woh_n{! ZWMam\g7c^ussig p:: k|Ek83D=>/Od@ۢt~^꼱 F@wŕ^Jm= .UxIj.kcR"*si8_1[/xIVCɥ˘gS,Er@ }.! U5:'N vEtDY r d' Qjjz%A%eIy Q)Wh* e%fN ݚLUB'@1 ̚xj%KT:ˊ/ Wѧ} F0c/xʱ>n P7._Fڞ3%VoZgOPl뮗\ "Y|T@)Ӫ%p{R] Kg[ .#@&ȠNxP#`QmQ˼Cݰ'_ѕ7I/9Pb+ PX㮠JvQtjCkȔg@{| h0N$mP>AdSA&LsjUqUFia *lY.gE? Wobˊ/ ƂhL8.zݰӿ->q/c =f.BVRiMŬ%YV0m:RO/jO/SW~c=(\^0OaWpo!WYkv{Mvd'58=^⟄hBr_&r1<>nۥ'Oo'b`h*C|yNxs Ew|Qq6O &cvs1u={9>I<-IN49 oauT^!r$%"=V ɯ3ME)XJҷkwW;EEHi0> 9 #F0TTyiP9AX  …Ji BeHew(zWfqgi:ף4G6u;!$tVwɶf ; (p)4  L#8ႎA )' Zv$V=zG W 5Ak_ͳgC*?#i6M^gr6|=mfȹ`&~ZЪ u2~xXF9`;sGばI;3J$s_b|®ؼw2ըW7llBZE.h:V=9 +q\9~xA{#4m5-,Ou2qH5 #zo0^$,*iCf~b׉EvHaUo#{{bJAS̪ >xVE֧}kLy HjIfF~١L7y3>ft] ;n7#>|UHu\7r )ɢeP8M / 0Z=j{4?JGM(N(QPuY(T 輴ñ9P9~Kɺ{h)$! :8Ҵpƪ6gN!9Ocĥ U`v NV$X2t%L^i 4 B;b 6C1I?ģRc =ƴu -nYɳ Y븘l˅~3r'Ba~]beC*#Hb5] d#Ztr\[n8T/P@]S./ Ƃ`, Ƃ17p͕A 'H|1MVnmoZ^:zpW筱?x̧cCۺ (ú]p F4k|gt_m% WwZ$ SBh&d=ؚ;/lFu)a{<~1{x~ 2c|Ђ#^5I4 /KC<Fs>2lpc.[<e"\c,Bw@m \muLE oқ%DYRyO4}뗜j4M^d{{<y0#[yNuySSsv=0Zl!jo ceJ2;F  -ANbv4rpљ s`l3tV_P,WE<{g9n>szѮHLOL\FkiiF4u1rU☛-SNΓoTz)1SgDPhw[ An*aCc8ӎ퉶F }](E*ٓ*N 'UG (R+ˮZ ,m @Uૻ>ӝ `thNt%s/( kZijscƴsbpI46"&=$$r뼯qI,򰰱OF?ھW&[G+DhCm=PN.|:hFO2}:% Ќp}ۘJ<~?2`0JɈSr9&U]¦6:sqс9[ ;92\gxOog}>ϒyoH{^\|X0nszmf?˫t)]g;_^zdhe2`B 8'ĵS`*Fp Vѧ 7peGW3"0 48X=\Ҡ@>sJl p.T¨vQNރ#Xf(bySM|a}u"~k/W5۳Ψag@S_84\D3 C.\#!Zd7;\,%uz-VI,q*[Y=7pS밻ˆؓ0?oC@-/0rWG0WZ+d.5 ڠ8cΆ1U5$CR'zpu WJsƘuN/R+}TUHbR8}xGB Ƃ1gotlX:'`AUSˁ筺D]0LăPd43.F8bZj UgS%gbc_0ӃӢ֒gSdܔ}ai/[O ;[XcSQ":y;mCYb|\p.:+98$\_6\\I3uX~+]0\HE긺 2*Zrh4z㨜%h9B X`8# ʤ0z7`\/p҆ `\,cU.d(.Ls]_EhgSfKF[`i hvup~NL.swh!R˘xP;WN{hvIva*RgI2/xTG,1zp]T`#wt4^f^}\Dd;Gǵj2.qRL@;֖g\嬱.fw /G8zg0g}UNjZ ;)~5dH\KpUpKPr'\SS+55yV?mm\߲kPt9# Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, Ƃ`, #rY*G¿{[#n\%G }cckcx}ǿ7dme/!q[JiMqmcX0cX0cX0kIENDB`PKhR styles.xml[[۸~ؾɖnf!ŢMҢo-ˎCb]*Pd>BLJՕųx4a)$]#ߩ7DOQ\*S#5H&I]UB4'K[ 7}csPiϊԀ_z FiEXi&Jc+^*>5Mbjr/InpxgU,'d~'Zϊ:2cp)8zfvUUZ?XSl.E[ǫȱЌp@n6Vԁɿ[L;y26t+8ܧED;E;N\z&S̘2sNAND&Zήn7m(țbzl E:W{O2r7\pW^OZ]G]ŖQ1Q 2vLږdJRo(DMTzBpi|!vj>ɚ8&,m ~W7!=sghDQuLYkAz3H o ]ܾk՛AYw0,%f*9ں!D7ɡaQ,|/h(MЏҝ#}'IlL@2,c,J0heo1t~}WF3\f[If|ybGϳ%`Дg0ĚuaJiitY݉>fRdD_;#婚h< H!D_^ct}.)qB|F9(6Y%sc58՜y| ORê;S;ǙfxmԺTwjuXM;Fݜc0'Cng!76&էB\gWl(^p:[}$6{=OFs}8N@xIfk!9hF.x8;#烦ŒGB4KSN͛܊޸JgD;I֜X66/#' _s r\ZF&s3hISYfF.:N nlBPI]v(wLɞr^dfU#Da$W\P"wdT,n+ÿF|d9c|˹_k Y|QtC`!y׻Fȫ1hH} L45B#rDW { /זPKq2F 3PKhRMETA-INF/manifest.xmlj0 }눽4L {DNl4o?'4M(4Лeɿwkg *YTdf)B !PwaŒ'iU Iudu@Sz9*ݣ-@&jT7!:8VkA.~S-h4Prt2t*+& 2*3Xą>΀/[1`b%m#6lœ!ϭ^։Ow7 \EWj@Tabb54@yos~H "NG} jA uco&a ĿPK!--%PKhR^2 ''mimetypePKhRMConfigurations2/toolbar/PKhRConfigurations2/floater/PKhRConfigurations2/menubar/PKhRConfigurations2/popupmenu/PKhR'Configurations2/accelerator/PKhRaConfigurations2/toolpanel/PKhRConfigurations2/progressbar/PKhRConfigurations2/statusbar/PKhR Configurations2/images/Bitmaps/PKhRh Hmanifest.rdfPKhR)meta.xmlPKhRu?/ settings.xmlPKhR;vv Thumbnails/thumbnail.pngPKhRA ^ )4 m"styles.xmlPKhRq2F 3 ,content.xmlPKhR!--%5META-INF/manifest.xmlPKe6libdwarf-code-0.11.1/doc/Doxyfile000066400000000000000000003431021472336503500165620ustar00rootroot00000000000000# Doxyfile 1.9.2 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the configuration # file that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = "libdwarf" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. # Set NO by davea 12 march 2024 to avoid duplicated brief in examples output. REPEAT_BRIEF = NO # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = YES # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line # such as # /*************** # as being the beginning of a Javadoc-style comment "banner". If set to NO, the # Javadoc-style will behave just like regular comments and it will not be # interpreted by doxygen. # The default value is: NO. JAVADOC_BANNER = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # By default Python docstrings are displayed as preformatted text and doxygen's # special commands cannot be used. By setting PYTHON_DOCSTRING to NO the # doxygen's special commands can be used and the contents of the docstring # documentation blocks is shown as doxygen documentation. # The default value is: YES. PYTHON_DOCSTRING = YES # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:^^" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". Note that you cannot put \n's in the value part of an alias # to insert newlines (in the resulting output). You can put ^^ in the value part # of an alias to insert a newline as if a physical newline was in the original # file. When you need a literal { or } or , in the value part of an alias you # have to escape them by means of a backslash (\), this can lead to conflicts # with the commands \{ and \} for these it is advised to use the version @{ and # @} or use a double escape (\\{ and \\}) ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice # sources only. Doxygen will then generate output that is more tailored for that # language. For instance, namespaces will be presented as modules, types will be # separated into more groups, etc. # The default value is: NO. OPTIMIZE_OUTPUT_SLICE = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, JavaScript, # Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, # VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser # tries to guess whether the code is fixed or free formatted code, this is the # default for Fortran type files). For instance to make doxygen treat .inc files # as Fortran files (default is PHP), and .f files as C (default is Fortran), # use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. When specifying no_extension you should add # * to the FILE_PATTERNS. # # Note see also the list of default file extension mappings. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. # Minimum value: 0, maximum value: 99, default value: 5. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. TOC_INCLUDE_HEADINGS = 5 # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 # The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use # during processing. When set to 0 doxygen will based this on the number of # cores available in the system. You can set it explicitly to a value larger # than 0 to get more control over the balance between CPU load and processing # speed. At this moment only the input processing can be done using multiple # threads. Since this is still an experimental feature the default is set to 1, # which effectively disables parallel processing. Please report any issues you # encounter. Generating dot graphs in parallel is controlled by the # DOT_NUM_THREADS setting. # Minimum value: 0, maximum value: 32, default value: 1. NUM_PROC_THREADS = 1 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual # methods of a class will be included in the documentation. # The default value is: NO. EXTRACT_PRIV_VIRTUAL = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If this flag is set to YES, the name of an unnamed parameter in a declaration # will be determined by the corresponding definition. By default unnamed # parameters remain unnamed in the output. # The default value is: YES. RESOLVE_UNNAMED_PARAMS = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # declarations. If set to NO, these declarations will be included in the # documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # With the correct setting of option CASE_SENSE_NAMES doxygen will better be # able to match the capabilities of the underlying filesystem. In case the # filesystem is case sensitive (i.e. it supports files in the same directory # whose names only differ in casing), the option must be set to YES to properly # deal with such files in case they appear in the input. For filesystems that # are not case sensitive the option should be be set to NO to properly deal with # output files written for symbols that only differ in casing, such as for two # classes, one named CLASS and the other named Class, and to also support # references to files without having to specify the exact matching casing. On # Windows (including Cygwin) and MacOS, users should typically set this option # to NO, whereas on Linux or other Unix flavors it should typically be set to # YES. # The default value is: system dependent. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_HEADERFILE tag is set to YES then the documentation for a class # will show which file needs to be included to use the class. # The default value is: YES. SHOW_HEADERFILE = YES # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = NO # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. See also section "Changing the # layout of pages" for information. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = NO # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as documenting some parameters in # a documented function twice, or documenting parameters that don't exist or # using markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete # function parameter documentation. If set to NO, doxygen will accept that some # parameters have no documentation without warning. # The default value is: YES. WARN_IF_INCOMPLETE_DOC = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong parameter # documentation, but not about the absence of documentation. If EXTRACT_ALL is # set to YES then this flag will automatically be disabled. See also # WARN_IF_INCOMPLETE_DOC # The default value is: NO. WARN_NO_PARAMDOC = YES # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS # then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but # at the end of the doxygen process doxygen will return with a non-zero status. # Possible values are: NO, YES and FAIL_ON_WARNINGS. # The default value is: NO. WARN_AS_ERROR = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = libdwarf.dox jitaccess.dox ../src/lib/libdwarf/dwarf.h ../src/lib/libdwarf/libdwarf.h checkexamples.c ../src/bin/dwarfexample/jitreader.c ../src/bin/dwarfexample/showsectiongroups.c # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: # https://www.gnu.org/software/libiconv/) for the list of possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # Note the list of default checked file patterns might differ from the list of # default file extension mappings. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, # *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C # comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, # *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.c *.h # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = YES # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a color-wheel, see # https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use gray-scales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that # are dynamically created via JavaScript. If disabled, the navigation index will # consists of multiple levels of tabs that are statically embedded in every HTML # page. Disable this option to support browsers that do not have JavaScript, # like the Qt help browser. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_MENUS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: # https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To # create a documentation set, doxygen will generate a Makefile in the HTML # output directory. Running make will produce the docset in that directory and # running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy # genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # on Windows. In the beginning of 2021 Microsoft took the original page, with # a.o. the download links, offline the HTML help workshop was already many years # in maintenance mode). You can download the HTML help workshop from the web # archives at Installation executable (see: # http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo # ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the main .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location (absolute path # including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to # run qhelpgenerator on the generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine tune the look of the index (see "Fine-tuning the output"). As an # example, the default style sheet generated by doxygen has an example that # shows how to put an image at the root of the tree instead of the PROJECT_NAME. # Since the tree basically has the same information as the tab index, you could # consider setting DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the # FULL_SIDEBAR option determines if the side bar is limited to only the treeview # area (value NO) or if it should extend to the full height of the window (value # YES). Setting this to YES gives a layout similar to # https://docs.readthedocs.io with more room for contents, but less room for the # project logo, title, and description. If either GENERATOR_TREEVIEW or # DISABLE_INDEX is set to NO, this option has no effect. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. FULL_SIDEBAR = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg # tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see # https://inkscape.org) to generate formulas as SVG images instead of PNGs for # the HTML output. These images will generally look nicer at scaled resolutions. # Possible values are: png (the default) and svg (looks nicer but requires the # pdf2svg or inkscape tool). # The default value is: png. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FORMULA_FORMAT = png # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands # to create new LaTeX commands to be used in formulas as building blocks. See # the section "Including formulas" for details. FORMULA_MACROFILE = # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # https://www.mathjax.org) which uses client side JavaScript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # With MATHJAX_VERSION it is possible to specify the MathJax version to be used. # Note that the different versions of MathJax have different requirements with # regards to the different settings, so it is possible that also other MathJax # settings have to be changed when switching between the different MathJax # versions. # Possible values are: MathJax_2 and MathJax_3. # The default value is: MathJax_2. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_VERSION = MathJax_2 # When MathJax is enabled you can set the default output format to be used for # the MathJax output. For more details about the output format see MathJax # version 2 (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 # (see: # http://docs.mathjax.org/en/latest/web/components/output.html). # Possible values are: HTML-CSS (which is slower, but has the best # compatibility. This is the name for Mathjax version 2, for MathJax version 3 # this will be translated into chtml), NativeMML (i.e. MathML. Only supported # for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This # is the name for Mathjax version 3, for MathJax version 2 this will be # translated into HTML-CSS) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from https://www.mathjax.org before deployment. The default value is: # - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 # - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # for MathJax version 2 (see # https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # For example for MathJax version 3 (see # http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): # MATHJAX_EXTENSIONS = ams # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /