<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>This is a new bug. What changes introduced it?</div><br><div><div>On 19 Mar 2009, at 21:22, Jay wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">RTHooks__CheckLoadTracedRef is I'm sure innocent. It gets called before any pointer deref, I guess. The problem is the pointer is sometimes null, sometimes not. And why that is is what we need to figure out.<br> <br> - Jay<br><br> <br>> From:<span class="Apple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br>> To:<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> Date: Thu, 19 Mar 2009 07:47:47 +0000<br>> Subject: [M3devel] formsedit crash during startup sometimes?<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> Formsedit on SOLgnu also crashes, sometimes, during startup.<br>> It doesn't seem to crash in a debugger, but you can load up the core dump after a crash. It looks very similar as on PPC_DARWIN.<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> In both cases, it is dereferencing the value 4, just after calling RTHooks__CheckLoadTracedRef? Relevant? Coincidence?<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> -bash-3.00$ uname -a<br>> SunOS unknown 5.10 Generic_118833-17 sun4u sparc SUNW,Sun-Blade-100<br>> -bash-3.00$ rm core<br>> -bash-3.00$ ./formsedit<br>> Segmentation Fault (core dumped)<br>> -bash-3.00$ dbx ./formsedit ./core<br>> ...<br>> t@2 (l@2) terminated by signal KILL (Killed)<br>> 0xfe3c03d0: ___nanosleep+0x0008: bcc,a,pt %icc,___nanosleep+0x18 ! 0xfe3c03e0<br>> (dbx) lwps<br>> l@1 LWP suspended in lwp_yield()<br>> >l@2 LWP suspended in ___nanosleep()<br>> l@3 LWP suspended in __lwp_park()<br>> l@4 LWP suspended in ___nanosleep()<br>> l@11 LWP suspended in __lwp_park()<br>> l@12 LWP suspended in __lwp_park()<br>> l@13 LWP suspended in __lwp_park()<br>> o l@27 signal SIGSEGV in ScrollerVBTClass__PaintViewWithShadows()<br>> l@28 LWP suspended in __lwp_park()<br>> (dbx) lwp l@27<br>> t@27 (l@27) stopped in ScrollerVBTClass__PaintViewWithShadows at 0xff1b945c<br>> 0xff1b945c: ScrollerVBTClass__PaintViewWithShadows+0x0340: ld [%g1], %g1<br>> (dbx) dis $pc - 0x10<br>> dbx: warning: unknown language, 'c' assumed<br>> 0xff1b941c: ScrollerVBTClass__PaintViewWithShadows+0x0300: inc -4, %g1<br>> 0xff1b9420: ScrollerVBTClass__PaintViewWithShadows+0x0304: ld [%g1], %g1<br>> 0xff1b9424: ScrollerVBTClass__PaintViewWithShadows+0x0308: sll %g1, 22, %g1<br>> 0xff1b9428: ScrollerVBTClass__PaintViewWithShadows+0x030c: srl %g1, 31, %g1<br>> 0xff1b942c: ScrollerVBTClass__PaintViewWithShadows+0x0310: btog 1, %g1<br>> 0xff1b9430: ScrollerVBTClass__PaintViewWithShadows+0x0314: and %g1, 255, %g1<br>> 0xff1b9434: ScrollerVBTClass__PaintViewWithShadows+0x0318: cmp %g1, 0<br>> 0xff1b9438: ScrollerVBTClass__PaintViewWithShadows+0x031c: bne,pt %icc,ScrollerVBTClass__Pain<br>> tViewWithShadows+0x334 ! 0xff1b9450<br>> 0xff1b943c: ScrollerVBTClass__PaintViewWithShadows+0x0320: nop<br>> 0xff1b9440: ScrollerVBTClass__PaintViewWithShadows+0x0324: ld [%fp - 24], %g1<br>> (dbx) dis<br>> 0xff1b9444: ScrollerVBTClass__PaintViewWithShadows+0x0328: mov %g1, %o0<br>> 0xff1b9448: ScrollerVBTClass__PaintViewWithShadows+0x032c: call RTHooks__CheckLoadTracedRef<br>> [PLT] ! 0xff2a9518<br>> 0xff1b944c: ScrollerVBTClass__PaintViewWithShadows+0x0330: nop<br>> 0xff1b9450: ScrollerVBTClass__PaintViewWithShadows+0x0334: ld [%fp + 68], %g3<br>> 0xff1b9454: ScrollerVBTClass__PaintViewWithShadows+0x0338: ld [%fp - 24], %g1<br>> 0xff1b9458: ScrollerVBTClass__PaintViewWithShadows+0x033c: inc 4, %g1<br>> 0xff1b945c: ScrollerVBTClass__PaintViewWithShadows+0x0340: ld [%g1], %g1<br>> 0xff1b9460: ScrollerVBTClass__PaintViewWithShadows+0x0344: st %g1, [%fp - 180]<br>> 0xff1b9464: ScrollerVBTClass__PaintViewWithShadows+0x0348: add %fp, -40, %g1<br>> 0xff1b9468: ScrollerVBTClass__PaintViewWithShadows+0x034c: add %fp, -180, %g2<br>> (dbx) print $g1<br>> $g1 = 4ULL<br>> (dbx)<br>><span class="Apple-converted-space"> </span><br>> I believe it is on the last line of the function, the PaintTint call (due to what PPC_DARWIN showed).<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> PROCEDURE PaintViewWithShadows (v: T) =<br>> VAR<br>> dom : Rect.T;<br>> stripe: Rect.T;<br>> r : Rect.T;<br>> f : Rect.Partition;<br>> BEGIN<br>> dom := VBT.Domain(v);<br>> stripe := ComputeStripe(v, dom);<br>> (* Paint the scroll. We are careful not to draw the area of the<br>> trough that will be covered by the stripe. This helps reduce<br>> the flicker. *)<br>> r := Rect.Inset(dom, v.shadowPixels);<br>> ShadowPaint.Border(v, Region.Full, v.shadow, Shadow.Style.Lowered,<br>> r, dom);<br>> Rect.Factor(r, stripe, f, 0, 0);<br>> FOR i := FIRST(f) TO LAST(f) DO<br>> IF i # 2 AND NOT Rect.IsEmpty(f[i]) THEN<br>> VBT.PaintTint(v, f[i], v.troughColor);<br>> END;<br>> END;<br>> (* Paint the stripe. *)<br>> r := Rect.Inset(stripe, v.shadowPixels);<br>> ShadowPaint.Border(v, Region.Full, v.shadow, Shadow.Style.Raised,<br>> r, stripe);<br>> VBT.PaintTint(v, r, v.shadow.bg);<br>> END PaintViewWithShadows;<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> I'm somewhat just showing people how to get started debugging it, in case folks are as afraid of command line debuggers as I used to be.<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> - Jay<br></div></span></blockquote></div><br></body></html>