Re: OS stopping stack buffer overflow exploits

From: Xuan Baldauf (technik--lkml@exmail.de)
Date: Sun Jun 04 2000 - 12:01:16 EST


Khimenko Victor wrote:

> [...]
> Answer: it's
> stored in trampoline, generated in place where for_each is called from
> draw_table. The same is true for Java compilers as well (it's used
> for local classes - they should be able to access variables of procedure
> where such classes are defined and they should be used in place of normal
> classes as well).

AFAIK, Java forces you to declare method local variables "final" before you can use them in the methods inner class.
This can is be compiled as follows:

for every method local variable copy it at the time of object creation as hidden class variables of the inner class

This works because variables declared "final" cannot be changed once their value is set.

Xuân. :o)

P.S.: This does not necessarily say that trampolines would not work for Java too, maybe they would be faster, but it
would be only possible if the VM can guarantee that the created object will be garbage collectable at the time the
creating method exits, and this case is rather unlikely for most inner classes.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:19 EST