Subject: Re: Dynamic limits for SysV semaphores and message queues
To: None <tech-kern@netbsd.org>
From: Mindaugas R. <rmind@NetBSD.org>
List: tech-kern
Date: 10/09/2007 02:45:36
Greg Troxel <gdt@ir.bbn.com> wrote:
> The code mallocs a large area that is the sum of sizes, and then uses
> the sizes to grab sub-areas.  This does not guarantee that all of the
> sub-areas will have appropriate alignment for their data structures.
> For example, if the second area were char foo[17], the third area
> wouldn't even be byte aligned.  I don't know what's in all the structs,
> and they're probably all 8-byte aligned, but this seems in general
> not safe.

I have discussed this point with <uwe>, and seems yes - in some cases there
might be a problem with aligning both in the reallocation and old init code
(it was here forever!). I will take a look at this.

Thanks for you comments.

-- 
Best regards,
Mindaugas
www.NetBSD.org