[ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488867
]
Alexey Varlamov commented on HARMONY-3575:
------------------------------------------
Vera, as you did not report any progress, I tried to investigate these puzzles myself.
Using CAFEBABE classfile browser [1], I see DRLVM correctly reports about real defects. So
why RI accepts these files but rejects the synthetic test classes? The answer appeared in
different classfile versions:
PyObject - 45.3
PydevPlugin - 48.0
locVar - 49.0
Indeed, after changing version of locVar to 48.0, RI accepted it fine! I looked at JVMS v1
(which documents v45.3) and it does not require any checks for LocalVariableTable content.
Also, passing -noverify makes RI ignoring duplicate vars.
So the fix should be in making these validations conditional.
BTW, I noticed DRLVM gives misguiding message in case of truncated classfile, like " could
not parse bla-bla-bla", while RI plainly says "Truncated file". Really, this is widely used
pattern in Class_File_Loader.cpp, like
if(!cfs.parse(&value)) {
REPORT_FAILED_CLASS("could not parse bla-bla value");
return false;
}
for each and every entity. Quite verbose and not really useful, we need to refactor this.
[1] http://switch.dl.sourceforge.net/sourceforge/cafebabe/cafebabe-main-1.4-bin.zip
> [drlvm][eclipse] One class in Pydev fails classloading
> ------------------------------------------------------
>
> Key: HARMONY-3575
> URL: https://issues.apache.org/jira/browse/HARMONY-3575
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, DRLVM
> Environment: linux x86_64
> Reporter: Santiago Gala
> Assigned To: Alexey Varlamov
> Attachments: clf.patch, local_var_table.ZIP, local_variable_table.patch, lvt_20070406.patch,
PydevPlugin.class, pydevplugin.txt, PyObject.class
>
>
> I was getting a problem with PyDev in eclipse, until I found the error in the log:
> Root exception:
> java.lang.ClassFormatError: org/python/pydev/plugin/PydevPlugin : Element: 0x413b1bb0
from LocalVariableTypeTable doesn't coincide with element from LocalVariableTable for method
createEditorInput(Lorg/eclipse/core/runtime/IPath;Z)Lorg/eclipse/ui/IEditorInput;
> at java.lang.ClassLoader.defineClass0(ClassLoader.java)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:417)
> at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:161)
> Removing the check under
> // See specification 4.8.12 second paragraph.
> in Class_File_Loader.cpp makes it load, though I'm not sure it is the proper solution.
> I'll attach the output of javap -v
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|