Bug#398589: Backtrace with debugging info
Michel Dänzer wrote:
> Looks like a duplicate of #398589, merging.
>
> Would be great if you could attempt to provide the information requested
> there.
Here's the backtrace for the following event,
1. start xorg
2. attach debugger
3. start xterm
4. terminate xterm with Ctrl-C
Program received signal SIGSEGV, Segmentation fault.
0xb7d9ec1f in memcpy () from /lib/tls/libc.so.6
(gdb) bt
#0 0xb7d9ec1f in memcpy () from /lib/tls/libc.so.6
#1 0xb7bc5afd in SavageLoadCursorImage (pScrn=0x81f9ee0, src=0x82897d8
"\017�) at ../../src/savage_cursor.c:214
#2 0xaf9f66db in xf86SetCursor () from /usr/lib/xorg/modules/libramdac.so
#3 0xaf9f5d43 in xf86CursorSetCursor () from
/usr/lib/xorg/modules/libramdac.so
#4 0x08112be7 in miPointerUpdate () at ../../mi/mipointer.c:360
#5 0x08112cf9 in miPointerDisplayCursor (pScreen=0x824d400,
pCursor=0x828ccd0) at ../../mi/mipointer.c:183
#6 0x0812921e in CursorDisplayCursor (pScreen=0x824d400,
pCursor=0x828ccd0) at ../../xfixes/cursor.c:136
#7 0x0814e953 in AnimCurDisplayCursor (pScreen=0x824d400,
pCursor=0x828ccd0) at ../../render/animcur.c:235
#8 0x0808f80e in DefineInitialRootWindow (win=0x8243238) at
../../dix/events.c:2198
#9 0x0806e665 in main (argc=2, argv=0xbf90fc04, envp=0xf000f065) at
../../dix/main.c:465
(gdb)
I can also do that with tinyvm instead of xterm or mplayer and see
segfault at exactly the same position.
Digging a little deeper, I get at the problem,
(gdb) print psav->FBBase
$5 = (unsigned char *) 0x0
The segfault is on the line,
/* Upload the cursor image to the frame buffer. */
memcpy(psav->FBBase + psav->CursorKByte * 1024, src, 1024);
So I guess a brain dead solution would be to do a
if( psav->FBBase == 0 )
return;
But the question is can this pointer be NULL in the first place? (Don't
ask me - I'm not familiar with X codebase!)
Let me know if you need more debugging in different stack frames and
what you are looking for.
- Adam
Reply to: