|
Message
From: cvs at opencores.org<cvs@o...>
Date: Wed May 30 22:03:37 CEST 2007
Subject: [cvs-checkins] MODIFIED: jop ...
Date: 00/07/05 30:22:03 Modified: jop/java/target/src/common/com/jopdesign/sys JVM.java Log: null pointer check in GC write-barrier Revision Changes Path 1.26 jop/java/target/src/common/com/jopdesign/sys/JVM.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/common/com/jopdesign/sys/JVM.java.diff?r1=1.25&r2=1.26 (In the diff below, changes in quantity of whitespace are not shown.) Index: JVM.java =================================================================== RCS file: /cvsroot/martin/jop/java/target/src/common/com/jopdesign/sys/JVM.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -b -r1.25 -r1.26 --- JVM.java 30 May 2007 17:49:36 -0000 1.25 +++ JVM.java 30 May 2007 20:03:37 -0000 1.26 @@ -790,8 +790,7 @@ synchronized (GC.mutex) { // snapshot-at-beginning barrier int oldRef = Native.rdMem(addr); - int space = Native.rdMem(oldRef+GC.OFF_SPACE); - if (space!=GC.toSpace) { + if (oldRef!=0 && Native.rdMem(oldRef+GC.OFF_SPACE)!=GC.toSpace) { GC.push(oldRef); } Native.wrMem(val, addr); @@ -817,8 +816,7 @@ ref = Native.rdMem(ref); // snapshot-at-beginning barrier int oldRef = Native.rdMem(ref+index); - int space = Native.rdMem(oldRef+GC.OFF_SPACE); - if (space!=GC.toSpace) { + if (oldRef!=0 && Native.rdMem(oldRef+GC.OFF_SPACE)!=GC.toSpace) { GC.push(oldRef); }
|
 |