tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: firefox on aarch64



On Tue, Aug 04, 2020 at 04:15:36PM +0200, Tobias Nygren wrote:
> On Sun, 2 Aug 2020 19:00:33 +0000
> maya%NetBSD.org@localhost wrote:
> 
> > 162 1 node CALL mmap(0x35140000,0x7f000,PROT_NONE,0x1042<PRIVATE,NORESERVE,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0)
> > 162 1 node RET mmap -1 errno 12 Cannot allocate memory
> > 162 1 node CALL mmap(0x35140000,0x7f000,PROT_NONE,0x1042<PRIVATE,NORESERVE,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0)
> > 162 1 node RET mmap -1 errno 12 Cannot allocate memory
> 
> There's no obvious reason why the kernel would ENOMEM for such a small
> allocation. It is interesting that it does two consecutive failing calls
> to mmap with the same hint address. Possibly race condition in the mmap
> syscall?
> 
> -Tobias
mlelstv provided this smaller test case.
Sorry, I ended up making it into a bug report and did not update the
thread.
He says mmapping a mapped address fails on aarch64 but not amd64.
#include <stdio.h>
#include <err.h>
#include <sys/mman.h>
int main()
{
 void *p;
 p = (void *) mmap;
 p = mmap(p,0x7f000,PROT_NONE,MAP_PRIVATE | MAP_NORESERVE | MAP_ANONYMOUS, 0xffffffff, 0);
 if (p == MAP_FAILED)
 err(1,"mmap");
 printf("mmap = %p\n", p);
 return 0;
}


Home | Main Index | Thread Index | Old Index

AltStyle によって変換されたページ (->オリジナル) /