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
««« 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
««« 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
««« 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
««« 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
««« 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
««« 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
««« 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
««« 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
««« 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
««« 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
««« 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
««« 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
««« 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
««« 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
««« 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
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
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
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
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
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
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