NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xsrc/49408: XftGlyphSpecRender crash with gcc 4.8.4 on earmv7hf



The following reply was made to PR xsrc/49408; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: xsrc/49408: XftGlyphSpecRender crash with gcc 4.8.4 on earmv7hf
Date: Sat, 22 Nov 2014 21:10:01 +0100

 Actually looks like a compiler bug to me:
 
 (gdb) x/16i $pc-32
    0x400b8eb0 <XftGlyphSpecRender+1012>:        str     r5, [r4, #448]  ; 0x1c0
    0x400b8eb4 <XftGlyphSpecRender+1016>:        ldr     r5, [r4, #448]  ; 0x1c0
    0x400b8eb8 <XftGlyphSpecRender+1020>:        mla     r8, r12, r10, r8
    0x400b8ebc <XftGlyphSpecRender+1024>:        str     r8, [r4, #408]  ; 0x198
    0x400b8ec0 <XftGlyphSpecRender+1028>:        ldr     r8, [r4, #444]  ; 0x1bc
    0x400b8ec4 <XftGlyphSpecRender+1032>:        add     r4, r8, r5, lsl #2
    0x400b8ec8 <XftGlyphSpecRender+1036>:        
     sub r5, r11, #8192  ; 0x2000
    0x400b8ecc <XftGlyphSpecRender+1040>:        ldr     r5, [r5, #448]  ; 0x1c0
 => 0x400b8ed0 <XftGlyphSpecRender+1044>:        ldr     r8, [r5, #444]  ; 0x1bc
    0x400b8ed4 <XftGlyphSpecRender+1048>:        str     r7, [r8, r5, lsl #2]
    0x400b8ed8 <XftGlyphSpecRender+1052>:        
     sub r8, r11, #8192  ; 0x2000
    0x400b8edc <XftGlyphSpecRender+1056>:        mov     r5, #1
    0x400b8ee0 <XftGlyphSpecRender+1060>:        mov     r7, r8
    0x400b8ee4 <XftGlyphSpecRender+1064>:        str     r5, [r8, #448]  ; 0x1c0
    0x400b8ee8 <XftGlyphSpecRender+1068>:        ldr     r8, [r8, #408]  ; 0x198
    0x400b8eec <XftGlyphSpecRender+1072>:        str     r8, [r4, #4]
 
 and it dies because r5 is NULL:
 
 (gdb) info reg
 r0             0x3      3
 r1             0x40b06e60       1085304416
 r2             0x7fffa850       2147461200
 r3             0x0      0
 r4             0x7fff8dc8       2147454408
 r5             0x0      0
 r6             0x4094d000       1083494400
 r7             0x2600011        39845905
 r8             0x7fff8dc8       2147454408
 r9             0x0      0
 r10            0x1      1
 r11            0x7fffa7f4       2147461108
 r12            0x0      0
 sp             0x7fff8968       0x7fff8968
 lr             0x400b8b88       1074498440
 pc             0x400b8ed0       0x400b8ed0 <XftGlyphSpecRender+1044>
 cpsr           0x600e0210       1611530768
 
 This happens here:
 
 (gdb) list
 294                     if (n)
 295                     {
 296                         elts[nelt].nchars = n;
 297                         nelt++;
 298                     }
 
 299                     elts[nelt].glyphset = font->glyphset;
   ...... crash here
 
 300                     elts[nelt].chars = char8 + size * j;
 301                     elts[nelt].xOff = glyphs[i].x - x;
 302                     elts[nelt].yOff = glyphs[i].y - y;
 303                     x = glyphs[i].x;
 
 and a few values, according to gcc, are:
 
 (gdb) p elts
 $9 = (XGlyphElt8 *) 0x7fff8dc8
 (gdb) p nelt
 $10 = 0
 (gdb) p font
 $11 = (XftFontInt *) 0x4094d000
 (gdb) p &font->glyphset
 $12 = (GlyphSet *) 0x4094d080
 (gdb) p &elts[nelt]
 $13 = (XGlyphElt8 *) 0x7fff8dc8
 (gdb) p &elts[nelt].glyphset
 $14 = (GlyphSet *) 0x7fff8dc8
 
 
 Martin
 


Home | Main Index | Thread Index | Old Index