Message-Id: <200508160231.j7G2VVAG020266@delorie.com> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Gary R. Van Sickle" To: Subject: RE: Cygwin.dll crash, alloca and custom stack Date: Mon, 15 Aug 2005 21:31:12 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <602EF4562299D711978800065BEECE9A0D2D30D4@cbrml50.ag.gov.au> X-IsSubscribed: yes [snip a lot of jibba-jabba] > >And, I assume that there will be no recursion in your > program? Because > >if > there > >is you're guaranteed heap corruption. > > No, each function call has its own scheme environment and > therefore its own stack. So on a recursive call a new > environment is allocated and thus a new stack is allocated. > Of course, most scheme recursion is tail calls and that will > be implemented with longjmp, thus re-using the same stack. By > allocating my own stacks I can longjmp down the stack > (conceptually), which is normally a no-no, but I've shown to > work fine if you allocate your own chain of stacks that are > not garbage collected till they have no references. Is there going to be any part of this interpreter that isn't a "no-no"? You're going to longjmp() around all your crazy malloc'd stacks? Seriously Chris, how is it that you can come up with all these wild... Schemes... and yet you can't just admit you've taken a wrong turn at Albequerque and do things in a sane way? Whatever, I'm with Faylor. Good luck, and good night nurse. -- Gary R. Van Sickle -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/