]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
posix_spawn: fix for some custom allocator setups
authorKyle Evans <kevans@FreeBSD.org>
Fri, 12 Jun 2020 18:13:32 +0000 (18:13 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Fri, 12 Jun 2020 18:13:32 +0000 (18:13 +0000)
commitebff66b3c3314b29a295f6ea6276e74cec47c841
treeab8154efd0da7993c278a9f16cb24f0067427d9b
parent13dca1937fd7407b09c71ac76f223afa24dab91d
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