From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: [patch] [python] Re: GDB crashing on gdb.python/py-linetable.exp
Date: Fri, 07 Feb 2014 17:17:00 -0000 [thread overview]
Message-ID: <20140207171701.GA25187@host2.jankratochvil.net> (raw)
In-Reply-To: <52F4B930.1020209@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 759 bytes --]
On Fri, 07 Feb 2014 11:45:04 +0100, Phil Muldoon wrote:
> I've tried most of the morning to reproduce this on Fedora 19, with
> -lmcheck and after several thousand test runs I can't reproduce.
Due to the requirement of specific stack layout I found it is reproducible for
me on Fedora 20 x86_64 with (it sure could be reduced):
CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" LDFLAGS="-static-libstdc++ -static-libgcc -Wl,-z,relro" ./configure --with-system-readline;make
(ulimit -c unlimited;/usr/bin/runtest gdb.python/py-linetable.exp)
The fix is obvious, I will check it in.
- int py_line;
+ gdb_py_longest py_line;
[...]
Regards,
Jan
[-- Attachment #2: 1 --]
[-- Type: text/plain, Size: 831 bytes --]
gdb/
2014-02-07 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix Python stack corruption.
* python/py-linetable.c (ltpy_get_pcs_for_line, ltpy_has_line): Use
gdb_py_longest.
diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c
index e83d46d..8b5362b 100644
--- a/gdb/python/py-linetable.c
+++ b/gdb/python/py-linetable.c
@@ -168,7 +168,7 @@ static PyObject *
ltpy_get_pcs_for_line (PyObject *self, PyObject *args)
{
struct symtab *symtab;
- int py_line;
+ gdb_py_longest py_line;
struct linetable_entry *best_entry = NULL;
linetable_entry_object *result;
VEC (CORE_ADDR) *pcs = NULL;
@@ -200,7 +200,7 @@ static PyObject *
ltpy_has_line (PyObject *self, PyObject *args)
{
struct symtab *symtab;
- int py_line;
+ gdb_py_longest py_line;
int index;
LTPY_REQUIRE_VALID (self, symtab);
next prev parent reply other threads:[~2014-02-07 17:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 21:30 Jan Kratochvil
2014-02-07 10:45 ` Phil Muldoon
2014-02-07 17:17 ` Jan Kratochvil [this message]
2014-02-09 17:56 ` [commit+7.7] [patch] [python] " Jan Kratochvil
2014-02-10 2:08 ` Joel Brobecker
2014-02-10 6:18 ` Jan Kratochvil
2014-02-10 7:43 ` Joel Brobecker
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=20140207171701.GA25187@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pmuldoon@redhat.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