bugKawa - Bugs: bug #46728, java.lang.VerifyError when class...

 
 

bug #46728: java.lang.VerifyError when class that inherits another class is the same name as the file on kawa 2.1

Submitter:  None
Submitted:  Sun 20 Dec 2015 07:39:21 PM UTC
   
 
Category:  Code generation Severity:  3 - Normal
Item Group:  Run-time exception Status:  Fixed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 10 Apr 2016 03:31:32 AM UTC, comment #2: 

I checked in a fix for this.
I also checked in your test-case.
If you want credit in the testsuite/ChangeLog, let me know.

Per Bothner <bothner>
Group administrator
Sat 09 Apr 2016 05:44:41 AM UTC, comment #1: 

This is somewhat tricky.

The first part of the fix is that this situation (when the "module class" is the same as an explicit class) should act as if we specified-module-static-run.  The part is that we don't create a "run" method in the -module-static-run case.

I'm working on a fix along those lines, but it isn't quite working yet.

Per Bothner <bothner>
Group administrator
Sun 20 Dec 2015 07:39:21 PM UTC, original submission:  

When I have file

x.scm
(define-simple-class x ()
(q 0)
((init) #!void)
((fn) 1))

z.scm
(import (x))
(define-simple-class z (x)
((init) #!void)
((fn2) 2))

I compile with
kawa -C x.scm z.scm

java -cp kawa-2.1.jar:../ kawa.repl
(define p (z))

Exception in thread "main" java.lang.VerifyError: class z overrides final method run.(Lgnu/mapping/CallContext;)V


If I change the z.scm to following
(import (x))
(define-simple-class not-z (x)
((init) #!void)
((fn2) 2))

kawa -C x.scm z.scm

java -cp kawa-2.1.jar:../ kawa.repl
(define p (not-z))
p:q => 0

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bothner (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-13 bothner Open/ClosedOpen Closed
    2016-04-10 bothner StatusIn Progress Fixed
    2016-04-09 bothner StatusNone In Progress
        Assigned toNone bothner

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code