Re: SecurityManager troubles

2006-01-16 Thread Gary Benson
Archie Cobbs wrote: Gary Benson wrote: + try + { + Class.forName(java.security.Security); + } + catch (Throwable t) + { + } It might be more appropriate to only catch Exception, not Throwable. So I was halfway through thinking about this when I forgot

Re: SecurityManager troubles

2006-01-16 Thread Archie Cobbs
Gary Benson wrote: + catch (Throwable t) + { + } It might be more appropriate to only catch Exception, not Throwable. So I was halfway through thinking about this when I forgot and committed it :( Why Exception as opposed to Throwable? My reasoning was that the code was added to

RE: SecurityManager troubles

2006-01-16 Thread Jeroen Frijters
Gary Benson wrote: Archie Cobbs wrote: Gary Benson wrote: + try + { + Class.forName(java.security.Security); + } + catch (Throwable t) + { + } It might be more appropriate to only catch Exception, not Throwable. So I was halfway through

RE: SecurityManager troubles

2006-01-14 Thread Jeroen Frijters
Gary Benson wrote: Gary Benson wrote: Jeroen Frijters wrote: I think I figured it out. With the attached test I could reproduce the problem on IKVM as well. The attach Classpath patch fixing things, although past 0.20 I think we should refactor the security properties like I did

RE: SecurityManager troubles (and the release)

2006-01-13 Thread Mark Wielaard
On Fri, 2006-01-13 at 08:48 +0100, Mark Wielaard wrote: Maybe we can again special case that security check by doing a this.getClass().getClassLoader() == null? Hmmm, no, that doesn't work since getClassLoader() will trigger a security check. Nasty... I see you solved this by just doing an

Re: SecurityManager troubles

2006-01-13 Thread Gary Benson
Guilhem Lavaux wrote: Gary Benson wrote: FWIW I was able to push IBM's JRE into an infinite loop with this test, so it would appear to be vulnerable to the same class of problems even if not this actual problem. BTW, Gary your test triggers a really nasty VerifyError in kaffe so maybe

Re: SecurityManager troubles

2006-01-13 Thread Christian Thalinger
On Thu, 2006-01-12 at 14:15 +, Gary Benson wrote: FWIW I was able to push IBM's JRE into an infinite loop with this test, so it would appear to be vulnerable to the same class of problems even if not this actual problem. Another test which completely kicks us out. Actually it's an stack

Re: SecurityManager troubles

2006-01-13 Thread Gary Benson
Jeroen Frijters wrote: I think I figured it out. With the attached test I could reproduce the problem on IKVM as well. The attach Classpath patch fixing things, although past 0.20 I think we should refactor the security properties like I did with the system properties (i.e. introduce a

Re: SecurityManager troubles

2006-01-13 Thread Gary Benson
Gary Benson wrote: Jeroen Frijters wrote: I think I figured it out. With the attached test I could reproduce the problem on IKVM as well. The attach Classpath patch fixing things, although past 0.20 I think we should refactor the security properties like I did with the system properties

Re: SecurityManager troubles

2006-01-13 Thread Archie Cobbs
Mark Wielaard wrote: Maybe we can again special case that security check by doing a this.getClass().getClassLoader() == null? Hmmm, no, that doesn't work since getClassLoader() will trigger a security check. Nasty... That's what VMStackWalker.getClassLoader() is for... you could use it.

RE: SecurityManager troubles

2006-01-13 Thread Jeroen Frijters
Archie Cobbs wrote: Mark Wielaard wrote: Maybe we can again special case that security check by doing a this.getClass().getClassLoader() == null? Hmmm, no, that doesn't work since getClassLoader() will trigger a security check. Nasty... That's what VMStackWalker.getClassLoader() is

Re: SecurityManager troubles

2006-01-13 Thread Guilhem Lavaux
Gary Benson wrote: Guilhem Lavaux wrote: Gary Benson wrote: FWIW I was able to push IBM's JRE into an infinite loop with this test, so it would appear to be vulnerable to the same class of problems even if not this actual problem. BTW, Gary your test triggers a really nasty VerifyError in

Re: SecurityManager troubles

2006-01-13 Thread Archie Cobbs
Gary Benson wrote: Gary Benson wrote: Jeroen Frijters wrote: I think I figured it out. With the attached test I could reproduce the problem on IKVM as well. The attach Classpath patch fixing things, although past 0.20 I think we should refactor the security properties like I did with the

Re: SecurityManager troubles

2006-01-13 Thread Dalibor Topic
Guilhem Lavaux wrote: Gary Benson wrote: Guilhem Lavaux wrote: Gary Benson wrote: FWIW I was able to push IBM's JRE into an infinite loop with this test, so it would appear to be vulnerable to the same class of problems even if not this actual problem. BTW, Gary your test triggers a

Re: SecurityManager troubles

2006-01-13 Thread S. Meslin-Weber
On Sat, Jan 14, 2006 at 12:16:48AM +0100, Dalibor Topic wrote: I have found what was causing the VerifyError in kaffe. I have fixed it and now it passes your test successfully with the help of latest patches from Jeroen. Thanks to you all ! Wow, that was awesome to watch ... GNU

RE: SecurityManager troubles

2006-01-12 Thread Mark Wielaard
Hi Jeroen, On Fri, 2006-01-13 at 07:54 +0100, Jeroen Frijters wrote: I think I figured it out. With the attached test I could reproduce the problem on IKVM as well. The attach Classpath patch fixing things, although past 0.20 I think we should refactor the security properties like I did with

Re: SecurityManager troubles

2006-01-11 Thread Gary Benson
Guilhem Lavaux wrote: I have stumbled across a bug probably shared by all VMs using GNU Classpath. In Apache Ant a SecurityManager is installed to be able to execute java application without forking the VM. Thanks to the SM exiting a VM is forbidden and so ant is protected from the

RE: SecurityManager troubles

2006-01-11 Thread Christian Thalinger
On Wed, 2006-01-11 at 08:45 +0100, Jeroen Frijters wrote: After fixing some IKVM specific bugs, I was able to run the testcase succesfully with only the attached GNU Classpath fix. Can you please see if this patch improves things for you as well? No, same StackOverFlow with jamvm or cacao.

RE: SecurityManager troubles

2006-01-11 Thread Jeroen Frijters
Gary Benson wrote: Guilhem Lavaux wrote: 3) One solution of the problem is to load some core classes. But it will appear quite soon that some other classes may also be loaded for really wicked applications. It is a limitative solution and I would not support it. Yes. Exactly which

RE: SecurityManager troubles

2006-01-11 Thread Mark Wielaard
Hi Jeroen, On Wed, 2006-01-11 at 08:45 +0100, Jeroen Frijters wrote: After fixing some IKVM specific bugs, I was able to run the testcase succesfully with only the attached GNU Classpath fix. That patch is obviously correct. Please do check this in even if other runtimes are still broken :)

Re: SecurityManager troubles

2006-01-11 Thread Guilhem Lavaux
Jeroen Frijters wrote: Gary Benson wrote: Guilhem Lavaux wrote: 3) One solution of the problem is to load some core classes. But it will appear quite soon that some other classes may also be loaded for really wicked applications. It is a limitative solution and I would not support it. Yes.

Re: SecurityManager troubles

2006-01-11 Thread Archie Cobbs
Guilhem Lavaux wrote: I must say that I don't understand this problem. Me neither... I do not think it is strictly linked to the VM. I have produced an artificial stack trace by tweaking kaffe's VM. Normally this stack trace is hidden by the VM and replaced by a NoClassDefFoundError. Here

RE: SecurityManager troubles

2006-01-10 Thread Jeroen Frijters
Guilhem Lavaux wrote: I have stumbled across a bug probably shared by all VMs using GNU Classpath. In Apache Ant a SecurityManager is installed to be able to execute java application without forking the VM. Thanks to the SM exiting a VM is forbidden and so ant is protected from the