1. 02 Aug, 2017 4 commits
    • Ian Lance Taylor's avatar
      testsanitizers: check that tsan program runs, skip tsan10 on gcc · b63db76c
      Ian Lance Taylor authored
      Check not only that a tsan program can be built, but also that it runs.
      This fails with some installations of GCC 7.
      
      Skip the tsan10 program when using GCC, as it reportedly hangs.
      
      This is a patch to help people build 1.9; we may be able to do a
      better fix for 1.10.
      
      Updates #21196
      
      Change-Id: Icd1ffbd018dc65a97ff45cab1264b9b0c7fa0ab2
      Reviewed-on: https://go-review.googlesource.com/52790
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Run-TryBot: Bryan Mills <bcmills@google.com>
      Reviewed-by: default avatarBryan Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b63db76c
    • Alberto Donizetti's avatar
      time: skip ZoneAbbr test in timezones with no abbreviation · 193eda72
      Alberto Donizetti authored
      The testZoneAbbr assumes that
      
        Parse(RFC1123, t1.Format(RFC1123))
      
      will always succeed. This is not true because Format will fall back to
      the numeric zone (ex. -07) for timezones with no abbreviation, but
      Parse won't accept the numeric zone when the layout specifies 'MST'
      (an abbreviation).
      
      Skip the zone abbreviation test in timezones with no abbreviation.
      
      Fixes #21183
      
      Change-Id: If04691cc23ae1075d8a953733024e17f5a7646de
      Reviewed-on: https://go-review.googlesource.com/52430
      Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      193eda72
    • Seiji Takahashi's avatar
      cmd/go: show examples with empty output in go test -list · 6f08c935
      Seiji Takahashi authored
      Fixes #21205
      
      Change-Id: I81b001eb42cbf2a5d5b7b82eb63548b22f501be5
      Reviewed-on: https://go-review.googlesource.com/52110Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      6f08c935
    • Cherry Zhang's avatar
      cmd/compile: set/unset base register for better assembly print · f20944de
      Cherry Zhang authored
      For address of an auto or arg, on all non-x86 architectures
      the assembler backend encodes the actual SP offset in the
      instruction but leaves the offset in Prog unchanged. When the
      assembly is printed in compile -S, it shows an offset
      relative to pseudo FP/SP with an actual hardware SP base
      register (e.g. R13 on ARM). This is confusing. Unset the
      base register if it is indeed SP, so the assembly output is
      consistent. If the base register isn't SP, it should be an
      error and the error output contains the actual base register.
      
      For address loading instructions, the base register isn't set
      in the compiler on non-x86 architectures. Set it. Normally it
      is SP and will be unset in the change mentioned above for
      printing. If it is not, it will be an error and the error
      output contains the actual base register.
      
      No change in generated binary, only printed assembly. Passes
      "go build -a -toolexec 'toolstash -cmp' std cmd" on all
      architectures.
      
      Fixes #21064.
      
      Change-Id: Ifafe8d5f9b437efbe824b63b3cbc2f5f6cdc1fd5
      Reviewed-on: https://go-review.googlesource.com/49432
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      f20944de
  2. 31 Jul, 2017 2 commits
    • Austin Clements's avatar
      runtime: map bitmap and spans during heap initialization · 623e2c46
      Austin Clements authored
      We lazily map the bitmap and spans areas as the heap grows. However,
      right now we're very slightly too lazy. Specifically, the following
      can happen on 32-bit:
      
      1. mallocinit fails to allocate any heap arena, so
         arena_used == arena_alloc == arena_end == bitmap.
      
      2. There's less than 256MB between the end of the bitmap mapping and
         the next mapping.
      
      3. On the first allocation, mheap.sysAlloc sees that there's not
         enough room in [arena_alloc, arena_end) because there's no room at
         all. It gets a 256MB mapping from somewhere *lower* in the address
         space than arena_used and sets arena_alloc and arena_end to this
         hole.
      
      4. Since the new arena_alloc is lower than arena_used, mheap.sysAlloc
         doesn't bother to call mheap.setArenaUsed, so we still don't have a
         bitmap mapping or a spans array mapping.
      
      5. mheap.grow, which called mheap.sysAlloc, attempts to fill in the
         spans array and crashes.
      
      Fix this by mapping the metadata regions for the initial arena_used
      when the heap is initialized, rather than trying to wait for an
      allocation. This maintains the intended invariant that the structures
      are always mapped for [arena_start, arena_used).
      
      Fixes #21044.
      
      Change-Id: I4422375a6e234b9f979d22135fc63ae3395946b0
      Reviewed-on: https://go-review.googlesource.com/51714
      Run-TryBot: Austin Clements <austin@google.com>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      623e2c46
    • Austin Clements's avatar
      runtime: fall back to small mmaps if we fail to grow reservation · 780249ee
      Austin Clements authored
      Right now, if it's possible to grow the arena reservation but
      mheap.sysAlloc fails to get 256MB more of memory, it simply fails.
      However, on 32-bit we have a fallback path that uses much smaller
      mmaps that could take in this situation, but fail to.
      
      This commit fixes mheap.sysAlloc to use a common failure path in case
      it can't grow the reservation. On 32-bit, this path includes the
      fallback.
      
      Ideally, mheap.sysAlloc would attempt smaller reservation growths
      first, but taking the fallback path is a simple change for Go 1.9.
      
      Updates #21044 (fixes one of two issues).
      
      Change-Id: I1e0035ffba986c3551479d5742809e43da5e7c73
      Reviewed-on: https://go-review.googlesource.com/51713
      Run-TryBot: Austin Clements <austin@google.com>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      780249ee
  3. 30 Jul, 2017 1 commit
  4. 28 Jul, 2017 1 commit
  5. 27 Jul, 2017 1 commit
  6. 26 Jul, 2017 2 commits
  7. 25 Jul, 2017 3 commits
  8. 24 Jul, 2017 4 commits
  9. 22 Jul, 2017 1 commit
    • Joe Tsai's avatar
      encoding/json: ignore embedded fields of pointers to unexported non-structs · b8173592
      Joe Tsai authored
      https://golang.org/cl/33773 fixes the JSON marshaler to avoid serializing
      embedded fields on unexported types of non-struct types. However, Go allows
      embedding pointer to types, so the check for whether the field is a non-struct
      type must first dereference the pointer to get at the underlying type.
      
      Furthermore, due to a edge-case in the behavior of StructField.PkgPath not
      being a reliable indicator of whether the field is unexported (see #21122),
      we use our own logic to determine whether the field is exported or not.
      
      The logic in this CL may be simplified depending on what happens in #21122.
      
      Fixes #21121
      Updates #21122
      
      Change-Id: I8dfd1cdfac8a87950df294a566fb96dfd04fd749
      Reviewed-on: https://go-review.googlesource.com/50711Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b8173592
  10. 21 Jul, 2017 5 commits
  11. 20 Jul, 2017 8 commits
  12. 19 Jul, 2017 4 commits
  13. 18 Jul, 2017 4 commits