[all-commits] [llvm/llvm-project] 527595: [lldb][Mach-O] Initialize cputype/cpusubtype in te...

Jason Molenda via All-commits all-commits at lists.llvm.org
Thu Dec 19 08:58:58 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 527595f92789f9701a4b91ab32b792034352f78d
      https://github.com/llvm/llvm-project/commit/527595f92789f9701a4b91ab32b792034352f78d
  Author: Jason Molenda <jmolenda at apple.com>
  Date:   2024-12-19 (Thu, 19 Dec 2024)

  Changed paths:
    M lldb/test/API/macosx/lc-note/firmware-corefile/create-empty-corefile.cpp

  Log Message:
  -----------
  [lldb][Mach-O] Initialize cputype/cpusubtype in test corefiles (#120518)

TestFirmwareCorefiles.py has a helper utility,
create-empty-corefile.cpp, which creates corefiles with different
metadata to specify the binary that should be loaded. It normally uses
an actual binary's UUID for the metadata, and it uses the binary's
cputype/cpusubtype for the corefile's mach header.

There is one test where it creates a corefile with metadata for a UUID
that cannot be found -- it is given no binary -- and in that case, the
cputype/cpusubtype it sets in the core file mach header was
uninitialized data. Through luck, on Darwin systems, the uninitialized
data typically matched a CPU_TYPE from machine.h and the test would
work. But when the value doens't match one of thoes defines, lldb would
reject the corefile entirely, and the test would fail. This has been an
infrequent failure on the CI bots for a while and I couldn't ever repo
it. There's a recent configuration where it was happening every time and
I was able to track it down.

rdar://141727563



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list