Re: Stack mangling for anonymous function pointers

2008-10-24 Thread Andrew Pinski
On Fri, Oct 24, 2008 at 2:23 PM, Matt Hauer <[EMAIL PROTECTED]> wrote: > Is there a reliable way to write data to the stack such that a called > function pointer can extract the values it seeks? I suggest you look into libffi which is already used for this purpose for GCJ (inside libgcj). Thanks,

Stack mangling for anonymous function pointers

2008-10-24 Thread Matt Hauer
I'm working on a system where we're jumping from Java into C to pull a function out of a dictionary (indexed by string name) and calling it as a 'long (*)(void *, ...). There's some confusion as to if there is a method to copy a structure or an array onto the stack through the ... arg such that th