From patchwork Sat Feb 20 17:19:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 10971 Received: (qmail 127672 invoked by alias); 20 Feb 2016 17:19:36 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 127660 invoked by uid 89); 20 Feb 2016 17:19:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=H*Ad:D*ubuntu.com, H*r:Debian-4, H*Ad:U*doko, sk:py-fram X-HELO: einhorn.in-berlin.de Received: from einhorn.in-berlin.de (HELO einhorn.in-berlin.de) (192.109.42.8) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 20 Feb 2016 17:19:34 +0000 X-Envelope-From: doko@ubuntu.com Received: from [192.168.178.29] (ip5f5bd515.dynamic.kabel-deutschland.de [95.91.213.21]) (authenticated bits=0) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id u1KHJUYk010120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 20 Feb 2016 18:19:30 +0100 To: gdb-patches@sourceware.org Cc: Sebastien Bacher , Julian Taylor From: Matthias Klose Subject: [patch] fix OverflowError in backtraces with 32bit kernels Message-ID: <56C8A021.1000800@ubuntu.com> Date: Sat, 20 Feb 2016 18:19:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 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: 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);