From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15187 invoked by alias); 6 Oct 2004 09:00:10 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 15106 invoked from network); 6 Oct 2004 09:00:09 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sourceware.org with SMTP; 6 Oct 2004 09:00:09 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i968x93j023593; Wed, 6 Oct 2004 10:59:09 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i968x9qG023591; Wed, 6 Oct 2004 10:59:09 +0200 Date: Wed, 06 Oct 2004 09:00:00 -0000 From: Jakub Jelinek To: Ulrich Drepper , Martin Schwidefsky Cc: Glibc hackers Subject: [PATCH] Fix s390{,x} _JMPBUF_CFA_UNWINDS_ADJ Message-ID: <20041006085908.GI30497@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2004-10/txt/msg00009.txt.bz2 Hi! _Unwind_GetCFA () on s390{,x} returns address 96 (resp. 160) above actual %r15 value, so with the recent stack space saving changes on s390{,x} _JMPBUF_CFA_UNWINDS_ADJ misbehaves. With this patch make check passes fully on s390 again. 2004-10-06 Jakub Jelinek * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h. (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA. --- libc/nptl/sysdeps/s390/jmpbuf-unwind.h 2004-09-02 18:46:00.000000000 -0400 +++ libc/nptl/sysdeps/s390/jmpbuf-unwind.h 2004-10-06 03:43:32.000000000 -0400 @@ -20,13 +20,18 @@ #include #include #include +#include +/* On s390{,x}, CFA is always 96 (resp. 160) bytes above actual + %r15. */ #define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ - _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + _JMPBUF_UNWINDS_ADJ (_jmpbuf, \ + (void *) (_Unwind_GetCFA (_context) \ + - 32 - 2 * __WORDSIZE), _adj) -#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ - ((uintptr_t) (_address) - (_adj) \ +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) \ < (uintptr_t) (_jmpbuf)->__gregs[__JB_GPR15] - (_adj)) -/* We use the normal lobngjmp for unwinding. */ +/* We use the normal longjmp for unwinding. */ #define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) Jakub