1. 14 May, 2018 4 commits
    • Dmitri Shuralyov's avatar
      path/filepath: make Abs("") return working directory on Windows · 91f07c57
      Dmitri Shuralyov authored
      The current Abs docs say:
      
      	// If the path is not absolute it will be joined with the current
      	// working directory to turn it into an absolute path.
      
      The empty string is not an absolute path, so the docs suggest that the
      empty string should be joined with the current working directory to
      turn it into an absolute path. This was already the case on all
      platforms other than Windows. Per the decision in issue #24441,
      this change makes it work on Windows too.
      
      Since the empty string is not a valid path for the purposes of calling
      os.Stat on it, we can't simply add the empty string test case to
      absTests, which TestAbs uses. It would error when trying to do:
      
      	info, err := os.Stat(path)
      
      I didn't find a good way to modify TestAbs to handle this situation
      without significantly complicating its code and compromising the test.
      So, a separate test is created for testing Abs on empty string input.
      
      Fixes #24441.
      
      Change-Id: I11d8ae2f6e6e358f3e996372ee2a0449093898d2
      Reviewed-on: https://go-review.googlesource.com/112935Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarAlex Brainman <alex.brainman@gmail.com>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      91f07c57
    • Rob Pike's avatar
      doc/contribute.html: clean up HTML and formatting · a023f3c8
      Rob Pike authored
      Mostly just formatting and minor cleanup:
      
      - regularize HTML (add </p> etc.)
      - remove all errors caught by tidy
      - start all sentences on new line for easy editing
      
      Some wording changes, but there will be more to come.
      It seemed there were already enough edits to send it out.
      
      Update #24487
      
      Change-Id: I613ce206b1e8e3e522ecb0bbcd2acb11c4ff5bae
      Reviewed-on: https://go-review.googlesource.com/113015Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      a023f3c8
    • Ben Shi's avatar
      cmd/internal/obj/arm: fix wrong encoding of MUL · bec2f51b
      Ben Shi authored
      The arm assembler incorrectly encodes the following instructions.
      "MUL R2, R4" -> 0xe0040492 ("MUL R4, R2, R4")
      "MUL R2, R4, R4" -> 0xe0040492 ("MUL R4, R2, R4")
      
      The CL fixes that issue.
      
      fixes #25347
      
      Change-Id: I883716c7bc51c5f64837ae7d81342f94540a58cb
      Reviewed-on: https://go-review.googlesource.com/112737Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      bec2f51b
    • Austin Clements's avatar
      runtime: unify fetching of locals and arguments maps · 3080b7d0
      Austin Clements authored
      Currently we have two nearly identical copies of the code that fetches
      the locals and arguments liveness maps for a frame, plus a third
      that's a poor knock-off. Unify these all into a single function.
      
      Change-Id: Ibce7926a0b0e3d23182112da4e25df899579a585
      Reviewed-on: https://go-review.googlesource.com/109698
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      3080b7d0
  2. 13 May, 2018 3 commits
  3. 12 May, 2018 3 commits
  4. 11 May, 2018 5 commits
    • Bryan C. Mills's avatar
      runtime: skip GDB tests on Windows · e6a9335c
      Bryan C. Mills authored
      Updates #22687.
      
      Change-Id: Iedccd9d2416ae7150cd2febe81c8bc9493d8d65c
      Reviewed-on: https://go-review.googlesource.com/112915
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      e6a9335c
    • Daniel Theophanes's avatar
      database/sql: add note to Scanner that the database owns values · 94280237
      Daniel Theophanes authored
      It was unclear that users must copy values out of the src value
      for value types like []byte.
      
      Fixes #24492
      
      Change-Id: I99ad61e0ad0075b9efc5ee4e0d067f752f91b8fa
      Reviewed-on: https://go-review.googlesource.com/108535Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      94280237
    • Elias Naur's avatar
      misc/ios: forward SIGQUIT to the iOS program · 4122319e
      Elias Naur authored
      When running tests that fails to complete within the test timeout,
      the go tool sends the test program a SIGQUIT signal to print
      backtraces. However, for tests running with an exec wrapper, the
      resulting backtraces will come from the exec wrapper process and
      not the test program.
      
      Change the iOS exec wrapper to forward SIGQUIT signals to the lldb
      python driver and change the driver to forward the signals to the
      running test on the device.
      
      Before:
      
      $ GOARCH=arm64 go test forever_test.go
      lldb: running program
      SIGQUIT: quit
      PC=0x10816fe m=0 sigcode=0
      
      goroutine 54 [syscall]:
      syscall.Syscall6(0x7, 0x16ab, 0xc000033dfc, 0x0, 0xc000116f30, 0x0, 0x0, 0xc000116f30, 0x0, 0x1328820)
      	/Users/elias/go-tip/src/syscall/asm_darwin_amd64.s:41 +0x5 fp=0xc000033d48 sp=0xc000033d40 pc=0x10816d5
      syscall.wait4(0x16ab, 0xc000033dfc, 0x0, 0xc000116f30, 0x90, 0x1200e00, 0x1)
      	/Users/elias/go-tip/src/syscall/zsyscall_darwin_amd64.go:34 +0x7b fp=0xc000033dc0 sp=0xc000033d48 pc=0x107e4eb
      syscall.Wait4(0x16ab, 0xc000033e4c, 0x0, 0xc000116f30, 0xc0000fd518, 0x0, 0x0)
      	/Users/elias/go-tip/src/syscall/syscall_bsd.go:129 +0x51 fp=0xc000033e10 sp=0xc000033dc0 pc=0x107b7b1
      os.(*Process).wait(0xc00008d440, 0x1095e2e, 0xc0000fd518, 0x0)
      	/Users/elias/go-tip/src/os/exec_unix.go:38 +0x7b fp=0xc000033e80 sp=0xc000033e10 pc=0x109af2b
      os.(*Process).Wait(0xc00008d440, 0xc000033fb0, 0x10, 0x11d1f00)
      	/Users/elias/go-tip/src/os/exec.go:125 +0x2b fp=0xc000033eb0 sp=0xc000033e80 pc=0x109a47b
      os/exec.(*Cmd).Wait(0xc0000b1ce0, 0xc000033f90, 0x11394df)
      	/Users/elias/go-tip/src/os/exec/exec.go:463 +0x5b fp=0xc000033f28 sp=0xc000033eb0 pc=0x1136f0b
      main.startDebugBridge.func1(0xc0000b1ce0, 0xc0000b8ae0, 0xc0000e2a80)
      	/Users/elias/go-tip/misc/ios/go_darwin_arm_exec.go:314 +0x40 fp=0xc000033fc8 sp=0xc000033f28 pc=0x11a1980
      runtime.goexit()
      	/Users/elias/go-tip/src/runtime/asm_amd64.s:1360 +0x1 fp=0xc000033fd0 sp=0xc000033fc8 pc=0x10565a1
      created by main.startDebugBridge
      	/Users/elias/go-tip/misc/ios/go_darwin_arm_exec.go:313 +0x15f
      
      ...
      
      After:
      
      $ GOARCH=arm64 go test forever_test.go
      lldb: running program
      === RUN   TestForever
      SIGQUIT: quit
      PC=0x100144e24 m=0 sigcode=0
      
      ...
      
      goroutine 19 [select (no cases)]:
      command-line-arguments.TestForever(0x1300b60f0)
      	/Users/elias/go-tip/src/forever_test.go:6 +0x18
      testing.tRunner(0x1300b60f0, 0x100211aa0)
      	/Users/elias/go-tip/src/testing/testing.go:795 +0xa8
      created by testing.(*T).Run
      	/Users/elias/go-tip/src/testing/testing.go:840 +0x22c
      
      ...
      
      Change-Id: I6b3cf1662d07a43ade0530842733b0944bee1ace
      Reviewed-on: https://go-review.googlesource.com/112676
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarHyang-Ah Hana Kim <hyangah@gmail.com>
      4122319e
    • Daniel Theophanes's avatar
      database/sql: add additional Stats to DBStats · d89ea410
      Daniel Theophanes authored
      Provide better statistics for the database pool. Add counters
      for waiting on the pool and closes. Too much waiting or too many
      connection closes could indicate a problem.
      
      Fixes #24683
      Fixes #22138
      
      Change-Id: I9e1e32a0487edf41c566b8d9c07cb55e04078fec
      Reviewed-on: https://go-review.googlesource.com/108536
      Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      d89ea410
    • quasilyte's avatar
      cmd/internal/obj/x86: use named consts for movtab Z-cases · e405c9cc
      quasilyte authored
      Use 0-terminated opbyte sequences for Zlit-like movtabs instead of E=0xff.
      
      movCodeFullPtr is unused (load full ptr is unsupported), but it should
      be removed in a separate CL (if removed at all).
      
      Passes toolstash-check.
      
      Change-Id: I28436718d93b017153de0e50e3bcec344ea4ee05
      Reviewed-on: https://go-review.googlesource.com/107076
      Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      e405c9cc
  5. 10 May, 2018 14 commits
  6. 09 May, 2018 11 commits