Skip to content
Snippets Groups Projects
  1. Nov 16, 2016
  2. Nov 15, 2016
    • Matthias Klose's avatar
      config-ml.in: Remove references to GCJ. · 84c1b9d3
      Matthias Klose authored
      <toplevel>
      
      2016-11-15  Matthias Klose  <doko@ubuntu.com>
      
      	* config-ml.in: Remove references to GCJ.
      	* configure.ac: Likewise.
      	* configure: Regenerate.
      
      config/
      
      2016-11-15  Matthias Klose  <doko@ubuntu.com>
      
      	multi.m4: Don't set GCJ.
      
      gcc/
      
      2016-11-15  Matthias Klose  <doko@ubuntu.com>
      
      	* doc/install.texi: Remove references to gcj/libjava.
      	* doc/invoke.texi: Likewise.
      
      */ (where necessary)
      
      2016-11-15  Matthias Klose  <doko@ubuntu.com>
      
      	* configure: Regenerate.
      
      From-SVN: r242433
      84c1b9d3
  3. Nov 14, 2016
    • Ian Lance Taylor's avatar
      runtime: don't crash if signal handler info argument is nil · 7b9f5cee
      Ian Lance Taylor authored
          
          Apparently on Solaris 10 a SA_SIGINFO signal handler can be invoked with
          a nil info argument.  I would not have believed it but I've now seen it
          happen, and the sigaction man page actually says "If the second argument
          is not equal to NULL, it points to a siginfo_t structure...."  So, if
          that happens, don't crash.
          
          Also fix another case where we want to make sure that &T{} does not
          allocate.
          
          Reviewed-on: https://go-review.googlesource.com/33150
      
      From-SVN: r242403
      7b9f5cee
  4. Nov 11, 2016
  5. Nov 10, 2016
    • Ian Lance Taylor's avatar
      runtime: copy signal code from Go 1.7 runtime · 980f9a0a
      Ian Lance Taylor authored
          
          Add a little shell script to auto-generate runtime.sigtable from the
          known signal names.
          
          Force the main package to always import the runtime package.  Otherwise
          some runtime package global variables may never be initialized.
          
          Set the syscallsp and syscallpc fields of g when entering a syscall, so
          that the runtime package knows when a g is executing a syscall.
          
          Fix runtime.funcPC to avoid dead store elimination of the interface
          value when the function is inlined.
          
          Reviewed-on: https://go-review.googlesource.com/33025
      
      From-SVN: r242060
      980f9a0a
  6. Nov 05, 2016
  7. Nov 01, 2016
  8. Oct 30, 2016
  9. Oct 28, 2016
  10. Oct 21, 2016
  11. Oct 20, 2016
    • Ian Lance Taylor's avatar
      runtime: rewrite interface code into Go · 6b752cfa
      Ian Lance Taylor authored
          
          I started to copy the Go 1.7 interface code, but the gc and gccgo
          representations of interfaces are too different.  So instead I rewrote
          the gccgo interface code from C to Go.  The code is largely the same as
          it was, but the names are more like those used in the gc runtime.
          
          I also copied over the string comparison functions, and tweaked the
          compiler to use eqstring when comparing strings for equality.
          
          Reviewed-on: https://go-review.googlesource.com/31591
      
      From-SVN: r241384
      6b752cfa
  12. Oct 19, 2016
  13. Oct 18, 2016
    • Ian Lance Taylor's avatar
      runtime: copy netpoll code from Go 1.7 runtime · 812ba636
      Ian Lance Taylor authored
          
          Reviewed-on: https://go-review.googlesource.com/31325
      
      From-SVN: r241307
      812ba636
    • Ian Lance Taylor's avatar
      runtime: scan caller-saved registers for non-split-stack · 421a8ed4
      Ian Lance Taylor authored
          
          While testing a patch on Solaris, which does not support split-stack, I
          ran across a bug in the handling of caller-saved registers for the
          garbage collector.  For non-split-stack systems, runtime_mcall is
          responsible for saving all caller-saved registers on the stack so that
          the GC stack scan will see them.  It does this by calling
          __builtin_unwind_init and setting the g's gcnextsp field to point to the
          current stack.  The garbage collector then scans the stack from gcnextsp
          to the top of stack.
          
          Unfortunately, the code was setting gcnextsp to point to runtime_mcall's
          argument, which meant that even though runtime_mcall was careful to
          store all caller-saved registers on the stack, the GC never saw them.
          This is, of course, only a problem if a value lives only in a
          caller-saved register, and not anywhere else on the stack or heap.  And
          it is only a problem if that caller-saved register manages to make it
          all the way down to runtime_mcall without being saved by any function on
          the way.  This is moderately unlikely but it turns out that the recent
          changes to keep values on the stack when compiling the runtime package
          caused it to happen for the local variable `s` in `notifyListWait` in
          runtime/sema.go.  That function calls goparkunlock which is simple
          enough to not require all registers, and itself calls runtime_mcall.  So
          it was possible for `s` to be released by the GC before the goroutine
          returned from goparkunlock, which eventually caused a dangling pointer
          to be passed to releaseSudog.
          
          This is not a problem on split-stack systems, which use
          __splitstack_get_context, which saves a stack pointer low enough on the
          stack to scan the registers saved by runtime_mcall.
          
          Reviewed-on: https://go-review.googlesource.com/31323
      
      From-SVN: r241304
      421a8ed4
  14. Oct 17, 2016
  15. Oct 15, 2016
  16. Oct 14, 2016
  17. Oct 13, 2016
    • Ian Lance Taylor's avatar
      runtime: copy mstats code from Go 1.7 runtime · 58f7dab4
      Ian Lance Taylor authored
          
          This replaces mem.go and the C runtime_ReadMemStats function with the Go
          1.7 mstats.go.
          
          The GCStats code is commented out for now.  The corresponding gccgo code
          is in runtime/mgc0.c.
          
          The variables memstats and worldsema are shared between the Go code and
          the C code, but are not exported.  To make this work, add temporary
          accessor functions acquireWorldsema, releaseWorldsema, getMstats (the
          latter known as mstats in the C code).
          
          Check the preemptoff field of m when allocating and when considering
          whether to start a GC.  This works with the new stopTheWorld and
          startTheWorld functions in Go, which are essentially the Go 1.7
          versions.
          
          Change the compiler to stack allocate closures when compiling the
          runtime package.  Within the runtime packages closures do not escape.
          This is similar to what the gc compiler does, except that the gc
          compiler, when compiling the runtime package, gives an error if escape
          analysis shows that a closure does escape.  I added this here because
          the Go version of ReadMemStats calls systemstack with a closure, and
          having that allocate memory was causing some tests that measure memory
          allocations to fail.
          
          Reviewed-on: https://go-review.googlesource.com/30972
      
      From-SVN: r241124
      58f7dab4
    • Ian Lance Taylor's avatar
      syscall: don't use pt_regs in clone_linux.c · 80b489eb
      Ian Lance Taylor authored
          
          It's unnecessary and it reportedly breaks the build on arm64 GNU/Linux.
          
          Reviewed-on: https://go-review.googlesource.com/30978
      
      From-SVN: r241084
      80b489eb
  18. Oct 12, 2016
  19. Oct 11, 2016
  20. Oct 10, 2016
    • Ian Lance Taylor's avatar
      runtime: copy print/println support from Go 1.7 · 65180edc
      Ian Lance Taylor authored
          
          Update the compiler to use the new names.  Add calls to printlock and
          printunlock around print statements.  Move expression evaluation before
          the call to printlock.  Update g's writebuf field to a slice, and adjust
          C code accordingly.
          
          Reviewed-on: https://go-review.googlesource.com/30717
      
      From-SVN: r240956
      65180edc
    • Ian Lance Taylor's avatar
      runtime: copy channel code from Go 1.7 runtime · 5d8c099e
      Ian Lance Taylor authored
          
          Change the compiler to use the new routines. Drop the separation of
          small and large values when sending on a channel. Allocate the select
          struct on the stack. Remove the old C implementation of channels. Adjust
          the garbage collector for the new data structure.
          
          Bring in part of the tracing code, enough for the channel code to call.
          
          Bump the permitted number of allocations in one of the tests in
          context_test.go. The difference is that now receiving from a channel
          allocates a sudog, which the C code used to simply put on the
          stack. This will be somewhat better when we port proc.go.
          
          Reviewed-on: https://go-review.googlesource.com/30714
      
      From-SVN: r240941
      5d8c099e
  21. Oct 03, 2016
    • Ian Lance Taylor's avatar
      re PR go/77809 ("_LITTLE_ENDIAN" redefined) · 95ccd17c
      Ian Lance Taylor authored
      	PR go/77809
      
          libgo: strip most C macros from runtime.inc
          
          The Go runtime package is picking up C macros from runtime_sysinfo.go
          and then re-exporting them to runtime.inc.  This can cause name
          conflicts.  Change the Makefile so that we only put the macros we need
          into runtime.inc.  These are the constants that are actually defined by
          Go code, not runtime_sysinfo.go.  There are only a few, so we can
          pattern match.
          
          This is an additional hack on runtime.inc.  The long term goal is to
          convert the runtime package to Go and eliminate runtime.inc entirely, so
          a few hacks seem acceptable.
          
          Fixes GCC PR 77809.
      
          Reviewed-on: https://go-review.googlesource.com/30167
      
      From-SVN: r240724
      95ccd17c
  22. Sep 30, 2016
    • Ian Lance Taylor's avatar
      runtime: copy internal locking code from Go 1.7 runtime · c0401cf7
      Ian Lance Taylor authored
          
          Remove the old locking code written in C.
          
          Add a shell script mkrsysinfo.sh to generate the runtime_sysinfo.go
          file, so that we can get Go copies of the system time structures and
          other types.
          
          Tweak the compiler so that when compiling the runtime package the
          address operator does not cause local variables to escape.  When the gc
          compiler compiles the runtime, an escaping local variable is treated as
          an error.  We should implement that, instead of this change, when escape
          analysis is turned on.
          
          Tweak the compiler so that the generated C header does not include names
          that start with an underscore followed by a non-upper-case letter,
          except for the special cases of _defer and _panic.  Otherwise we
          translate C types to Go in runtime_sysinfo.go and then generate those Go
          types back as C types in runtime.inc, which is useless and painful for
          the C code.
          
          Change entersyscall and friends to take a dummy argument, as the gc
          versions do, to simplify calls from the shared code.
          
          Reviewed-on: https://go-review.googlesource.com/30079
      
      From-SVN: r240657
      c0401cf7
Loading