[PATCHv5][Kasan] Allow to override Asan shadow offset from command line
Kirill Yukhin
kirill.yukhin@gmail.com
Wed Nov 5 14:50:00 GMT 2014
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);
More information about the Gcc-patches
mailing list