There is a corefile writer that is including uninitialized data in the Mach-O header 'flags' field. I'll work with them to fix that, but it only causes a problem in one part of lldb today, in ObjectFileMachO::SanitizeSegmentCommand where there is code that is trying to detect an LC_SEGMENT in a binary in the shared cache. The shared cache flag bit is set in this corefile, so we adjust the offsets and the corefile parsing fails big time.
lldb doesn't make a lot of decisions based on the mach header flags field, and even fewer of them when dealing with corefiles, so to handle these corefiles that are floating around, I'd like to add a guard to the code to explicitly opt out when working on a corefile, to work around this.
Fred, this is an edit to your change from last summer in https://reviews.llvm.org/D83023 . Are you OK with this.