[ADT] [lld-macho] Check for end iterator deref in filter_iterator_base
If ld64.lld was supplied an object file that had a `__debug_abbrev` or `__debug_str` section, but didn't have any compile unit DIEs in `__debug_info`, it would dereference an iterator pointing to the empty array of DIEs. This underlying issue started causing segmentation faults when parsing for `__debug_info` was addded in D128184. That commit was reverted, and this one fixes the invalid dereference to allow relanding it. This commit adds an assertion to `filter_iterator_base`'s dereference operators to catch bugs like this one. Ran check-llvm, check-clang and check-lld. Differential Revision: https://reviews.llvm.org/D128294
parent
3ade3d37
Please register or sign in to comment