Tuesday, December 04, 2018

Re: statethreads crashes in ld on 6.4

On Tue, Dec 04, 2018 at 03:41:48AM -0800, Claus Assmann wrote:

> 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

Yes of course, you want to call mmap(2) yourself.

> 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;
>

No comments:

Post a Comment