[all-commits] [llvm/llvm-project] 8965dd: [lldb] Handle a byte size of zero in CompilerType:...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Jan 16 09:34:20 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8965dd40c63cf00610fcf550017b46dae736d94b
      https://github.com/llvm/llvm-project/commit/8965dd40c63cf00610fcf550017b46dae736d94b
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2025-01-16 (Thu, 16 Jan 2025)

  Changed paths:
    M lldb/source/Symbol/CompilerType.cpp

  Log Message:
  -----------
  [lldb] Handle a byte size of zero in CompilerType::GetValueAsScalar (#123107)

A bit or byte size of 0 is not a bug. It can legitimately (and
frequently) happen in Swift and C, just not in C++. However, it doesn't
make sense to read a scalar of zero bytes.

Currently, when this happens, we trigger an `lldb_assert` in the data
extractor and return 0, which isn't accurate. I have a bunch of reports
of the assert triggering, but nobody has been able to provide me with a
reproducer that I can turn into a test and I wasn't able to concoct a
test case by reverse-engineering the code.

rdar://141630334



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