NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: port-arm/50563: pool allocator corruption due to __MUTEX_PRIVATE
The following reply was made to PR port-arm/50563; it has been noted by GNATS.
From: christos%zoulas.com@localhost (Christos Zoulas)
To: matthew green <mrg%eterna.com.au@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, port-arm-maintainer%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: re: port-arm/50563: pool allocator corruption due to __MUTEX_PRIVATE
Date: Wed, 16 Dec 2015 08:24:38 -0500
On Dec 16, 8:34pm, mrg%eterna.com.au@localhost (matthew green) wrote:
-- Subject: re: port-arm/50563: pool allocator corruption due to __MUTEX_PRIV
| > Yes, if the types of ipl_cookie_t or __cpu_simple_lock_t are not defined
| > to be 8 bits. Is that the case? We should add a:
| >
| > CTASSERT(sizeof(uintptr_t) == sizeof(struct kmutex));
| >
| > in the header file to enforce that.
|
| that doesn't seem sane to me. or even valid. alpha has a uint32 and
| a uintprt_t.
|
| struct kmutex is MD-defined. i don't know of a good way to check
| this without a helper. we have to compile machine/mutex.h with and
| without __MUTEX_PRIVATE defined, and compare their sizes. it seems
| way to ugly to try to do this in a single C file (you'd have to
| #undef all the sys/arch/foo/include/mutex.h's #ifdef _FOO_MUTEX_H,
| but it would work i think...)
That CTASSERT goes in the MD file.
christos
Home |
Main Index |
Thread Index |
Old Index