4 ms·
> in jdk classes [...] there are a number of security sensitive methods that rely on counting stack frames between jdk library code and calling code to figur
by cryptonector 7y ago
> in jdk classes [...] there are a number of security sensitive methods that rely on counting stack frames between jdk library code and calling code to figure out who's calling them.
That's... lame. BTW, tail code elimination could keep a count of tail calls for this. It wouldn't work so well for mutual recursion, but maybe that would suffice. In any case, nothing should be so dependent on stack traces!
- saagarjha 7y agoJava's security manager model is fairly lame in general.
- cryptonector 7y agoYes. And JAAS won't die even though applets did.
- abecedarius 7y agoHow to do it for mutual recursion is sketched in my other comment. Java's stack inspection doesn't inherently require counting stack frames -- it's a choice. I agree it's a bad model anyway.