1. 13 Jul, 2015 1 commit
  2. 17 Apr, 2015 2 commits
    • re PR go/64683 (FAIL: runtime/pprof -- testing.go:278: The entry did not match) · d6c2d7c1
      	PR go/64683
      runtime/pprof: Assume function with no name is in runtime.
      
      GCC PR 65797 causes some of the runtime functions to be
      compiled with no name in the debug info.  This in turn causes
      the runtime/pprof test to fail as reported in GCC PR 64683.
      
      There are no good choices when a function has no name in the
      debug info, but here we assume that if we see such a function
      while reading the runtime functions, we assume that it is also
      a runtime function.
      
      From-SVN: r222200
      Ian Lance Taylor committed
    • re PR go/65755 (incorrect reflection of struct fields with gccgo) · 90e00f87
      	PR go/65755
      compiler, runtime, reflect: Use reflection string for type comparisons.
      
      Change the runtime and reflect libraries to always use only
      the type reflection string to determine whether two types are
      equal.  It previously used the PkgPath and Name values for a
      type name, but that required a PkgPath that did not match the
      gc compiler.
      
      Change the compiler to use the same PkgPath value as the gc
      compiler in all cases.
      
      Change the compiler to put the receiver type in the reflection
      string for a type defined inside a method.
      
      From-SVN: r222194
      Ian Lance Taylor committed
  3. 31 Mar, 2015 1 commit
    • go/cmd/go: always link external test packages first · 9f5059b2
      When linking complex packages that use both internal and external tests as well as many dependencies it is critical that the link order be external test package, internal test package, everything else.
      
      This change is a back (forward?) port of the same change that canonical have been maintaining on their fork of the go tool for gccgo. Now that gccgo uses the go tool from upstream, this patch should be applied both to the gofrontend and golang/go repos.
      
      From-SVN: r221800
      Ian Lance Taylor committed
  4. 26 Mar, 2015 2 commits
  5. 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
  6. 12 Mar, 2015 2 commits
  7. 10 Mar, 2015 1 commit
  8. 06 Mar, 2015 1 commit
  9. 06 Feb, 2015 1 commit
  10. 03 Feb, 2015 1 commit
  11. 23 Jan, 2015 2 commits
  12. 20 Jan, 2015 1 commit
  13. 19 Jan, 2015 2 commits
  14. 16 Jan, 2015 3 commits
  15. 15 Jan, 2015 4 commits
  16. 10 Jan, 2015 1 commit
  17. 09 Jan, 2015 1 commit
  18. 08 Jan, 2015 1 commit
  19. 06 Jan, 2015 1 commit
  20. 13 Dec, 2014 1 commit
  21. 21 Nov, 2014 1 commit
  22. 05 Nov, 2014 1 commit
  23. 04 Nov, 2014 1 commit
    • libgo: add s390 support · 1fec5f52
      From Dominik Vogt.
      
      * libgo/go/syscall/libcall_linux_s390.go: New file for s390 support.
      * libgo/go/syscall/syscall_linux_s390.go: Ditto.
      * libgo/go/syscall/libcall_linux_s390x.go: New file for s390x support.
      * libgo/go/syscall/syscall_linux_s390x.go: Ditto.
      * libgo/go/runtime/pprof/pprof.go (printStackRecord): Support s390 and
      s390x.
      * libgo/runtime/runtime.c (runtime_cputicks): Add support for s390 and
      s390x
      * libgo/mksysinfo.sh: Ditto.
      (upcase_fields): New helper function
      
      * libgo/go/debug/elf/file.go (applyRelocations): Implement relocations
      on s390x.
      (applyRelocationsS390x): Ditto.
      (DWARF): Ditto.
      * libgo/go/debug/elf/elf.go (R_390): New constants for S390 relocations.
      (r390Strings): Ditto.
      (String): Helper function for S390 relocations.
      (GoString): Ditto.
      
      * libgo/go/reflect/makefuncgo_s390.go: New file.
      (S390MakeFuncStubGo): Implementation of s390 abi.
      * libgo/go/reflect/makefuncgo_s390x.go: New file.
      (S390xMakeFuncStubGo): Implementation of s390x abi.
      * libgo/go/reflect/makefunc_s390.c: New file.
      (makeFuncStub): s390 and s390x specific implementation of function.
      * libgo/go/reflect/makefunc.go
      (MakeFunc): Add support for s390 and s390x.
      (makeMethodValue): Ditto.
      (makeValueMethod): Ditto.
      * libgo/Makefile.am (go_reflect_makefunc_s_file): Ditto.
      (go_reflect_makefunc_file): Ditto.
      * libgo/go/reflect/makefunc_dummy.c: Ditto.
      * libgo/runtime/runtime.h (__go_makefunc_can_recover): Export prototype
      for use in makefunc_s390.c.
      (__go_makefunc_returning): Ditto.
      
      * libgo/go/syscall/exec_linux.go (forkAndExecInChild): Fix order of the
      arguments of the clone system call for s390[x].
      
      * libgo/configure.ac (is_s390): New variable.
      (is_s390x): Ditto
      (LIBGO_IS_S390): Ditto.
      (LIBGO_IS_S390X): Ditto.
      (GOARCH): Support s390 and s390x.
      * libgo/go/go/build/build.go (cgoEnabled): Ditto.
      * libgo/go/go/build/syslist.go (goarchList): Ditto.
      
      From-SVN: r217106
      Ian Lance Taylor committed
  24. 28 Oct, 2014 1 commit
  25. 27 Oct, 2014 1 commit
  26. 20 Oct, 2014 1 commit
    • reflect: allocate correct type in assignTo and cvtT2I · 7b28fa2c
      Backport https://codereview.appspot.com/155450044 from the
      master Go library.  Original description:
      
      I came across this while debugging a GC problem in gccgo.
      There is code in assignTo and cvtT2I that handles assignment
      to all interface values.  It allocates an empty interface even
      if the real type is a non-empty interface.  The fields are
      then set for a non-empty interface, but the memory is recorded
      as holding an empty interface.  This means that the GC has
      incorrect information.
      
      This is extremely unlikely to fail, because the code in the GC
      that handles empty interfaces looks like this:
      
      obj = nil;
      typ = eface->type;
      if(typ != nil) {
              if(!(typ->kind&KindDirectIface) || !(typ->kind&KindNoPointers))
                      obj = eface->data;
      
      In the current runtime the condition is always true--if
      KindDirectIface is set, then KindNoPointers is clear--and we
      always want to set obj = eface->data.  So the question is what
      happens when we incorrectly store a non-empty interface value
      in memory marked as an empty interface.  In that case
      eface->type will not be a *rtype as we expect, but will
      instead be a pointer to an Itab.  We are going to use this
      pointer to look at a *rtype kind field.  The *rtype struct
      starts out like this:
      
      type rtype struct {
              size          uintptr
              hash          uint32            // hash of type; avoids computation in hash tables
              _             uint8             // unused/padding
              align         uint8             // alignment of variable with this type
              fieldAlign    uint8             // alignment of struct field with this type
              kind          uint8             // enumeration for C
      
      An Itab always has at least two pointers, so on a
      little-endian 64-bit system the kind field will be the high
      byte of the second pointer.  This will normally be zero, so
      the test of typ->kind will succeed, which is what we want.
      
      On a 32-bit system it might be possible to construct a failing
      case by somehow getting the Itab for an interface with one
      method to be immediately followed by a word that is all ones.
      The effect would be that the test would sometimes fail and the
      GC would not mark obj, leading to an invalid dangling
      pointer.  I have not tried to construct this test.
      
      I noticed this in gccgo, where this error is much more likely
      to cause trouble for a rather random reason: gccgo uses a
      different layout of rtype, and in gccgo the kind field happens
      to be the low byte of a pointer, not the high byte.
      
      From-SVN: r216489
      Ian Lance Taylor committed
  27. 08 Oct, 2014 1 commit
  28. 03 Oct, 2014 1 commit
  29. 05 Sep, 2014 1 commit