From owner-cvs-all@FreeBSD.ORG Wed Oct 25 07:29:22 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEACC16A403; Wed, 25 Oct 2006 07:29:22 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B260F43D4C; Wed, 25 Oct 2006 07:29:22 +0000 (GMT) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k9P7TMlv005322; Wed, 25 Oct 2006 07:29:22 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k9P7TMYi005321; Wed, 25 Oct 2006 07:29:22 GMT (envelope-from bde) Message-Id: <200610250729.k9P7TMYi005321@repoman.freebsd.org> From: Bruce Evans Date: Wed, 25 Oct 2006 07:29:22 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/contrib/gcc function.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Oct 2006 07:29:23 -0000 bde 2006-10-25 07:29:22 UTC FreeBSD src repository Modified files: contrib/gcc function.c Log: Fixed -mprofiler-epilogue. The garbage collector apparently doesn't understand that non-local variables can never be collected, and when it collected the static variable for mexitcount_libfunc, gcc aborted on the next use of this variable. This quick fix is to reinitialize the variable on every use and depend on garbage collection recovering the small amount of memory wasted by this, and not worry by the small amount of time wasted by this. It would be better to initialize the variable together with most of the other libfuncs in optabs.c and depend on whatever magic is there to prevent its collection, but we initialize it here to avoid taking at least 2 more files off the vendor branch. Revision Changes Path 1.23 +3 -1 src/contrib/gcc/function.c