From owner-cvs-all Fri Aug 17 15:54:32 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 C4D6337B403; Fri, 17 Aug 2001 15:54:26 -0700 (PDT) (envelope-from obrien@FreeBSD.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7HMsQl43600; Fri, 17 Aug 2001 15:54:26 -0700 (PDT) (envelope-from obrien) Message-Id: <200108172254.f7HMsQl43600@freefall.freebsd.org> From: "David E. O'Brien" Date: Fri, 17 Aug 2001 15:54:26 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/contrib/gcc.295/config/alpha crtbegin.asm X-FreeBSD-CVS-Branch: HEAD 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:54:26 PDT Modified files: contrib/gcc.295/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 Obtained from: GCC 3.0 Revision Changes Path 1.2 +89 -4 src/contrib/gcc.295/config/alpha/crtbegin.asm To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message