Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: GDB crashing on gdb.python/py-linetable.exp
Date: Fri, 07 Feb 2014 10:45:00 -0000	[thread overview]
Message-ID: <52F4B930.1020209@redhat.com> (raw)
In-Reply-To: <20140206213003.GA19756@host2.jankratochvil.net>

On 06/02/14 21:30, Jan Kratochvil wrote:
> Hi Phil,
>
> at least on CentOS-6.5 x86_64 with -lmcheck I get the following crash.
>
> I have seen the crash also once on Fedora Rawhide x86_64 but I do not have it
> reproducible there.  But it suggests to me it does not have to be necessarily
> just CentOS-6 specific.  I have not tried real RHEL.
>

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.  Is
there access to a machine where I can reproduce this?

> $ gdb ../gdb ./core.*
> Program terminated with signal 11, Segmentation fault.
> #0  0x00007f4d77642b1f in PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>)
>     at Python/ceval.c:952
> 952            f->f_lasti = INSTR_OFFSET();
> (gdb) bt
> #0  in PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:952
> #1  in PyEval_EvalCodeEx (co=0x7f4d78731468, globals=<value optimized out>, locals=<value optimized out>, args=<value optimized out>, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3044
> #2  in PyEval_EvalCode (co=<value optimized out>, globals=<value optimized out>, locals=<value optimized out>) at Python/ceval.c:545
> #3  in run_mod (mod=<value optimized out>, filename=<value optimized out>, globals={'__builtins__': <module at remote 0x7f4d787d4868>, 'GdbRemoveReadlineFinder': <classobj at remote 0x7f4d78728590>, 'lt': <gdb.LineTable at remote 0x7f4d7871b138>, 'list_lines': <function at remote 0x7f4d78731578>, '__package__': None, 'sys': <module at remote 0x7f4d787d4c20>, 'gdb': <module at remote 0x7f4d787431a0>, '__name__': '__main__', '__doc__': None}, locals={'__builtins__': <module at remote 0x7f4d787d4868>, 'GdbRemoveReadlineFinder': <classobj at remote 0x7f4d78728590>, 'lt': <gdb.LineTable at remote 0x7f4d7871b138>, 'list_lines': <function at remote 0x7f4d78731578>, '__package__': None, 'sys': <module at remote 0x7f4d787d4c20>, 'gdb': <module at remote 0x7f4d787431a0>, '__name__': '__main__', '__doc__': None}, flags=<value optimized out>, arena=<value optimized out>) at Python/pythonrun.c:1358
> #4  in PyRun_StringFlags (str=0x3cbe3a7 "print len(lt.line(42))", start=257, globals={'__builtins__': <module at remote 0x7f4d787d4868>, 'GdbRemoveReadlineFinder': <classobj at remote 0x7f4d78728590>, 'lt': <gdb.LineTable at remote 0x7f4d7871b138>, 'list_lines': <function at remote 0x7f4d78731578>, '__package__': None, 'sys': <module at remote 0x7f4d787d4c20>, 'gdb': <module at remote 0x7f4d787431a0>, '__name__': '__main__', '__doc__': None}, locals={'__builtins__': <module at remote 0x7f4d787d4868>, 'GdbRemoveReadlineFinder': <classobj at remote 0x7f4d78728590>, 'lt': <gdb.LineTable at remote 0x7f4d7871b138>, 'list_lines': <function at remote 0x7f4d78731578>, '__package__': None, 'sys': <module at remote 0x7f4d787d4c20>, 'gdb': <module at remote 0x7f4d787431a0>, '__name__': '__main__', '__doc__': None}, flags=0x0) at Python/pythonrun.c:1321
> #5  in PyRun_SimpleStringFlags (command=0x3cbe3a7 "print len(lt.line(42))", flags=0x0) at Python/pythonrun.c:974

I suspect the linetable information in GDB is not what this test
expects it to be.

The method that causes this crash just uses:

pcs = find_pcs_for_symtab_line (symtab, py_line, &best_entry);

But as this is happening in the C evaluation part of the code in
Python I can't tell if this happened earlier and screwed up Python, or
if there is something wrong with the Python tuple holding the line
table data.

Cheers

Phil


  reply	other threads:[~2014-02-07 10:45 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 [this message]
2014-02-07 17:17   ` [patch] [python] " Jan Kratochvil
2014-02-09 17:56     ` [commit+7.7] " 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=52F4B930.1020209@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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