[Top][All Lists]

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

RE: Implementation details of VMStackWalker

From: Jeroen Frijters
Subject: RE: Implementation details of VMStackWalker
Date: Mon, 25 Jul 2005 12:00:18 +0200

Ingo Prötel wrote:
> I really like the idea of having a stack walker so I would like to use
> it wherever possible. For example in java.util.logging.Logger. If a
> class calls 'logger.warning("some warning")' this call will 
> be forwarded through a couple of calls until it will call
> 'Logger.log(Level level, String message, Throwable thrown)' there the
> stack will be inspected to get the calling class and calling method.

I think that a (potentially) more optimized version of the stack walker API can 
be made for this. I have no problem with that since accuracy in the logging 
isn't that critical (getting it wrong will be annoying but won't create a 
security hole).

> Does this mean the VM must check for every call if it is a call into 
> the gnu.classpath.* package and if so check the classloader 
> of the calling class?

No, this is enforced by the system class loader. Untrusted code cannot even 
load classes from the gnu.classpath package (this isn't yet fully implemented 
yet, but most of the infrastructure is in place).

Only if you replace the GNU Classpath system class loader do you need to worry 
about this.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]