From 940f2e7f1893af17be6e35ef8f7ad09949a12709 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Fri, 17 Nov 2023 13:40:37 +0100 Subject: [PATCH] size_pool_idx_for_size: Include debugging info in error message We ran into that case on our CI, including some sizes would help debug it much easier. --- gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gc.c b/gc.c index 7710fec7d4..de0b9bf79e 100644 --- a/gc.c +++ b/gc.c @@ -2769,7 +2769,7 @@ size_pool_idx_for_size(size_t size) size_t size_pool_idx = 64 - nlz_int64(slot_count - 1); if (size_pool_idx >= SIZE_POOL_COUNT) { - rb_bug("size_pool_idx_for_size: allocation size too large"); + rb_bug("size_pool_idx_for_size: allocation size too large (size=%lu, size_pool_idx=%lu)", size, size_pool_idx); } #if RGENGC_CHECK_MODE