dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: [DotGNU]Hacking - TODOs in the engine.]


From: Rhys Weatherley
Subject: [Fwd: [DotGNU]Hacking - TODOs in the engine.]
Date: Sat, 04 May 2002 10:18:00 +1000

Whoops - forgot to Cc the list.

--- Begin Message --- Subject: Re: [DotGNU]Hacking - TODOs in the engine. Date: Sat, 04 May 2002 09:12:40 +1000
Jonathan P Springer wrote:

> I added dynamic frame array reallocation and command line argument -F to
> allow one to set the frame size.  This because I'm trying to get a
> recursive program to overrun the stack rather than the frame.  Success
> there, but not where I wanted it.

There are two stacks that come into play: the frame stack
and the operation stack.  The frame stack stores information
for returning from methods, and can be dynamically reallocated.
But the operation stack (where pushes and pops occur) cannot.

This is because of managed pointers: it is possible to take the
address of a local variable (using IL's ldloca) and push it onto
the stack as a pointer.  If the stack is reallocated, the local
may be moved in memory, which will cause the pointer to now
point at garbage.

Since the frame stack can reallocate at will, there isn't much
need for an option to set the size.  It would be nice to have an
option to specify the operation stack size though.

> Anyone else in the engine right now?  Should I steer clear?

I'm always in the engine, but which part of it varies from day
to day.  But that isn't necessarily a problem.  Patches are
normally localized, and are unlikely to be localized to exactly
where I am right now.

Cheers,

Rhys.



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]