public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.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>
Subject: Re: [PATCHv3][Kasan][PING^3] Allow to override Asan shadow offset from command line
Date: Wed, 15 Oct 2014 16:54:00 -0000	[thread overview]
Message-ID: <20141015163717.GU10376@tucnak.redhat.com> (raw)
In-Reply-To: <543E9E23.2060809@samsung.com>

On Wed, Oct 15, 2014 at 08:17:39PM +0400, Yury Gribov wrote:
> +static unsigned HOST_WIDE_INT asan_shadow_offset_value;
> +static bool asan_shadow_offset_computed;
> +
> +/* Sets shadow offset to value in string VAL.  */
> +
> +bool
> +set_asan_shadow_offset (const char *val)
> +{
> +  char *endp;
> +  
> +  errno = 0;
> +  asan_shadow_offset_value = strtoul (val, &endp, 0);

This will not really work well e.g. for 32-bit cross-compilers
to 64-bit.
I'm afraid you need to use strtoull here, libiberty has strtoul.c
already, perhaps just copying that to strtoull.c and adjusting types
etc. (and guarding it whole with HAVE_LONG_LONG)?
Then just use strtoull here if either HAVE_LONG_LONG instead
of strtoul.

	Jakub

  reply	other threads:[~2014-10-15 16:37 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 [this message]
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
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=20141015163717.GU10376@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=a.ryabinin@samsung.com \
    --cc=dvyukov@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).