From: Dan Carpenter <dan.carpenter@oracle.com>
To: eranian@google.com
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: [bug report] perf jit: add source line info support
Date: Wed, 30 Nov 2016 21:48:22 +0300 [thread overview]
Message-ID: <20161130184822.GA15376@mwanda> (raw)
Hello Stephane Eranian,
The patch 598b7c6919c7: "perf jit: add source line info support" from
Nov 30, 2015, leads to the following static checker warning:
./tools/perf/util/genelf_debug.c:211 emit_signed_LEB128()
warn: potential left shift more than type allows '57'
./tools/perf/util/genelf_debug.c
202 static void emit_signed_LEB128(struct buffer_ext *be, long data)
203 {
204 int more = 1;
205 int negative = data < 0;
206 int size = sizeof(long) * CHAR_BIT;
207 while (more) {
208 ubyte cur = data & 0x7F;
209 data >>= 7;
210 if (negative)
211 data |= - (1 << (size - 7));
^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is a no-op on 64 bit systems. I suspect it's not intentional?
212 if ((data == 0 && !(cur & 0x40)) ||
213 (data == -1l && (cur & 0x40)))
214 more = 0;
215 else
216 cur |= 0x80;
217 buffer_ext_add(be, &cur, 1);
218 }
219 }
regards,
dan carpenter
next reply other threads:[~2016-11-30 18:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 18:48 Dan Carpenter [this message]
2016-12-10 5:16 ` [bug report] perf jit: add source line info support Stephane Eranian
2016-12-10 5:23 ` Stephane Eranian
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=20161130184822.GA15376@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
/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