1
0
mirror of https://github.com/golang/go synced 2024-11-14 13:30:30 -07:00
Commit Graph

12396 Commits

Author SHA1 Message Date
Andrew Gerrand
018854d24a [release-branch.go1.1] bufio: check buffer availability before reading in ReadFrom
This change was applied by hand, as bufio has seen some refactoring
since 1.1 was branched. The only difference between this and the
original patch is the offset of the change, and s/flush/Flush/.

««« CL 11801043 / 3ffbc06b4874
bufio: check buffer availability before reading in ReadFrom

Fixes  issue 5947 .

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11801043
»»»

Update #5928

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12002043
2013-07-29 18:00:58 +10:00
Andrew Gerrand
2041d55aac [release-branch.go1.1] syscall: prlimit argument error for Getrlimit and Setrlimit on Linux 32-bit
««« CL 11803043 / ba52f6399462
syscall: prlimit argument error for Getrlimit and Setrlimit on Linux 32-bit

The rlimit arguments for prlimit are reversed for linux 32-bit (386 and arm).
Getrlimit becomes Setrlimit and vice versa.
Fixes #5949.

R=iant, mikioh.mikioh, rsc
CC=golang-dev
https://golang.org/cl/11803043

»»»

Update #5928

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11996043
2013-07-29 10:34:53 +10:00
Andrew Gerrand
3e917131a1 [release-branch.go1.1] cmd/cgo: gccgo fixes
««« CL 11406047 / 4d9c3095de9d
cmd/cgo: gccgo fixes

Don't require a full-scale callback for calls to the special
prologue functions.

Always use a simple wrapper function for C functions, so that
we can handle static functions defined in the import "C"
comment.

Disable a test that relies on gc-specific function names.

Fixes #5905.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11406047

»»»

Update #5928

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11887043
2013-07-29 09:57:49 +10:00
Andrew Gerrand
89020aa72c [release-branch.go1.1] cmd/gc: avoid passing unevaluated constant expressions to backends.
««« CL 11107044 / 5baf6060648e
cmd/gc: avoid passing unevaluated constant expressions to backends.

Backends do not exactly expect receiving binary operators with
constant operands or use workarounds to move them to
register/stack in order to handle them.

Fixes #5841.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/11107044

»»»

Update #5928

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11879044
2013-07-26 10:04:32 +10:00
Andrew Gerrand
b5245b9c77 [release-branch.go1.1] undo 6efaa14e2e7f
It breaks the build.

R=golang-dev
CC=golang-dev
https://golang.org/cl/11584045
2013-07-23 10:10:11 +10:00
Andrew Gerrand
ceeda72bab [release-branch.go1.1] runtime: prevent sysmon from polling network excessivly
««« CL 11569043 / 6b3c351c7fe6
runtime: prevent sysmon from polling network excessivly
If the network is not polled for 10ms, sysmon starts polling network
on every iteration (every 20us) until another thread blocks in netpoll.
Fixes  issue 5922 .

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/11569043
»»»

Update #5928

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11438044
2013-07-23 09:50:35 +10:00
Andrew Gerrand
fc9a18f16b [release-branch.go1.1] cmd/8g: Make clearfat non-interleaved with pointer calculations.
««« CL 11383043 / dc24634de6c5
cmd/8g: Make clearfat non-interleaved with pointer calculations.

clearfat (used to zero initialize structures) will use AX for x86 block ops. If we write to AX while calculating the dest pointer, we will fill the structure with incorrect values.
Since 64-bit arithmetic uses AX to synthesize a 64-bit register, getting an adress by indexing with 64-bit ops can clobber the register.

Fixes #5820.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11383043
»»»

Update #5928

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11698043
2013-07-23 09:40:49 +10:00
Andrew Gerrand
f2fa995324 [release-branch.go1.1] runtime: properly set G status after syscall
««« CL 9307045 / fab6ba2a2d10
runtime: properly set G status after syscall

R=golang-dev, r, dave
CC=golang-dev
https://golang.org/cl/9307045
»»»

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11694043
2013-07-23 09:31:37 +10:00
Andrew Gerrand
9db29c2784 [release-branch.go1.1] cmd/6g, cmd/8g: prevent constant propagation of non-constant LEA.
««« CL 10785043 / cf792c00f410
cmd/6g, cmd/8g: prevent constant propagation of non-constant LEA.

Fixes #5809.

R=golang-dev, dave, rsc, nigeltao
CC=golang-dev
https://golang.org/cl/10785043
»»»

Update #5928

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11515045
2013-07-23 08:00:01 +10:00
Andrew Gerrand
b82120bd3e [release-branch.go1.1] cmd/gc: fix issue with method wrappers not having escape analysis run on them.
««« CL 10383048 / 58e15340e78f
cmd/gc: fix issue with method wrappers not having escape analysis run on them.

Escape analysis needs the right curfn value on a dclfunc node, otherwise it will not analyze the function.
When generating method value wrappers, we forgot to set the curfn correctly.

Fixes #5753.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/10383048
»»»

Update #5928

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11669043
2013-07-22 23:45:28 +10:00
Andrew Gerrand
b315b7ffff [release-branch.go1.1] time: prevent a panic from leaving the timer mutex held
««« CL 10373047 / 974a69ed9fcf
time: prevent a panic from leaving the timer mutex held

When deleting a timer, a panic due to nil deref
would leave a lock held, possibly leading to a deadlock
in a defer. Instead return false on a nil timer.

Fixes #5745.

R=golang-dev, daniel.morsing, dvyukov, rsc, iant
CC=golang-dev
https://golang.org/cl/10373047

»»»

Update #5928

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11666046
2013-07-22 18:41:32 +10:00
Andrew Gerrand
e33810b291 [release-branch.go1.1] cmd/gc: fix missing export data for inlining in a few other cases.
««« CL 10464043 / c224c549a3c7
cmd/gc: fix missing export data for inlining in a few other cases.

Exported inlined functions that perform a string conversion
using a non-exported named type may miss it in export data.

Fixes #5755.

R=rsc, golang-dev, ality, r
CC=golang-dev
https://golang.org/cl/10464043
»»»

Update #5928

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11629044
2013-07-22 18:34:36 +10:00
Andrew Gerrand
6baa8dba68 [release-branch.go1.1] cmd/gc: fix pointer composite literals in exported if statements.
««« CL 10470043 / d04e6b0bcacf
cmd/gc: fix pointer composite literals in exported if statements.

Fixes #4230 (again).

R=rsc, golang-dev, r
CC=golang-dev
https://golang.org/cl/10470043
»»»

Update #5928

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11455045
2013-07-22 18:22:30 +10:00
Andrew Gerrand
3b7e6e8db1 [release-branch.go1.1] cmd/gc: compute initialization order for top-level blank vars too.
««« CL 8601044 / 3a74e15c5d56
cmd/gc: compute initialization order for top-level blank vars too.

Fixes #5244.

R=golang-dev, rsc, iant, r, daniel.morsing
CC=golang-dev
https://golang.org/cl/8601044
»»»

R=iant, rsc
CC=golang-dev
https://golang.org/cl/10250043
2013-06-13 10:30:45 +10:00
Andrew Gerrand
13af44f8a5 [release-branch.go1.1] cmd/gc: save local var list before inlining
««« CL 10210043 / b357e33bb414
cmd/gc: save local var list before inlining

This avoids problems with inlining in genwrappers, which
occurs after functions have been compiled.  Compiling a
function may cause some unused local vars to be removed from
the list.  Since a local var may be unused due to
optimization, it is possible that a removed local var winds up
beingused in the inlined version, in which case hilarity
ensues.

Fixes #5515.

R=golang-dev, khr, dave
CC=golang-dev
https://golang.org/cl/10210043
»»»

R=iant, rsc
CC=golang-dev
https://golang.org/cl/10242044
2013-06-13 10:04:17 +10:00
Andrew Gerrand
3e88a825df [release-branch.go1.1] cmd/gc: fix missing slice/array types in export data.
««« CL 9953044 / 0e1b2f7384d2
cmd/gc: fix missing slice/array types in export data.

Fixes #5614.

R=golang-dev
CC=golang-dev
https://golang.org/cl/9953044
»»»

R=iant, remyoudompheng, dsymonds
CC=golang-dev
https://golang.org/cl/10033043
2013-06-05 11:19:26 +10:00
Andrew Gerrand
d72c550f1c [release-branch.go1.1] runtime: fix heap corruption during GC
««« CL 9831043 / e84e7204b01b
runtime: fix heap corruption during GC
The 'n' variable is used during rescan initiation in GC_END case,
but it's overwritten with chan capacity in GC_CHAN case.
As the result rescan is done with the wrong object size.
Fixes #5554.

R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/9831043
»»»

R=dvyukov, khr, dave
CC=golang-dev
https://golang.org/cl/10028044
2013-06-05 11:12:46 +10:00
Andrew Gerrand
ff7cb872a4 [release-branch.go1.1] runtime: zeroize g->fnstart to not prevent GC of the closure
««« CL 9557043 / 2c128d417029
runtime: zeroize g->fnstart to not prevent GC of the closure
Fixes #5493.

R=golang-dev, minux.ma, iant
CC=golang-dev
https://golang.org/cl/9557043
»»»

R=dvyukov, iant, minux.ma, bradfitz, dave
CC=golang-dev
https://golang.org/cl/10031043
2013-06-05 10:52:00 +10:00
Andrew Gerrand
b9b37d1292 [release-branch.go1.1] cmd/gc: repair make(T) in export data for inlining.
««« CL 9303050 / 9a73efa2cd4e
cmd/gc: repair make(T) in export data for inlining.

When T was an unexported type it could be forgotten.

Fixes #5470.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/9303050
»»»

R=bradfitz, iant, remyoudompheng
CC=golang-dev
https://golang.org/cl/10029043
2013-06-05 10:27:38 +10:00
Andrew Gerrand
03290b55e9 [release-branch.go1.1] runtime: fix GC scanning of slices
««« CL 9372044 / 1abed5873071
runtime: fix GC scanning of slices
If a slice points to an array embedded in a struct,
the whole struct can be incorrectly scanned as the slice buffer.
Fixes #5443.

R=cshapiro, iant, r, cshapiro, minux.ma
CC=bradfitz, gobot, golang-dev
https://golang.org/cl/9372044
»»»

R=cshapiro, iant
CC=golang-dev
https://golang.org/cl/10027043
2013-06-05 10:20:34 +10:00
Andrew Gerrand
5f1cf34402 [release-branch.go1.1] cmd/gc: do not corrupt init() with initializers of _ in closures.
««« CL 9952043 / c42a7c218440
cmd/gc: do not corrupt init() with initializers of _ in closures.

Fixes #5607.

R=golang-dev, daniel.morsing, r, dsymonds
CC=golang-dev
https://golang.org/cl/9952043
»»»

R=daniel.morsing, dsymonds, r, remyoudompheng
CC=golang-dev
https://golang.org/cl/9895044
2013-06-05 10:00:54 +10:00
Andrew Gerrand
09879160e5 [release-branch.go1.1] runtime: introduce cnewarray() to simplify allocation of typed arrays
««« CL 9648044 / 139919984600
runtime: introduce cnewarray() to simplify allocation of typed arrays

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/9648044
»»»

R=dsymonds, dvyukov, dave
CC=golang-dev
https://golang.org/cl/9780050
2013-06-04 12:54:13 +10:00
Andrew Gerrand
6c7631126f [release-branch.go1.1] runtime/race: improve public documentation
««« CL 9144050 / d29da2ced72b
runtime/race: improve public documentation
Move the documentation from race.go to doc.go, because
race.go uses +build race, so it's not normally parsed by go doc.
Rephrase the documentation for end users, provide link to race
detector manual.
Fixes #5444.

R=golang-dev, minux.ma, adg, r
CC=golang-dev
https://golang.org/cl/9144050
»»»

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/9387043
2013-05-13 09:35:18 -07:00
Andrew Gerrand
91504a0e0d [release-branch.go1.1] runtime: fix crash in select
««« CL 9311043 / 53bc96b4c0c7
runtime: fix crash in select
runtime.park() can access freed select descriptor
due to a racing free in another thread.
See the comment for details.

Slightly modified version of dvyukov's CL 9259045.

No test yet.  Before this CL, the test described in issue 5422
would fail about every 40 times for me.  With this CL, I ran
the test 5900 times with no failures.

Fixes #5422.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9311043
»»»

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9304044
2013-05-08 16:02:59 -07:00
Andrew Gerrand
c785d6af66 [release-branch.go1.1] cmd/cgo: pass -Wsystem-headers when looking for errors
««« CL 9120045 / e4f62df3e6c9
cmd/cgo: pass -Wsystem-headers when looking for errors

This works around a bug in GCC 4.8.0.

Fixes #5118.

R=golang-dev, r, minux.ma
CC=golang-dev
https://golang.org/cl/9120045
»»»

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9259047
2013-05-08 16:00:15 -07:00
Andrew Gerrand
99aa2da7ea [release-branch.go1.1] net: fix dial race on plan9 and windows
««« CL 9159043 / f1ddc3ce3dfe
net: fix dial race on plan9 and windows

Fixes #5349.

R=golang-dev, lucio.dere, dsymonds, bradfitz, iant, adg, dave, r
CC=golang-dev
https://golang.org/cl/9159043
»»»

R=golang-dev
CC=golang-dev
https://golang.org/cl/9315043
2013-05-08 15:58:43 -07:00
Andrew Gerrand
1c5438aae8 go1.1rc2 2013-05-06 17:33:44 -07:00
Brad Fitzpatrick
9e93d5014e api: add go1.1.txt; update cmd/api to use it
R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/9250043
2013-05-06 17:25:09 -07:00
Dmitriy Vyukov
f322c78692 runtime: fix crash in badsignal()
The linker can generate split stack prolog when a textflag 7 function
makes an indirect function call.  If it happens, badsignal() crashes
trying to dereference g.
Fixes #5337.

R=bradfitz, dave, adg, iant, r, minux.ma
CC=adonovan, golang-dev
https://golang.org/cl/9226043
2013-05-06 16:15:03 -07:00
Shenghou Ma
b3b1efd882 runtime: reduce max arena size on windows/amd64 to 32 GiB
Update #5236
Update #5402
This CL reduces gofmt's committed memory from 545864 KiB to 139568 KiB.
Note: Go 1.0.3 uses about 70MiB.

R=golang-dev, r, iant, nightlyone
CC=golang-dev
https://golang.org/cl/9245043
2013-05-07 06:53:02 +08:00
Brad Fitzpatrick
e85016f81f database/sql: remove an unused field from Rows
Found while debugging memory usage. Nobody accesses this field
anymore.

R=golang-dev, i.caught.air, adg, r
CC=golang-dev
https://golang.org/cl/9108043
2013-05-06 15:16:47 -07:00
Shenghou Ma
6de184b385 syscall: fix prototype of Fchflags (API change)
API change, but the old API is obviously wrong.

R=golang-dev, iant, r, rsc
CC=golang-dev
https://golang.org/cl/9157044
2013-05-07 05:20:00 +08:00
Jeremiah Harmsen
a228e733b9 go/doc/example: Fix bug causing false negatives for Example playability.
Allows Examples with KeyValue expressions to be playable in godoc.

During the traversal of the abstract syntax tree any KeyValueExpr Key.Name was incorrectly being added as an unresolved identifier.
Since this identifier could not be provided the Example was marked as unplayable.
This updates the AST traversal to skip Keys (but continue traversing the Values).

Example of problematic AST now fixed (see L99 where "UpperBound" was being added as a missing identifier):

 81  .  .  .  .  .  .  .  .  .  Values: []ast.Expr (len = 1) {
 82  .  .  .  .  .  .  .  .  .  .  0: *ast.UnaryExpr {
 83  .  .  .  .  .  .  .  .  .  .  .  OpPos: 12:19
 84  .  .  .  .  .  .  .  .  .  .  .  Op: &
 85  .  .  .  .  .  .  .  .  .  .  .  X: *ast.CompositeLit {
 86  .  .  .  .  .  .  .  .  .  .  .  .  Type: *ast.SelectorExpr {
 87  .  .  .  .  .  .  .  .  .  .  .  .  .  X: *ast.Ident {
 88  .  .  .  .  .  .  .  .  .  .  .  .  .  .  NamePos: 12:20
 89  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Name: "t_proto"
 90  .  .  .  .  .  .  .  .  .  .  .  .  .  }
 91  .  .  .  .  .  .  .  .  .  .  .  .  .  Sel: *ast.Ident {
 92  .  .  .  .  .  .  .  .  .  .  .  .  .  .  NamePos: 12:41
 93  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Name: "BConfig"
 94  .  .  .  .  .  .  .  .  .  .  .  .  .  }
 95  .  .  .  .  .  .  .  .  .  .  .  .  }
 96  .  .  .  .  .  .  .  .  .  .  .  .  Lbrace: 12:79
 97  .  .  .  .  .  .  .  .  .  .  .  .  Elts: []ast.Expr (len = 2) {
 98  .  .  .  .  .  .  .  .  .  .  .  .  .  0: *ast.KeyValueExpr {
 99  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Key: *ast.Ident {
100  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  NamePos: 13:3
101  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Name: "UpperBound"
102  .  .  .  .  .  .  .  .  .  .  .  .  .  .  }
103  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Colon: 13:13
104  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Value: *ast.CallExpr {
105  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Fun: *ast.SelectorExpr {
106  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  X: *ast.Ident {
107  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  NamePos: 13:15
108  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Name: "proto"
109  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  }
110  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Sel: *ast.Ident {
111  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  NamePos: 13:21
112  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Name: "Float32"
113  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  }

R=adg
CC=gobot, golang-dev, gri
https://golang.org/cl/8569045
2013-05-06 10:15:16 -07:00
Brad Fitzpatrick
1294f14f1f image/png: fix error message to not return width twice
Fixes #5413

R=golang-dev, dave, adg
CC=golang-dev
https://golang.org/cl/9153045
2013-05-06 09:59:33 -07:00
Shenghou Ma
a21b36da1c go/build: document GOOS.go also has implicit GOOS build constraint
R=golang-dev, i.caught.air, alexb, r
CC=golang-dev
https://golang.org/cl/9064044
2013-05-05 02:23:19 +08:00
Keith Randall
4ff48c7f45 text/template: comment fix
R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/9086043
2013-05-03 14:22:34 -07:00
Shenghou Ma
988236ba86 runtime/cgo: fix build for ARM
TBR=iant
CC=golang-dev
https://golang.org/cl/9048048
2013-05-03 17:15:43 +08:00
Shenghou Ma
e0db7fae87 cmd/ld: add .note.GNU-stack section for external linking
Fixes #5392.

R=iant, r
CC=golang-dev
https://golang.org/cl/9119043
2013-05-03 16:33:21 +08:00
Brad Fitzpatrick
7cc0581f86 regexp: doc fix
This must have been from when "error" was a good variable
name for an "os.Error". But we use "err" these days.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/9132045
2013-05-02 18:59:39 -07:00
Alex Brainman
3a32367040 cmd/ld: fix SDYNIMPORT symbol test
As advised by iant. Fixes windows build.

R=golang-dev, r
CC=golang-dev, iant
https://golang.org/cl/9110044
2013-05-02 13:02:00 +10:00
Rob Pike
d727d147c0 cmd/ld: fix another unsigned value causing bugs on Plan 9
"The usual conversions" bite again.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/9103044
2013-05-01 17:00:21 -07:00
David du Colombier
c8942f021e libmach: fix build on Plan 9
Include libc.h before bio.h in 8.c, because bio.h uses
the UTFmax enum, which is declared in libc.h, since
the recent switch to 21-bit runes in Plan 9.

The 5.c and 6.c files already includes libc.h.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9040047
2013-05-01 15:48:13 -07:00
Ian Lance Taylor
83feea5af8 cmd/cgo: correct pragma name in comment
R=rsc, alexb, minux.ma, bradfitz, i.caught.air
CC=golang-dev
https://golang.org/cl/9082043
2013-05-01 14:31:42 -07:00
Ian Lance Taylor
9de38d6788 runtime/cgo: export symbols in both internal and external link mode
R=rsc, r
CC=golang-dev
https://golang.org/cl/9060045
2013-05-01 14:30:51 -07:00
Ian Lance Taylor
a555758909 cmd/ld: fix syms that are both cgo_import_static & cgo_import_dynamic
This is needed for SWIG when linking in internal mode.  In
internal mode if a symbol was cgo_import_static we used to
forget that it was also cgo_import_dynamic.

R=rsc, r
CC=golang-dev
https://golang.org/cl/9080043
2013-05-01 14:30:19 -07:00
Alex Brainman
ca6b1f3eeb net: do not call syscall.Bind twice on windows
Fixes #5355.

R=golang-dev, mikioh.mikioh, bradfitz, r
CC=golang-dev
https://golang.org/cl/8966046
2013-04-30 17:47:39 -07:00
Rob Pike
2a1ca145cf cmd/ld: when linking externally, only generate dwarf info for ELF
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/9025047
2013-04-30 14:22:28 -07:00
Russ Cox
ed9644fc39 cmd/go: undo CL 8119049
Manual undo due to later changes in doc/go1.1.html; cmd/go/test.bash still passes.

Rationale, from CL 8119049 review log:

This makes the 'go run' command different from every other command.
For example, 'go test' does not mean 'go test *.go'.

If we were going to handle the no arguments case in 'go run', I would hope that
it would scan the current directory to find a package just like 'go build' or
'go test' would, and then it would require that package to be 'package main',
and then it would run that package. This would make it match 'go test' and 'go
build' and 'go install' and so on. It would mean that if you are working on a
command in a directory that is 'go install'able, then 'go run' will run the
binary for you. The current CL does not accomplish that when build constraints
or file name constraints are involved.

For example, if I am working on a program like:

$ ls
main.go
main_386.s
main_arm.s
main_amd64.s
$

Then 'go run' will fail here because the .s files are ignored.

If instead I am working on a program like:

$ ls
main.go
main_386.go
main_arm.go
main_amd64.go
$

then 'go run' will fail because too many files are included.

I would like to see this command implemented so that it is compatible with the
other go subcommands. Since it is too late to do that for Go 1.1, I would like
to see this CL reverted, to preserve the option to do it better later.

R=golang-dev, iant, r
CC=golang-dev
https://golang.org/cl/8797049
2013-04-30 17:04:58 -04:00
Ian Lance Taylor
825b1e1591 cmd/ld: emit relocs for DWARF info when doing an external link
I would like opinions on whether this is a good idea for 1.1.
On the one hand it's a moderately important issue.  On the
other hand this introduces at least the possibility of
external linker errors due to the additional relocations and
it may be better to wait.

I'm fairly confident that the behaviour is unchanged when not
using an external linker.

Update #5221

This CL is tested lightly on 386 and amd64 and fixes the cases
I tested.  I have not tested it on Darwin or Windows.

R=golang-dev, dave, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/8858047
2013-04-30 14:01:05 -07:00
Rob Pike
b461c94cfa os/exec: disable TestExtraFilesFDShuffle
It's too hard to make portable just now.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/9057043
2013-04-30 13:17:37 -07:00