> Hi, > > Posix says that mmap(2)ing 0 bytes is bad and furthermore, our subsystem > is not written to support this (because there is no difference between > no allocation and a 0-byte allocation). > Strictly speaking, mmap(2) is to return EINVAL for 0 byte allocations > and I intend to get that into the kernel. But before that can happen, > ld.so must cease performing 0-byte mmaps. Hence the diff below. > > This diff is called mmap0_ld.so.diff.0, has no api/abi change and treats > a 0-byte area mmap as a noop (i.e. skips the corresponding mmap call). > > ok?
Wouldn't it be simpler, in library_mquery.c, to skip LDLIST_INSERT() for size == 0 elements? Miod