]> granicus.if.org Git - clang/commit
InstrProf: Read unsigned numbers with strtoul and strtoull
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 10 Apr 2014 23:37:34 +0000 (23:37 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 10 Apr 2014 23:37:34 +0000 (23:37 +0000)
commitd0ffe4b87c0846c50c5ab7eeeed0f003843a43b1
treee1ac27861a747b8e39f48614685edb601b928111
parent8343ca22cc915c4a5135aeccc0a7123acf47fdc2
InstrProf: Read unsigned numbers with strtoul and strtoull

Fixes a bug where unsigned numbers are read using strtol and strtoll.

I don't have a testcase because this bug is effectively unobservable
right now.  To expose the problem in the hash, we would need a function
with greater than INT64_MAX counters, which we don't handle anyway.  To
expose the problem in the function count, we'd need a function with
greater than INT32_MAX counters; this is theoretically observable, but
it isn't a practical testcase to check in.

An upcoming commit changes the hash to be non-trivial, so we'll get some
coverage eventually.

<rdar://problem/16435801>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206001 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenPGO.cpp