bugKawa - Bugs: bug #32209, Class verification errors when...

 
 

bug #32209: Class verification errors when reloading source files

Submitted by:  None
Submitted on:  Sat 22 Jan 2011 10:27:30 AM UTC  
 
Category: Code generationSeverity: 3 - Normal
Item Group: Compile-time exceptionStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Fri 24 Jun 2011 04:17:52 AM UTC, comment #6:

I checked in a fix for Charles's simple test-case.
Thanks - that was quite helpful. (The problem was the new
erroneous declarations of 'cons' persisted into future commands.)
I'm hoping this also fixes Konrad's problem.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Fri 24 Jun 2011 01:04:56 AM UTC, comment #5:

I suppose (define (cons 'a 'b)) should raise a syntax exception instead of just a warning. If I'm reading into the orignal posters submission correctly, this person was evaluating the code for an early SICP exercise, so it's likely that they just made a simple error such as the one I demonstrated.

Charles Turner <charlest>
Thu 23 Jun 2011 02:48:28 PM UTC, comment #4:

I noticed this today. Here is an easy way to reproduce the bug,

#|kawa:1|# (define (cons 'a 'b))
/dev/stdin:1:16: unknown type name 'a'
/dev/stdin:1:19: unknown type name 'b'
/dev/stdin:1:1: body with no expressions
#|kawa:2|# (cons 'a 'b)
exception while initializing module atInteractiveLevel$2
at gnu.expr.ModuleContext.findInstance(ModuleContext.java:84)
at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:276)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:187)
at kawa.Shell.run(Shell.java:281)
at kawa.Shell.run(Shell.java:194)
at kawa.Shell.run(Shell.java:175)
at kawa.repl.main(repl.java:852)
Caused by: java.lang.VerifyError: (class: atInteractiveLevel$2, method: run signature: (Lgnu/mapping/CallContext;)V) Accessing value from uninitialized register 3
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2308)
at java.lang.Class.getDeclaredField(Class.java:1897)
at gnu.expr.ModuleContext.findInstance(ModuleContext.java:74)
... 6 more

Not sure how to add attachments here, but I suppose you can generate the zip file yourself with this information.

Charles Turner <charlest>
Mon 24 Jan 2011 11:54:59 PM UTC, comment #3:

Using the flag --debug-dump-zip create files names kawa-XXX.zip files that can be useful in debugging.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sat 22 Jan 2011 08:29:05 PM UTC, comment #2:

I am the original reporter, but now have an account.

Unfortunately, the problem is sporadic. I will try to retrace my steps the next time it occurs.

Would a core file help?

The size of the file I am using is tiny, three or four Scheme functions of which I might be modifying the last one, e.g., fixing a syntax error (incorrect parenthesis).

Konrad Schwarz <konrad_schwarz>
Sat 22 Jan 2011 05:48:10 PM UTC, comment #1:

Please provide a complete self-contained test-case, along with clear instructions for how to reproduce the problem.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sat 22 Jan 2011 10:27:30 AM UTC, original submission:

I've been playing with kawa for a few days now and using (load "some.file.scm") to load source files repeatedly. I've gotten the following error twice:

(load "ex.1.16.scm")
exception while initializing module atInteractiveLevel$87
at gnu.expr.ModuleContext.findInstance(ModuleContext.java:84)
at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:274)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:185)
at kawa.Shell.run(Shell.java:281)
at kawa.Shell.runFile(Shell.java:490)
at kawa.standard.load.apply2(load.java:42)
at kawa.standard.load.apply1(load.java:26)
at gnu.mapping.Procedure.apply(Procedure.java:130)
at gnu.mapping.Procedure.apply(Procedure.java:113)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:234)
at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:348)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:185)
at kawa.Shell.run(Shell.java:281)
at kawa.Shell.run(Shell.java:194)
at kawa.Shell.run(Shell.java:175)
at kawa.repl.main(repl.java:848)
Caused by: java.lang.VerifyError: (class: atInteractiveLevel$87, method: fastExpt signature: (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;) Accessing value from uninitialized register 2
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
at java.lang.Class.getDeclaredField(Class.java:1880)
at gnu.expr.ModuleContext.findInstance(ModuleContext.java:74)
... 15 more

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by charlest (Posted a comment)
  • -unavailable- added by konrad_schwarz (Posted a comment)
  • -unavailable- added by bothner (Posted a comment)
  •  

    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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 30 Jun 2011 02:19:38 AM UTCbothnerStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Fri 24 Jun 2011 04:17:52 AM UTCbothnerStatusNeed Info=>Ready For Test
    Sat 22 Jan 2011 05:48:10 PM UTCbothnerStatusNone=>Need Info
      Assigned toNone=>bothner

    Back to the top


    Powered by Savane 3.1-cleanup1