From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/288 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Simple testing task - string functions Date: Thu, 14 Apr 2011 19:11:40 -0400 Message-ID: <20110414231140.GO13185@brightrain.aerifal.cx> References: <20110410044515.GB13185@brightrain.aerifal.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1312595705 11461 80.91.229.12 (6 Aug 2011 01:55:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2011 01:55:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: envelope-from@hidden Fri Apr 15 03:16:41 2011 Content-Disposition: inline In-Reply-To: <4DA73605.9080107@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:288 Archived-At: On Thu, Apr 14, 2011 at 07:59:33PM +0200, Luka Marčetić wrote: > Hello again. > Attached is the solution to the task. The program seems to preform > as expected, but may still need double-checking. > The tests therein fail where expected when linked with various old > versions of musl. Note that although the program is designed to > allow tests to fail gracefully as suggested, this does not happen > due to bugs in function implementations in said old versions that > the program depends on. Rich and Chris have confirmed a bug in 0.7.6 > that causes a segfault in the siglongjmp (longjmp to be exact). I'm > still waiting for confirmation of inability of version 0.7.5 to > dispose the same signal to a specified handler properly. Here's an idea for avoiding the sigsetjmp/siglongjmp bug: just use setjmp/longjmp, and use sigaction with SA_NODEFER to install the signal handler. Actually sigaction should always be used to install signal handlers, since signal is under-specified and you can't be sure how it will behave. Rich