You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Santiago Gala (JIRA)" <ji...@apache.org> on 2007/04/04 23:11:32 UTC

[jira] Created: (HARMONY-3575) One class in Pydev fails classloading

One class in Pydev fails classloading
-------------------------------------

                 Key: HARMONY-3575
                 URL: https://issues.apache.org/jira/browse/HARMONY-3575
             Project: Harmony
          Issue Type: Bug
         Environment: linux x86_64
            Reporter: Santiago Gala


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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486880 ] 

Santiago Gala commented on HARMONY-3575:
----------------------------------------

the "fix" causes SYSSEGV in the exact place where the report should fail, as the pointer seems to point to nowhere (out of the loop on "i", table[i] is doubtful to have any meaning)

My C/C++ is rusty, but the test+report seems to be needed *inside the loop on i, but outside the loop on j*, if no type matches each variable.


Re: you other question, I have no windows license, and I run amd64 gentoo here in development on a core 2 Duo. I have old ia32 linux machines, but no development setup on them.

The code is plain code that runs with every "decent" JDK, including Sun's and Ibm's (eclipse+pydev+open a project using python)

> [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
>         Attachments: PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487684 ] 

Alexey Varlamov commented on HARMONY-3575:
------------------------------------------

Oh dear, my hands are crooked! Vera, thanks for catching, fixed at r527019, + a slipped leak again ;)

> [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
>
>
> 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.


[jira] Updated: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Santiago Gala updated HARMONY-3575:
-----------------------------------

    Attachment: PyObject.class

org.python.core.PyObject, another class giving a different verification problem here

> [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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488037 ] 

Alexey Varlamov commented on HARMONY-3575:
------------------------------------------

I reproduced the same problems on Win32, so this is platform independent.

> [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.


[jira] Resolved: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov resolved HARMONY-3575.
--------------------------------------

    Resolution: Fixed

Vera, I added "no dups" fix to your patch and committed, please verify.
As a side note, I'm not a big fan of carrying Global_Env via method args, someday this should be refactored, too.

Fixed at r530377.

> [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, lvt_check_new.patch, lvtt_parsing_exclude.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.


[jira] Updated: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Santiago Gala updated HARMONY-3575:
-----------------------------------

    Description: 
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

  was:
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



Another error, maybe related: the printing is after I added the proverbial ->bytes to the FAIL...

java.lang.ClassFormatError: org/python/core/PyObject : Duplicate local variable itmp in attribute LocalVariableTable for method _cmp_unsafe(Lorg/python/core/PyObject;)I

I can attach the jython PyObject class or do whatever tests here, if requested

> [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, lvt_20070406.patch, PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486901 ] 

Santiago Gala commented on HARMONY-3575:
----------------------------------------

possibly, there is a comment on top of the block: 

        // JVM spec hints that LocalVariableTypeTable is meant to be a supplement to LocalVariableTable
        // so we have no reason to cross-check these tables
        // See specification 4.8.12 second paragraph.

so, maybe a warning should be enough.

Commenting out this check makes the difference (once I patched the stack blowing of HARMONY-3547 ) between having eclipse up and running for hours or not.

> [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, PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Commented: (HARMONY-3575) One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486843 ] 

Alexey Varlamov commented on HARMONY-3575:
------------------------------------------

Santiago,
unfortunately the attached log has no content entry for the method createEditorInput(Lorg/eclipse/core/runtime/IPath;Z)Lorg/eclipse/ui/IEditorInput;
Actually there are 3 overloaded static methods createEditorInput() but only 1 is included - smells like a bug in javap... Not to mention that LocalVariableTypeTable is never decoded.

Regarding the error message, apparently there's trivial bug of referencing an internal struct instead of char*, fixed at r525694.
Could you please try to reproduce and see the actual var name? And it would be nice to obtain the method info somehow - maybe try other classfile browser/parser or attach the classfile?

> One class in Pydev fails classloading
> -------------------------------------
>
>                 Key: HARMONY-3575
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3575
>             Project: Harmony
>          Issue Type: Bug
>         Environment: linux x86_64
>            Reporter: Santiago Gala
>         Attachments: pydevplugin.txt
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487537 ] 

Alexey Varlamov commented on HARMONY-3575:
------------------------------------------

Vera, I committed the workaround at r526725. Had to fix still remained leaks so tweaked the patch.

Santiago, the offending PyObject classfile may be interesting to look at, please attach it too.

> [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
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487218 ] 

Alexey Varlamov commented on HARMONY-3575:
------------------------------------------

Vera, thank you for checking! 
Bad news is that in fact RI accepts the attached class without complaints, so we have error somewhere in parsing, too. Tested as:
       try{ 
            String s = "org.python.pydev.plugin.PydevPlugin";
            InputStream is = cl.getResourceAsStream(s.replace('.', File.separatorChar) + ".class");
            byte[] classToBytes = new byte[is.available()];
            is.read(classToBytes);
            is.close();
            System.out.println (cl.defineClass(s, classToBytes, 0, classToBytes.length));
        } catch (Throwable t) {t.printStackTrace();}

Regarding your patch, there are still 2 leaks (1 was fixed in my variant and another one I noticed now):
1) Line 1743: return without freeing both generic_vars and lv_table;
2) Newly added return does not free lv_table.

> [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, lvt_20070406.patch, PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487916 ] 

Santiago Gala commented on HARMONY-3575:
----------------------------------------

java.lang.ClassFormatError: org/python/pydev/editor/PyEdit : Element map of LocalVariableTypeTable does not match any of LocalVariableTable entries for method parserError(Ljava/lang/Throwable;Lorg/eclipse/core/runtime/IAdaptable;Lorg/eclipse/jface/text/IDocument;)V
	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)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:501)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:471)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:334)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:386)

I'm still getting this. Maybe some 64bitness? (not sure if there is a test case I can run, that passes now)

> [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
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487550 ] 

Vera Volynets commented on HARMONY-3575:
----------------------------------------

Alexey, 
could you replace "return true" by "return false" in that part of code
        case ATTR_InnerClasses:
        {
            //See specification 4.8.5 about InnerClasses Attribute
            if (m_declaring_class_index || m_innerclasses) {
                REPORT_FAILED_CLASS_FORMAT(this, "more than one InnerClasses attribute");
                return true;
            }

> [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
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489303 ] 

Alexey Varlamov commented on HARMONY-3575:
------------------------------------------

Vera, I'm afraid the suggested fix is not enough - what if an LVTT entry itself has invalid data, in pre-v49 classfile? Since this attribute is documented for v49 only, I suppose we need to ignore LVTT content altogether. My guess RI does the same, need to check?

Another issue is also not covered - duplicate entries in LVT. I presume we may want to keep that invariant for pre-v49 classes too, then need to check for duplication always and either throw error (v >=49) or silently drop duplicate entry.

> [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, lvt_check_new.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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487231 ] 

Vera Volynets commented on HARMONY-3575:
----------------------------------------

And what was result of t.printStackTrace()?

> [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, lvt_20070406.patch, PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487543 ] 

Vera Volynets commented on HARMONY-3575:
----------------------------------------

Alexey,
There is no need to commit my patch now.
I agree with solution you suggested in workaround.

> [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
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487542 ] 

Vera Volynets commented on HARMONY-3575:
----------------------------------------

Alexey, there is no memory leaks left.
We should free only memory that was allocated with STD_MALLOC funtion.
STD_ALLOCA allocates on stack and ->Alloc( will automaticaly free it.


> [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
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487501 ] 

Alexey Varlamov commented on HARMONY-3575:
------------------------------------------

Vera, sorry if I was not clear:
RI output is:
---
class org.python.pydev.plugin.PydevPlugin
---

DRLVM output is:
---
java.lang.ClassFormatError: org/python/pydev/plugin/PydevPlugin : Element likelyFiles of LocalVariableTypeTable mismatches LocalVariableTable data for method createEditorInput(Lorg/eclipse/core/runtime/IPath;Z)Lorg/eclipse/ui/IEditorInput;
----

> [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, lvt_20070406.patch, PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489997 ] 

Alexey Varlamov commented on HARMONY-3575:
------------------------------------------

Earlier specifications did not mandate no dups, so RI is compatible with spec here. 
OTOH if we retain duplicates in pre-49 classes, LVT consumers may be confused. Say, some JVMTI agents may not expect this. So we better be consistent in all cases, i.e. do not refuse "corrupt" classes when allowed but always keep integrity of internal representation.

> [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, lvt_check_new.patch, lvtt_parsing_exclude.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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486844 ] 

Alexey Varlamov commented on HARMONY-3575:
------------------------------------------

BTW, this issue is hardly platform specific, can you try this on ia32 with IBM VME (comparing to DRLVM)?

> [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
>         Attachments: pydevplugin.txt
>
>
> 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.


[jira] Updated: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-3575:
-------------------------------------

    Attachment: clf.patch

Fixed error handling, loosed check for matched elements.
Still need to test all corner cases, and add a regression test.

> [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
>         Attachments: clf.patch, PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Updated: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-3575:
-------------------------------------

    Component/s: DRLVM
                 App-Oriented Bug Reports
        Summary: [drlvm][eclipse] One class in Pydev fails classloading  (was: One class in Pydev fails classloading)

> [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
>         Attachments: pydevplugin.txt
>
>
> 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.


[jira] Updated: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vera Volynets updated HARMONY-3575:
-----------------------------------

    Attachment: lvt_check_new.patch

I've attached file fixing the problem.
So for class file version less than 49 this check is off and it is off if flag -noverify is set.
Attached file: lvt_check_new.patch 

> [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, lvt_check_new.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.


[jira] Updated: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vera Volynets updated HARMONY-3575:
-----------------------------------

    Attachment: lvtt_parsing_exclude.patch

Alexey, 
I've attached file in which I don't parse LVTT at all if class file version is lower than 49.

> [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, lvt_check_new.patch, lvtt_parsing_exclude.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.


[jira] Updated: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vera Volynets updated HARMONY-3575:
-----------------------------------

    Attachment: lvt_20070406.patch

> [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, lvt_20070406.patch, PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489052 ] 

Vera Volynets commented on HARMONY-3575:
----------------------------------------

Alexey, thank you for your investigation.
It's true that LVT checks depends on class version, it's easy to add this condition.
Could you explain me the meaning of option -noverify, where to find description of it?
Which checks it turns off, does it concern type of classloader and so on?

Misleading message - it's the next question.
I'm going to refactor Class_File_Loader.cpp file once more, so let's leave it as it is now.

> [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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486933 ] 

Vera Volynets commented on HARMONY-3575:
----------------------------------------

Alexey, 
I think your patch is a bit excessive,  it changes too much. 
I'm going to evaluate the behavior of RI, how tolerant it's to unmached local_variable_type_table elements.
Gould you wait and not commit your patch, I'll prepare a new one?

> [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, PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486892 ] 

Alexey Varlamov commented on HARMONY-3575:
------------------------------------------

Ouch, thanks for pointing - you're rigth, the check is misplaced! 
Looking further, the classfile indeed provides misaligned data for code interval of variable:
lvt name=likelyFiles start_pc=108 length=51 index=7
lvtt name=likelyFiles start_pc=108 length=48 index=7
So need to be tolerant as RI - yet maybe issue a warning?

> [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
>         Attachments: PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489394 ] 

Vera Volynets commented on HARMONY-3575:
----------------------------------------

Alexey,
I don't understand why should we drop duplicated entries in LVT for cfv<49. Both specifications states that only one LVT entry per local variable.
This error is not  thrown for class file version less than 49, it's only a question if should be completely compatible with RI or specification. 

> [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, lvt_check_new.patch, lvtt_parsing_exclude.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.


[jira] Updated: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Santiago Gala updated HARMONY-3575:
-----------------------------------

    Attachment: PydevPlugin.class

The offending class

> [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
>         Attachments: PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Updated: (HARMONY-3575) One class in Pydev fails classloading

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Santiago Gala updated HARMONY-3575:
-----------------------------------

    Attachment: pydevplugin.txt

This is the detailed classfile output.

Commenting the lines:

            //if(j == lv_table->length) { 
            //    REPORT_FAILED_METHOD("Element: "<< gvi_name <<
            //        " from LocalVariableTypeTable doesn't coincide with element from LocalVariableTable");
            //}


makes the file load, I'm not sure where the bug is

> One class in Pydev fails classloading
> -------------------------------------
>
>                 Key: HARMONY-3575
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3575
>             Project: Harmony
>          Issue Type: Bug
>         Environment: linux x86_64
>            Reporter: Santiago Gala
>         Attachments: pydevplugin.txt
>
>
> 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.


[jira] Assigned: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov reassigned HARMONY-3575:
----------------------------------------

    Assignee: Alexey Varlamov

> [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, PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Commented: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vera Volynets updated HARMONY-3575:
-----------------------------------

    Attachment: local_var_table.ZIP

I've evaluated if RI checks that length of local variable table and local variable type table element coincide.
I've attached .zip file with test.
To run test: 
java.exe test
locVar2.ccode contains method with LocalVariableTable and LocalVariableTypeTable attributes with different element lengths.
Test output:
RI:
check local_variable_table and local_variable_type_table for coincidence
Test passed: java.lang.ClassFormatError: LVTT entry for 'ts' in class file locVar2 does not match any LVT entry
DRLVM:
check local_variable_table and local_variable_type_table for coincidence
Test passed: java.lang.ClassFormatError: locVar2 : Element: ts from LocalVariableTypeTable doesn't coincide with element from LocalVariableTable for method test()I

So RI should also fail on that broken class.
I'm not sure that we should make our checks more tolerant.

Threre is only one serious mistake, that the 'return false' statement is missed after error reporting. 
I've prepared patch.

> [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, PydevPlugin.class, pydevplugin.txt
>
>
> 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.


[jira] Updated: (HARMONY-3575) [drlvm][eclipse] One class in Pydev fails classloading

Posted by "Vera Volynets (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vera Volynets updated HARMONY-3575:
-----------------------------------

    Attachment: local_variable_table.patch

I've added patch with temporary solution.
It fixes leaks and remove check of length of lvtt element till I found the better way.
Could you review and commit it?

> [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
>
>
> 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.