Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.7.0
-
-
335d91e6d6c4ac21bcf39c4f5bb9a8bcd0e597bf
Description
When macdeployqt is invoked with the codesign option it segfaults. I traced the problem to the function codeSignBundle which calls findAppBundleFiles to get a list of binary files within a bundle. The trouble is, this function returns all the files in the bundle, not just the binaries. In particular it returns plist files, which then get passed to getBinaryDependencies and subsequently findDependencyInfo. In this function otool is invoked on the plist file and a crash occurs when its output is parsed.
Attached is a fix I have applied which checks if the files findAppBundleFiles returns are binaries before passing them on further. It is perhaps not the most elegant fix ever, but it does the job of getting our CI builds going again.