* [patch] fix OverflowError in backtraces with 32bit kernels
@ 2016-02-20 17:19 Matthias Klose
2016-10-04 14:24 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Matthias Klose @ 2016-02-20 17:19 UTC (permalink / raw)
To: gdb-patches; +Cc: Sebastien Bacher, Julian Taylor
This was reported at
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1513922
That's using i386, using "backtrace" gives those errors
"Traceback (most recent call last):
File "/usr/share/gdb/python/gdb/FrameDecorator.py", line 97, in function
if not isinstance(self._base, gdb.Frame):
SystemError: <built-in function isinstance> returned a result with an error set
#1 0xffffffff in OverflowError: Python int too large to convert to C long"
and a patch was suggested by Julian Taylor, which applies to the trunk as well.
Matthias
--- gdb-7.10.orig/gdb/python/py-framefilter.c
+++ gdb-7.10/gdb/python/py-framefilter.c
@@ -1111,7 +1111,7 @@ py_print_frame (PyObject *filter, int fl
if (paddr != Py_None)
{
- address = PyLong_AsLong (paddr);
+ address = PyLong_AsUnsignedLongLong (paddr);
has_addr = 1;
}
Py_DECREF (paddr);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] fix OverflowError in backtraces with 32bit kernels
2016-02-20 17:19 [patch] fix OverflowError in backtraces with 32bit kernels Matthias Klose
@ 2016-10-04 14:24 ` Pedro Alves
2016-10-04 16:16 ` Yao Qi
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2016-10-04 14:24 UTC (permalink / raw)
To: Matthias Klose, gdb-patches; +Cc: Sebastien Bacher, Julian Taylor
On 02/20/2016 05:19 PM, Matthias Klose wrote:
> This was reported at
> https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1513922
>
> That's using i386, using "backtrace" gives those errors
>
> "Traceback (most recent call last):
> File "/usr/share/gdb/python/gdb/FrameDecorator.py", line 97, in function
> if not isinstance(self._base, gdb.Frame):
> SystemError: <built-in function isinstance> returned a result with an
> error set
>
> #1 0xffffffff in OverflowError: Python int too large to convert to C long"
>
> and a patch was suggested by Julian Taylor, which applies to the trunk
> as well.
>
> Matthias
Looks like this was never reviewed, sorry about that.
Looks good to me. OK with a ChangeLog entry.
I wonder whether we should be using get_addr_from_python
here and in the other spot in the file we read an address
though:
else if (PyLong_Check (py_func))
{
CORE_ADDR addr = PyLong_AsUnsignedLongLong (py_func);
struct bound_minimal_symbol msymbol;
> --- gdb-7.10.orig/gdb/python/py-framefilter.c
> +++ gdb-7.10/gdb/python/py-framefilter.c
> @@ -1111,7 +1111,7 @@ py_print_frame (PyObject *filter, int fl
>
> if (paddr != Py_None)
> {
> - address = PyLong_AsLong (paddr);
> + address = PyLong_AsUnsignedLongLong (paddr);
> has_addr = 1;
> }
> Py_DECREF (paddr);
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] fix OverflowError in backtraces with 32bit kernels
2016-10-04 14:24 ` Pedro Alves
@ 2016-10-04 16:16 ` Yao Qi
0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2016-10-04 16:16 UTC (permalink / raw)
To: Pedro Alves; +Cc: Matthias Klose, gdb-patches, Sebastien Bacher, Julian Taylor
On Tue, Oct 4, 2016 at 3:24 PM, Pedro Alves <palves@redhat.com> wrote:
> On 02/20/2016 05:19 PM, Matthias Klose wrote:
>> This was reported at
>> https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1513922
>>
>> That's using i386, using "backtrace" gives those errors
>>
>> "Traceback (most recent call last):
>> File "/usr/share/gdb/python/gdb/FrameDecorator.py", line 97, in function
>> if not isinstance(self._base, gdb.Frame):
>> SystemError: <built-in function isinstance> returned a result with an
>> error set
>>
>> #1 0xffffffff in OverflowError: Python int too large to convert to C long"
>>
>> and a patch was suggested by Julian Taylor, which applies to the trunk
>> as well.
>>
>> Matthias
>
> Looks like this was never reviewed, sorry about that.
>
> Looks good to me. OK with a ChangeLog entry.
>
We need this fix in 7.12 branch too.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-04 16:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-20 17:19 [patch] fix OverflowError in backtraces with 32bit kernels Matthias Klose
2016-10-04 14:24 ` Pedro Alves
2016-10-04 16:16 ` Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).