]> git.pond.sub.org Git - empserver/commit
Fix LWP's stack initialization for -s
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 14 Feb 2008 22:47:27 +0000 (23:47 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 16 Feb 2008 19:57:38 +0000 (20:57 +0100)
commit5c2f7646e1deabf4b4a95d2b5e60fc24a3cfda20
treee83eeafbd138575093b69680f34e2eb791d7125f
parent40eb78eb74474597b79d05c4a5934ff02fb9e127
Fix LWP's stack initialization for -s

With -s, LWP initializes thread stacks to track stack use.  It did
that after makecontext(), with disastrous results on systems where
makecontext() writes something to the stack that swapcontext() expects
to find there.  Makes FreeBSD 6.2 crash in swapcontext().

Factor stack allocation out of lwpNewContext() into lwpNewStack().
Move call of lwpStackCheckInit() into lwpNewStack().
src/lib/lwp/arch.c
src/lib/lwp/lwp.c
src/lib/lwp/lwpint.h