1. 24 Mar, 2015 2 commits
    • re PR go/65417 (debug/elf: lacks support for PPC relocations) · e93870c1
      	PR go/65417
      debug/elf: support reading debug info from 32-bit PPC objects
      
      This is a backport of http://golang.org/7590 from the master
      Go library.
      
      From-SVN: r221644
      Ian Lance Taylor committed
    • re PR go/65462 (Use of 'go get' with gccgo is not finding dependencies correctly) · ab24432b
      	PR go/65462
      cmd: Fix dependencies for 'go get' with gccgo
      
      Problem described in GCC BZ 65462.
      Generate the list of the standard GO package names based on what was built into libgo in the libgo Makefile.
      Change the var name from reqPkgSrc to reqStdPkgSrc to clarify it only affects standard GO packages.
      Skip the attempted loading of a package only if it is a standard GO package and the flag is set indicating its source is not required to be available.
      This requires a corresponding change to gotools to build and link in the new file containing the list of standard GO package names that was generated by the libgo Makefile.
      
      gotools/:
      	PR go/65462
      	* Makefile.am (go_cmd_go_files): Add $(libgodir)/zstdpkglist.go.
      	* Makefile.in: Rebuild.
      
      From-SVN: r221643
      Ian Lance Taylor committed
  2. 13 Mar, 2015 1 commit
  3. 12 Mar, 2015 2 commits
  4. 10 Mar, 2015 1 commit
  5. 09 Mar, 2015 2 commits
  6. 06 Mar, 2015 1 commit
  7. 06 Feb, 2015 2 commits
    • mksysinfo.sh: Remove _zone_net_addr_t handling. · 898c81f8
      From Rainer Orth.
      
      The recent godump changes broke Solaris 11.1+ bootstrap in
      libgo: before, gen-sysinfo.so had
      
      type _zone_net_addr_t struct { zna_family uint16; zna_plen uint16; zna_addru struct { znau_addr6 _in6_addr; }; }
      
      which was filtered out by mksysinfo.sh due to the use of
      _in6_addr.
      
      After the change, there's now
      
      type _zone_net_addr_t struct { zna_family uint16; zna_plen uint16; zna_addru struct { znau_addr6 [16]byte; Godump_0_align [0]uint32; }; }
      
      instead, not filtered, but added a second time by the
      _zone_net_addr_t code in mksysinfo.sh, which leads to
      redefinition warnings/errors.
      
      Simply removing the old _zone_net_addr_t fragment fixes this
      and restores bootstrap.
      
      From-SVN: r220481
      Ian Lance Taylor committed
    • runtime: Add memprofilerate to GODEBUG · 8c5c44aa
      Add memprofilerate as a value recognized
      in the GODEBUG env var.  The value provided
      is used as the new setting for
      runtime.MemProfileRate, allowing the user
      to adjust memory profiling.
      
      From-SVN: r220470
      Ian Lance Taylor committed
  8. 03 Feb, 2015 1 commit
  9. 23 Jan, 2015 3 commits
  10. 21 Jan, 2015 1 commit
  11. 20 Jan, 2015 2 commits
  12. 19 Jan, 2015 2 commits
  13. 16 Jan, 2015 5 commits
    • runtime: Add __sparc__ case for SETCONTEXT_CLOBBERS_TLS. · 0f59f5c1
      The glibc setcontext incorrectly modifies %g7 on SPARC.
      
      From Richard Henderson.
      
      From-SVN: r219778
      Ian Lance Taylor committed
    • testing/quick: Revert Alpha specific change. · 20780a00
      No longer needed now that libffi supports complex types.
      
      From-SVN: r219777
      Ian Lance Taylor committed
    • compiler, reflect, runtime: Use static chain for closures. · 38bf819a
      Change from using __go_set_closure to passing the closure
      value in the static chain field.  Uses new backend support for
      setting the closure chain in a call from C via
      __builtin_call_with_static_chain.  Uses new support in libffi
      for Go closures.
      
      The old architecture specific support for reflect.MakeFunc is
      removed, replaced by the libffi support.
      
      All work done by Richard Henderson.
      
      	* go-gcc.cc (Gcc_backend::call_expression): Add chain_expr argument.
      	(Gcc_backend::static_chain_variable): New method.
      
      From-SVN: r219776
      Richard Henderson committed
    • net: Restore earlier Solaris-specific version of setKeepAlivePeriod. · 72d7151a
      The version from the master repository seems to be appropriate
      for OpenSolaris but not for Solaris itself.  Solaris 11.2
      proper does not define TCP_KEEPIDLE or TCP_KEEPINTVL.
      
      From-SVN: r219749
      Ian Lance Taylor committed
    • runtime: Use a struct, not void, for an empty struct for libffi. · cb054b63
      A recent libffi upgrade caused the reflect test to fail on
      386.  The problem case is a function that returns an empty
      struct--a struct with no fields.  The libffi library does not
      recognize the existence of empty structs, presumably since
      they can't happen in C.  To work around this, the Go interface
      to the libffi library changes an empty struct to void.  This
      normally works fine, but with the new libffi upgrade it fails
      for a function that returns an empty struct.  On 386 a
      function that returns a struct is expected to pop the hidden
      pointer when it returns.  So when we convert an empty struct
      to void, libffi is calling a function that pops the hidden
      pointer but does not expect that to happen.
      
      In the older version of libffi, this didn't matter, because
      the libffi code for 386 used a frame pointer, so the fact that
      the stack pointer was wonky when the function returned was
      ignored as the stack pointer was immediately replaced by the
      saved frame pointer.  In the newer version of libffi, the 386
      code is more efficient and does not use a frame pointer, and
      therefore it matters whether libffi expects the function to
      pop the hidden pointer or not.
      
      This patch changes libgo to convert an empty to a struct with
      a single field of type void.  This seems to be enough to get
      the test cases working again.
      
      Of course the real fix would be to change libffi to handle
      empty types, but as libffi uses size == 0 as a marker for an
      uninitialized type, that would be a non-trivial change.
      
      From-SVN: r219701
      Ian Lance Taylor committed
  14. 15 Jan, 2015 5 commits
  15. 10 Jan, 2015 1 commit
  16. 09 Jan, 2015 1 commit
  17. 08 Jan, 2015 1 commit
  18. 06 Jan, 2015 1 commit
  19. 05 Jan, 2015 1 commit
  20. 23 Dec, 2014 1 commit
  21. 17 Dec, 2014 1 commit
  22. 13 Dec, 2014 3 commits
    • re PR go/61258 (gccgo: assertion failure go-map-delete.c:37 [GoSmith]) · 9ac18f8c
      	PR go/61258
      runtime: Don't crash when deleting zero-sized key.
      
      From-SVN: r218702
      Ian Lance Taylor committed
    • testing: Add testing.MainStart function. · e846322c
      This patches in the Go 1.4 function, for convenience for
      people using the Go 1.4 go tool with mainline gccgo.
      
      From-SVN: r218700
      Ian Lance Taylor committed
    • runtime: Clear stack pointers for extra G's. · c31fc2f4
      Fix an unusual C to Go callback case.  Newly created C threads
      call into Go code, forcing the Go code to allocate new M and G
      structures.  While executing Go code, the stack is split.  The
      Go code then returns.  Returning from a Go callback is treated
      as entering a system call, so the G gcstack field is set to
      point to the Go stack.  In this case, though, we were called
      from a newly created C thread, so we drop the extra M and G
      structures.  The C thread then exits.
      
      Then a new C thread calls into Go code, reusing the previously
      created M and G.  The Go code requires a larger stack frame,
      causing the old stack segment to be unmapped and a new stack
      segment allocated.  At this point the gcstack field is
      pointing to the old stack segment.
      
      Then a garbage collection occurs.  The garbage collector sees
      that the gcstack field is not nil, so it scans it as the first
      stack segment.  Unfortunately it points to memory that was
      unmapped.  So the program crashes.
      
      The fix is simple: when handling extra G structures created
      for callbacks from new C threads, clear the gcstack field.
      
      From-SVN: r218699
      Ian Lance Taylor committed