]> granicus.if.org Git - gc/commitdiff
Add assertion that GC is initialized to base incremental_protection_needs
authorIvan Maidanski <ivmai@mail.ru>
Thu, 25 Apr 2019 07:16:00 +0000 (10:16 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 25 Apr 2019 07:16:00 +0000 (10:16 +0300)
* os_dep.c [!HAVE_INCREMENTAL_PROTECTION_NEEDS]
(GC_incremental_protection_needs): Call GC_ASSERT(GC_is_initialized).

os_dep.c

index 1e713252ebe0269f15a30761e9dd1347d86a2769..fb530f9d9f576c41378a6f103f6e2dd3f3b02827 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -4421,6 +4421,7 @@ catch_exception_raise(mach_port_t exception_port GC_ATTR_UNUSED,
 #ifndef HAVE_INCREMENTAL_PROTECTION_NEEDS
   GC_API int GC_CALL GC_incremental_protection_needs(void)
   {
+    GC_ASSERT(GC_is_initialized);
     return GC_PROTECTS_NONE;
   }
 #endif /* !HAVE_INCREMENTAL_PROTECTION_NEEDS */