VMAccessController suggestion
Marcel Wiesweg <[email protected]> Wed, 25 May 2005 19:38:15 +0200
| Newsgroups | gmane.comp.java.vm.sablevm.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi. You probably know that currently java.security.VMAccessController.getStack() is unimplemented in SableVM, and this effectively disables any use of the java.security.AccessController+Permission based security framework (took me quite long to find that out). I only found an old IRC log on that topic, which did not seem to have any result. getStack() needs an array of the Class objects on the stack, and an array of String objects with the names of the functions. Currently there is Java_gnu_classpath_VMStackWalker_fillContext which provides an array of classes (used by SecurityManager.getClassContext), and Java_java_lang_Throwable_nativeGetStackTraceList which provides a String list of some sort, but does _a lot_ more things (files, line numbers). Am I missing something when I say that the VMStackWalker implementation can be used to obtain the Classes array for VMAccessController.getStack()? If that is possible, I would suggest to add a native function like fillMethodNames to VMStackWalker (or move both to some other class? I would not, depends on your taste), which is as lightweight as fillContext, to obtain the method names, and use both in VMAccessController.getStack(). Marcel