summaryrefslogtreecommitdiff
path: root/misc
Commit message (Collapse)AuthorAgeFilesLines
* [release-branch.go1.3] runtime: keep g->syscallsp consistent after cgo->Go ↵Russ Cox2014-09-262-0/+104
| | | | | | | | | | | | | | | | | | | | callbacks This is a manual backport of CL 131910043 to the Go 1.3 release branch. We believe this CL can cause arbitrary corruption in programs that call into C from Go and then call back into Go from C. This change will be released in Go 1.3.2. LGTM=iant R=iant, hector CC=adg, dvyukov, golang-codereviews, r https://codereview.appspot.com/142690043 Committer: Andrew Gerrand <adg@golang.org>
* [release-branch.go1.3] cmd/cgo: fix recursive type mappingAndrew Gerrand2014-08-121-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | ??? CL 122850043 / 0015a2541545 cmd/cgo: fix recursive type mapping 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> ??? TBR=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/128940043
* [release-branch.go1.3] nacltest.bash, misc/nacl/README: update NaCl docs.Russ Cox2014-06-111-6/+4
| | | | | | | | | | | | | | | | ??? CL 105030043 / 6146799f32ed nacltest.bash, misc/nacl/README: update NaCl docs. LGTM=rsc R=dave, rsc CC=golang-codereviews https://codereview.appspot.com/105030043 ??? LGTM=r R=golang-codereviews, r CC=bradfitz, golang-codereviews, iant https://codereview.appspot.com/105020044
* [release-branch.go1.3] cmd/cgo: for typedef of untagged struct, use typedef ↵Russ Cox2014-06-061-0/+31
| | | | | | | | | | | | | | | | | | | | name in C code ??? CL 103080043 / 5e058e21b67d cmd/cgo: for typedef of untagged struct, use typedef name in C code Fixes issue 8148. LGTM=cookieo9, rsc R=rsc, cookieo9 CC=golang-codereviews https://codereview.appspot.com/103080043 ??? LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r https://codereview.appspot.com/103900046
* [release-branch.go1.3] cmd/cgo: use same Go type for typedef to anonymous structDavid Symonds2014-06-033-0/+35
| | | | | | | | | | | | | | | | | | | | | ??? CL 102080043 / 256d975c53cb cmd/cgo: use same Go type for typedef to anonymous struct If we see a typedef to an anonymous struct more than once, presumably in two different Go files that import "C", use the same Go type name. Fixes issue 8133. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/102080043 ??? TBR=adg CC=golang-codereviews https://codereview.appspot.com/102100043
* [release-branch.go1.3] misc/nacl: remove cmd/link from testzip.protoAndrew Gerrand2014-06-021-3/+0
| | | | | | | | | There's no cmd/link in this branch. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/102050043
* misc/makerelease: report uploads to the new downloads pageAndrew Gerrand2014-06-021-7/+50
| | | | | | | LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/102040047
* misc/goplay: remove programAndrew Gerrand2014-06-024-318/+0
| | | | | | | | | | | | | This program has barely been touched since it was first committed, and in its current state it opens a code execution vector similar to the one that was recently fixed in go.tools/playground/socket. Rather than try to make it secure, remove it. LGTM=minux, rsc R=rsc, minux CC=golang-codereviews https://codereview.appspot.com/102030047
* misc/makerelease: upload files to Google Cloud StorageAndrew Gerrand2014-05-291-120/+57
| | | | | | | LGTM=bradfitz R=jasonhall, bradfitz CC=golang-codereviews https://codereview.appspot.com/91700047
* cmd/cgo: given typedef struct S T, make C.T and C.struct_S interchangeableRuss Cox2014-05-281-0/+51
| | | | | | | | | | | | | | | | | | | | | | For incomplete struct S, C.T and C.struct_S were interchangeable in Go 1.2 and earlier, because all incomplete types were interchangeable (even C.struct_S1 and C.struct_S2). CL 76450043, which fixed issue 7409, made different incomplete types different from Go's point of view, so that they were no longer completely interchangeable. However, imprecision about C.T and C.struct_S - really the same underlying C type - is the one behavior enabled by the bug that is most likely to be depended on by existing cgo code. Explicitly allow it, to keep that code working. Fixes issue 7786. LGTM=iant, r R=golang-codereviews, iant, r CC=golang-codereviews https://codereview.appspot.com/98580046
* misc: properly spell Chrome in docDmitriy Vyukov2014-05-261-1/+1
| | | | | | | LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/99440046
* cmd/ld: really import runtime/cgo for external linkIan Lance Taylor2014-05-202-0/+36
| | | | | | | | | Fixes issue 8032. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/95580043
* build: make nacl passRuss Cox2014-05-207-0/+1941
| | | | | | | | | | | | | | | | Add nacl.bash, the NaCl version of all.bash. It's a separate script because it builds a variant of package syscall with a large zip file embedded in it, containing all the input files needed for tests. Disable various tests new since the last round, mostly the ones using os/exec. Fixes issue 7945. LGTM=dave R=golang-codereviews, remyoudompheng, dave, bradfitz CC=golang-codereviews https://codereview.appspot.com/100590044
* misc/makerelease: handle update tour file layoutAndrew Gerrand2014-05-201-1/+0
| | | | | | | | | Fixes issue 7835. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/94670044
* misc/pprof: always use go tool objdump on windowsAlex Brainman2014-05-151-0/+1
| | | | | | | | | Fixes issue 7406. LGTM=r R=golang-codereviews, r CC=golang-codereviews https://codereview.appspot.com/97440043
* cmd/cgo: omit misaligned struct fields, like we omit bitfieldsRuss Cox2014-05-122-0/+45
| | | | | | | | | Fixes issue 7560. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/96300045
* cmd/gc: disable link-time copying of un-Go-initialized globalsRuss Cox2014-05-092-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you write: var x = 3 then the compiler arranges for x to be initialized in the linker with an actual 3 from the data segment, rather than putting x in the bss and emitting init-time "x = 3" assignment code. If you write: var y = x var x = 3 then the compiler is clever and treats this the same as if the code said 'y = 3': they both end up in the data segment with no init-time assignments. If you write var y = x var x int then the compiler was treating this the same as if the code said 'x = 0', making both x and y zero and avoiding any init-time assignment. This copying optimization to avoid init-time assignment of y is incorrect if 'var x int' doesn't mean 'x = 0' but instead means 'x is initialized in C or assembly code'. The program ends up with 'y = 0' instead of 'y = the value specified for x in that other code'. Disable the propagation if there is no initializer for x. This comes up in some uses of cgo, because cgo generates Go globals that are initialized in accompanying C files. Fixes issue 7665. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/93200044
* misc/vim/readme.txt: workaround weird OS X vim bug.Shenghou Ma2014-04-281-3/+5
| | | | | | | | | | | | | | | | The vi bundled with OS X has a weird bug in that if you turn off filetype in .vimrc when it's not turned on, even a clean exit of vi will return 1 which breaks almost everything. While we're at it, add hint to change $GOROOT to its actual value in .vimrc. Fixes issue 7865. LGTM=robert.hencke, dsymonds R=golang-codereviews, robert.hencke, gobot, dsymonds CC=golang-codereviews https://codereview.appspot.com/96800046
* misc/cgo/test/backdoor: add gccgo version of backdoor functionIan Lance Taylor2014-04-261-0/+11
| | | | | | | | | | | | For the gc compiler the Go function Issue7695 is defined in runtime.c, but there is no way to do that for gccgo, because there is no way to get the correct pkgpath. The test is not important for gccgo in any case. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/93870044
* test: demo for issue 7695Russ Cox2014-04-163-0/+35
| | | | | | | | | | | | | | | | | | | | Cgo writes C function declarations pretending every arg is a pointer. If the C function is deferred, it does not inhibit stack copying on split. The stack copying code believes the C declaration, possibly misinterpreting integers as pointers. Probably the right fix for Go 1.3 is to make deferred C functions inhibit stack copying. For Go 1.4 and beyond we probably need to make cgo generate Go code for 6g here, not C code for 6c. Update issue 7695 LGTM=khr R=khr CC=golang-codereviews https://codereview.appspot.com/83820043
* misc/emacs: ignore backquote in comment or stringRui Ueyama2014-04-091-1/+13
| | | | | | | | | | | | | | | | | go-mode on Emacs 23 wrongly recognizes a backquote in a comment or a string as a start of a raw string literal. Below is an example that go-mode does not work well. This patch is to fix that issue. // ` var x = 1 // ` LGTM=dominik.honnef R=golang-codereviews, dominik.honnef, adonovan CC=golang-codereviews https://codereview.appspot.com/84900043 Committer: Alan Donovan <adonovan@google.com>
* benchcmp: leave a forwarding scriptRuss Cox2014-03-311-0/+5
| | | | | | | | | | People (like me!) will still try to run misc/benchcmp and wonder where it went. Tell them. LGTM=bradfitz R=golang-codereviews, bradfitz, dave CC=adg, golang-codereviews, r https://codereview.appspot.com/82710043
* misc/emacs: do not highlight built-in function if not followed by '('Rui Ueyama2014-03-271-1/+1
| | | | | | | | | | | | | | | | | | Name of built-in function is not reserved word in Go, and you can use it as variable name. "new" is often used as local variable, for instance. This patch is to apply font-lock-builtin-face only when built-in function name is followed by '(', so that it doesn't highlight non-function variable that happen to have the same name as built-in function. LGTM=dominik.honnef R=golang-codereviews, dominik.honnef, adonovan CC=golang-codereviews https://codereview.appspot.com/79260043 Committer: Alan Donovan <adonovan@google.com>
* cmd/cgo: enforce typing of 0-sized typesDaniel Morsing2014-03-272-0/+19
| | | | | | | | | | | cgo represents all 0-sized and unsized types internally as [0]byte. This means that pointers to incomplete types would be interchangable, even if given a name by typedef. Fixes issue 7409. LGTM=iant R=golang-codereviews, bradfitz, iant CC=golang-codereviews https://codereview.appspot.com/76450043
* misc/emacs: handle backslash in raw string in Emacs 23Rui Ueyama2014-03-271-1/+13
| | | | | | | | | | | | | | | | | | Go-mode in Emacs 23 does not recognize a backslash followed by a backquote as end of raw string literal, as it does not support syntax-propertize-function which Go-mode uses to remove special meaning from backslashes in ``. This patch provides a fallback mechanism to do the same thing using font-lock-syntactic-keywords, which is supported by Emacs 23. LGTM=dominik.honnef R=golang-codereviews, dominik.honnef CC=adonovan, golang-codereviews https://codereview.appspot.com/78730048 Committer: Alan Donovan <adonovan@google.com>
* misc/bash, misc/zsh: fix completion rulesRui Ueyama2014-03-272-13/+4
| | | | | | | | | | | | This patch includes fixes pointed out in CL 52140043, which was originally written by john.gosset. LGTM=minux.ma R=golang-codereviews, minux.ma CC=golang-codereviews https://codereview.appspot.com/80320043 Committer: Shenghou Ma <minux.ma@gmail.com>
* misc/vim: Disable automatic line wrapping by textwidth.David Barnett2014-03-261-1/+3
| | | | | | | | | | | | | If someone configures a 'textwidth' in go files, vim will by default insert newlines into long lines as you type, which breaks syntax and doesn't really make sense for go code. This fixes the default. LGTM=dsymonds R=golang-codereviews, gobot, dsymonds CC=golang-codereviews https://codereview.appspot.com/76890046 Committer: David Symonds <dsymonds@golang.org>
* misc/nacl: add Native Client support scripts and documentationDave Cheney2014-03-243-0/+85
| | | | | | | LGTM=josharian, dan.kortschak R=golang-codereviews, josharian, dan.kortschak CC=golang-codereviews https://codereview.appspot.com/75080043
* misc/bash/go: remove "doc" subcommand autocompletionRui Ueyama2014-03-181-4/+1
| | | | | | | | | | | "go doc" has been removed in CL 17799. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/77420045 Committer: Ian Lance Taylor <iant@golang.org>
* misc/bash/go: Add a completion rule for "go env".Rui Ueyama2014-03-171-1/+1
| | | | | | | | | | | "env" is a valid go command. This patch is to make bash to autocomplete it. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/74660045 Committer: Brad Fitzpatrick <bradfitz@golang.org>
* misc/emacs: correctly fontify methods when go-fontify-function-calls is nilDominik Honnef2014-03-121-1/+1
| | | | | | | | | | | We were fontifying the wrong part of method declarations LGTM=adonovan R=adonovan CC=golang-codereviews https://codereview.appspot.com/66120043 Committer: Alan Donovan <adonovan@google.com>
* misc/makerelease: use windows installer resources from local gorootAndrew Gerrand2014-03-031-5/+1
| | | | | | | | | | This broke when we renamed the tool, and I missed this fix when I fixed darwin last week. LGTM=minux.ma, bradfitz R=golang-codereviews, minux.ma, bradfitz CC=golang-codereviews https://codereview.appspot.com/70670043
* go/misc/makerelease: pin go-tour repo to a specific revisionAndrew Gerrand2014-02-281-29/+44
| | | | | | | | | | | | | | We're about to commit some wide-sweeping changes to the go-tour and I would rather not include them in Go 1.2.1, which is due in the next week or so. Also fix the makerelease tool; it has been broken since it was renamed from bindist. LGTM=campoy R=campoy CC=golang-codereviews https://codereview.appspot.com/68780043
* misc/cgo/testso: don't use TLS variables on Darwin and OpenBSD.Shenghou Ma2014-02-232-1/+5
| | | | | | | | | Fix build for 10.6 Darwin builders and OpenBSD builers. LGTM=jsing R=golang-codereviews, dave, jsing CC=golang-codereviews https://codereview.appspot.com/67710043
* cmd/ld: don't emit unreachable dynimport symbols in ELF symtab.Shenghou Ma2014-02-232-0/+21
| | | | | | | | | | | Fix build for Dragonfly BSD. Fixes issue 7318. Fixes issue 7367. LGTM=jsing, iant R=jsing, iant, mikioh.mikioh CC=golang-codereviews https://codereview.appspot.com/64340043
* misc/emacs: add support for ff-find-other-fileDominik Honnef2014-02-181-0/+10
| | | | | | | | | | | | | | | | | | c-mode classically uses ff-find-other-file to toggle between headers and implementation. For Go it seemingly makes sense to jump between implementation and test. While there's no enforced mapping of file names for tests, the mapping in this CL seems to be very common at least throughout the standard library, and ff-find-other-file fails gracefully when the mapping doesn't apply. LGTM=adonovan R=adonovan CC=golang-codereviews https://codereview.appspot.com/65750044 Committer: Alan Donovan <adonovan@google.com>
* misc/emacs: actually use point argument that is passed to godef--callDominik Honnef2014-02-181-1/+1
| | | | | | | | | LGTM=adonovan R=adonovan CC=golang-codereviews https://codereview.appspot.com/62600043 Committer: Alan Donovan <adonovan@google.com>
* runtime: more precise mprof samplingDmitriy Vyukov2014-02-121-0/+1
| | | | | | | | | | Better sampling of objects that are close in size to sampling rate. See the comment for details. LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews https://codereview.appspot.com/43830043
* misc/pprof: support web profiles on windowsDmitriy Vyukov2014-02-101-0/+7
| | | | | | | LGTM=bradfitz R=golang-codereviews, bradfitz, alex.brainman CC=golang-codereviews https://codereview.appspot.com/61260044
* cmd/go, doc/go1.3.txt: misc/benchcmp has been replaced by go tool benchcmpJosh Bleecher Snyder2014-02-041-124/+0
| | | | | | | | | | | Fixes issue 7016. LGTM=r R=r CC=adg, bradfitz, dave, golang-codereviews https://codereview.appspot.com/60100043 Committer: Rob Pike <r@golang.org>
* cmd/ld: fix bug with "runtime/cgo" in external link modeIan Lance Taylor2014-01-301-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | In external link mode the linker explicitly adds the string constant "runtime/cgo". It adds the string constant using the same symbol name as the compiler, but a different format. The compiler assumes that the string data immediately follows the string header, but the linker puts the two in different sections. The result is bad string data when the compiler sees "runtime/cgo" used as a string constant. The compiler assumption is in datastring in [568]g/gobj.c. The linker layout is in addstrdata in ld/data.c. The compiler assumption is valid for string literals. The linker is not creating a string literal, so its assumption is also valid. There are a few ways to avoid this problem. This patch fixes it by only doing the fake import of runtime/cgo if necessary, and by only creating the string symbol if necessary. Fixes issue 7234. LGTM=dvyukov R=golang-codereviews, dvyukov, bradfitz CC=golang-codereviews https://codereview.appspot.com/58410043
* misc/cgo/testtls: make test less flakyRuss Cox2014-01-211-6/+8
| | | | | | | | | Now it should always fail on ARM. (The fix is on its way too.) R=iant, r, dave CC=golang-codereviews https://codereview.appspot.com/55140043
* runtime: co-exist with NPTL's pthread_cancel.Rowan Worth2014-01-093-0/+67
| | | | | | | | | | | | | | | | | NPTL uses SIGRTMIN (signal 32) to effect thread cancellation. Go's runtime replaces NPTL's signal handler with its own, and ends up aborting if a C library that ends up calling pthread_cancel is used. This patch prevents runtime from replacing NPTL's handler. Fixes issue 6997. R=golang-codereviews, iant, dvyukov CC=golang-codereviews https://codereview.appspot.com/47540043 Committer: Ian Lance Taylor <iant@golang.org>
* misc/emacs: fontify type switch correctlyDominik Honnef2014-01-061-2/+2
| | | | | | | | | | | Require at least one space after "type" and do not fontify closing parenthesis of type switch as a type. R=adonovan CC=golang-codereviews https://codereview.appspot.com/37720050 Committer: Alan Donovan <adonovan@google.com>
* misc/emacs: minor cleanupsDominik Honnef2014-01-061-7/+10
| | | | | | | | R=adonovan CC=golang-codereviews https://codereview.appspot.com/23290044 Committer: Alan Donovan <adonovan@google.com>
* misc/vim: Fix broken quoteYasuhiro Matsumoto2013-12-241-1/+1
| | | | | | | | R=golang-codereviews, gobot, dsymonds CC=golang-codereviews https://codereview.appspot.com/44960043 Committer: David Symonds <dsymonds@golang.org>
* misc/notepadplus: Fix Function List in Notepad++ 6.5ChaiShushan2013-12-181-0/+7
| | | | | | | | | | | | | Since version 6.5, npp change the Function List syntax for User Defined Languages. We need use userDefinedLangName syntax in association tag in Notepad++ 6.5. Fix issue 6735. R=golang-dev, rsc CC=golang-dev https://codereview.appspot.com/22770043 Committer: Brad Fitzpatrick <bradfitz@golang.org>
* misc/vim: use shiftwidth() instead of &sw if available.Shenghou Ma2013-12-161-4/+16
| | | | | | | | Fixes issue 6841. R=golang-dev, dsymonds CC=golang-dev https://codereview.appspot.com/43010044
* misc/dist: rename to makereleaseAndrew Gerrand2013-12-1113-9/+9
| | | | | | | | The ambiguity has gone on too long. R=golang-dev, minux.ma, r, dsymonds CC=golang-dev https://codereview.appspot.com/39920043
* misc/cgo/testcdefs: rm correct file in test.bashAlex Brainman2013-12-101-1/+1
| | | | | | R=golang-dev, rsc CC=golang-dev https://codereview.appspot.com/39780043