swiftlang / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Swift’s stable releases of Clang as well as support the Swift project.
https://llvm.org
Other
1.11k stars 328 forks source link

[Cherry-pick into stable/20240723] llvm-objdump: ensure a MachO symbol isn't STAB before looking up secion (#86667) #9142

Closed adrian-prantl closed 3 weeks ago

adrian-prantl commented 3 weeks ago
commit 52337d5f9d108f04b2ed06069b21a255c232dc1f
Author: Tim Northover <t.p.northover@gmail.com>
Date:   Thu Aug 15 19:19:30 2024 +0100

    llvm-objdump: ensure a MachO symbol isn't STAB before looking up secion (#86667)

    The section field has been repurposed for some STAB symbol types, and if
    we blindly look it up we'll produce an error and terminate. Logic
    already existed

    Existing stabs test had a section that was in range. Unfortunately I
    don't know of an easy way to produce stabs entries in LLVM (I thought
    they died in the 90s until this came up) so I just binary-edited it to
    cause a failure on existing llvm-objdump.