[sgen] Abort with a message on failure to initialize binary protocol
authorLudovic Henry <ludovic@xamarin.com>
Fri, 29 Jan 2016 18:10:10 +0000 (18:10 +0000)
committerLudovic Henry <ludovic@xamarin.com>
Fri, 29 Jan 2016 18:10:10 +0000 (18:10 +0000)
mono/sgen/sgen-protocol.c

index 5b30cbce11b832f65c640596ba7469f72be9ffb6..963035950b32ecdad234e250174df43819e5f02c 100644 (file)
@@ -99,6 +99,9 @@ binary_protocol_open_file (void)
                        break; /* Failed */
        } while (binary_protocol_file == -1);
 
+       if (binary_protocol_file == -1)
+               g_error ("sgen binary protocol: failed to open file");
+
        if (file_size_limit > 0)
                free_filename (filename);
 }
@@ -114,6 +117,8 @@ binary_protocol_init (const char *filename, long long limit)
        file_size_limit = limit;
 
        binary_protocol_open_file ();
+#else
+       g_error ("sgen binary protocol: not supported");
 #endif
 }