From: Eli Zaretskii <eliz@gnu.org>
To: 明覺 <shi.minjue@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: how to debug this error by gdb?
Date: Mon, 11 May 2009 03:12:00 -0000 [thread overview]
Message-ID: <834ovsz62r.fsf@gnu.org> (raw)
In-Reply-To: <6a8fced30905101934j2aa94d27i210484a99a523ce5@mail.gmail.com>
> Date: Mon, 11 May 2009 10:34:52 +0800
> From: =?ISO-2022-JP?B?GyRCTEBrNBsoQg==?= <shi.minjue@gmail.com>
>
> ---------------------------------------------------------------------------------------
> PUBLIC void glXWaitX(void)
> {
> ......
> if (psc->driScreen->waitX != NULL)
> [line 660] (*psc->driScreen->waitX)(pdraw);
> .....
> }
> ---------------------------------------------------------------------------------------
>
>
> and here is the gdb info:
> ---------------------------------------------------------------------------------------
> (gdb) break glxcmds.c:660
> Breakpoint 1 (glxcmds.c:660) pending.
> (gdb) run
> Breakpoint 1, glXWaitX () at glxcmds.c:660
> (gdb) print psc->driScreen->waitX
> $3 = (void (*)(__GLXDRIdrawable *)) 0x47206769666e6f63
^^^^^^^^^^^^^^^^^^
This looks like ASCII text to me ("config G", little-endian). So I'd
try to see if some code that runs before this place could overflow
some buffer with plain text, and part of that text spilled into this
pointer.
> (gdb) print *psc->driScreen->waitX
> Cannot access memory at address
> (gdb) step
> Program received signal SIGSEGV, Segmentation fault.
Right, because it's not NULL, but not a valid pointer, either. Thus a
SIGSEGV.
next prev parent reply other threads:[~2009-05-11 3:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-11 2:35 明覺
2009-05-11 3:12 ` Eli Zaretskii [this message]
2009-05-11 4:55 ` 明覺
2009-05-11 6:24 ` Paul Pluzhnikov
2009-05-11 17:21 ` Michael Snyder
2009-05-12 14:42 ` Frank Ch. Eigler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=834ovsz62r.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb@sourceware.org \
--cc=shi.minjue@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox