From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6520 invoked by alias); 9 Apr 2002 21:05:10 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6513 invoked from network); 9 Apr 2002 21:05:08 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 9 Apr 2002 21:05:08 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 16v2nQ-0003kP-00; Tue, 09 Apr 2002 17:04:56 -0400 Date: Tue, 09 Apr 2002 14:05:00 -0000 From: Daniel Jacobowitz To: Don Howard Cc: Andreas Schwab , Michael Snyder , Hilfinger@cs.berkeley.edu, gdb-patches@sources.redhat.com Subject: Re: [RFA] Avoid recursivly defined user functions. Message-ID: <20020409170456.A14389@nevyn.them.org> Mail-Followup-To: Don Howard , Andreas Schwab , Michael Snyder , Hilfinger@cs.berkeley.edu, gdb-patches@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i X-SW-Source: 2002-04/txt/msg00374.txt.bz2 On Tue, Apr 09, 2002 at 02:01:13PM -0700, Don Howard wrote: > I think I can detect mutual recursion by walking through the body of each > user-defined command (recursivly). This amounts to static recursion > detection. > > I think I could track simple recursion depth at runtime. > > I don't see how to track mutual recursion depth at runtime. Maybe do the > static recursion detection and recursivly flag user-defined commands in > the body? How about something even simpler - track user command depth at runtime? Set an absurd limit, like 1024 deep, if we can handle that in a normal-sized stack limit. Then complain if we hit it at runtime. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer