An error occurred fetching the project authors.
  1. 09 Mar, 2017 1 commit
  2. 09 Feb, 2017 1 commit
  3. 03 Feb, 2017 1 commit
    • Elias Naur's avatar
      runtime: handle SIGPIPE in c-archive and c-shared programs · 78074f68
      Elias Naur authored
      Before this CL, Go programs in c-archive or c-shared buildmodes
      would not handle SIGPIPE. That leads to surprising behaviour where
      writes on a closed pipe or socket would raise SIGPIPE and terminate
      the program. This CL changes the Go runtime to handle
      SIGPIPE regardless of buildmode. In addition, SIGPIPE from non-Go
      code is forwarded.
      
      This is a refinement of CL 32796 that fixes the case where a non-default
      handler for SIGPIPE is installed by the host C program.
      
      Fixes #17393
      
      Change-Id: Ia41186e52c1ac209d0a594bae9904166ae7df7de
      Reviewed-on: https://go-review.googlesource.com/35960
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      78074f68
  4. 01 Dec, 2016 1 commit
  5. 18 Nov, 2016 1 commit
    • Elias Naur's avatar
      runtime: handle SIGPIPE in c-archive and c-shared programs · d24b57a6
      Elias Naur authored
      Before this CL, Go programs in c-archive or c-shared buildmodes
      would not handle SIGPIPE. That leads to surprising behaviour where
      writes on a closed pipe or socket would raise SIGPIPE and terminate
      the program. This CL changes the Go runtime to handle
      SIGPIPE regardless of buildmode. In addition, SIGPIPE from non-Go
      code is forwarded.
      
      Fixes #17393
      Updates #16760
      
      Change-Id: I155e82020a03a5cdc627a147c27da395662c3fe8
      Reviewed-on: https://go-review.googlesource.com/32796
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      d24b57a6
  6. 17 Nov, 2016 1 commit
  7. 15 Nov, 2016 1 commit
  8. 01 Nov, 2016 1 commit
  9. 17 Oct, 2016 1 commit
  10. 23 Aug, 2016 1 commit
  11. 07 May, 2016 1 commit
    • Elias Naur's avatar
      cmd/go: add -shared to darwin/arm{,64} default build mode · fa270ad9
      Elias Naur authored
      Buildmode c-archive now supports position independent code for
      darwin/arm (in addition to darwin/arm64). Make PIC (-shared) the
      default for both platforms in the default buildmode.
      
      Without this change, gomobile will go install the standard library
      into its separate package directory without PIC support.
      
      Also add -shared to darwin/arm64 in buildmode c-archive, for
      symmetry (darwin/arm64 always generates position independent code).
      
      Fixes #15519
      
      Change-Id: If27d2cbea8f40982e14df25da2703cbba572b5c6
      Reviewed-on: https://go-review.googlesource.com/22920Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      fa270ad9
  12. 06 May, 2016 2 commits
  13. 02 May, 2016 1 commit
  14. 29 Apr, 2016 1 commit
  15. 27 Apr, 2016 1 commit
  16. 09 Apr, 2016 1 commit
  17. 04 Apr, 2016 1 commit
    • Christopher Nelson's avatar
      cmd/go: fix -buildmode=c-archive should work on windows · ed8f0e5c
      Christopher Nelson authored
      Add supporting code for runtime initialization, including both
      32- and 64-bit x86 architectures.
      
      Add .ctors section on Windows to PE .o files, and INITENTRY to .ctors
      section to plug in to the GCC C/C++ startup initialization mechanism.
      This allows the Go runtime to initialize itself. Add .text section
      symbol for .ctor relocations. Note: This is unlikely to be useful for
      MSVC-based toolchains.
      
      Fixes #13494
      
      Change-Id: I4286a96f70e5f5228acae88eef46e2bed95813f3
      Reviewed-on: https://go-review.googlesource.com/18057Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      ed8f0e5c
  18. 26 Mar, 2016 2 commits
  19. 25 Mar, 2016 1 commit
    • Elias Naur's avatar
      misc/cgo/testcarchive: fix build · 95add73a
      Elias Naur authored
      I failed to rebase (and re-test) CL 21102 before submit, which meant
      that two extra tests sneaked into testcarchive that still referenced
      runtime.GOOS and runtime.GOARCH.
      
      Convert the new tests.
      
      While we're here, make sure pending tasks are flushed before running
      the host tests. If not, the "##### misc/cgo/testcarchive" banner
      and "PASS" won't show up in the all.bash output.
      
      Change-Id: I41fc4ec9515f9a193fa052f7c31fac452153c897
      Reviewed-on: https://go-review.googlesource.com/21106
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      95add73a
  20. 24 Mar, 2016 2 commits
    • Elias Naur's avatar
      misc/cgo/testcarchive: re-enable c-archive test on iOS and Android · 0a82ed5d
      Elias Naur authored
      The c-archive test were recently converted from shell script to Go.
      Unfortunately, it also lost the ability to target iOS and Android
      that lack C compilers and require exec wrappers.
      
      Compile the c-archive test for the host and run it with the target
      GOOS/GOARCH environment. Change the test to rely on go env GOOS
      and go env GOARCH instead of runtime.GOOS and runtime.GOARCH.
      
      Fixes #8345
      
      Change-Id: I290ace2f7e96b87c55d99492feb7d660140dcb32
      Reviewed-on: https://go-review.googlesource.com/21102Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      0a82ed5d
    • Joe Sylve's avatar
      runtime: improve last ditch signal forwarding for Unix libraries · df2b2eb6
      Joe Sylve authored
      The current runtime attempts to forward signals generated by non-Go
      code to the original signal handler.  If it can't call the original
      handler directly, it currently attempts to re-raise the signal after
      resetting the handler.  In this case, the original context is lost.
      
      This fix prevents that problem by simply returning from the go signal
      handler after resetting the original handler.  It only does this when
      the original handler is the system default handler, which in all cases
      is known to not recover.  The signal is not reset, so it is retriggered
      and the original handler takes over with the proper context.
      
      Fixes #14899
      
      Change-Id: Ib1c19dfa4b50d9732d7a453de3784c8141e1cbb3
      Reviewed-on: https://go-review.googlesource.com/21006Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      df2b2eb6
  21. 23 Mar, 2016 1 commit
  22. 26 Jan, 2016 1 commit
  23. 09 Jan, 2016 1 commit
  24. 07 Jan, 2016 1 commit
  25. 06 Jan, 2016 1 commit
  26. 05 Jan, 2016 1 commit
  27. 22 Dec, 2015 1 commit
  28. 18 Dec, 2015 1 commit
  29. 07 May, 2015 1 commit
    • Ian Lance Taylor's avatar
      cmd/go: install headers for c-archive/c-shared cgo exports · e45aebd6
      Ian Lance Taylor authored
      When
        using -buildmode=c-archive or c-shared, and
        when installing packages that use cgo, and
        when those packages export some functions via //export comments,
      then
        for each such package, install a pkg.h header file that declares the
        functions.
      
      This permits C code to #include the header when calling the Go
      functions.
      
      This is a little awkward to use when there are multiple packages that
      export functions, as you have to "go install" your c-archive/c-shared
      object and then pull it out of the package directory.  When compiling
      your C code you have to -I pkg/$GOOS_$GOARCH.  I haven't thought of
      any more convenient approach.  It's simpler when only the main package
      has exported functions.
      
      When using c-shared you currently have to use a _shared suffix in the
      -I option; it would be nice to fix that somehow.
      
      Change-Id: I5d8cf08914b7d3c2b194120c77791d2732ffd26e
      Reviewed-on: https://go-review.googlesource.com/9798Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      e45aebd6
  30. 20 Apr, 2015 1 commit
  31. 17 Apr, 2015 1 commit
  32. 14 Apr, 2015 1 commit
    • David Crawshaw's avatar
      runtime: make cgocallback wait on package init · 3b22ffc0
      David Crawshaw authored
      With the new buildmodes c-archive and c-shared, it is possible for a
      cgo call to come in early in the lifecycle of a Go program. Calls
      before the runtime has been initialized are caught by
      _cgo_wait_runtime_init_done. However a call can come in after the
      runtime has initialized, but before the program's package init
      functions have finished running.
      
      To avoid this cgocallback checks m.ncgo to see if we are on a thread
      running Go. If not, we may be a foreign thread and it blocks until
      main_init is complete.
      
      Change-Id: I7a9f137fa2a40c322a0b93764261f9aa17fcf5b8
      Reviewed-on: https://go-review.googlesource.com/8897Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      3b22ffc0
  33. 13 Apr, 2015 2 commits