summaryrefslogtreecommitdiff
path: root/misc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* misc/pprof: support web profiles on windows/MinGWChaiShushan2014-07-231-2/+8
| | | | | | | | | LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/117060043 Committer: Brad Fitzpatrick <bradfitz@golang.org>
* undo CL 109640045 / f97fb06525e5Shenghou Ma2014-07-181-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Breaks build for FreeBSD. Probably clang related? ??? original CL description cmd/cgo: disable inappropriate warnings when the gcc struct is empty package main //#cgo CFLAGS: -Wall //void test() {} import "C" func main() { C.test() } This code will cause gcc issuing warnings about unused variable. This commit use offset of the second return value of Packages.structType to detect whether the gcc struct is empty, and if it's directly invoke the C function instead of writing an unused code. LGTM=dave, minux R=golang-codereviews, iant, minux, dave CC=golang-codereviews https://codereview.appspot.com/109640045 Committer: Shenghou Ma <minux@golang.org> ??? TBR=dfc R=dave CC=golang-codereviews https://codereview.appspot.com/114990044
* cmd/cgo: disable inappropriate warnings when the gcc struct is emptysnyh2014-07-181-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | package main //#cgo CFLAGS: -Wall //void test() {} import "C" func main() { C.test() } This code will cause gcc issuing warnings about unused variable. This commit use offset of the second return value of Packages.structType to detect whether the gcc struct is empty, and if it's directly invoke the C function instead of writing an unused code. LGTM=dave, minux R=golang-codereviews, iant, minux, dave CC=golang-codereviews https://codereview.appspot.com/109640045 Committer: Shenghou Ma <minux@golang.org>
* misc/nacl: add go_nacl_arm_exec, update READMEShenghou Ma2014-07-102-3/+17
| | | | | | | LGTM=dave, rsc R=rsc, iant, dave CC=golang-codereviews https://codereview.appspot.com/109390043
* androidtest.bash, misc/android: build scripts for androidDavid Crawshaw2014-07-092-0/+107
| | | | | | | LGTM=minux R=minux CC=golang-codereviews https://codereview.appspot.com/107640044
* misc/nacl, syscall: lazily initialize fs on nacl.Shenghou Ma2014-07-011-2/+8
| | | | | | | | | | On amd64, the real time is reduced from 176.76s to 140.26s. On ARM, the real time is reduced from 921.61s to 726.30s. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/101580043
* misc: delete editor and shell supportRob Pike2014-07-0132-4335/+5
| | | | | | | | | | | | | We are not the right people to support editor plugins, and the profusion of editors in this CL demonstrates the unreality of pretending to do so. People are free to create and advertise their own repos with support. For discussion: https://groups.google.com/forum/#!topic/golang-dev/SA7fD470FxU LGTM=rminnich, kamil.kisiel, gri, rsc, dave, josharian, ruiu R=golang-codereviews, rminnich, kamil.kisiel, gri, rsc, dominik.honnef, dave, josharian, ruiu, ajstarks CC=golang-codereviews https://codereview.appspot.com/105470043
* misc/emacs: add new function godoc-at-pointDominik Honnef2014-06-171-12/+44
| | | | | | | | | LGTM=adonovan R=adonovan, ruiu CC=golang-codereviews https://codereview.appspot.com/107160048 Committer: Alan Donovan <adonovan@google.com>
* misc/emacs: replace hacky go--delete-whole-line with own implementationDominik Honnef2014-06-171-17/+23
| | | | | | | | | | | | | | | | Using flet to replace kill-region with delete-region was a hack, flet is now (GNU Emacs 24.3) deprecated and at least two people have reported an issue where using go--delete-whole-line would permanently break their kill ring. While that issue is probably caused by faulty third party code (possibly prelude), it's easier to write a clean implementation than to tweak the hack. LGTM=ruiu, adonovan R=adonovan, ruiu CC=adg, golang-codereviews https://codereview.appspot.com/106010043 Committer: Alan Donovan <adonovan@google.com>
* misc/makerelease: update default tag to release-branch.go1.3Andrew Gerrand2014-06-121-2/+2
| | | | | | | TBR=bradfitz R=golang-codereviews CC=golang-codereviews https://codereview.appspot.com/104090044
* nacltest.bash, misc/nacl/README: update NaCl docs.Shenghou Ma2014-06-101-6/+4
| | | | | | | LGTM=rsc R=dave, rsc CC=golang-codereviews https://codereview.appspot.com/105030043