[LTP] [PATCH v3 2/3] lib: rename ltp_clone_malloc to ltp_clone_alloc

Cyril Hrubis chrubis@suse.cz
Fri Jun 14 17:24:28 CEST 2019


Hi!
> > Well, we can free the memory in ltp_clone_alloc() if the child runs in a
> > separate memory space, but if CLONE_VM was passed in flags there is no
> > way how to free the memory...
> >
> 
> A stupid way come up to my mind is just to export the stack as global
> pointer and releasing in do_cleanup() if possible.

This only works if you call the function only once, if you clone two or
more you end up in the very same situation as before.

Also we will have to figure out similar problem as a part of
https://github.com/linux-test-project/ltp/issues/531 anyways, so I
wouldn't bother at this point.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list