summaryrefslogtreecommitdiff
path: root/misc
Commit message (Collapse)AuthorAgeFilesLines
* misc/cgo/test: skip test8694 on ARM.Shenghou Ma2014-12-081-1/+7
| | | | | | | | | LGTM=dave, bradfitz, rsc R=golang-codereviews, dave, bradfitz, rsc CC=golang-codereviews https://codereview.appspot.com/185130043 Committer: Russ Cox <rsc@golang.org>
* undo CL 176900044 / 561398621ba7David Symonds2014-11-171-0/+3
| | | | | | | | | | | | | | | | | | | | Turns out it *is* needed because the cmd/link tests expect to find their own files. ??? original CL description misc/nacl: exclude cmd/link from the test zip. It does not appear to be necessary, and cmd/link does not appear in release branches. LGTM=rsc R=adg, rsc CC=golang-codereviews https://codereview.appspot.com/176900044 ??? TBR=rsc R=adg, rsc CC=golang-codereviews https://codereview.appspot.com/175870045
* misc/nacl: exclude cmd/link from the test zip.David Symonds2014-11-171-3/+0
| | | | | | | | | It does not appear to be necessary, and cmd/link does not appear in release branches. LGTM=rsc R=adg, rsc CC=golang-codereviews https://codereview.appspot.com/176900044
* misc/makerelease: use release-branch.go1.4 for tools and tourAndrew Gerrand2014-11-171-2/+2
| | | | | | | TBR=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/175870043
* cmd/dist: remove old misc/pprofRuss Cox2014-11-091-5100/+0
| | | | | | | LGTM=dave, bradfitz, r, alex.brainman R=r, dave, bradfitz, alex.brainman CC=golang-codereviews https://codereview.appspot.com/167350043
* all: use golang.org/x/... import pathsAndrew Gerrand2014-11-102-6/+6
| | | | | | | LGTM=rsc, r R=r, rsc CC=golang-codereview, golang-codereviews https://codereview.appspot.com/168050043
* misc/cgo/test: fix freebsd test failure by moving test to its own package.Alan Donovan2014-11-032-27/+39
| | | | | | | | | | (The assertion depends on a per-package gensym counter whose value varies based on what else is in the package.) LGTM=khr R=khr, rsc CC=golang-codereviews https://codereview.appspot.com/169930043
* misc: Increase issue 6997's test timeout to prevent spurious failures.Benoit Sigoure2014-11-011-1/+1
| | | | | | | | | | | | On heavily loaded build servers, a 5 second timeout is too aggressive, which causes this test to fail spuriously. LGTM=iant R=iant CC=golang-codereviews, sqweek https://codereview.appspot.com/170850043 Committer: Ian Lance Taylor <iant@golang.org>
* misc/cgo/test: fix bad C test code that fails on some configurationsAlan Donovan2014-10-301-1/+1
| | | | | | | LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/169800043
* cmd/cgo: avoid worklist nondeterminism.Alan Donovan2014-10-302-0/+34
| | | | | | | | | | | + Regression test. Fixes issue 9026. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/162490043
* misc/makerelease/windows: fix 404 help URL in installerEmil Hessman2014-10-271-3/+3
| | | | | | | | | | | | | ARPHELPLINK yields 404; update the URL. While here, also prefix the ARPREADME and ARPURLINFOABOUT URL's with the HTTP scheme to make 'em clickable links in the Add or Remove Programs listing. LGTM=adg R=golang-codereviews CC=adg, golang-codereviews https://codereview.appspot.com/154580045 Committer: Andrew Gerrand <adg@golang.org>
* misc/makerelease: set version number in Windows installerJens Frederich2014-10-222-4/+20
| | | | | | | | | | | | | | | | | | | | Set correct version number at Windows installer based on Go's Mercurial tag. Name | Version ------------------------------------------------ Go Programming Language amd64 go1.3.3 | 1.3.3 Go Programming Language amd64 go1.2rc3 | 1.2 Go Programming Language amd64 go1.2beta1 | 1.2 Fixes issue 8239. LGTM=adg R=adg, c.emil.hessman, alex.brainman CC=golang-codereviews https://codereview.appspot.com/160950044 Committer: Andrew Gerrand <adg@golang.org>
* cmd/go: add '_go_' suffix to go files compiled by gccgo to avoid naming ↵Chris Manghane2014-10-153-0/+31
| | | | | | | | | | | conflicts Fixes issue 8828. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/154410043
* cmd/ld: do not assume that only pe section names start with '.'Alex Brainman2014-10-113-0/+31
| | | | | | | | | | | | | | | | | | | Our current pe object reader assumes that every symbol starting with '.' is section. It appeared to be true, until now gcc 4.9.1 generates some symbols with '.' at the front. Change that logic to check other symbol fields in addition to checking for '.'. I am not an expert here, but it seems reasonable to me. Added test, but it is only good, if tested with gcc 4.9.1. Otherwise the test PASSes regardless. Fixes issue 8811. Fixes issue 8856. LGTM=jfrederich, iant, stephen.gutekanst R=golang-codereviews, jfrederich, stephen.gutekanst, iant CC=alex.brainman, golang-codereviews https://codereview.appspot.com/152410043
* misc/cgo/test: add Test8517Alex Brainman2014-10-094-0/+83
| | | | | | | | | | | CL 145890044 did not provide test. Rectify that. Update issue 8517 LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews https://codereview.appspot.com/148790043
* runtime: fix _cgo_allocate(0)Russ Cox2014-10-072-0/+17
| | | | | | | | | Fixes a SWIG bug reported off-list. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/155990043
* misc/cgo/test: fail issue 7978 with clearer error when GOTRACEBACK != 2Russ Cox2014-10-031-0/+4
| | | | | | | | | | The test doesn't work with GOTRACEBACK != 2. Diagnose that failure mode. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r https://codereview.appspot.com/152970043
* misc/nacl/README: fix typoMikio Hara2014-10-011-3/+3
| | | | | | | LGTM=dave R=golang-codereviews, dave CC=golang-codereviews https://codereview.appspot.com/151870043
* cmd/cgo: add missing ast.SliceExpr.Max case to AST traversal.Alan Donovan2014-09-301-0/+5
| | | | | | | | | | | + static test NB: there's a preexisting (dynamic) failure of test issue7978.go. LGTM=iant R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/144650045
* cgo: adjust return value location to account for stack copies.Keith Randall2014-09-253-48/+111
| | | | | | | | | | | | | | | | During a cgo call, the stack can be copied. This copy invalidates the pointer that cgo has into the return value area. To fix this problem, pass the address of the location containing the stack top value (which is in the G struct). For cgo functions which return values, read the stktop before and after the cgo call to compute the adjustment necessary to write the return value. Fixes issue 8771 LGTM=iant, rsc R=iant, rsc, khr CC=golang-codereviews https://codereview.appspot.com/144130043
* debug/dwarf: correct name for clang-generated complex typeRuss Cox2014-09-242-0/+33
| | | | | | | | | Fixes issue 8694. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/143570043
* cmd/go: prohibit C sources files unless using cgoRuss Cox2014-09-244-61/+1
| | | | | | | | | | | | | | Those C files would have been compiled with 6c. It's close to impossible to use C correctly anymore, and the C compilers are going away eventually. Make them unavailable now. go1.4.txt change in CL 145890046 LGTM=iant R=iant CC=golang-codereviews, r https://codereview.appspot.com/149720043
* runtime: keep g->syscallsp consistent after cgo->Go callbacksHector Martin Cantero2014-09-242-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | Normally, the caller to runtime.entersyscall() must not return before calling runtime.exitsyscall(), lest g->syscallsp become a dangling pointer. runtime.cgocallbackg() violates this constraint. To work around this, save g->syscallsp and g->syscallpc around cgo->Go callbacks, then restore them after calling runtime.entersyscall(), which restores the syscall stack frame pointer saved by cgocall. This allows the GC to correctly trace a goroutine that is currently returning from a Go->cgo->Go chain. This also adds a check to proc.c that panics if g->syscallsp is clearly invalid. It is not 100% foolproof, as it will not catch a case where the stack was popped then pushed back beyond g->syscallsp, but it does catch the present cgo issue and makes existing tests fail without the bugfix. Fixes issue 7978. LGTM=dvyukov, rsc R=golang-codereviews, dvyukov, minux, bradfitz, iant, gobot, rsc CC=golang-codereviews, rsc https://codereview.appspot.com/131910043 Committer: Russ Cox <rsc@golang.org>
* runtime: remove untyped allocation of ParForRuss Cox2014-09-165-0/+107
| | | | | | | | | | | | | | | | Now it's two allocations. I don't see much downside to that, since the two pieces were in different cache lines anyway. Rename 'conservative' to 'cgo_conservative_type' and make clear that _cgo_allocate is the only allowed user. This depends on CL 141490043, which removes the other use of conservative (in defer). LGTM=dvyukov, iant R=khr, dvyukov, iant CC=golang-codereviews, rlh https://codereview.appspot.com/139610043
* build: more adjustments for move from src/pkg to srcRuss Cox2014-09-081-80/+79
| | | | | | | | | | These were missed in CL 134570043. Fixes nacl, solaris builds. TBR=r CC=golang-codereviews https://codereview.appspot.com/136320043
* build: adjustments for move from src/pkg to srcRuss Cox2014-09-082-3/+3
| | | | | | | | | | | | | | | | | | | This CL adjusts code referring to src/pkg to refer to src. Immediately after submitting this CL, I will submit a change doing 'hg mv src/pkg/* src'. That change will be too large to review with Rietveld but will contain only the 'hg mv'. This CL will break the build. The followup 'hg mv' will fix it. For more about the move, see golang.org/s/go14nopkg. LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/134570043
* misc/makerelease: make goimports-safeRuss Cox2014-09-061-1/+1
| | | | | | | LGTM=bradfitz R=adg, bradfitz, minux CC=golang-codereviews https://codereview.appspot.com/140310045
* runtime: get rid of other Go->C calls in test exports.Keith Randall2014-09-062-14/+16
| | | | | | | | | | testSchedLocal* tests need to malloc now because their stack frames are too big to fit on the G0 stack. LGTM=iant R=golang-codereviews, iant, khr CC=golang-codereviews https://codereview.appspot.com/133660043
* runtime: use reflect.call during panic instead of newstackcallRuss Cox2014-09-052-0/+4
| | | | | | | | | | newstackcall creates a new stack segment, and we want to be able to throw away all that code. LGTM=khr R=khr, iant CC=dvyukov, golang-codereviews, r https://codereview.appspot.com/139270043
* misc/cgo/test: make issue5548 test pickierRuss Cox2014-09-051-4/+5
| | | | | | | | | | | | | | If there is doubt about passing arguments correctly (as there is in this test), there should be doubt about getting the results back intact too. Using 0 and 1 (especially 0 for success) makes it easy to get a PASS accidentally when the return value is not actually being propagated. Use less common values. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r https://codereview.appspot.com/141110043
* runtime: refactor/fix asmcgocall/asmcgocall_errnoRuss Cox2014-09-041-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Instead of making asmcgocall call asmcgocall_errno, make both load args into registers and call a shared assembly function. On amd64, this costs 1 word in the asmcgocall_errno path but saves 3 words in the asmcgocall path, and the latter is what happens on critical nosplit paths on Windows. On arm, this fixes build failures: asmcgocall was writing the arguments for asmcgocall_errno into the wrong place on the stack. Passing them in registers avoids the decision entirely. On 386, this isn't really needed, since the nosplit paths have twice as many words to work with, but do it for consistency. Update issue 8635 Fixes arm build (except GOARM=5). TBR=iant CC=golang-codereviews https://codereview.appspot.com/134390043
* cmd/cgo, runtime: write cgo stub wrappers in Go, not CRuss Cox2014-09-031-3/+4
| | | | | | | LGTM=alex.brainman, iant R=golang-codereviews, alex.brainman, iant CC=dvyukov, golang-codereviews, khr, r https://codereview.appspot.com/139070043
* misc/cgo/testcdefs: comment out test of packed structsIan Lance Taylor2014-08-312-3/+9
| | | | | | | | | | | | | | | The [568]c compilers no longer support packed structs, so using them with -cdefs no longer works. Just commenting out the test, rather than removing it, in case this needs to be handled. It may be that -cdefs can go away entirely in the future, in which case so can this directory. LGTM=mdempsky R=rsc, mdempsky CC=golang-codereviews https://codereview.appspot.com/136030043 Committer: Russ Cox <rsc@golang.org>
* misc/cgo/test: disable issue 8428 regress test on darwinMatthew Dempsky2014-08-281-0/+4
| | | | | | | | | | | | | | | Clang 3.2 and older (as shipped with OS X Mountain Lion and older) outputs ambiguous DWARF debug info that makes it impossible for us to reconstruct accurate type information as required for this test. Fixes issue 8611. LGTM=rsc R=r, rsc, minux CC=golang-codereviews https://codereview.appspot.com/135990043 Committer: Russ Cox <rsc@golang.org>
* cmd/{ld,link,objdump}, runtime, debug/gosym: move linker-defined symbols ↵Matthew Dempsky2014-08-272-0/+37
| | | | | | | | | | | | | into runtime package Fixes issue 8092. LGTM=rsc R=iant, rsc CC=golang-codereviews https://codereview.appspot.com/126790043 Committer: Russ Cox <rsc@golang.org>
* misc/nacl: fix buildDave Cheney2014-08-221-0/+2
| | | | | | | | | | | Add gofmt.go and gofmt_test.go as they are part of the test data set. See CL 130440043. LGTM=dvyukov R=golang-codereviews, dvyukov CC=golang-codereviews https://codereview.appspot.com/132820044
* misc/nacl: add debugging instructionsDmitriy Vyukov2014-08-151-3/+31
| | | | | | | LGTM=dave, minux R=golang-codereviews, dave, minux CC=golang-codereviews, rsc https://codereview.appspot.com/122570043
* cmd/cgo: check for compiler errors in the C preambleMatthew Dempsky2014-08-142-0/+18
| | | | | | | | | | | | | | | | | | | | E.g., here's the new "go build" output: $ go build misc/cgo/errors/issue8442.go # command-line-arguments could not determine kind of name for C.issue8442foo gcc errors for preamble: misc/cgo/errors/issue8442.go:11:19: error: unknown type name 'UNDEF' Fixes issue 8442. LGTM=iant R=iant, alex.brainman CC=golang-codereviews https://codereview.appspot.com/129160043 Committer: Ian Lance Taylor <iant@golang.org>
* cmd/cgo, debug/dwarf: fix translation of zero-size arraysMatthew Dempsky2014-08-131-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In cgo, now that recursive calls to typeConv.Type() always work, we can more robustly calculate the array sizes based on the size of our element type. Also, in debug/dwarf, the decision to call zeroType is made based on a type's usage within a particular struct, but dwarf.Type values are cached in typeCache, so the modification might affect uses of the type in other structs. Current compilers don't appear to share DWARF type entries for "[]foo" and "[0]foo", but they also don't consistently share type entries in other cases. Arguably modifying the types is an improvement in some cases, but varying translated types according to compiler whims seems like a bad idea. Lastly, also in debug/dwarf, zeroType only needs to rewrite the top-level dimension, and only if the rest of the array size is non-zero. Fixes issue 8428. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/127980043 Committer: Ian Lance Taylor <iant@golang.org>
* misc/makerelease: exit with nonzero status code on errorAndrew Gerrand2014-08-131-0/+5
| | | | | | | LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/129040043
* cmd/cgo: make C function pointers non-assignableMatthew Dempsky2014-08-122-0/+15
| | | | | | | | | | | | Fixes issue 7757. Fixes issue 8488. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/118690044 Committer: Ian Lance Taylor <iant@golang.org>
* cmd/cgo: fix default alignment for empty structsMatthew Dempsky2014-08-112-0/+32
| | | | | | | | | | | Fixes issue 5242. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/125120043 Committer: Ian Lance Taylor <iant@golang.org>
* misc/nacl/testzip.proto: add fewer files to the zipShenghou Ma2014-08-111-1/+2
| | | | | | | LGTM=bradfitz, rsc R=rsc, iant, bradfitz CC=golang-codereviews https://codereview.appspot.com/126940043
* misc/nacl/testzip.proto: include cmd/internal/* to fix buildShenghou Ma2014-08-071-0/+2
| | | | | | | LGTM=adg, dave R=golang-codereviews, adg, dave CC=golang-codereviews https://codereview.appspot.com/123050043
* cmd/go: pass --build-id=none when generating a cgo .oIan Lance Taylor2014-08-072-2/+80
| | | | | | | | | | | | | | | | | Some systems, like Ubuntu, pass --build-id when linking. The effect is to put a note in the output file. This is not useful when generating an object file with the -r option, as it eventually causes multiple build ID notes in the final executable, all but one of which are for tiny portions of the file and are therefore useless. Disable that by passing an explicit --build-id=none when linking with -r on systems that might do this. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/119460043
* misc/nacl: wrap lines in README fileAndrew Gerrand2014-08-071-15/+42
| | | | | | | LGTM=dan.kortschak, dave R=dave, dan.kortschak CC=golang-codereviews https://codereview.appspot.com/121350043
* cmd/cgo: consistently map void* to *byte under -{c,go}defsMatthew Dempsky2014-08-063-1/+24
| | | | | | | | | | | Fixes issue 8478. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/122150043 Committer: Ian Lance Taylor <iant@golang.org>
* cmd/cgo: fix recursive type mappingMatthew Dempsky2014-08-051-0/+27
| | | | | | | | | | | | | | | | Instead of immediately completing pointer type mappings, add them to a queue to allow them to be completed later. This fixes issues caused by Type() returning arbitrary in-progress type mappings. Fixes issue 8368. Fixes issue 8441. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/122850043 Committer: Ian Lance Taylor <iant@golang.org>
* cmd/cgo: fix handling of defs_linux.goMatthew Dempsky2014-08-053-0/+42
| | | | | | | | | | | | | | | | | | | Instead of including <sys/types.h> to get size_t, instead include the ISO C standard <stddef.h> header, which defines fewer additional types at risk of colliding with the user code. In particular, this prevents collisions between <sys/types.h>'s userspace definitions with the kernel definitions needed by defs_linux.go. Also, -cdefs mode uses #pragma pack, so we can keep misaligned fields. Fixes issue 8477. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/120610043 Committer: Ian Lance Taylor <iant@golang.org>
* cmd/cgo: for -godefs, promote first field of anonymous unionIan Lance Taylor2014-08-053-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | Update issue 6677 When a struct contains an anonymous union, use the type and name of the first field in the union. This should make the glibc <sys/resource.h> file work; in that file struct rusage has fields like __extension__ union { long int ru_maxrss; __syscall_slong_t __ru_maxrss_word; }; in which the field that matters is ru_maxrss and __ru_maxrss_word just exists to advance to the next field on systems where the kernel uses long long fields but userspace expects long fields. LGTM=mikioh.mikioh R=golang-codereviews, mikioh.mikioh CC=golang-codereviews https://codereview.appspot.com/106260044