Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Machine > Re: modifying j...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 9 Topic 764 of 816
Post > Topic >>

Re: modifying java.lang.String.java

by "danwichs@[EMAIL PROTECTED] " <danwichs@[EMAIL PROTECTED] > Mar 25, 2007 at 06:34 PM

Thanks. I suspect you are right. I just wish that I knew exactly what
the problem is. Unfortunatley since the error happens as the JVM is
loading, I cannot attach a debugger.

It is strange that adding "private final boolean tainted[] = new
boolean[5];"

causes a crash bud adding:

"private final boolean tainted=false;" works fine.



If anyone knows more about the internals of how the JVM makes strings
out of string literals I would appreciate a lesson.



On Mar 25, 9:21 pm, "Ralf Ullrich" <n...@[EMAIL PROTECTED]
> wrote:
> danwi...@[EMAIL PROTECTED]
 wrote:
> >On Mar 25, 7:06 pm, "Ralf Ullrich" <n...@[EMAIL PROTECTED]
> wrote:
> >>danwi...@[EMAIL PROTECTED]
 wrote:
> >>>  I'm trying to modify java.lang.String.java and add the modified
> >>>String.class to
> >>>rt.jar [THIS IS FOR MYSELF ONLY AND WILL NOT BE DEPLOYED].
>
> >>Try running the VM with
>
> >>    -Xshare:off
>
> >>If this works re-create the shared archives
> >>(JAVA_HOME/bin/(client|server)/cl*****.jsa).
>
> >>HTH
>
> >>cu
>
> >That still does not work. I get the same error.
>
> Well, the offending code seems to be this line in java.lang.Thread:
>
>    private static final RuntimePermission
>        SUBCLASS_IMPLEMENTATION_PERMISSION =
>            new RuntimePermission("enableContextClassLoaderOverride");
>
> where "new RuntimePermission(...)" results in your observed error if the
> supplied string returns 0 for length().
>
> So I would assume, that after you modified java.lang.String the magic
> trickery within the VM that creates String objects from String literals
in
> class files is broken with regard to your modified String class.
>
> I'd try to look there for the problem.
>
> Sorry, that I cannot be of more help.
>
> cu- Hide quoted text -
>
> - Show quoted text -
 




 9 Posts in Topic:
modifying java.lang.String.java
"danwichs@[EMAIL PRO  2007-03-25 15:00:27 
Re: modifying java.lang.String.java
"Ralf Ullrich"   2007-03-25 23:06:17 
Re: modifying java.lang.String.java
"danwichs@[EMAIL PRO  2007-03-25 17:58:40 
Re: modifying java.lang.String.java
"Ralf Ullrich"   2007-03-26 01:21:15 
Re: modifying java.lang.String.java
"danwichs@[EMAIL PRO  2007-03-25 18:34:14 
Re: modifying java.lang.String.java
"danwichs@[EMAIL PRO  2007-03-25 19:10:28 
Re: modifying java.lang.String.java
Tom Hawtin <usenet@[EM  2007-03-26 09:30:37 
Re: modifying java.lang.String.java
Moritz Hammer <newsgro  2007-03-26 11:43:56 
Re: modifying java.lang.String.java
"danwichs@[EMAIL PRO  2007-03-26 06:49:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 17:38:42 CDT 2008.