fork of 9front i guess
![]() attachimage()'s approach to handling newseg() error is flawed: a) the the image is on the hash table, but ref is still 0, and there is no segment/pages attached to it so nobody is going to reclaim / putimage() it -> leak b) calling pexit() would deadlock us because exec has acquired up->seglock when calling attachimage(), so this would just deadlock. the fix does the following: attachimage() will putimage() and nexterror() if newseg() fails instead of pexit(). this is less surprising. exec now keeps the condition variable commit which is set once we are commited / reached the point of no return and check this variable in the highest waserror() handler and pexit() us there. this way we have released up all the locks and pexit() will cleanup. note: this bug shouldnt us hit in with the current newseg() implementation as it uses smalloc() which would wait to satisfy the allocation instead of erroring. |
||
---|---|---|
386 | ||
68000 | ||
68020 | ||
acme | ||
adm/timezone | ||
alpha | ||
amd64 | ||
arm | ||
lib | ||
mips | ||
power | ||
power64 | ||
rc | ||
sparc | ||
sparc64 | ||
sys | ||
.hgignore |