]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
posix_spawn: fix for some custom allocator setups
authorkevans <kevans@FreeBSD.org>
Fri, 12 Jun 2020 18:13:32 +0000 (18:13 +0000)
committerkevans <kevans@FreeBSD.org>
Fri, 12 Jun 2020 18:13:32 +0000 (18:13 +0000)
commit11f9e29b36761a90e4ea52e5afb57e0e634f9672
treeab8154efd0da7993c278a9f16cb24f0067427d9b
parent3befce834a140d7ab58556c72ffd3585b9b480d2
posix_spawn: fix for some custom allocator setups

libc cannot assume that aligned_alloc and free come from jemalloc, or that
any application providing its own malloc and free is actually providing
aligned_alloc.

Switch back to malloc and just make sure we're passing a properly aligned
stack into rfork_thread, as an application perhaps can't reasonably replace
just malloc or just free without headaches.

This unbreaks ksh93 after r361996, which provides malloc/free but no
aligned_alloc.

Reported by: freqlabs
Diagnosed by: Andrew Gierth <andrew_tao173.riddles.org.uk>
X-MFC-With: r361996
lib/libc/gen/posix_spawn.c