Bug#886736: diffoscope: mach-o disassembly with otool can fail in a way that fools diffoscope into dumping raw data instead

Mike Hommey mh+reportbug at glandium.org
Tue Jan 9 12:18:26 UTC 2018

Package: diffoscope
Version: 90
Severity: normal

Dear Maintainer,

In some cases, otool can fail with:

  can't create x86_64 llvm disassembler

(where x86_64 may be another platform, and where the message is usually
preceded by the file path name and "(__TEXT,__text) section", well, in
fact, anything that would normally come before the disassembly for the
given command line)

"Sensibly", it does print that on stdout, and quits with exit code 0.

Which means when you're comparing two binaries that have assembly
differences, the otool output is identical and non-failing, from
diffoscope's perspective, meaning it goes on to the fallback "No file
format specific differences found inside, yet data differs", which then
goes on to do a diff on a hexdump.

When the llvm disassembler fails for some reason, one can use the -Q
option to otool to make it use its internal disassembler, which is
better than nothing.


More information about the Reproducible-builds mailing list