From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11792 Path: news.gmane.org!.POSTED!not-for-mail From: Bobby Bingham Newsgroups: gmane.linux.lib.musl.general Subject: Re: possible bug in setjmp implementation for ppc64 Date: Wed, 2 Aug 2017 19:19:44 -0500 Message-ID: <20170803001944.GC5455@dora.lan> References: <20170801051042.GA14914@dora.lan> <20170801224533.GD1627@brightrain.aerifal.cx> <20170801230759.GF1627@brightrain.aerifal.cx> <20170802002845.GA21256@dora.lan> <20170802035556.GG1627@brightrain.aerifal.cx> <20170802043155.GA5455@dora.lan> <20170802045816.GH1627@brightrain.aerifal.cx> <20170802133825.GB5455@dora.lan> <20170802144612.GI1627@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: blaine.gmane.org 1501719605 11150 195.159.176.226 (3 Aug 2017 00:20:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 3 Aug 2017 00:20:05 +0000 (UTC) User-Agent: Mutt/1.8.3 (2017-05-23) To: musl@lists.openwall.com Original-X-From: musl-return-11805-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 03 02:20:02 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dd3rn-0002MW-6C for gllmg-musl@m.gmane.org; Thu, 03 Aug 2017 02:19:55 +0200 Original-Received: (qmail 21937 invoked by uid 550); 3 Aug 2017 00:19:58 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 21916 invoked from network); 3 Aug 2017 00:19:58 -0000 Content-Disposition: inline In-Reply-To: <20170802144612.GI1627@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:11792 Archived-At: On Wed, Aug 02, 2017 at 10:46:12AM -0400, Rich Felker wrote: > On Wed, Aug 02, 2017 at 08:38:25AM -0500, Bobby Bingham wrote: > Whether the call to longjmp/siglongjmp was local or not is irrelevant. > It's only whether the original call to setjmp/sigsetjmp was local or > not that's relevant. And in either case I'm pretty sure it suffices to I think I was treating whether longjmp is called locally as a proxy for whether setjmp was called locally. But of course that doesn't work. I think we're on the same page now. > restore the saved value to both *(r1+24) and r2. Per the ABI, *(r1+24) > can't be used for any purpose except saving the TOC, so upon return > from setjmp, the caller's only options are to treat the value at > *(r1+24) as indeterminate or assume it contains the TOC pointer. > Likewise for r2, if the call was non-local, r2 is call-clobbered so it > doesn't matter what it contains after return, and if the call was > local, r2 is expected to contain the caller's TOC pointer. > > Rich