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

Re: setjmp and friends




"Andre E. Bar'yudin" wrote:

> I've already seen this thing many times.  Below there's an example of my
> intentions:
> 
> An example, working on BSDI:
> /* somewhere in the code */
> jmp_buf jbuf[2];
> 
> /* later in the code: */
> 
>   setjmp(jbuf[0]);
>   jbuf[0]->jb_esp = (unsigned) &stack1[1008];
>   jbuf[0]->jb_eip = (unsigned) f;
>   jbuf[0]->jb_mask = 0;
> 
> /* end example */
> 
> I want to do the same thing on Linux.  I guess that the __jmpbuf field
> is the place for the state etc., but how do I actually access its
> components?

     jbuf[0]->__jmpbuf[JB_SP] = (unsigned) &stack1[1008]; ?

     The JB_* are defined on jmp_buf.h.
     Please don't take this as any sure-fire solution. Just a quick
idea.
     Btw, Andre, the message you quoted was sent to YOU personally, not
to the list. Please pay attention to this sort of thing in the future.

--izar 
-- 
izar@bindview.com - Bindview Corporation
Security Engineer - HackerShield

=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il