Ensuring good plugin behavior

Eric Scharff scharffe at cs.colorado.edu
Thu Jul 24 22:51:15 UTC 2003


I am writing an external plugin that takes two arguments, does 
something to them, and returns, so the last line of my C code calls

   interpreterProxy->popthenPush(3, myResult);

Everything works fine.  (This is correct for a 2 arg function, yes?)

Just out of curiosity, I tried popping too few items (2) or too many 
(4), and the code still worked, and Squeak seemed to survive.  This 
disturbs me because I could imagine that stack leakage could be a very 
bad problem.

Is there a way to validate that my code (in either the correct or 
broken form) isn't doing nasty things to the VM?  Can I determine the 
stack depth before and after my code?

-Eric



More information about the Squeak-dev mailing list