- 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
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
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
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
The CL causes misc/cgo/test to fail randomly.
I suspect that the problem is the use of a division instruction
in usleep, which can be called while trying to acquire an m
and therefore cannot store the denominator in m.
The solution to that would be to rewrite the code to use a
magic multiply instead of a divide, but now we're getting
pretty far off the original code.
Go back to the original in preparation for a different,
less efficient but simpler fix.
««« original CL description
cmd/5l, runtime: make ARM integer division profiler-friendly
The implementation of division constructed non-standard
stack frames that could not be handled by the traceback
routines.
CL 13239052 left the frames non-standard but fixed them
for the specific case of a divide-by-zero panic.
A profiling signal can arrive at any time, so that fix
is not sufficient.
Change the division to store the extra argument in the M struct
instead of in a new stack slot. That keeps the frames bog standard
at all times.
Also fix a related bug in the traceback code: when starting
a traceback, the LR register should be ignored if the current
function has already allocated its stack frame and saved the
original LR on the stack. The stack copy should be used, as the
LR register may have been modified.
Combined, these make the torture test from issue 6681 pass.
Fixes#6681.
R=golang-dev, r, josharian
CC=golang-dev
https://golang.org/cl/19810043
»»»
TBR=r
CC=golang-dev
https://golang.org/cl/20350043
The implementation of division constructed non-standard
stack frames that could not be handled by the traceback
routines.
CL 13239052 left the frames non-standard but fixed them
for the specific case of a divide-by-zero panic.
A profiling signal can arrive at any time, so that fix
is not sufficient.
Change the division to store the extra argument in the M struct
instead of in a new stack slot. That keeps the frames bog standard
at all times.
Also fix a related bug in the traceback code: when starting
a traceback, the LR register should be ignored if the current
function has already allocated its stack frame and saved the
original LR on the stack. The stack copy should be used, as the
LR register may have been modified.
Combined, these make the torture test from issue 6681 pass.
Fixes#6681.
R=golang-dev, r, josharian
CC=golang-dev
https://golang.org/cl/19810043
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
bradfitz reports:
> It breaks go-mode on GNU Emacs 22.1.1 as ships with OS X 10.8.6.
««« original CL description
misc/emacs: various cleanups
- Use #' for function symbols
- Remove unused variables
- Use declare-function to shut up byte compiler
R=adonovan
CC=golang-dev
https://golang.org/cl/19010044
»»»
R=bradfitz
CC=golang-dev
https://golang.org/cl/19640043
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
- Use #' for function symbols
- Remove unused variables
- Use declare-function to shut up byte compiler
R=adonovan
CC=golang-dev
https://golang.org/cl/19010044
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
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
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
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
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
Encoded query strings are always sorted by key; the example wasn't.
R=golang-dev, dsymonds, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/16430043
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
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