Russ Cox [Tue, 17 Nov 2009 22:42:08 +0000 (14:42 -0800)]
runtime: do not create new threads during malloc.
the signal handling stack is a different size than
the normal stack, so it cannot be allocated using
the backup stack allocator.
Aron Nopanen [Tue, 17 Nov 2009 19:29:02 +0000 (11:29 -0800)]
Make non-errored RPC calls return 'nil' error to caller.
Error information is carried from RPC server to client in the string
'Error' field of rpc.Response. An empty string is sent in the success
case. This empty string was being returned to the caller (of Client.Call
or Client.Go), resulting in a non-nil error response.
This change detects an empty-string Response.Error at the client, and
translates it into a nil value in Call.Error.
Tests updated to check error return in success cases.
Sergio Luis O. B. Correia [Tue, 17 Nov 2009 17:02:47 +0000 (09:02 -0800)]
cmd/cc: Fix -I switch to handle a path with blankspaces correctly
Currently, -I switch can't deal with a path containing spaces.
This commit simplify setinclude(), by removing the special case
of a string that had spaces. After this change, setinclude() will
merely add the given directories to the include path, if it does
not yet exist, and this approach works.
Will be needed for solving issue 115.
R=agl1, rsc, iant2, r
https://golang.org/cl/155059
Russ Cox [Tue, 17 Nov 2009 16:47:48 +0000 (08:47 -0800)]
codereview: add clpatch --ignore_hgpatch_errors.
of limited utility but good for creating the metadata
for an AUTHORS/CONTRIBUTORS change even if
the patch doesn't apply cleanly.
Devon H. O'Dell [Tue, 17 Nov 2009 16:20:58 +0000 (08:20 -0800)]
FreeBSD-specific porting work.
cgo/libmach remain unimplemented. However, compilers, runtime,
and packages are 100%. I still need to go through and implement
missing syscalls (at least make sure they're all listed), but
for all shipped functionality, this is done. Ship! ;)
Robert Griesemer [Mon, 16 Nov 2009 22:26:29 +0000 (14:26 -0800)]
Don't emit line tags when source code is printed as part of
package documentation using templates. The line tag interferes
with the anchor tag introduces by the template.
This fixes an an issue where some headers lost their ability
to link to the respective source code.
David G. Andersen [Mon, 16 Nov 2009 20:39:37 +0000 (12:39 -0800)]
Adding my name to authors/contributors. I'm waiting to hear
back from Carnegie Mellon about whether they're interested in
signing the agreement (do you know if they have already?).
In the meantime, I'm submitting these changes on my own time.
If CMU has already signed the corporate contributor agreement,
please remove my name from the AUTHORS list.
Robert Griesemer [Mon, 16 Nov 2009 16:58:55 +0000 (08:58 -0800)]
- Clarify that struct composite literal keys are field names not selectors.
- Slight re-phrasing of struct type section since "field name" was not
properly introduced.
Adam Langley [Sun, 15 Nov 2009 04:38:00 +0000 (20:38 -0800)]
crypto/rsa: handle the case of non-coprime blinds.
We are dealing with the multiplicative group ℤ/pqℤ. Multiples of
either p or q are not members of the group since they cannot have an
inverse. (Such numbers are 0 in the subgroup ℤ/pℤ.)
With p and q of typical size (> 512 bits), the probability of a random
blind [1..pq-1] being a multiple of p or q is negligible. However, in
the unit tests, much smaller sizes are used and the event could occur.
This change checks the result of the ext GCD and deals with this case.
It also increases the size of p and q in the unit test as a large
number of the keys selected were p, q = 227,169.
Môshe van der Sterre [Sat, 14 Nov 2009 22:42:22 +0000 (14:42 -0800)]
encoding/binary: implemented the Write function
The ByteOrder.Put* methods are already available, this change uses
them to implement the Write function.
R=golang-dev, agl1, rsc, r
https://golang.org/cl/152141
Rob Pike [Sat, 14 Nov 2009 20:23:24 +0000 (12:23 -0800)]
move evaluation of null-matching instructions one iteration earlier.
performance hit of about 20% but more intuitive results for submatches.
we need a good regexp package at some point.
David Titarenco [Sat, 14 Nov 2009 02:06:47 +0000 (18:06 -0800)]
Created new Conn.Flush() public method so the fd pipeline can be drained arbitrarily by the user.
Commented both flush methods so people know what they are looking at.
This is a necessary fix for streaming and long polling HTTP services.
Fixes #93.
Adam Langley [Fri, 13 Nov 2009 18:08:51 +0000 (10:08 -0800)]
runtime: warn about SELinux based mmap failures on Linux.
SELinux will cause mmap to fail when we request w+x memory unless the
user has configured their policies. We have a warning in make.bash,
but it's quite likely that the policy will be reset at some point and
then all their binaries start failing.
This patch prints a warning on Linux when mmap fails with EACCES.
Robert Griesemer [Fri, 13 Nov 2009 02:26:45 +0000 (18:26 -0800)]
Remove -align flag from gofmt.
(Making it work correctly with -spaces is a bit of work and the output
won't make much sense as it is intended as input to tabwriter.)
Fixes #100.