Date: Tue, 03 Feb 2009 14:45:44 +0800 From: David Xu <davidxu@freebsd.org> To: freebsd-threads@freebsd.org Subject: pthread_exit() and stack unwinding, do you need it ? Message-ID: <4987E818.9010309@freebsd.org>
next in thread | raw e-mail | index | archive | help
Hi, This patch had been done in free time when I found nothing to do, it is used for unwinding stack before thread really exits. patch: http://people.freebsd.org/~davidxu/patch/unwind.patch test cases: http://people.freebsd.org/~davidxu/patch/unwind_test.tgz The feature implemented here is that C++ and other languages need to destruct on-stack objects, the current pthread_exit() does not know the knowledge and when thread exits, they may cause resource leaks not freed by their objects. This patch has not been tested for enough long time, I am also not a such binary-level expert, I will be glad to see experts come in and continue the work, as other OSes have already implemented this feature. However, I see this as an enhanced feature, and it is not a must-have feature. It is left to people to determine whether we need it or not. Regards, David Xu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4987E818.9010309>