Skip to content

Commit

Permalink
macho-parser: Don't support FAT binaries, and warn for it
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonKagstrom committed Aug 17, 2023
1 parent 8f63ce8 commit 29d0e8a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/parsers/macho-parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,12 @@ class MachoParser : public IFileParser
auto hdr = reinterpret_cast<mach_header_64*>(data);

// Don't handle big endian machines, or 32-bit binaries
if (hdr->magic == MH_MAGIC_64 || hdr->magic == FAT_MAGIC_64)
if (hdr->magic == FAT_MAGIC_64)
{
error("kcov doesn't support FAT binaries");
return match_none;
}
if (hdr->magic == MH_MAGIC_64)
{
return match_perfect;
}
Expand Down

0 comments on commit 29d0e8a

Please sign in to comment.