bugKawa - Bugs: bug #39060, ClassFormatException (Absent Code...

 
 

bug #39060: ClassFormatException (Absent Code attribute)

Submitted by:  Matthieu Vachon <maoueh>
Submitted on:  Fri 24 May 2013 02:40:32 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 30 Jun 2013 07:11:47 PM UTC, comment #1:

Fix and testcase checked in - thanks. This fix was to "always" call CompileMembers - even for unused/private classes.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Fri 24 May 2013 02:40:32 AM UTC, original submission:

I hit the same kind of issue then bug report SAM-conversion Bug #36911 but with the `(define-simple-class)` syntax. Maybe related to the issue, maybe not.

The problem on my side was that I was not exporting the class and was not using in the source file neither (it was loaded at runtime by Eclipse).

So, with the following code example:

The bytecode produced for class <PrivateClass> (at org/kawa/test/PrivateClass.class) is:

This then produce the `ClassFormatException` because the method has no body.

If the `<PrivateClass>` is used in the source file or exported, it works correctly. It's fairly easy to workaround the issue by exporting it, which might be the intended use for this.

But in my opinion, even if the class is not exported, its bytecode should be the correct one. Maybe with a warning if possible.

What do you think?

Regards,
Matt

Matthieu Vachon <maoueh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #28155:  code-attribute.scm added by maoueh (783B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Posted a comment)
  • -unavailable- added by maoueh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 30 Jun 2013 07:11:47 PM UTCbothnerStatusNone=>Fixed
      Assigned toNone=>bothner
      Open/ClosedOpen=>Closed
    Fri 24 May 2013 02:40:32 AM UTCmaouehAttached File-=>Added code-attribute.scm, #28155

    Back to the top


    Powered by Savane 3.1-cleanup