summaryrefslogtreecommitdiff
path: root/src/run.bash
Commit message (Collapse)AuthorAgeFilesLines
* runtime: generate windows callback list with go generateRuss Cox2014-12-051-2/+1
| | | | | | | | | | | | | | | | | | This is the last system-dependent file written by cmd/dist. They are all now written by go generate. cmd/dist is not needed to start building package runtime for a different system anymore. Now all the generated files can be assumed generated, so delete the clumsy hacks in cmd/api. Re-enable api check in run.bash. LGTM=bradfitz R=bradfitz CC=golang-codereviews https://codereview.appspot.com/185040044
* [dev.cc] all: merge default (e4ab8f908aac) into dev.ccRuss Cox2014-11-201-2/+2
|\ | | | | | | | | | | TBR=austin CC=golang-codereviews https://codereview.appspot.com/179040044
| * [dev.cc] build: disable API check until all systems buildRuss Cox2014-11-111-2/+2
| | | | | | | | | | | | | | | | | | Otherwise no system will get an 'ok' until they all do. LGTM=r, dave R=r, dave CC=austin, dvyukov, golang-codereviews, iant, khr https://codereview.appspot.com/170320044
* | build: disable race external linking test on OS X 10.6 and earlierRuss Cox2014-11-191-13/+24
| | | | | | | | | | | | | | | | | | External linking doesn't work there at all. LGTM=bradfitz R=adg, bradfitz CC=golang-codereviews https://codereview.appspot.com/176070043
* | runtime: remove assumption that noptrdata data bss noptrbss are ordered and ↵Russ Cox2014-11-191-2/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | contiguous The assumption can be violated by external linkers reordering them or inserting non-Go sections in between them. I looked briefly at trying to write out the _go_.o in external linking mode in a way that forced the ordering, but no matter what there's no way to force Go's data and Go's bss to be next to each other. If there is any data or bss from non-Go objects, it's very likely to get stuck in between them. Instead, rewrite the two places we know about that make the assumption. I grepped for noptrdata to look for more and didn't find any. The added race test (os/exec in external linking mode) fails without the changes in the runtime. It crashes with an invalid pointer dereference. Fixes issue 9133. LGTM=dneil R=dneil CC=dvyukov, golang-codereviews, iant https://codereview.appspot.com/179980043
* build: fix elf buildsRuss Cox2014-09-241-4/+7
| | | | | | | | | Corrections due to new strict type rules for data+bss. Also disable misc/cgo/cdefstest since you can't compile C code anymore. TBR=iant CC=golang-codereviews https://codereview.appspot.com/148050044
* src: pass GO_GCFLAGS down to go test stdBrad Fitzpatrick2014-09-241-1/+1
| | | | | | | | | Update Issue 8725 LGTM=rsc, josharian R=rsc, josharian CC=golang-codereviews https://codereview.appspot.com/149000043
* runtime: keep g->syscallsp consistent after cgo->Go callbacksHector Martin Cantero2014-09-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* run.bash: run misc/cgo/testgodefs/test.bashMatthew Dempsky2014-08-121-1/+6
| | | | | | | | | | | | misc/cgo/testgodefs was added by revision d1cf884a594f, but not add to run.bash. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/129760044 Committer: Ian Lance Taylor <iant@golang.org>
* run.bash: disable tests that don't (yet) like running off the hostDavid Crawshaw2014-07-081-1/+14
| | | | | | | LGTM=bradfitz, minux R=bradfitz, golang-codereviews, minux CC=golang-codereviews https://codereview.appspot.com/110940043
* run.bash: run race tests on freebsdDmitriy Vyukov2014-06-201-2/+2
| | | | | | | LGTM=dave R=golang-codereviews, dave CC=golang-codereviews https://codereview.appspot.com/102580043
* build: remove goplay from run.bash and run.batAndrew Gerrand2014-06-021-5/+0
| | | | | | | TBR=rsc R=golang-codereviews CC=golang-codereviews https://codereview.appspot.com/106730043
* cmd/ld: really import runtime/cgo for external linkIan Lance Taylor2014-05-201-0/+3
| | | | | | | | | Fixes issue 8032. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/95580043
* build: make nacl passRuss Cox2014-05-201-3/+12
| | | | | | | | | | | | | | | | 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
* run.bash: skip -static cgo test if -static linking isn't possible.Shenghou Ma2014-04-291-1/+6
| | | | | | | | | | | | Some system doesn't have libc.a available. While we're at here, also export GOROOT in run.bash, so that one doesn't need to set GOROOT to run run.bash. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/99870043
* runtime, cmd/ld, cmd/5l, run.bash: enable external linking on FreeBSD/ARM.Shenghou Ma2014-04-211-1/+6
| | | | | | | | | Update issue 7331 LGTM=dave, iant R=golang-codereviews, dave, gobot, iant CC=golang-codereviews https://codereview.appspot.com/89520043
* run.bash: fix build on netbsd builders.Shenghou Ma2014-04-151-1/+1
| | | | | | | LGTM=bradfitz R=golang-codereviews, bradfitz, dave CC=golang-codereviews https://codereview.appspot.com/88000044
* build: disable static cgo linking test on netbsdRuss Cox2014-04-151-1/+8
| | | | | | | | | | | | | | We get /usr/lib/libc.a(stack_protector.o): In function `__stack_chk_fail_local': stack_protector.c:(.text+0x158): multiple definition of `__stack_chk_fail_local' /var/tmp/go-link-04838a/000001.o:/tmp/gobuilder/netbsd-386-minux-c7a9e9243878/go/src/pkg/runtime/cgo/gcc_386.S:41: first defined here I am assuming this has never worked and possibly is not intended to work. (Some systems are vehemently against static linking.) TBR=iant CC=golang-codereviews https://codereview.appspot.com/88130046
* cmd/ld: use TLS relocations on ELF systems in external linking modeRuss Cox2014-04-151-0/+1
| | | | | | | | | Fixes issue 7719. LGTM=iant R=iant CC=golang-codereviews https://codereview.appspot.com/87760050
* build: remove depdenency on GNU makeAndrew Gerrand2014-04-071-1/+0
| | | | | | | LGTM=bradfitz R=bradfitz CC=golang-codereviews https://codereview.appspot.com/84920043
* run.bash: explain why we set GOMAXPROCS for runtime testDmitriy Vyukov2014-03-061-0/+2
| | | | | | | | | Fixes issue 7459. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/71060044
* build: comment possible ulimit failure in run.bashRuss Cox2014-02-241-0/+6
| | | | | | | | | | | | Record what's going on in case someone is debugging a failure there. It's not Go's fault. Fixes issue 7381. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/68200043
* cmd/gc: fix handling of append with -race.R?my Oudompheng2014-02-191-4/+2
| | | | | | | | | | | Also re-enable race tests in run.bash. Fixes issue 7334. LGTM=rsc R=rsc, dvyukov, iant, bradfitz, dave CC=golang-codereviews https://codereview.appspot.com/65740043
* build: disable race detector test in run.bat on windowsRuss Cox2014-02-151-1/+2
| | | | | | | | | CL 64170043 disabled it in run.bash for Unix systems. I did not realize Windows systems also ran the race detector test. TBR=iant CC=golang-codereviews https://codereview.appspot.com/64480043
* cmd/gc: correct liveness for fat variablesRuss Cox2014-02-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VARDEF placement must be before the initialization but after any final use. If you have something like s = ... using s ... the rhs must be evaluated, then the VARDEF, then the lhs assigned. There is a large comment in pgen.c on gvardef explaining this in more detail. This CL also includes Ian's suggestions from earlier CLs, namely commenting the use of mode in link.h and fixing the precedence of the ~r check in dcl.c. This CL enables the check that if liveness analysis decides a variable is live on entry to the function, that variable must be a function parameter (not a result, and not a local variable). If this check fails, it indicates a bug in the liveness analysis or in the generated code being analyzed. The race detector generates invalid code for append(x, y...). The code declares a temporary t and then uses cap(t) before initializing t. The new liveness check catches this bug and stops the compiler from writing out the buggy code. Consequently, this CL disables the race detector tests in run.bash until the race detector bug can be fixed (golang.org/issue/7334). Except for the race detector bug, the liveness analysis check does not detect any problems (this CL and the previous CLs fixed all the detected problems). The net test still fails with GOGC=0 but the rest of the tests now pass or time out (because GOGC=0 is so slow). TBR=iant CC=golang-codereviews https://codereview.appspot.com/64170043
* cgo: enable cgo on dragonflyAulus Egnatius Varialus2013-09-041-2/+3
| | | | | | | | | | Enable cgo for dragonfly/386 and dragonfly/amd64. R=golang-dev, jsing, iant, bradfitz CC=golang-dev https://codereview.appspot.com/13247046 Committer: Ian Lance Taylor <iant@golang.org>
* cmd/cgo: don't let #cgo directives mess up line numberingIan Lance Taylor2013-09-031-0/+6
| | | | | | | | Fixes issue 5272. R=golang-dev, r CC=golang-dev https://codereview.appspot.com/13498046
* runtime.cmd/ld: Add ARM external linking and implement -shared in terms of ↵Elias Naur2013-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | external linking This CL is an aggregate of 10271047, 10499043, 9733044. Descriptions of each follow: 10499043 runtime,cmd/ld: Merge TLS symbols and teach 5l about ARM TLS This CL prepares for external linking support to ARM. The pseudo-symbols runtime.g and runtime.m are merged into a single runtime.tlsgm symbol. When external linking, the offset of a thread local variable is stored at a memory location instead of being embedded into a offset of a ldr instruction. With a single runtime.tlsgm symbol for both g and m, only one such offset is needed. The larger part of this CL moves TLS code from gcc compiled to internally compiled. The TLS code now uses the modern MRC instruction, and 5l is taught about TLS fallbacks in case the instruction is not available or appropriate. 10271047 This CL adds support for -linkmode external to 5l. For 5l itself, use addrel to allow for D_CALL relocations to be handled by the host linker. Of the cases listed in rsc's comment in issue 4069, only case 5 and 63 needed an update. One of the TODO: addrel cases was since replaced, and the rest of the cases are either covered by indirection through addpool (cases with LTO or LFROM flags) or stubs (case 74). The addpool cases are covered because addpool emits AWORD instructions, which in turn are handled by case 11. In the runtime, change the argv argument in the rt0* functions slightly to be a pointer to the argv list, instead of relying on a particular location of argv. 9733044 The -shared flag to 6l outputs a shared library, implemented in Go and callable from non-Go programs such as C. The main part of this CL change the thread local storage model. Go uses the fastest and least general mode, local exec. TLS data in shared libraries normally requires at least the local dynamic mode, however, this CL instead opts for using the initial exec mode. Initial exec mode is faster than local dynamic mode and can be used in linux since the linker has reserved a limited amount of TLS space for performance sensitive TLS code. Initial exec mode requires an extra load from the GOT table to determine the TLS offset. This penalty will not be paid if ld is not in -shared mode, since TLS accesses will be reduced to local exec. The elf sections .init_array and .rela.init_array are added to register the Go runtime entry with cgo at library load time. The "hidden" attribute is added to Cgo functions called from Go, since Go does not generate call through the GOT table, and adding non-GOT relocations for a global function is not supported by gcc. Cgo symbols don't need to be global and avoiding the GOT table is also faster. The changes to 8l are only removes code relevant to the old -shared mode where internal linking was used. This CL only address the low level linker work. It can be submitted by itself, but to be useful, the runtime changes in CL 9738047 is also needed. Design discussion at https://groups.google.com/forum/?fromgroups#!topic/golang-nuts/zmjXkGrEx6Q Fixes issue 5590. R=rsc CC=golang-dev https://codereview.appspot.com/12871044 Committer: Russ Cox <rsc@golang.org>
* runtime/race: add end-to-end testDmitriy Vyukov2013-08-121-1/+2
| | | | | | | | Fixes issue 5933. R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/12699051
* cmd/api: eliminate duplicate package import workRuss Cox2013-08-091-1/+1
| | | | | | | | | On my Mac, cuts the API checks from 15 seconds to 6 seconds. Also clean up some tag confusion: go run list-of-files ignores tags. R=bradfitz, gri CC=golang-dev https://codereview.appspot.com/12699048
* build: change how cmd/api is run in run.bash and run.batBrad Fitzpatrick2013-08-071-6/+3
| | | | | | | | | | | | | | | | In prep for Robert's forthcoming cmd/api rewrite which depends on the go.tools subrepo, we'll need to be more careful about how and when we run cmd/api. Rather than implement this policy in both run.bash and run.bat, this change moves the policy and mechanism into cmd/api/run.go, which will then evolve. The plan is in a TODO in run.go. R=golang-dev, gri CC=golang-dev https://codereview.appspot.com/12482044
* build: ignore new zfiles, delete temp goplay binary in run.bashBrad Fitzpatrick2013-08-021-0/+1
| | | | | | R=golang-dev, rsc CC=golang-dev https://codereview.appspot.com/12320045
* build: on OS X 10.8 and later, use clang instead of gccRuss Cox2013-08-021-1/+4
| | | | | | | | | Fixes issue 5822. Will no doubt cause other problems, but Apple has forced our hand. R=golang-dev, bradfitz, khr CC=golang-dev https://codereview.appspot.com/12350044
* misc/dist: don't ship cmd/apiBrad Fitzpatrick2013-08-021-3/+6
| | | | | | | | | | | | | | | | | | | | | | | cmd/api is a tool to prevent the Go developers from breaking the Go 1 API promise. It has no utility to end users and doesn't run on arbitrary packages (it's always been full of hacks for its bespoke type checker to work on the standard library) Robert's in-progress rewrite depends on the go.tools repo for go/types, so we won't be able to ship this tool later anyway. Just remove it from binary distributions. A future change to run.bash can conditionally build & run cmd/api, perhaps automatically fetching go/types if necessary. I assume people don't want to vendor go/types into a private gopath just for cmd/api. I will need help with run.bat. R=golang-dev, adg, dsymonds, rsc CC=golang-dev https://codereview.appspot.com/12316043
* build: remove builder from test suite (fix build)Andrew Gerrand2013-08-011-2/+2
| | | | | | R=golang-dev, dave, dsymonds CC=golang-dev https://codereview.appspot.com/12225043
* doc/codewalk: test source codeAndrew Gerrand2013-07-301-4/+1
| | | | | | | | Fixes issue 2648. R=golang-dev, r CC=golang-dev https://codereview.appspot.com/11331043
* build: fix buildRuss Cox2013-07-291-2/+0
| | | | | | | | As promised. TBR=dvyukov CC=golang-dev https://codereview.appspot.com/12063043
* build: break buildsRuss Cox2013-07-291-0/+2
| | | | | | | | | | | | I want to see the timing information in build logs, and we can't see the logs for "ok" builds. So make the build fail everywhere. Will roll back immediately. TBR=dvyukov CC=golang-dev https://codereview.appspot.com/12058046
* cmd/cgo: Fix issue with cgo cdefsKevin Klues2013-07-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the cdecl() function in cmd/cgo/godefs.go isn't properly translating the Go array type to a C array type when an asterisk follows the [] in the array type declaration (it is perfectly legal to put the asterisk on either side of the [] in go syntax, depending on how you set up your pointers). That said, the cdefs tool is only designed to translate from Go types generated using the cgo *godefs* tool -- where the godefs tool is designed to translate gcc-style C types into Go types. In essence, the cdefs tool translates from gcc-style C types to Go types (via the godefs tool), then back to kenc-style C types. Because of this, cdefs does not need to know how to translate arbitraty Go types into C, just the ones produced by godefs. The problem is that during this translation process, the logic is slightly wrong when going from (e.g.): char *array[10]; to: array [10]*int8; back to: int8 *array[10]; In the current implementation of cdecl(), the translation from the Go type declaration back to the kenc-style declaration looks for Go types of the form: name *[]type; rather than the actual generated Go type declaration of: name []*type; Both are valid Go syntax, with slightly different semantics, but the latter is the only one that can ever be generated by the godefs tools. (The semantics of the former are not directly expressible in a single C statement -- you would have to have to first typedef the array type, then declare a pointer to that typedef'd type in a separate statement). This commit changes the logic of cdecl() to look properly for, and translate, Go type declarations of the form: name []*type; Additionally, the original implementation only allowed for a single asterisk and a single sized aray (i.e. only a single level of pointer indirection, and only one set of []) on the type, whereas the patched version allows for an arbitrary number of both. Tests are included in misc/cgo/testcdefs and the all.bash script has been updated to account for these. R=golang-dev, bradfitz, dave, iant CC=golang-dev https://codereview.appspot.com/11377043 Committer: Ian Lance Taylor <iant@golang.org>
* run.bash: enlarge timeout of runtime testsShenghou Ma2013-07-131-1/+1
| | | | | | | | | Recently addition to runtime test makes it take very close to 720s of timeout limit on the netbsd-arm-qemu builder. R=golang-dev, go.peter.90, rsc CC=golang-dev https://codereview.appspot.com/10935043
* run.bash: actually stop on cgo failuresRuss Cox2013-07-111-22/+38
| | | | | | | | I hate bash. R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/11200043
* run.bash: raise ulimit for the number of threads.Benny Siegert2013-06-171-0/+5
| | | | | | | | | | | This is needed on NetBSD-current. Support for ulimit -T in bash was added in 4.2nb3. R=golang-dev, minux.ma, rsc, dave CC=golang-dev https://codereview.appspot.com/10078047 Committer: Dave Cheney <dave@cheney.net>
* runtime: more flexible heap memory mapping on 64-bitsDmitriy Vyukov2013-06-121-0/+6
| | | | | | | | Fixes issue 5641. R=golang-dev, dave, daniel.morsing, iant CC=golang-dev, kcc https://codereview.appspot.com/10126044
* cmd/go: fix LDFLAGS handling, enable misc/cgo/testso on DarwinShenghou Ma2013-05-221-1/+0
| | | | | | | | Fixes issue 5479. R=golang-dev, dave CC=golang-dev https://codereview.appspot.com/9416047
* api: add go1.1.txt; update cmd/api to use itBrad Fitzpatrick2013-05-061-1/+1
| | | | | | R=golang-dev, adg, r CC=golang-dev https://codereview.appspot.com/9250043
* cmd/dist, cmd/ld: GO_EXTLINK_ENABLED=0 defaults to -linkmode=internalIan Lance Taylor2013-03-291-1/+9
| | | | | | | | | | | | Change build system to set GO_EXTLINK_ENABLED=0 by default for OS X 10.6, since the system linker has a bug and can not handle the object files generated by 6l. Fixes issue 5130. R=golang-dev, r CC=golang-dev https://codereview.appspot.com/8183043
* cmd/ld: emit TLS relocations during external linkingIan Lance Taylor2013-03-271-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL was written by rsc. I just tweaked 8l. This CL adds TLS relocation to the ELF .o file we write during external linking, so that the host linker (gcc) can decide the final location of m and g. Similar relocations are not necessary on OS X because we use an alternate program start-time mechanism to acquire thread-local storage. Similar relocations are not necessary on ARM or Plan 9 or Windows because external linking mode is not yet supported on those systems. On almost all ELF systems, the references we use are like %fs:-0x4 or %gs:-0x4, which we write in 6a/8a as -0x4(FS) or -0x4(GS). On Linux/ELF, however, Xen's lack of support for this mode forced us long ago to use a two-instruction sequence: first we load %gs:0x0 into a register r, and then we use -0x4(r). (The ELF program loader arranges that %gs:0x0 contains a regular pointer to that same memory location.) In order to relocate those -0x4(r) references, the linker must know where they are. This CL adds the equivalent notation -0x4(r)(GS*1) for this purpose: it assembles to the same encoding as -0x4(r) but the (GS*1) indicates to the linker that this is one of those thread-local references that needs relocation. Thanks to Elias Naur for reminding me about this missing piece and also for writing the test. R=r CC=golang-dev https://codereview.appspot.com/7891047
* build, cmd/5l: actually report failures for -linkmode testsShenghou Ma2013-03-251-0/+1
| | | | | | R=golang-dev, rsc CC=golang-dev https://codereview.appspot.com/7938046
* build: increase timeout for ARMShenghou Ma2013-03-241-3/+7
| | | | | | | | in an effort to make builder freebsd-arm-pi and netbsd-arm-qemu pass again. R=golang-dev, r CC=golang-dev https://codereview.appspot.com/7621050
* cmd/ld: replace -hostobj with -linkmodeRuss Cox2013-03-191-2/+3
| | | | | | | | Still disabled. Need to fix TLS. R=golang-dev, minux.ma, bradfitz CC=golang-dev https://codereview.appspot.com/7783044