I think the error is caused by the intern() function in String.java.
This is implemented in native code. I bet it somehow messes up.
On Mar 25, 9:34 pm, "danwi...@[EMAIL PROTECTED]
" <danwi...@[EMAIL PROTECTED]
> wrote:
> 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 -- Hide quoted text -
>
> - Show quoted text -


|