From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18276 invoked by alias); 13 Jul 2009 21:27:28 -0000 Received: (qmail 18266 invoked by uid 22791); 13 Jul 2009 21:27:27 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail153.messagelabs.com (HELO mail153.messagelabs.com) (216.82.253.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Jul 2009 21:27:21 +0000 X-VirusChecked: Checked X-Env-Sender: yuan-bo.ye@motorola.com X-Msg-Ref: server-15.tower-153.messagelabs.com!1247520438!9792194!1 X-StarScan-Version: 6.0.0; banners=-,-,- Received: (qmail 16630 invoked from network); 13 Jul 2009 21:27:18 -0000 Received: from motgate3.mot.com (HELO motgate3.mot.com) (136.182.1.13) by server-15.tower-153.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 13 Jul 2009 21:27:18 -0000 Received: from il27exr03.cig.mot.com (il27exr03.mot.com [10.17.196.72]) by motgate3.mot.com (8.14.3/8.14.3) with ESMTP id n6DLRCJU024679 for ; Mon, 13 Jul 2009 14:27:12 -0700 (MST) Received: from il27vts03 (il27vts03.cig.mot.com [10.17.196.87]) by il27exr03.cig.mot.com (8.13.1/Vontu) with SMTP id n6DLRCif003276 for ; Mon, 13 Jul 2009 16:27:12 -0500 (CDT) Received: from zmy16exm62.ds.mot.com (zmy16exm62.ap.mot.com [10.179.4.33]) by il27exr03.cig.mot.com (8.13.1/8.13.0) with ESMTP id n6DLRBSS003236 for ; Mon, 13 Jul 2009 16:27:11 -0500 (CDT) Received: from 10.22.61.161 ([10.22.61.161]) by zmy16exm62.ds.mot.com ([10.179.4.33]) via Exchange Front-End Server zmy16exf63.ds.mot.com ([10.179.4.22]) with Microsoft Exchange Server HTTP-DAV ; Mon, 13 Jul 2009 21:26:49 +0000 Received: from debian-nb by zmy16exf63.ds.mot.com; 13 Jul 2009 16:26:48 -0500 Subject: Re: how to use expand_builtin_alloca From: Janboe Ye To: Ian Lance Taylor Cc: gcc@gcc.gnu.org, janboe.ye@gmail.com In-Reply-To: References: <1247519293.4414.16.camel@debian-nb> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 13 Jul 2009 21:27:00 -0000 Message-Id: <1247520408.4414.20.camel@debian-nb> Mime-Version: 1.0 X-CFilter-Loop: Reflected Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg00224.txt.bz2 Hi Ian Thanks for reply. Is it possible to override alloc to do the same thing as expand_buitlin_alloca in application codes? On Mon, 2009-07-13 at 14:17 -0700, Ian Lance Taylor wrote: > Janboe Ye writes: > > > normally gcc will use expand_builtin_alloca to handle variable array. > > But mudflap will force this function to return immediately to invoke > > alloca explicit. > > > > Is there some way to still use expand_builtin_alloca without changing > > gcc source code? > > mudflap can't check accesses to memory allocated using alloca unless it > overrides __builtin_alloca. So if I understand your question correctly, > the answer is no. Although, of course, you could simply not use mudflap > for the code in question. > > Ian