On Tue, Dec 04, 2018, Otto Moerbeek wrote:

> malloc(3) uses mmap without MAP_STACK flag, so you'll end up with memory
> not marked MAP_STACK in both cases.

Thanks for the information.

> Define MALLOC_STACK and add MAP_STACK to the flags,

You mean "undefine MALLOC_STACK", right? I don't see a way (in the
man page) to add MAP_STACK to malloc(2) memory, but I might be
missing something (again).

statethreads works when adding MAP_STACK:

...
#if defined (MAP_STACK)
  mmap_flags |= MAP_STACK;
#endif
  vaddr = mmap(NULL, size, PROT_READ | PROT_WRITE, mmap_flags, zero_fd, 0);


Thanks!

-- 
Address is valid for this mailing list only.

Reply via email to