NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/40651: kmem_alloc() returns misaligned pointers
> and tp is 0xf41b4c0c - which is only 32bit aligned, but struct tty contains
> a 64 bit t_dev, which needs 64 bit alignement.
>
> >How-To-Repeat:
>
> Just boot a -current sparc kernel (should probably happen on other 32bit
> alignement picky archs too)
is it with DEBUG?
YAMAMOTO Takashi
Index: subr_kmem.c
===================================================================
RCS file: /cvsroot/src/sys/kern/subr_kmem.c,v
retrieving revision 1.24
diff -u -p -r1.24 subr_kmem.c
--- subr_kmem.c 6 Feb 2009 22:58:49 -0000 1.24
+++ subr_kmem.c 16 Feb 2009 00:15:12 -0000
@@ -119,7 +119,7 @@ static void kmem_poison_check(void *, si
#endif /* defined(KMEM_REDZONE) */
#if defined(KMEM_SIZE)
-#define SIZE_SIZE (min(KMEM_QUANTUM_SIZE, sizeof(size_t)))
+#define SIZE_SIZE (max(KMEM_QUANTUM_SIZE, sizeof(size_t)))
static void kmem_size_set(void *, size_t);
static void kmem_size_check(void *, size_t);
#else
Home |
Main Index |
Thread Index |
Old Index