From: Kirill Yukhin <kirill.yukhin@gmail.com>
To: Yury Gribov <y.gribov@samsung.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Konstantin Serebryany <konstantin.s.serebryany@gmail.com>,
Dmitry Vyukov <dvyukov@google.com>,
Andrey Ryabinin <a.ryabinin@samsung.com>,
Ian Lance Taylor <ian@airs.com>
Subject: Re: [PATCHv5][Kasan] Allow to override Asan shadow offset from command line
Date: Wed, 05 Nov 2014 14:50:00 -0000 [thread overview]
Message-ID: <20141105144957.GA55685@msticlxl57.ims.intel.com> (raw)
In-Reply-To: <544A5A95.6030502@samsung.com>
Hello,
On 24 Oct 17:56, Yury Gribov wrote:
...
> +const struct test_data_t test_data[] = {
> + { STRTOL, "-0x80000000", 0, -0x80000000L, 0 },
...
> + switch (test_data[i].fun)
> + {
> + case STRTOL:
> + res = strtol (test_data[i].nptr, 0, test_data[i].base);
> + break;
As far as we might have `long long int' on 32-bit, `res' will fail
to compare with corresponding `test_data[i].base'.
Tiny patch fixes it.
--
Thanks, K
diff --git a/libiberty/testsuite/test-strtol.c b/libiberty/testsuite/test-strtol.c
index 96d6871..6faf81b 100644
--- a/libiberty/testsuite/test-strtol.c
+++ b/libiberty/testsuite/test-strtol.c
@@ -132,7 +132,8 @@ run_tests (const struct test_data_t *test_data, size_t ntests)
switch (test_data[i].fun)
{
case STRTOL:
- res = strtol (test_data[i].nptr, 0, test_data[i].base);
+ res = (unsigned long) strtol (test_data[i].nptr,
+ 0, test_data[i].base);
break;
case STRTOUL:
res = strtoul (test_data[i].nptr, 0, test_data[i].base);
next prev parent reply other threads:[~2014-11-05 14:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-08 14:29 [PATCH][Kasan] " Yury Gribov
2014-09-15 9:46 ` [PATCH][Kasan][PING] " Yury Gribov
2014-09-18 11:01 ` Jakub Jelinek
2014-09-18 11:05 ` Yury Gribov
2014-09-29 17:21 ` [PATCHv3][Kasan][PING] " Yury Gribov
2014-10-06 11:06 ` [PATCHv3][Kasan][PING^2] " Yury Gribov
2014-10-06 11:17 ` Yury Gribov
2014-10-15 16:19 ` [PATCHv3][Kasan][PING^3] " Yury Gribov
2014-10-15 16:54 ` Jakub Jelinek
2014-10-17 7:59 ` [PATCHv4][Kasan] " Yury Gribov
2014-10-17 11:25 ` Jakub Jelinek
2014-10-17 12:32 ` Ian Lance Taylor
2014-10-21 10:02 ` Yury Gribov
2014-10-24 13:58 ` [PATCHv5][Kasan] " Yury Gribov
2014-10-24 14:09 ` Jakub Jelinek
2014-10-27 16:02 ` Ian Lance Taylor
2014-11-05 14:50 ` Kirill Yukhin [this message]
2014-11-12 16:22 ` H.J. Lu
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=20141105144957.GA55685@msticlxl57.ims.intel.com \
--to=kirill.yukhin@gmail.com \
--cc=a.ryabinin@samsung.com \
--cc=dvyukov@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ian@airs.com \
--cc=konstantin.s.serebryany@gmail.com \
--cc=y.gribov@samsung.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).