[Mono-bugs] [Bug 77787][Wis] Changed - Mono fails on Itanium-machine
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri May 12 04:13:00 EDT 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by yury at serdyuk.botik.ru.
http://bugzilla.ximian.com/show_bug.cgi?id=77787
--- shadow/77787 2006-05-11 09:51:35.000000000 -0400
+++ shadow/77787.tmp.13601 2006-05-12 04:13:00.000000000 -0400
@@ -1061,6 +1061,89 @@
------- Additional Comments From vargaz at gmail.com 2006-05-11 09:51 -------
So the problem here is that GC_base(obj) returns 0, which it shouldn't.
Could you step into the GC_base () call with gdb to see why it
returns that ?
+
+------- Additional Comments From Yury at serdyuk.botik.ru 2006-05-12 04:12 -------
+I did not understand how GC_base was run.
+Is it consequence of optimization ?
+
+Starting program: /home/users/gramuser2/m-1.1.14/bin/mono
+/home/users/gramuser2/m-1.1.14/lib/mono/1.0/mcs.exe
+[Thread debugging using libthread_db enabled]
+[New Thread 2305843009219573216 (LWP 11785)]
+[Switching to Thread 2305843009219573216 (LWP 11785)]
+
+Breakpoint 3, GC_base (p=<value optimized out>) at misc.c:395
+395 r = (word)p;
+(gdb) l
+390 register struct hblk *h;
+391 register bottom_index *bi;
+392 register hdr *candidate_hdr;
+393 register word limit;
+394
+395 r = (word)p;
+396 if (!GC_is_initialized) return 0;
+397 h = HBLKPTR(r);
+398 GET_BI(r, bi);
+399 candidate_hdr = HDR_FROM_BI(bi, r);
+(gdb)
+400 if (candidate_hdr == 0) return(0);
+401 /* If it's a pointer to the middle of a large object, move
+it */
+402 /* to the beginning.
+ */
+403 while (IS_FORWARDING_ADDR_OR_NIL(candidate_hdr)) {
+404 h = FORWARDED_ADDR(h,candidate_hdr);
+405 r = (word)h;
+406 candidate_hdr = HDR(h);
+407 }
+408 if (candidate_hdr -> hb_map == GC_invalid_map) return(0);
+409 /* Make sure r points to the beginning of the object */
+(gdb)
+410 r &= ~(WORDS_TO_BYTES(1) - 1);
+411 {
+412 register int offset = HBLKDISPL(r);
+413 register signed_word sz = candidate_hdr -> hb_sz;
+414 register signed_word map_entry;
+415
+416 map_entry = MAP_ENTRY((candidate_hdr -> hb_map),
+offset);
+417 if (map_entry > CPP_MAX_OFFSET) {
+418 map_entry =
+(signed_word)(BYTES_TO_WORDS(offset)) % sz;
+419 }
+(gdb)
+420 r -= WORDS_TO_BYTES(map_entry);
+421 limit = r + WORDS_TO_BYTES(sz);
+422 if (limit > (word)(h + 1)
+423 && sz <= BYTES_TO_WORDS(HBLKSIZE)) {
+424 return(0);
+425 }
+426 if ((word)p >= limit) return(0);
+427 }
+428 return((GC_PTR)r);
+429 }
+(gdb) display r
+1: r = 6917529027641185568
+(gdb) n
+398 GET_BI(r, bi);
+1: r = 6917529027641185568
+(gdb) n
+396 if (!GC_is_initialized) return 0;
+1: r = 6917529027641185568
+(gdb) n
+397 h = HBLKPTR(r);
+1: r = 6917529027641185568
+(gdb) n
+396 if (!GC_is_initialized) return 0;
+1: r = 6917529027641185568
+(gdb) n
+424 return(0);
+1: r = 6917529027641185568
+(gdb) n
+429 }
+1: r = 6917529027641185568
+(gdb)
+
More information about the mono-bugs
mailing list