Selaa lähdekoodia

2009-12-24 Sebastien Pouliot <[email protected]>

	* method-to-ir.c (mono_method_to_ir): Avoid SIGSEGV when
	mono_method_get_signature returns NULL. Fix #567084


svn path=/trunk/mono/; revision=148889
Sebastien Pouliot 16 vuotta sitten
vanhempi
sitoutus
2d6dbcd8a3
2 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 5 0
      mono/mini/ChangeLog
  2. 2 0
      mono/mini/method-to-ir.c

+ 5 - 0
mono/mini/ChangeLog

@@ -1,3 +1,8 @@
+2009-12-24  Sebastien Pouliot  <[email protected]>
+
+	* method-to-ir.c (mono_method_to_ir): Avoid SIGSEGV when
+	mono_method_get_signature returns NULL. Fix #567084
+
 2009-12-23  Zoltan Varga  <[email protected]>
 
 	* mini-x86.h (MONO_ARCH_LLVM_SUPPORTED): Define this to fix the x86 llvm build.

+ 2 - 0
mono/mini/method-to-ir.c

@@ -7515,6 +7515,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 			if (!cmethod)
 				goto load_error;
 			fsig = mono_method_get_signature (cmethod, image, token);
+			if (!fsig)
+				goto load_error;
 
 			mono_save_token_info (cfg, image, token, cmethod);