An error occurred fetching the project authors.
  1. 01 Mar, 2015 1 commit
  2. 28 Feb, 2015 1 commit
    • Brad Fitzpatrick's avatar
      syscall: make pwd process-wide on Plan 9 · bc9748ee
      Brad Fitzpatrick authored
      On Plan 9, the pwd is apparently per-thread not per process. That
      means different goroutines saw different current directories, even
      changing within a goroutine as they were scheduled.
      
      Instead, track the the process-wide pwd protected by a mutex in the
      syscall package and set the current goroutine thread's pwd to the
      correct once at critical points.
      
      Fixes #9428
      
      Change-Id: I928e90886355be4a95c2be834f5883e2b50fc0cf
      Reviewed-on: https://go-review.googlesource.com/6350Reviewed-by: default avatarDavid du Colombier <0intro@gmail.com>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      bc9748ee
  3. 08 Sep, 2014 2 commits
    • Russ Cox's avatar
      syscall: keep allocated C string live across call to Syscall · cf622d75
      Russ Cox authored
      Given:
      
              p := alloc()
              fn_taking_ptr(p)
      
      p is NOT recorded as live at the call to fn_taking_ptr:
      it's not needed by the code following the call.
      p was passed to fn_taking_ptr, and fn_taking_ptr must keep
      it alive as long as it needs it.
      In practice, fn_taking_ptr will keep its own arguments live
      for as long as the function is executing.
      
      But if instead you have:
      
              p := alloc()
              i := uintptr(unsafe.Pointer(p))
              fn_taking_int(i)
      
      p is STILL NOT recorded as live at the call to fn_taking_int:
      it's not needed by the code following the call.
      fn_taking_int is responsible for keeping its own arguments
      live, but fn_taking_int is written to take an integer, so even
      though fn_taking_int does keep its argument live, that argument
      does not keep the allocated memory live, because the garbage
      collector does not dereference integers.
      
      The shorter form:
      
              p := alloc()
              fn_taking_int(uintptr(unsafe.Pointer(p)))
      
      and the even shorter form:
      
              fn_taking_int(uintptr(unsafe.Pointer(alloc())))
      
      are both the same as the 3-line form above.
      
      syscall.Syscall is like fn_taking_int: it is written to take a list
      of integers, and yet those integers are sometimes pointers.
      If there is no other copy of those pointers being kept live,
      the memory they point at may be garbage collected during
      the call to syscall.Syscall.
      
      This is happening on Solaris: for whatever reason, the timing
      is such that the garbage collector manages to free the string
      argument to the open(2) system call before the system call
      has been invoked.
      
      Change the system call wrappers to insert explicit references
      that will keep the allocations alive in the original frame
      (and therefore preserve the memory) until after syscall.Syscall
      has returned.
      
      Should fix Solaris flakiness.
      
      This is not a problem for cgo, because cgo wrappers have
      correctly typed arguments.
      
      LGTM=iant, khr, aram, rlh
      R=iant, khr, bradfitz, aram, rlh
      CC=dvyukov, golang-codereviews, r
      https://golang.org/cl/139360044
      cf622d75
    • Russ Cox's avatar
      build: move package sources from src/pkg to src · c007ce82
      Russ Cox authored
      Preparation was in CL 134570043.
      This CL contains only the effect of 'hg mv src/pkg/* src'.
      For more about the move, see golang.org/s/go14nopkg.
      c007ce82
  4. 09 Jul, 2014 1 commit
  5. 15 May, 2014 1 commit
    • Russ Cox's avatar
      syscall: fix stack frame sizes in assembly · 7ad60b72
      Russ Cox authored
      for GOOS in darwin freebsd linux nacl netbsd openbsd plan9 solaris windows
      do
              for GOARCH in 386 amd64 amd64p32 arm
              do
                      go vet
              done
      done
      
      These are all real mistakes being corrected, but none
      of them should be able to cause problems today
      due to the NOSPLIT on the functions.
      
      However, vet has also identified a few important problems.
      I'm sending this CL to get rid of the trivial 'go vet' results
      before attacking the real ones.
      
      LGTM=r
      R=golang-codereviews, r, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/95460046
      7ad60b72
  6. 17 Jan, 2014 2 commits
    • Russ Cox's avatar
      undo CL 45930043 / c22889382a17 · 5c958595
      Russ Cox authored
      The compiler change is an ugly hack.
      We can do better.
      
      ««« original CL description
      syscall: mark arguments to Syscall as noescape
      Heap arguments to "async" syscalls will break when/if we have moving GC anyway.
      With this change is must not break until moving GC, because a user must
      reference the object in Go to preserve liveness. Otherwise the code is broken already.
      Reduces number of leaked params from 125 to 36 on linux.
      
      R=golang-codereviews, mikioh.mikioh, bradfitz
      CC=cshapiro, golang-codereviews, khr, rsc
      https://golang.org/cl/45930043
      »»»
      
      R=golang-codereviews, r
      CC=bradfitz, dvyukov, golang-codereviews
      https://golang.org/cl/53870043
      5c958595
    • Dmitriy Vyukov's avatar
      syscall: mark arguments to Syscall as noescape · fc37eba1
      Dmitriy Vyukov authored
      Heap arguments to "async" syscalls will break when/if we have moving GC anyway.
      With this change is must not break until moving GC, because a user must
      reference the object in Go to preserve liveness. Otherwise the code is broken already.
      Reduces number of leaked params from 125 to 36 on linux.
      
      R=golang-codereviews, mikioh.mikioh, bradfitz
      CC=cshapiro, golang-codereviews, khr, rsc
      https://golang.org/cl/45930043
      fc37eba1
  7. 10 Jun, 2013 1 commit
  8. 28 Feb, 2013 1 commit
    • Akshat Kumar's avatar
      net, os, syscall: Plan 9: adjust error handling · f0a8b610
      Akshat Kumar authored
      syscall: Use NewError for all system errors and introduce
              some new errors for compatibility with other packages
              and proper error handling in net. Also introduce
              Temporary and Timeout methods on ErrorString.
      
      net: Make errors from dial, accept, listen functions follow the
              OpError standard and discern whether the underlying
              error came from syscall. Since Plan 9 uses a correspondence
              between file and network operations, all system error
              reporting happens through the underlying file operation.
              In Go code, we go through package os for file operations,
              so there is another level of indirection in error types.
              This change allows us to compare the errors with those in
              package syscall, when appropriate.
      
      os: Just use the error string already present in package os,
              instead of calling out to package syscall.
      
      R=rsc, ality, rminnich, bradfitz
      CC=golang-dev
      https://golang.org/cl/7398054
      f0a8b610
  9. 26 Feb, 2013 1 commit
  10. 30 Oct, 2012 1 commit
  11. 09 Oct, 2012 1 commit
  12. 01 Oct, 2012 1 commit
  13. 31 Aug, 2012 1 commit
  14. 05 Aug, 2012 1 commit
    • Alexey Borzenkov's avatar
      syscall: return EINVAL when string arguments have NUL characters · a108369c
      Alexey Borzenkov authored
      Since NUL usually terminates strings in underlying syscalls, allowing
      it when converting string arguments is a security risk, especially
      when dealing with filenames. For example, a program might reason that
      filename like "/root/..\x00/" is a subdirectory or "/root/" and allow
      access to it, while underlying syscall will treat "\x00" as an end of
      that string and the actual filename will be "/root/..", which might
      be unexpected. Returning EINVAL when string arguments have NUL in
      them makes sure this attack vector is unusable.
      
      R=golang-dev, r, bradfitz, fullung, rsc, minux.ma
      CC=golang-dev
      https://golang.org/cl/6458050
      a108369c
  15. 04 May, 2012 1 commit
  16. 19 Apr, 2012 1 commit
  17. 17 Feb, 2012 1 commit
  18. 19 Jan, 2012 1 commit
  19. 13 Jan, 2012 1 commit
  20. 21 Nov, 2011 1 commit
    • Lucio De Re's avatar
      syscall: fix for Plan 9 build · 8ec32e8d
      Lucio De Re authored
      exec_plan9.go:
      . Adjusted return argument to match other changes.
      #mksyscall.pl:
      . Replaced "err = e1" with "err = NewError(e1)".
      * Change abandoned, Russ made a better suggestion involving
        syscall_plan9.go.
      syscall_plan9.go:
      . Removed redundant "err = nil" lines.
      . Adjusted //sys lines for mksyscall.pl.
      * Replaced "err string" with "err ErrorString" in return arguments.
      zsyscall_plan9_386.go:
      . This module ought to be generated, but as it exists in the
        repository, I rebuilt it and checked that it matched expectations.
        Anybody is welcome to remove this from the repository if
        they feel it should go, but remember that not all Plan 9
        installations have a working Perl.
      
      R=rsc
      CC=ality, golang-dev
      https://golang.org/cl/5411046
      8ec32e8d
  21. 16 Nov, 2011 1 commit
  22. 14 Nov, 2011 2 commits
    • Russ Cox's avatar
      syscall: take over env implementation · 0acd879c
      Russ Cox authored
      The environment is needed by package time, which
      we want not to depend on os (so that os can use
      time.Time), so push down into syscall.
      
      Delete syscall.Sleep, now unnecessary.
      
      The package os environment API is preserved;
      it is only the implementation that is moving to syscall.
      
      Delete os.Envs, which was undocumented,
      uninitialized on Windows and Plan 9, and
      not maintained by Setenv and Clearenv.
      Code can call os.Environ instead.
      
      R=golang-dev, r
      CC=golang-dev
      https://golang.org/cl/5370091
      0acd879c
    • Russ Cox's avatar
      syscall: use error · c017a829
      Russ Cox authored
      - syscall (not os) now defines the Errno type.
      - the low-level assembly functions Syscall, Syscall6, and so on
        return Errno, not uintptr
      - syscall wrappers all return error, not uintptr.
      
      R=golang-dev, mikioh.mikioh, r, alex.brainman
      CC=golang-dev
      https://golang.org/cl/5372080
      c017a829
  23. 08 Nov, 2011 1 commit
  24. 31 Oct, 2011 1 commit
  25. 17 Aug, 2011 1 commit
    • Fazlul Shahriar's avatar
      net: Plan 9 support · 0f7bc92b
      Fazlul Shahriar authored
      All tests enabled by default passes except those in timeout_test.go.
      
      For TestLookupPort, add an entry for "bootps" in /lib/ndb/common
      (Plan 9 calls it "bootp"). I've sent out a patch to fix this.
      
      R=paulzhol, rsc, mikioh.mikioh
      CC=ality, golang-dev
      https://golang.org/cl/4779041
      0f7bc92b
  26. 14 Jul, 2011 1 commit
  27. 20 Jun, 2011 1 commit
  28. 14 Jun, 2011 1 commit
  29. 20 May, 2011 1 commit
  30. 13 Apr, 2011 1 commit
  31. 02 Apr, 2011 1 commit