aboutsummaryrefslogtreecommitdiff
path: root/libgo
AgeCommit message (Collapse)AuthorFilesLines
2015-03-13libgo/README: Minor updates.Ian Lance Taylor1-9/+8
In particular, mention that libgo should not be stripped. From-SVN: r221427
2015-03-12go/build: cgo works on linux/arm64.Ian Lance Taylor1-0/+1
From-SVN: r221398
2015-03-12re PR go/65404 (cgo tool on powerpc-linux-gnu maybe incomplete)Ian Lance Taylor1-0/+1
PR go/65404 go/build: cgo works on linux/pcc. From-SVN: r221396
2015-03-10re PR go/65353 (unknown ptrSize for $GOARCH "arm64" on aarch64-linux-gnu)Ian Lance Taylor1-10/+32
PR go/65353. cmd/cgo: Add all gccgo GOARCH values to size maps. From-SVN: r221293
2015-03-09re PR go/65349 (go tool crashes, can't compile go code on 32bit linux systems)Ian Lance Taylor1-1/+3
PR go/65349 runtime: Don't crash if explicitly freeing small map. From-SVN: r221292
2015-03-09re PR go/65349 (go tool crashes, can't compile go code on 32bit linux systems)Ian Lance Taylor1-30/+6
PR go/65349 runtime: Don't call malloc from __go_file_line callback. When crashing, we call runtime_printcreatedby which calls __go_file_line which used to call the Go malloc. If we are crashing due to a signal due to heap corruption of some sort, the GO malloc lock might already be held, leading to a crash within a crash. Avoid that by assuming that the libbacktrace strings will stick around, as we already do in go-callers.c. From-SVN: r221291
2015-03-06libgo: Upgrade to Go 1.4.2 release.Ian Lance Taylor18-66/+170
From-SVN: r221245
2015-02-06mksysinfo.sh: Remove _zone_net_addr_t handling.Ian Lance Taylor1-5/+0
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
2015-02-06runtime: Add memprofilerate to GODEBUGIan Lance Taylor2-1/+19
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
2015-02-03go/types: Remove unused testdata files.Ian Lance Taylor13-1992/+0
The go/types package was removed in July 2013, but the testdata files were accidentally left behind. From-SVN: r220378
2015-01-23re PR go/64573 (Cmd.Start swallows error from fork()/clone())Ian Lance Taylor1-0/+1
PR go/64573 syscall: Restore line somehow lost in libgo merge. From-SVN: r220068
2015-01-23re PR go/64725 (FAIL: libgo/runtime TestFinalizerType testing.go:278: #2: ↵Ian Lance Taylor1-0/+9
finalizer for type func(*int) didn't run) PR go/64725 runtime: Disable tests that require that a finalizer run. From-SVN: r220067
2015-01-23re PR go/64595 (go programs abort when debug info is stripped)Ian Lance Taylor1-0/+5
PR go/64595 runtime: Don't crash in runtime_callers if no debug info available. From-SVN: r220057
2015-01-21runtime: Add the Go language version information to the Version output.Ian Lance Taylor4-2/+13
From-SVN: r219976
2015-01-20re PR go/64683 (FAIL: runtime/pprof -- testing.go:278: The entry did not match)Ian Lance Taylor1-2/+4
PR go/64683 runtime/pprof: Let memory profiler test pass if value not collected. Since gccgo's GC is not precise, the transient value may not be collected. Let the regexp match that case as well. From-SVN: r219900
2015-01-20runtime: No special case for 386 complex in FFI support.Ian Lance Taylor1-15/+1
All supported libgo 386 targets now have complex support in libffi. From Uros Bizjak. From-SVN: r219877
2015-01-19Add attribute unused to dummy arguments in ffi stubRichard Henderson1-1/+2
From-SVN: r219862
2015-01-19reflect: Fix build for systems that do not define ffi_go_closure.Ian Lance Taylor3-7/+7
From-SVN: r219831
2015-01-16runtime: Add __sparc__ case for SETCONTEXT_CLOBBERS_TLS.Ian Lance Taylor1-0/+24
The glibc setcontext incorrectly modifies %g7 on SPARC. From Richard Henderson. From-SVN: r219778
2015-01-16testing/quick: Revert Alpha specific change.Ian Lance Taylor1-7/+4
No longer needed now that libffi supports complex types. From-SVN: r219777
2015-01-16compiler, reflect, runtime: Use static chain for closures.Richard Henderson21-2344/+84
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
2015-01-16net: Restore earlier Solaris-specific version of setKeepAlivePeriod.Ian Lance Taylor3-2/+34
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
2015-01-16runtime: Use a struct, not void, for an empty struct for libffi.Ian Lance Taylor1-3/+16
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
2015-01-15go/build: cgo works on linux/alpha.Ian Lance Taylor1-0/+1
From Uros Bizjak. From-SVN: r219691
2015-01-15reflect: Correct error in conversion of s390x support to Go 1.4.Ian Lance Taylor1-1/+1
From-SVN: r219685
2015-01-15libgo: Bump version number in libgo configure script.Ian Lance Taylor2-2/+2
From-SVN: r219629
2015-01-15Add files somehow left out of last commit (upgrade to Go 1.4).Ian Lance Taylor2-0/+174
From-SVN: r219628
2015-01-15libgo, compiler: Upgrade libgo to Go 1.4, except for runtime.Ian Lance Taylor613-6871/+29850
This upgrades all of libgo other than the runtime package to the Go 1.4 release. In Go 1.4 much of the runtime was rewritten into Go. Merging that code will take more time and will not change the API, so I'm putting it off for now. There are a few runtime changes anyhow, to accomodate other packages that rely on minor modifications to the runtime support. The compiler changes slightly to add a one-bit flag to each type descriptor kind that is stored directly in an interface, which for gccgo is currently only pointer types. Another one-bit flag (gcprog) is reserved because it is used by the gc compiler, but gccgo does not currently use it. There is another error check in the compiler since I ran across it during testing. gotools/: * Makefile.am (go_cmd_go_files): Sort entries. Add generate.go. * Makefile.in: Rebuild. From-SVN: r219627
2015-01-10cmd/go: Back-port CL 157460043 (pass $CGO_LDFLAGS to linker with the "gccgo" ↵Ian Lance Taylor1-0/+1
toolchain). From-SVN: r219419
2015-01-09cmd/go: Adjust finding gccgo to match current upstream sources.Ian Lance Taylor1-6/+13
From-SVN: r219406
2015-01-08cmd/go: Use builtin constant to set default gccgo compiler.Ian Lance Taylor1-11/+12
Don't look it up on PATH. This lets a go tool built as part of a GCC build use the gccgo from the same build. Also pass -c when assembling a .s file with gccgo. From-SVN: r219358
2015-01-06libgo: Add sources for go, cgo, and gofmt commands.Ian Lance Taylor135-3/+18991
The new commands are not yet built. That will be done separately. Also include a few changes to go/build to support them. From-SVN: r219272
2015-01-05re PR go/61871 (FAIL: regexp from libgo testsuite on non-split stack targets)Ian Lance Taylor1-1/+1
PR go/61871 runtime: Increase stack size on 64-bit non-split-stack systems. From Uros Bizjak. From-SVN: r219192
2014-12-23runtime: Remove undefined references to runtime_race*.Ian Lance Taylor7-130/+2
From-SVN: r219049
2014-12-17mksysinfo: Pass -O to compiler to avoid warnings on CentOS.Ian Lance Taylor2-2/+2
From Uros Bizjak. https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01366.html From-SVN: r218819
2014-12-13re PR go/61258 (gccgo: assertion failure go-map-delete.c:37 [GoSmith])Ian Lance Taylor1-1/+4
PR go/61258 runtime: Don't crash when deleting zero-sized key. From-SVN: r218702
2014-12-13testing: Add testing.MainStart function.Ian Lance Taylor1-5/+51
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
2014-12-13runtime: Clear stack pointers for extra G's.Ian Lance Taylor1-0/+3
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
2014-12-12Add load of target-utils.exp to libatomic, libitm, libvtv, libgo testsuite ↵Kyrylo Tkachov1-0/+2
drivers * testsuite/lib/libatomic.exp: Load target-utils.exp * testsuite/lib/libitm.exp: Load target-utils.exp. Move load of target-supports.exp earlier. * testsuite/lib/libvtv.exp: Load target-utils.exp From-SVN: r218664
2014-12-01runtime: introduce mvifdiff.sh script to replace GCC's move-if-changeIan Lance Taylor3-12/+27
This goes towards making libgo more self-contained. From-SVN: r218198
2014-11-21runtime: GOARCH values for ppc64 BE & LEIan Lance Taylor4-7/+45
ppc64 for BE ppc64le for LE issue 8654 From-SVN: r217941
2014-11-14runtime: set library name based on compiler nameIan Lance Taylor4-44/+116
Different compilers may have different release cadences or ABI incompatibilities, so it does not make sense to use the same library name for runtime libraries intended for different compilers. This CL causes a libgo built by llgo to receive the name libgo-llgo. Likewise, libgobegin is named libgobegin-llgo. From-SVN: r217583
2014-11-12libgo: Update libtool support to files in current GCC trunk.Ian Lance Taylor3-45/+37
From-SVN: r217404
2014-11-06runtime: Use stckf unconditionally on s390.Dominik Vogt1-6/+6
2014-11-05 Dominik Vogt <vogt@linux.vnet.ibm.com> * libgo/runtime/runtime.c (runtime_cputicks): s390: use stckf unconditionally From-SVN: r217195
2014-11-06mksysinfo: Tolerate missing structures in upcase_fields.Dominik Vogt1-4/+4
2014-11-06 Dominik Vogt <vogt@linux.vnet.ibm.com> * libgo/mksysinfo.sh: Tolerate missing structures. From-SVN: r217194
2014-11-05sync/atomic: fix data races in testsIan Lance Taylor1-8/+8
Backport https://codereview.appspot.com/111320044 from Go master library. From-SVN: r217110
2014-11-04libgo: add s390 supportIan Lance Taylor20-18/+1309
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
2014-11-03runtime: use "$GOC -dumpversion" instead of BASE-VER to discover compiler ↵Ian Lance Taylor2-2/+2
version From-SVN: r217049
2014-10-28debug/elf: add power64 support along with relocation testIan Lance Taylor4-1/+233
Backport of https://codereview.appspot.com/125910043 from the dev.power64 branch of the master repository. From-SVN: r216813
2014-10-28libgo: Add consts for ioctlIan Lance Taylor1-1/+25
TIOCSWINSZ_val, TCGETS_val, TCSETS_val From-SVN: r216807