[mmp] Add unusual checks necessary to process obfuscated code. Fixes #53420. (#2117)

https://bugzilla.xamarin.com/show_bug.cgi?id=53420
This commit is contained in:
Rolf Bjarne Kvinge 2017-05-23 15:38:19 +02:00 коммит произвёл GitHub
Родитель 4b8047977b
Коммит bf81f8f27b
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -335,6 +335,9 @@ namespace Xamarin.Bundler {
foreach (var mr in m.ModuleReferences) {
string name = mr.Name;
if (string.IsNullOrEmpty (name))
continue; // obfuscated assemblies.
string file = Path.GetFileNameWithoutExtension (name);
switch (file) {

Просмотреть файл

@ -76,7 +76,7 @@ namespace MonoTouch.Tuner
void ProcessMethod (MethodDefinition method)
{
if (method.IsPInvokeImpl && method.HasPInvokeInfo) {
if (method.IsPInvokeImpl && method.HasPInvokeInfo && method.PInvokeInfo != null) {
var pinfo = method.PInvokeInfo;
if (pinfo.Module.Name == "__Internal")
DerivedLinkContext.GetRequiredSymbolList (pinfo.EntryPoint).Add (method);