+ if (count != 1)
+ return 1;
+
+ // Try overflow in unmanaged code
+ count = 0;
+ try {
+ Recurse ();
+ } catch (Exception ex) {
+ Console.WriteLine ("Handled: {0}", ex.Message);
+ count++;
+ }
+ // Check that the stack protection is properly restored
+ try {
+ Recurse ();
+ } catch (Exception ex) {
+ Console.WriteLine ("Again: {0}", ex.Message);
+ count++;
+ }
+ if (count != 2)
+ return 2;
+
+ return 0;