bugKawa - Bugs: bug #4496, init-form can cause invalid classes

 
 

bug #4496: init-form can cause invalid classes

Submitted by:  Chris Dean <ctdean>
Submitted on:  Sat 26 Jul 2003 08:43:35 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 07 Aug 2003 05:18:38 AM UTC, comment #2:

I checked in patches (to gnu.expr) to print a
hopefully-helpful error messages when a static
function or class (including dfeine-simple-class)
references a non-static.

I also checked in a fixe so that the code example
will work if you replace define-simple-class by
define-class. I also extended the test case.

Per Bothner <bothner>
Project Administrator
Wed 06 Aug 2003 06:40:26 AM UTC, comment #1:

The problem is that the patch makes <SimpleDateTest>
depend on a non-static function define-offset. (That
function is non-static because it depends on a
non-static non-constant module variable.) Therefore
the <SimpleDateTest> is no longer a simple class.
The attached patch makes the test compile and create
a valid class file, since the *field for the "variable"
<SimpleDataTest> is no longer static.

We probably should emit a wanring or error in this case.
You may have intended to compile a static module, which
should fix the problem.

I tried changing the define-simple-class to a simple-class,
and (with my patches) I got:
java.lang.RuntimeException: make: no method named `<init>' in class classes1$SimpleDateTest
This at least is supposed to work.

Per Bothner <bothner>
Project Administrator
Sat 26 Jul 2003 08:43:35 PM UTC, original submission:

If I patch the testsuite with the attached file, I get a java.lang.VerifyError on the class created by define-simple-class.

Chris Dean <ctdean>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #581:  defclass.patch added by bothner (1KiB - application/octet-stream - Incomplete patch)
file #559:  classes1.patch added by ctdean (786B - application/octet-stream - classes1.patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Thu 07 Aug 2003 05:18:38 AM UTCbothnerOpen/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1