From owner-freebsd-stable@FreeBSD.ORG Tue Nov 24 15:35:28 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92B39106568F; Tue, 24 Nov 2009 15:35:28 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from asuka.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) by mx1.freebsd.org (Postfix) with ESMTP id 1C42B8FC28; Tue, 24 Nov 2009 15:35:27 +0000 (UTC) Received: from yuga.mahoroba.org (ume@yuga-m.mahoroba.org [IPv6:2001:2f0:104:801c:21b:d3ff:fe38:5381]) (user=ume mech=CRAM-MD5 bits=0) by asuka.mahoroba.org (8.14.3/8.14.3) with ESMTP/inet6 id nAOFZCmb045295 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 25 Nov 2009 00:35:20 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Wed, 25 Nov 2009 00:35:05 +0900 Message-ID: From: Hajimu UMEMOTO To: Mikolaj Golub In-Reply-To: <8663907xyy.fsf@zhuzha.ua1> References: <86aayc7z4g.fsf@zhuzha.ua1> <8663907xyy.fsf@zhuzha.ua1> User-Agent: xcite1.58> Wanderlust/2.15.7 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.7 Emacs/23.1 (i386-portbld-freebsd8.0) MULE/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 8.0-RELEASE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (asuka.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Wed, 25 Nov 2009 00:35:21 +0900 (JST) X-Virus-Scanned: clamav-milter 0.95.3 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on asuka.mahoroba.org Cc: FreeBSD Stable Subject: Re: pthread.h: typo in #define pthread_cleanup_push/pthread_cleanup_pop X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 15:35:28 -0000 Hi, >>>>> On Tue, 24 Nov 2009 17:18:29 +0200 >>>>> Mikolaj Golub said: to.my.trociny> I was hurry when said that the patch fixed the problem. The application to.my.trociny> compiled but later it crashed in pthread_cleanup_pop: to.my.trociny> (gdb) bt to.my.trociny> #0 0xbf4f9ee0 in ?? () to.my.trociny> #1 0x287d18c9 in __pthread_cleanup_pop_imp () from /lib/libthr.so.3 to.my.trociny> #2 0x287d18ed in pthread_cleanup_pop () from /lib/libthr.so.3 to.my.trociny> #3 0x287d123c in pthread_exit () from /lib/libthr.so.3 to.my.trociny> #4 0x287c7757 in pthread_getprio () from /lib/libthr.so.3 to.my.trociny> #5 0x00000000 in ?? () to.my.trociny> So, I don't know what these macros actually were supposed to be. They were to.my.trociny> introduced in r179662: Your modification to pthread.h is wrong. You need to write your code something like following: pthread_cleanup_push(); . . . do something . . . pthread_cleanup_pop(); This is not FreeBSD alone. pthread_cleanup_push() and pthread_cleanup_pop() are macro on Linux as well. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/