From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79153 invoked by alias); 22 Mar 2016 17:54:25 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 79039 invoked by uid 89); 22 Mar 2016 17:54:23 -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,SPF_PASS autolearn=ham version=3.3.2 spammy=his, interest X-HELO: mail-wm0-f46.google.com Received: from mail-wm0-f46.google.com (HELO mail-wm0-f46.google.com) (74.125.82.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 22 Mar 2016 17:54:13 +0000 Received: by mail-wm0-f46.google.com with SMTP id l68so203360055wml.0 for ; Tue, 22 Mar 2016 10:54:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=qyfUI074dbPycp9jjEH8fHzOpyKQvMzh9+alZXOJvMs=; b=m+VBYhMjqvLTpJLHyry66sSxxF8k9C1zR/DFeM56TL3jGG5JS+l4fjbJg0CKoJ7rBH t8rhxMjSnmrALlacFsm6w9F8k9QaS47qG0EAwR+Ca8hh2GglV5xy4rBDEB0llyXya6KE vr/KutvPDw/BHsH+xfji9FmUuAaBYZlqel2B5AMEIoIj1MzoJnLzvZK74sl+xMEWa117 299fnadqXWS/SzDqY2vsqlHoKt+xK8cDg4Wf23KBMsPDD9TLsUuRuLRX66klx+qe6KQY YxNsd723CGUrNhJ1dDNOuEt5BcuQrWotDPoEH+PyDhEh7WR0pItwt4s9EyLGWe1mQ8i9 41yQ== X-Gm-Message-State: AD7BkJIPLeFt4aC7sf2rKXRZyW+OdCdrA4/jZejGjoKr3JLX8qxD8qRHdsQl/mwFnSwO7R/g X-Received: by 10.28.111.92 with SMTP id k89mr22459055wmc.36.1458669250916; Tue, 22 Mar 2016 10:54:10 -0700 (PDT) Received: from [10.100.101.2] (85-189-96-186.rcg-global.managedbroadband.co.uk. [85.189.96.186]) by smtp.gmail.com with ESMTPSA id o128sm18368327wmb.19.2016.03.22.10.54.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Mar 2016 10:54:10 -0700 (PDT) To: Jan Kiszka , Peter Griffin , gdb@sourceware.org From: Kieran Bingham Subject: gdb.Value returning a string of length 1 (linux lx-version bug) Message-ID: <56F186C1.1080803@linaro.org> Date: Tue, 22 Mar 2016 17:54:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-03/txt/msg00031.txt.bz2 Hi Jan, Me and Pete have just been looking into the gdb.Value object bug where the lx-version command returns a string of length 1. As I recall at FOSDEM, you were also hitting the bug. Out of interest, what compiler version are you using? We've made some head way, but we are suspicious that compiler versions may affect the issue ! :( The crux of the issue, is that the valpy_string() calls c_get_string() which in turn calls get_discrete_bounds(). On my broken version, get_discrete_bounds, is setting both lowp, and highp to 0x0; where as on Peters working version, his highp gets set correctly. (there is a +1 added later which results in the string producing a strlen of 1) I'm running gcc 5.2.1-22ubuntu2, whereas Pete is running gcc 4.8.4. Pete's version of his compiled binutils-gdb always seems to function correctly, where as I hit the bug - *occasionally* Of course, since I have compiled with -g3 -O0 -fsanitize=undefined I can't reproduce the issue, and now even removing the optimise levels I haven't been able to reproduce. We have a Heisenbug :( Has anyone else on the GDB Mailinglist experienced any intermittent errors with gdb.Value strings from python? -- Kieran