go/src
Rob Pike 3cca069220 time: allow long fractions in ParseDuration
The code scanned for an integer after a decimal point, which
meant things could overflow if the number was very precise
(0.1234123412341234123412342134s). This fix changes the
parser to stop adding precision once we run out of bits, rather
than trigger an erroneous overflow.

We could parse durations using floating-point arithmetic,
but since the type is int64 and float64 has only has 53 bits
of precision, that would be imprecise.

Fixes #15011.

Change-Id: If85e22b8f6cef12475e221169bb8f493bb9eb590
Reviewed-on: https://go-review.googlesource.com/29338
Reviewed-by: Costin Chirvasuta <costinc@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-19 19:46:09 +00:00
..
archive archive/tar: reapply Header.Size to regFileReader after merging 2016-09-02 21:58:53 +00:00
bufio
builtin builtin: clarify that make(map[K]V, n) allocates space for n elements 2016-09-10 12:57:37 +00:00
bytes bytes: cut 10 seconds off the race builder's benchmark test 2016-09-14 18:22:16 +00:00
cmd cmd/compile: intrinsify Ctz{32,64} and Bswap{32,64} on s390x 2016-09-19 19:03:01 +00:00
compress compress/flate: clarify the behavior of Writer.Flush 2016-09-04 03:09:08 +00:00
container
context context: add examples 2016-09-09 22:50:41 +00:00
crypto crypto/md5, crypto/sha1, crypto/sha256: add examples for checksumming a file 2016-09-19 17:29:19 +00:00
database/sql
debug all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
encoding encoding/asn1: reduce allocations in Marshal 2016-09-13 21:05:27 +00:00
errors
expvar
flag flag: use strconv instead of fmt in values' String funcs 2016-09-10 10:29:44 +00:00
fmt doc: avoid mentioning non-existence of u flag to fmt.Printf. 2016-09-09 00:04:21 +00:00
go plugin: new package for loading plugins 2016-09-16 17:54:40 +00:00
hash hash/crc32: cleanup code and improve tests 2016-08-31 15:17:57 +00:00
html
image image/draw: optimize drawFillOver as drawFillSrc for opaque fills. 2016-09-09 01:17:26 +00:00
index/suffixarray
internal internal/testenv: add GoTool 2016-09-10 20:50:12 +00:00
io io/ioutil: return better error when TempDir called with non-extant dir 2016-09-08 15:08:35 +00:00
log
math cmd/compile: intrinsify Ctz{32,64} and Bswap{32,64} on s390x 2016-09-19 19:03:01 +00:00
mime mime/quotedprintable: accept trailing soft line-break at the end of message 2016-09-11 01:51:07 +00:00
net net/http: rename Post's parameter from bodyType to contentType 2016-09-19 16:08:31 +00:00
os os/exec: add examples for CombinedOutput, StdinPipe, StderrPipe 2016-09-16 03:41:53 +00:00
path path/filepath: handle "C:." correctly in EvalSymlinks on Windows 2016-09-05 00:53:32 +00:00
plugin plugin: cast dlerror return value for android 2016-09-17 13:47:37 +00:00
reflect reflect: update location of vet tool in comment 2016-09-09 15:02:46 +00:00
regexp regexp: don't run slow benchmarks on race builders 2016-09-14 18:17:06 +00:00
runtime cmd/compile: inline convT2{I,E} when result doesn't escape 2016-09-19 02:37:08 +00:00
sort sort: fix search descending order example 2016-09-17 00:14:19 +00:00
strconv strconv: fix function name in errors for Atoi 2016-09-04 00:17:58 +00:00
strings strings: use AVX2 for Index if available 2016-09-07 10:43:13 +00:00
sync
syscall syscall: add bounds checking and error returns to ParseNetlinkMessage 2016-09-14 08:42:28 +00:00
testing testing: improve the documentation for the -run flag 2016-09-12 06:12:35 +00:00
text text/template: improve lexer performance in finding left delimiters. 2016-09-13 12:51:13 +00:00
time time: allow long fractions in ParseDuration 2016-09-19 19:46:09 +00:00
unicode unicode/utf8: reduce bounds checks in EncodeRune 2016-09-03 20:05:36 +00:00
unsafe
vendor/golang_org/x/net net/http: update bundled x/net/http2 2016-09-13 19:15:41 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash
make.bash
make.bat
make.rc
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc