Browse Source

Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <[email protected]>

	* sgen-gc.c: ensure no object from the to space is copied again or finalized
	if it's seen twice in major collections.


svn path=/trunk/mono/; revision=85011
Paolo Molaro 18 years ago
parent
commit
240b6bad05
2 changed files with 8 additions and 3 deletions
  1. 5 0
      mono/metadata/ChangeLog
  2. 3 3
      mono/metadata/sgen-gc.c

+ 5 - 0
mono/metadata/ChangeLog

@@ -1,4 +1,9 @@
 
+Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <[email protected]>
+
+	* sgen-gc.c: ensure no object from the to space is copied again or finalized
+	if it's seen twice in major collections.
+
 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <[email protected]>
 
 	* sgen-gc.c: big objects are not copied to the gray area, but they

+ 3 - 3
mono/metadata/sgen-gc.c

@@ -1247,7 +1247,7 @@ add_to_global_remset (gpointer ptr)
 static char* __attribute__((noinline))
 copy_object (char *obj, char *from_space_start, char *from_space_end)
 {
-	if (obj >= from_space_start && obj < from_space_end) {
+	if (obj >= from_space_start && obj < from_space_end && (obj < to_space || obj >= to_space_end)) {
 		MonoVTable *vt;
 		char *forwarded;
 		mword objsize;
@@ -3012,7 +3012,7 @@ finalize_in_range (void **start, void **end)
 	for (i = 0; i < finalizable_hash_size; ++i) {
 		prev = NULL;
 		for (entry = finalizable_hash [i]; entry;) {
-			if (entry->object >= start && entry->object < end) {
+			if (entry->object >= start && entry->object < end && (entry->object < to_space || entry->object >= to_space_end)) {
 				if (object_is_fin_ready (entry->object)) {
 					char *from;
 					FinalizeEntry *next;
@@ -3052,7 +3052,7 @@ null_link_in_range (void **start, void **end)
 	for (i = 0; i < disappearing_link_hash_size; ++i) {
 		prev = NULL;
 		for (entry = disappearing_link_hash [i]; entry;) {
-			if (entry->object >= start && entry->object < end) {
+			if (entry->object >= start && entry->object < end && (entry->object < to_space || entry->object >= to_space_end)) {
 				if (object_is_fin_ready (entry->object)) {
 					void **p = entry->data;
 					FinalizeEntry *old;