From owner-cvs-all Fri Aug 17 15:51:53 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 67D4A37B407; Fri, 17 Aug 2001 15:51:43 -0700 (PDT) (envelope-from obrien@FreeBSD.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7HMphi43435; Fri, 17 Aug 2001 15:51:43 -0700 (PDT) (envelope-from obrien) Message-Id: <200108172251.f7HMphi43435@freefall.freebsd.org> From: "David E. O'Brien" Date: Fri, 17 Aug 2001 15:51:43 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/contrib/gcc/config/alpha crtbegin.asm X-FreeBSD-CVS-Branch: RELENG_4 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG obrien 2001/08/17 15:51:43 PDT Modified files: (Branch: RELENG_4) contrib/gcc/config/alpha crtbegin.asm Log: Re-initialize gp after a jsr. When rtld runs the .fini section in a shared lib (C++), the code in question from .../contrib/gdb/config/alpha/crtbegin.asm first calls __do_globals_dtors_aux and then __do_frame_takedown. Unfortunately, the value of gp after a jsr is undefined and in this case had changed from before the call, probably as a result of calling code in some other shared library. The normal calling convention for alpha is to re-initialize gp using 'ldgp gp,0(ra)' after a jsr instruction but in this case no such re-initialization is done. This leads to a bogus value being read for the address of __do_frame_takedown and a quick segfault. Submitted by: dfr Approved by: re Obtained from: GCC 3.0 Revision Changes Path 1.1.1.2.2.1 +1 -0 src/contrib/gcc/config/alpha/crtbegin.asm To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message