classpath
[Top][All Lists]
Advanced

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

Re: Security manager problem


From: Gary Benson
Subject: Re: Security manager problem
Date: Mon, 12 Dec 2005 17:55:54 +0000

Gary Benson wrote:
> Robert Lougher wrote:
> > Do you have a testcase?
> 
> If you build and run the attached testcase you ought to see only one
> checkPermission() between "Calling checkRead()" and "Done". ... In
> reality, JamVM chokes on it pretty hard.  I _think_ what is
> happening is that the System.out.println in checkPermission() is
> itself doing some initialisation which causes security checks,
> causing an infinite loop.

The initialisation in question turns out to be:

 1. Loading java.lang.StringBuffer to build the message.
 2. Loading java.io.PrintStream to print it out.
 3. Converting the message to bytes using String.getBytes(encoding).

Any one of them will trigger a security check and hence an infinite
loop.  There's an awful lot I still don't undertstand here, but I'm
a step closer...  MaƱana.

In case anyone's interested I've attached a patched testcase and a
patch for classpath which together work on JamVM.

Cheers,
Gary

Attachment: Test.java
Description: Text document

Attachment: getBytes.patch
Description: Text document


reply via email to

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