««« CL 20100043 / 9fe43a708b89
misc/emacs: various cleanups
- Use #' for function symbols
- Remove unused variables
- Use declare-function to shut up byte compiler
This is identical to CL 19010044 with one exception: Making sure
it doesn't break on Emacs 22.1
R=adonovan, bradfitz, shendaras
CC=golang-dev
https://golang.org/cl/20100043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/25750043
««« CL 22840043 / e6794866ebeb
cmd/cgo: fix handling of array of pointers when using clang
Clang does not record the "size" field for pointer types,
so we must insert the size ourselves. We were already
doing this, but only for the case of pointer types.
For an array of pointer types, the setting of the size for
the nested pointer type was happening after the computation
of the size of the array type, meaning that the array type
was always computed as 0 bytes. Delay the size computation.
This bug happens on all Clang systems, not just FreeBSD.
Our test checked that cgo wrote something, not that it was correct.
FreeBSD's default clang rejects array[0] as a C struct field,
so it noticed the incorrect sizes. But the sizes were incorrect
everywhere.
Update testcdefs to check the output has the right semantics.
Fixes#6292.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/22840043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/25460046
««« CL 21130043 / 0685a9549d5a
go/doc: add full stop of Japanese, Chinese and Korean.
This fix will show a good synopsis on package listings in that languages.
R=adg, r
CC=golang-dev
https://golang.org/cl/21130043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/25720043
««« CL 21770043 / ae58065f7dff
doc/go1.2: link to cgo documentation
I know it's linked in the previous sentence, but this new link is where I want it to be while reading this sentence.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/21770043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/25640045
««« CL 19910044 / 9eb64f5ef3a6
cmd/5l, runtime: fix divide for profiling tracebacks on ARM
Two bugs:
1. The first iteration of the traceback always uses LR when provided,
which it is (only) during a profiling signal, but in fact LR is correct
only if the stack frame has not been allocated yet. Otherwise an
intervening call may have changed LR, and the saved copy in the stack
frame should be used. Fix in traceback_arm.c.
2. The division runtime call adds 8 bytes to the stack. In order to
keep the traceback routines happy, it must copy the saved LR into
the new 0(SP). Change
SUB $8, SP
into
MOVW 0(SP), R11 // r11 is temporary, for use by linker
MOVW.W R11, -8(SP)
to update SP and 0(SP) atomically, so that the traceback always
sees a saved LR at 0(SP).
Fixes#6681.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/19910044
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20170048
««« CL 19780043 / 8b49cdda6ff4
cmd/cgo: accept extra leading _ on __cgodebug_data for all object formats
The current Windows build breakage appears to be because
the Windows code should be looking for __cgodebug_data
not ___cgodebug_data. Dodge the question everywhere by
accepting both.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/19780043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20660043
««« CL 19280043 / 9d199c7582d6
time: correct path to time zone zip file on Unix
Most Unix systems have their own time zone data,
so we almost never get far enough in the list to
discover that we cannot fall back to the zip file.
Adjust testing to exercise the final fallback.
Plan 9 and Windows were already correct
(and are the main users of the zip file).
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/19280043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20640043
««« CL 18870043 / eca0ca43a863
os: do not return Lstat errors from Readdir
This CL restores the Go 1.1.2 semantics for os.File's Readdir method.
The code in Go 1.1.2 was rewritten mainly because it looked buggy.
This new version attempts to be clearer but still provide the 1.1.2 results.
The important diff is not this CL's version against tip but this CL's version
against Go 1.1.2.
Go 1.1.2:
names, err := f.Readdirnames(n)
fi = make([]FileInfo, len(names))
for i, filename := range names {
fip, err := Lstat(dirname + filename)
if err == nil {
fi[i] = fip
} else {
fi[i] = &fileStat{name: filename}
}
}
return fi, err
This CL:
names, err := f.Readdirnames(n)
fi = make([]FileInfo, len(names))
for i, filename := range names {
fip, lerr := lstat(dirname + filename)
if lerr != nil {
fi[i] = &fileStat{name: filename}
continue
}
fi[i] = fip
}
return fi, err
The changes from Go 1.1.2 are stylistic, not semantic:
1. Use lstat instead of Lstat, for testing (done before this CL).
2. Make error handling in loop body look more like an error case.
3. Use separate error variable name in loop body, to be clear
we are not trying to influence the final return result.
Fixes#6656.
Fixes#6680.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/18870043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20110045
««« CL 19160043 / 104d56b5d664
cmd/gc: silence clang warning
This code is only built when you run 'make' in cmd/gc,
not in all.bash.
R=golang-dev, jsing, iant
CC=golang-dev
https://golang.org/cl/19160043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20290046
««« CL 18230043 / f2b59b5163b0
misc/emacs: support godef-jump on import statements
The newest version of godef supports jumping to a package's source
directory if point is on an import statement.
R=adonovan
CC=golang-dev
https://golang.org/cl/18230043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20620043
««« CL 18460043 / 08e6655618f5
debug/dwarf: add DWARF 4 form constants
Some versions of clang generate DWARF 4-format attributes
even when using -gdwarf-2. We don't care much about the
values, but we do need to be able to parse past them.
This fixes a bug in Go 1.2 rc2 reported via private mail using
a near-tip version of clang.
R=golang-dev, iant, dvyukov
CC=golang-dev
https://golang.org/cl/18460043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20470045
««« CL 18850043 / 5ef4bf9eb256
cmd/cgo: stop using -fno-eliminate-unused-debug-types
This flag was added in January 2010, in CL 181102, to fix issue 497.
(Numbers were just shorter back then.) The fix was for OS X machines
and the llvm-gcc frontend.
In July 2011 we had to change the way we get enum values, because
there were no flags available to force Xcode's llvm-gcc to include the
enum names and values in DWARF debug output.
We now use clang, not llvm-gcc, on OS X machines.
Earlier versions of clang printed a warning about not knowing the flag.
Newer versions of clang now make that an error.
That is:
- The flag was added for OS X machines.
- The flag is no longer necessary on OS X machines.
- The flag now breaks some OS X machines.
Remove it.
I have run the original program from issue 497 successfully
without the flag on both OS X and Linux machines.
Fixes#6678.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/18850043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/19850048
««« CL 18740044 / 1a8903f0a577
runtime: relax preemption assertion during stack split
The case can happen when starttheworld is calling acquirep
to get things moving again and acquirep gets preempted.
The stack trace is in golang.org/issue/6644.
It is difficult to build a short test case for this, but
the person who reported issue 6644 confirms that this
solves the problem.
Fixes#6644.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/18740044
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20460044
««« CL 14425049 / 093d299d669e
misc/linkcheck: better redirect handling, use meaningful exit code
Prevent linkcheck from following redirects that lead beyond the outside
the root URL.
Return a non-zero exit code when there are problems.
Some minor refactoring for clarity.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/14425049
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20360044
««« CL 16880043 / 0eb6508d3e88
strings: fix Replacer bug with prefix matches
singleStringReplacer had a bug where if a string was replaced
at the beginning and no output had yet been produced into the
temp buffer before matching ended, an invalid nil check (used
as a proxy for having matched anything) meant it always
returned its input.
Fixes#6659
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/16880043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20570044
««« CL 16650043 / afb8e00de04a
C+A: add Matthew Cottingham (Individual CLA)
Done by addca, but codereview failed with a Python stacktrace,
so submitting by hand.
R=golang-dev
CC=golang-dev
https://golang.org/cl/16650043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/19560046
««« CL 15570046 / 9169cb38c3e8
test/mapnan: use time.Now instead of syscall.Getrusage
Avoids a dependency on a somewhat nonstandard part of package syscall.
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/15570046
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/19960045
««« CL 15750046 / 2d1e1adf8ece
math: remove unnecessary source file
The routines in this file are dregs from a very early copy of the math API.
There are no Go prototypes and no non-amd64 implementations.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/15750046
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/19560045
««« CL 15570044 / b4c37131e846
crypto/x509: name constraints should be a disjunction.
The code was requiring that all constraints be met, but it should be
satisfied by meeting *any* of them.
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/15570044
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20580043
««« CL 15650043 / 29d3ab5ced5a
crypto/tls: advertise support for RSA+SHA1 in TLS 1.2 handshake.
Despite SHA256 support being required for TLS 1.2 handshakes, some
servers are aborting handshakes that don't offer SHA1 support.
This change adds support for signing TLS 1.2 ServerKeyExchange messages
with SHA1. It does not add support for signing TLS 1.2 client
certificates with SHA1 as that would require the handshake to be
buffered.
Fixes#6618.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/15650043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20570043
««« CL 15070043 / 90a628ac54ed
cmd/cgo: stop using compiler error message text to analyze C names
The old approach to determining whether "name" was a type, constant,
or expression was to compile the C program
name;
and scan the errors and warnings generated by the compiler.
This requires looking for specific substrings in the errors and warnings,
which ties the implementation to specific compiler versions.
As compilers change their errors or drop warnings, cgo breaks.
This happens slowly but it does happen.
Clang in particular (now required on OS X) has a significant churn rate.
The new approach compiles a slightly more complex program
that is either valid C or not valid C depending on what kind of
thing "name" is. It uses only the presence or absence of an error
message on a particular line, not the error text itself. The program is:
// error if and only if name is undeclared
void f1(void) { typeof(name) *x; }
// error if and only if name is not a type
void f2(void) { name *x; }
// error if and only if name is not an integer constant
void f3(void) { enum { x = (name)*1 }; }
I had not been planning to do this until Go 1.3, because it is a
non-trivial change, but it fixes a real Xcode 5 problem in Go 1.2,
and the new code is easier to understand than the old code.
It should be significantly more robust.
Fixes#6596.
Fixes#6612.
R=golang-dev, r, james, iant
CC=golang-dev
https://golang.org/cl/15070043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20060044