From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18831 invoked by alias); 3 Apr 2006 10:59:29 -0000 Received: (qmail 18815 invoked by uid 22791); 3 Apr 2006 10:59:29 -0000 X-Spam-Check-By: sourceware.org Received: from ns.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 03 Apr 2006 10:59:28 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id F19EEEB80 for ; Mon, 3 Apr 2006 12:59:24 +0200 (CEST) From: Andreas Schwab To: libc-hacker@sourceware.org Subject: Avoid wrong unwind info in clone child X-Yow: Yow! Now we can become alcoholics! Date: Mon, 03 Apr 2006 10:59:00 -0000 Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00000.txt.bz2 The unwind info attached to the clone function is usually wrong for the child. This changes the ppc(64) implementation to terminate the FDE before the syscall, similar to the i386 implementation. Andreas. 2006-04-03 Andreas Schwab * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Terminate FDE before syscall. * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise. --- sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S.~1.7.~ 2006-01-11 10:24:55.000000000 +0100 +++ sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S 2006-03-26 20:35:33.000000000 +0200 @@ -84,6 +84,10 @@ ENTRY (BP_SYM (__clone)) mr r6,r8 mr r7,r9 + /* End FDE now, because in the child the unwind info will be + wrong. */ + cfi_endproc + /* Do the call. */ DO_CALL(SYS_ify(clone)) @@ -138,6 +142,8 @@ L(parent): L(badargs): li r3,EINVAL b __syscall_error@local + + cfi_startproc END (BP_SYM (__clone)) weak_alias (BP_SYM (__clone), BP_SYM (clone)) --- sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S.~1.10.~ 2006-03-17 11:37:26.000000000 +0100 +++ sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S 2006-03-31 15:45:48.000000000 +0200 @@ -81,6 +81,10 @@ ENTRY (BP_SYM (__clone)) mr r6,r8 mr r7,r9 + /* End FDE now, because in the child the unwind info will be + wrong. */ + cfi_endproc + /* Do the call. */ DO_CALL(SYS_ify(clone)) @@ -132,6 +136,8 @@ L(parent): L(badargs): li r3,EINVAL b JUMPTARGET(__syscall_error) + + cfi_startproc END (BP_SYM (__clone)) weak_alias (BP_SYM (__clone), BP_SYM (clone)) -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."