Hello,

I recently ported the slab implementation in viengoos to Hurd. It seems that the
refcount field of hurd_slab isn't initialized when it is created in grow(). here
is the patch to fix it.

Best regards,
Zheng Da
diff --git a/libhurd-slab/slab.c b/libhurd-slab/slab.c
index b6e3f51..f78357c 100644
--- a/libhurd-slab/slab.c
+++ b/libhurd-slab/slab.c
@@ -253,6 +253,7 @@ grow (struct hurd_slab_space *space)
   __hurd_slab_nr_pages++;
 
   new_slab = (p + getpagesize () - sizeof (struct hurd_slab));
+  memset (new_slab, 0, sizeof (*new_slab));
 
   /* Calculate the number of objects that the page can hold.
      SPACE->size should be adjusted to handle alignment.  */

Reply via email to