[前][次][番号順一覧][スレッド一覧]

ruby-changes:63530

From: Aaron <ko1@a...>
Date: Fri, 6 Nov 2020 05:27:36 +0900 (JST)
Subject: [ruby-changes:63530] d8da5c1983 (master): add asserts to find crash

https://git.ruby-lang.org/ruby.git/commit/?id=d8da5c1983

From d8da5c198348eac3d3d7a3e13dfb8a9351ed07ae Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Thu, 5 Nov 2020 12:27:09 -0800
Subject: add asserts to find crash


diff --git a/gc.c b/gc.c
index a80d9fc..a5f99e5 100644
--- a/gc.c
+++ b/gc.c
@@ -8524,10 +8524,10 @@ gc_sort_heap_by_empty_slots(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L8524
 
     list_for_each(&heap_eden->pages, page, page_node) {
         page_list[i++] = page;
-        GC_ASSERT(page != NULL);
+        assert(page != NULL);
     }
-    GC_ASSERT(total_pages > 0);
-    GC_ASSERT((size_t)i == total_pages);
+    assert(total_pages > 0);
+    assert((size_t)i == total_pages);
 
     /* Sort the heap so "filled pages" are first. `heap_add_page` adds to the
      * head of the list, so empty pages will end up at the start of the heap */
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]