[Sablevm-bugs] [ sablevm-Bugs-434181 ] problem with long and the % operator
Brought to you by:
egagnon
From: <no...@so...> - 2001-06-26 13:41:22
|
Bugs item #434181, was opened at 2001-06-18 07:39 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105523&aid=434181&group_id=5523 Category: Execution Problem Group: SableVM Status: Open Resolution: None >Priority: 6 Submitted By: Pascal Grange (pascal) >Assigned to: Etienne M. Gagnon (egagnon) Summary: problem with long and the % operator Initial Comment: This class make a java.lang.NullPointerException when run with sablevm : public class Test{ public static void main(String args[]){ long i = 1; i = i % 2; } } Compiling and running : $> sablevm [...] Test java.lang.NullPointerException at Test.main ([Ljava/lang/String;)V (in file Test.java at line 3) at org/sablevm/vm/Startup.main (Ljava/lang/String;[Ljava/lang/String;)V (unknown) at org/sablevm/vm/Startup.main ([Ljava/lang/String;)V (in file Startup.java at line 18) Note that with this line : i = (long) ((int)i % 2); instead of : i = i % 2; all goes well. ---------------------------------------------------------------------- Comment By: Pascal Grange (pascal) Date: 2001-06-25 02:44 Message: Logged In: YES user_id=5113 NOTE that this bug was observed on the sablevm-0.1.6 release, on a bi-pentiumIII machine under redhat 6.2 with a 2.2.14 linux kernel. This bug was observed for the lrem instruction and the ldiv instruction too, but not for ladd or lsub. Finally, note that it appears only when using the inlined-threaded-interpreter, but not with the direct or indirect-threaded-interpreter. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105523&aid=434181&group_id=5523 |