1
0
mirror of https://github.com/golang/go synced 2024-10-04 07:21:22 -06:00
Commit Graph

5235 Commits

Author SHA1 Message Date
Adam Langley
364cb831f7 crypto/openpgp/packet: add basic routines
Since nobody suggested major changes to the higher level API, I'm
splitting up the lower level code for review. This is the first of the
changes for the packet reading/writing code.

It deliberately doesn't include a Makefile because the package is
incomplete.

R=bradfitzgo
CC=golang-dev
https://golang.org/cl/4080051
2011-02-03 09:22:40 -05:00
Adam Langley
2a2995cec8 crypto/openpgp/armor: bug fixes
* Don't require lines to be full.
* Don't forget to flush the line buffer.
* Update the test so that it doesn't happen to include only full lines
  in order to test the above.
* Always write the line after the header as GNUPG expects it.

R=bradfitzgo
CC=golang-dev
https://golang.org/cl/4124043
2011-02-03 09:19:20 -05:00
Adam Langley
fc5c1f0a18 crypto/cipher: add resync open to OCFB mode.
OpenPGP changed its OCFB mode for more modern packets (for example, the
MDC symmetrically encrypted packet). This change adds a bool to
determine which mode is used.

R=bradfitzgo, r, rsc
CC=golang-dev
https://golang.org/cl/4126041
2011-02-03 09:17:42 -05:00
Christopher Nielsen
31ccf19612 build: fix spaces in GOROOT
Fixes #1413.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4007041
2011-02-03 00:42:03 -05:00
Russ Cox
1e063b32cd runtime: faster allocator, garbage collector
GC is still single-threaded.
Multiple threads will happen in another CL.

Garbage collection pauses are typically
about half as long as they were before this CL.

R=brainman, iant, r
CC=golang-dev
https://golang.org/cl/3975046
2011-02-02 23:03:47 -05:00
Russ Cox
6b93a92ac0 windows: fix build?
Shot in the dark.

TBR=r
CC=golang-dev
https://golang.org/cl/4126054
2011-02-02 22:53:10 -05:00
Gustavo Niemeyer
34336bd9f3 cgo: fix _cgo_run timestamp file order
The timestamp file is being created before cgo
runs, which means errors will not prevent it
from being created and thus will cause the
build to break by rendering the rule up-to-date
when it isn't.

R=rsc
CC=golang-dev
https://golang.org/cl/4001049
2011-02-02 22:37:40 -05:00
Eoghan Sherry
cf63e34b1d gc: correct rounding of denormal constants
Fixes #1463.

R=rsc
CC=golang-dev
https://golang.org/cl/4079060
2011-02-02 22:36:54 -05:00
Hector Chu
fb9fc886ff windows: syscall: Make ForkExec acquire the ForkLock
so that spawned processes avoid inheriting pipes.

Implement CloseOnExec.
Make file and pipe handles inheritable.

R=rsc, brainman, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4126047
2011-02-03 12:50:41 +11:00
Russ Cox
259a974292 cgo: rename internal f to avoid conflict with possible C global named f
Fixes #1452.

R=r
CC=golang-dev
https://golang.org/cl/4023060
2011-02-02 18:53:03 -05:00
Russ Cox
8a2891fc56 gc: select receive bug fix
Affects receive using := when new variable escapes to heap.

Fixes #1468.

R=ken2
CC=golang-dev
https://golang.org/cl/4119052
2011-02-02 18:34:09 -05:00
Robert Griesemer
c5fc3b6972 fmt: rename internal interfaces
readRuner -> runeReader
unreadRuner -> runeUnreader

R=r, rsc
CC=golang-dev
https://golang.org/cl/4000054
2011-02-02 15:00:14 -08:00
Russ Cox
b287d7cbe1 runtime: more detailed panic traces, line number work
Follow morestack, so that crashes during a stack split
give complete traces.  Also mark stack segment boundaries
as an aid to debugging.

Correct various line number bugs with yet another attempt
at interpreting the pc/ln table.  This one has a chance at
being correct, because I based it on reading src/cmd/ld/lib.c
instead of on reading the documentation.

Fixes #1138.
Fixes #1430.
Fixes #1461.

throw: runtime: split stack overflow

runtime.throw+0x3e /home/rsc/g/go2/src/pkg/runtime/runtime.c:78
        runtime.throw(0x81880af, 0xf75c8b18)
runtime.newstack+0xad /home/rsc/g/go2/src/pkg/runtime/proc.c:728
        runtime.newstack()
runtime.morestack+0x4f /home/rsc/g/go2/src/pkg/runtime/386/asm.s:184
        runtime.morestack()
----- morestack called from stack: -----
runtime.new+0x1a /home/rsc/g/go2/src/pkg/runtime/malloc.c:288
        runtime.new(0x1, 0x0, 0x0)
gongo.makeBoard+0x33 /tmp/Gongo/gongo_robot_test.go:344
        gongo.makeBoard(0x809d238, 0x1, 0xf76092c8, 0x1)
----- stack segment boundary -----
gongo.checkEasyScore+0xcc /tmp/Gongo/gongo_robot_test.go:287
        gongo.checkEasyScore(0xf764b710, 0x0, 0x809d238, 0x1)
gongo.TestEasyScore+0x8c /tmp/Gongo/gongo_robot_test.go:255
        gongo.TestEasyScore(0xf764b710, 0x818a990)
testing.tRunner+0x2f /home/rsc/g/go2/src/pkg/testing/testing.go:132
        testing.tRunner(0xf764b710, 0xf763b5dc, 0x0)
runtime.goexit /home/rsc/g/go2/src/pkg/runtime/proc.c:149
        runtime.goexit()

R=ken2, r
CC=golang-dev
https://golang.org/cl/4000053
2011-02-02 16:44:20 -05:00
Robert Griesemer
827e98d4fd io: rename interfaces
ReadByter -> ByteReader
ReadRuner -> RuneReader

R=r, r2, rsc
CC=golang-dev
https://golang.org/cl/4023062
2011-02-02 13:42:15 -08:00
Rob Pike
029bbe18e0 fmt.Scan: scan binary-exponent floating format, 2.4p-3
R=rsc, rog, r2
CC=golang-dev
https://golang.org/cl/4128049
2011-02-02 12:38:48 -08:00
Russ Cox
bc874ec0dd runtime: correct runtime.GOOS, runtime.GOARCH
If the same directory was used for multiple builds,
it was possible for a stale version.go to contain the
wrong definitions for $GOOS and $GOARCH, because
they can change even if the hg version does not.
Split into multiple files to fix.

R=r, r2
CC=golang-dev
https://golang.org/cl/4124050
2011-02-02 15:35:54 -05:00
Rob Pike
7c189a8417 sync: tidy a couple of comments.
no semantic change.

R=rsc
CC=golang-dev
https://golang.org/cl/4128048
2011-02-01 21:29:46 -08:00
Rob Pike
03a93158d2 fmt: document %b for floating point
R=rsc
CC=golang-dev
https://golang.org/cl/4073051
2011-02-01 21:10:16 -08:00
Rob Pike
622d729b86 io: add ReadRuner
Put it in the same package as ReadByter.
There is no implementation here for either interface.

R=rsc
CC=golang-dev
https://golang.org/cl/4121051
2011-02-01 21:09:33 -08:00
Rob Pike
8a2d706487 regexp tests: make some benchmarks more meaningful
The first two "Literal" tests were silly.
Also fix a naming typo in a couple of tests.

R=rsc
CC=golang-dev
https://golang.org/cl/4127045
2011-02-01 17:48:42 -08:00
Robert Griesemer
3a54d43825 go/ast: add missing handling of SendStmt to ast.Walk
R=adg
CC=golang-dev
https://golang.org/cl/4044048
2011-02-01 16:57:45 -08:00
Russ Cox
1fa4173444 5l, 8l: pass stack frame size to morestack when needed
Shame on me: I fixed the same bug in 6l in 8691fcc6a66e
(https://golang.org/cl/2609041) and neglected
to look at 5l and 8l to see if they were affected.

On the positive side, the check I added in that CL is the
one that detected this bug.

Fixes #1457.

R=ken2
CC=golang-dev
https://golang.org/cl/3981052
2011-02-01 18:34:41 -05:00
Rob Pike
80f07cfbea arm: disable peep for release
R=ken2
CC=golang-dev
https://golang.org/cl/4001051
2011-02-01 15:02:07 -08:00
Robert Griesemer
288a39c86b go/ast: reflect communication operator changes accurately in ast
- go/ast: introduce SendStmt; adjust SelectStmt
- go/parser: accept new communication syntax, minor
  unrelated cleanups
- go/printer: adjustments for new ast, fewer binary
  expression precedences
- go/token: remove one binary precedence

Adjusted dependent code. gofmt -w src -misc. Ran all tests.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/3989056
2011-02-01 13:47:51 -08:00
Ian Lance Taylor
9040da9e40 ld: Add -I option to set ELF interpreter.
R=rsc
CC=golang-dev
https://golang.org/cl/4080049
2011-02-01 12:49:56 -08:00
Rob Pike
eea18d959e log: rename Exit* to Fatal*
This aligns the naming scheme with the testing package and
also lets govet work on more logging calls.

R=rsc
CC=golang-dev
https://golang.org/cl/4001048
2011-02-01 12:47:35 -08:00
Rob Pike
6a13175f7d govet: add Panic to the list of functions
R=rsc
CC=golang-dev
https://golang.org/cl/4119049
2011-02-01 12:47:09 -08:00
Russ Cox
05b9050bda gc: handle invalid name in type switch
Fixes #1453.

R=ken2
CC=golang-dev
https://golang.org/cl/4125043
2011-02-01 14:00:36 -05:00
Jose Luis Vázquez González
865d576702 http: add host patterns
R=bradfitzgo, rsc
CC=golang-dev
https://golang.org/cl/4070043
2011-02-01 13:58:59 -05:00
Russ Cox
850ad9a402 strconv: add test that trips up other implementations
R=r, gri1
CC=golang-dev
https://golang.org/cl/4092045
2011-02-01 12:48:18 -05:00
Gustavo Niemeyer
59a47732dd exec: use custom error for LookPath
Make the error message and the needed action more obvious
when a command isn't found to obtain the source code
of a project.  Users seem to strugle with the existing
wording in practice.

R=rsc
CC=golang-dev
https://golang.org/cl/4058047
2011-02-01 12:12:51 -05:00
Eoghan Sherry
e6a934a1d9 6g: fix registerization of temporaries
Use correct range in allocated register test.

R=rsc, ken2
CC=golang-dev
https://golang.org/cl/4073049
2011-02-01 12:12:42 -05:00
Gustavo Niemeyer
e71d8a2fe4 6l: add comment to CMOV* relocation
R=rsc
CC=golang-dev
https://golang.org/cl/4042045
2011-02-01 11:49:33 -05:00
Hector Chu
62afa225af windows: multiple improvements and cleanups
The callback mechanism has been made more flexible.
Eliminated one round of argument copying in Syscall.
Faster Get/SetLastError implemented.
Added gettime for gc perf profiling.

R=rsc, brainman, mattn, rog
CC=golang-dev
https://golang.org/cl/4058046
2011-02-01 11:49:24 -05:00
Adam Langley
e308d55973 crypto: add package.
The crypto package is added as a common place to store identifiers for
hash functions. At the moment, the rsa package has an enumeration of
hash functions and knowledge of their digest lengths. This is an
unfortunate coupling and other high level crypto packages tend to need
to duplicate this enumeration and knowledge (i.e. openpgp).

crypto pulls this code out into a common location.

It would also make sense to add similar support for ciphers to crypto,
but the problem there isn't as acute that isn't done in this change.

R=bradfitzgo, r, rsc
CC=golang-dev
https://golang.org/cl/4080046
2011-02-01 11:02:48 -05:00
Mikio Hara
400ea843c6 syscall: add network interface constants for freebsd/386, freebsd/amd64
R=rsc
CC=golang-dev
https://golang.org/cl/4105046
2011-02-01 08:46:21 -05:00
Gustavo Niemeyer
4fd867b283 cgo: define CGO_CFLAGS and CGO_LDFLAGS in Go files
R=rsc, binet
CC=golang-dev
https://golang.org/cl/3921043
2011-02-01 08:44:18 -05:00
Russ Cox
0e47460915 gc: fix send precedence
Test and fix case found by Robert.
Add receive inside send to tree too.

R=ken2
CC=golang-dev
https://golang.org/cl/3973052
2011-02-01 08:29:21 -05:00
Russ Cox
cb584707af gc: remove non-blocking send, receive syntax
R=ken2
CC=golang-dev
https://golang.org/cl/4126043
2011-01-31 18:52:16 -05:00
Russ Cox
f4e76d8309 replace non-blocking send, receive syntax with select
R=golang-dev, nigeltao, niemeyer, r
CC=golang-dev
https://golang.org/cl/4079053
2011-01-31 18:36:28 -05:00
Rob Pike
fc52d7029f unicode: update to unicode 6.0.0
R=rsc
CC=golang-dev
https://golang.org/cl/3981049
2011-01-31 15:20:44 -08:00
Russ Cox
614391860a ebnflint: exit with non-zero status on error
Tweak spec to avoid ebnflint complaints.

R=gri
CC=golang-dev
https://golang.org/cl/3973050
2011-01-31 17:42:10 -05:00
Eric Eisner
d93b2f384d suffixarray: fix construction bug
Previously, group numbers were updated while being read,
sometimes leading to inconsistencies.

R=gri, gri1
CC=golang-dev
https://golang.org/cl/4121045
2011-01-31 13:13:02 -08:00
Albert Strasheim
161f109cad os: add ETIMEDOUT
R=rsc
CC=golang-dev
https://golang.org/cl/4017045
2011-01-31 14:54:58 -05:00
Roger Peppe
76130bdeea cgo: improve error reporting slightly.
If there were warnings or errors in the user code,
cgo would print the first error from gcc and then stop,
which is not helpful.
This CL makes cgo ignore errors from user code
in the first pass - they will be shown later.
It also prints errors from user preamble code
with the correct line numbers.
(Also fixed misleading usage message).

R=iant, rsc
CC=golang-dev
https://golang.org/cl/4082047
2011-01-31 14:31:34 -05:00
Mikio Hara
5c0aab9cae syscall: add network interface constants for darwin/386, darwin/amd64
R=rsc
CC=golang-dev
https://golang.org/cl/4079049
2011-01-31 12:50:50 -05:00
Russ Cox
176d5769d9 lib9: update to Unicode 6.0.0
R=r
CC=golang-dev
https://golang.org/cl/4121042
2011-01-31 12:38:54 -05:00
Russ Cox
ad00644434 unicode: build maketables during build, take 2
The "all:" target is the default for running gomake
by hand, but it is not used during the build.
The build runs make install and make test.

Save the build of maketables for the test phase
so that the packages it needs will have been
installed already.

R=r, r2
CC=golang-dev
https://golang.org/cl/4121043
2011-01-31 11:50:04 -05:00
Luuk van Dijk
7400be87d8 runtime: generate Go defs for C types.
R=rsc, mattn
CC=golang-dev
https://golang.org/cl/4047047
2011-01-31 12:27:28 +01:00
Andrew Gerrand
9173a09530 bufio: make Flush a no-op when the buffer is empty
R=r
CC=golang-dev
https://golang.org/cl/4119048
2011-01-31 18:54:25 +11:00