[Lldb-commits] [PATCH] D128377: [lldb] Fix off-by-one error in the AppleObjCRuntimeV2 utility function

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 22 13:48:59 PDT 2022


JDevlieghere added a comment.

In D128377#3602856 <https://reviews.llvm.org/D128377#3602856>, @aprantl wrote:

> I'm curious now why there is both `count` and `max_class_infos` and if the second is workaround for this bug? Anyway, this *looks* plausible!

`count` is the actual value reported by the runtime. `max_class_infos` is a monotonically increasing number that allows us to detect that new classes have been instantiated. The latter is also used to allocate enough space. The guarantee from the runtime is that `count < max_class_infos`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128377/new/

https://reviews.llvm.org/D128377



More information about the lldb-commits mailing list