mono/mono-addins

Silently ignore native binaries during scanning

KirillOsenkov opened this issue · 6 comments

Mono Addins crashes when encountering a native binary that's not excluded. Maybe it should instead skip it silently?

Cecil throws a BadImageFormatException when it encounters a native library (CLI Header is empty). Maybe we should catch that, and log the assembly not being loaded.

Ideally avoid the exception in the first place (I bet Cecil has ways to probe)

Doesn't look like it does, but this is part of parsing the metadata of a given dll file, so we can safely just catch that exception.

@jbevain Jb is there a way to detect a native binary in Cecil and avoid throwing an exception?

Closing as #63 was merged.