[Lldb-commits] [lldb] [lldb] Fix wrong buffer size when fetching Objective-C classes (PR #197389)
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Wed May 13 01:52:25 PDT 2026
Teemperor wrote:
It's not obvious from the code, but there is only one of the three potential calling functions where we pass a size. The one change is this one:
```
uint32_t
__lldb_apple_objc_v2_get_dynamic_class_info3(void *gdb_objc_realized_classes_ptr,
void *class_infos_ptr,
uint32_t class_infos_byte_size,
void *class_buffer,
uint32_t class_buffer_len,
uint32_t should_log)
```
And the other two we never call with a buffer size as they don't take one:
```
uint32_t
__lldb_apple_objc_v2_get_dynamic_class_info2(void *gdb_objc_realized_classes_ptr,
void *class_infos_ptr,
uint32_t class_infos_byte_size,
uint32_t should_log)
```
and
```
uint32_t
__lldb_apple_objc_v2_get_dynamic_class_info (void *gdb_objc_realized_classes_ptr,
void *class_infos_ptr,
uint32_t class_infos_byte_size,
uint32_t should_log)
```
Also I'm not sure how we would test this aside from creating a test program with a really large amount of instantiated Objective-C classes.
https://github.com/llvm/llvm-project/pull/197389
More information about the lldb-commits
mailing list