summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-04-13runtime: better trace for fault due to nil pointer callRuss Cox7-20/+72
R=r CC=golang-dev http://codereview.appspot.com/854048
2010-04-13os, syscall: mingw bug fixesAlex Brainman3-14/+11
R=rsc CC=golang-dev http://codereview.appspot.com/815044 Committer: Russ Cox <rsc@golang.org>
2010-04-13go_spec updatesRuss Cox1-5/+5
R=r, iant CC=golang-dev http://codereview.appspot.com/921041
2010-04-14release.2010-04-13Andrew Gerrand1-0/+36
R=rsc, r CC=golang-dev http://codereview.appspot.com/902045
2010-04-13os: mingw version of Readdir() and Stat() implementedAlex Brainman11-110/+345
R=rsc CC=golang-dev http://codereview.appspot.com/851045 Committer: Russ Cox <rsc@golang.org>
2010-04-138l: add DOS stub to PE binariesEvan Shaw1-2/+23
R=rsc CC=golang-dev http://codereview.appspot.com/915041 Committer: Russ Cox <rsc@golang.org>
2010-04-13netchan: allow client to send as well as receive.Rob Pike4-122/+241
much rewriting and improving, but it's still experimental. R=rsc CC=golang-dev http://codereview.appspot.com/875045
2010-04-13template: use panic/recover to simplify internal error handling.Rob Pike1-50/+32
R=rsc CC=golang-dev http://codereview.appspot.com/824049
2010-04-13Use the copy function rather than a loop.Ian Lance Taylor1-4/+2
R=r CC=golang-dev http://codereview.appspot.com/882047
2010-04-12test: minor updates to avoid bitrotChristopher Wedgwood2-6/+6
R=rsc, r CC=golang-dev http://codereview.appspot.com/854046 Committer: Russ Cox <rsc@golang.org>
2010-04-13Remove exp/exception as it's no longer relevantChristopher Wedgwood4-156/+0
R=gri, adg CC=golang-dev, r, rsc http://codereview.appspot.com/857048 Committer: Andrew Gerrand <adg@golang.org>
2010-04-12fixes for rpc:Rob Pike1-2/+4
- don't log normal EOF - fix ServeConn to block as documented R=rsc, msolo CC=golang-dev http://codereview.appspot.com/886043
2010-04-12gc: zero unnamed return values on entry if func has deferRuss Cox2-4/+36
R=ken2 CC=golang-dev http://codereview.appspot.com/891050
2010-04-12xml: update documentation to match current coding styleChristopher Wedgwood1-14/+13
R=rsc, r CC=golang-dev http://codereview.appspot.com/891048 Committer: Rob Pike <r@golang.org>
2010-04-12fmt format verb %b bugAndrei Vieru3-9/+11
fmt.Printf("%b", int8(-1)) prints 64 ones instead of 8. This happens only for signed integers (int8, in16 and int32). I guess it's because of the way the conversion between integer types works. From go spec: "Conversions between integer types. If the value is a signed quantity, it is sign extended to implicit infinite precision ....". And there are several conversions to int64 and uint64 in the fmt package. This pathch solves only half of the problem. On a 32 bit system, an fmt.Printf("%b", int(-1)) should still print 64 ones. R=golang-dev, r CC=golang-dev http://codereview.appspot.com/891049 Committer: Rob Pike <r@golang.org>
2010-04-12CLA: Andrei VieruRob Pike2-0/+2
R=rsc CC=golang-dev http://codereview.appspot.com/890044
2010-04-11json: update documentation to match current coding styleChristopher Wedgwood1-6/+6
R=rsc CC=golang-dev http://codereview.appspot.com/888045 Committer: Russ Cox <rsc@golang.org>
2010-04-11gc: compile s == "" as len(s) == 0Russ Cox1-0/+24
R=ken2 CC=golang-dev http://codereview.appspot.com/840043
2010-04-11gc: distinguish fatal compiler bug from error+exitRuss Cox4-23/+49
R=ken2 CC=golang-dev http://codereview.appspot.com/902044
2010-04-11gc: make sure main.main has correct typeRuss Cox2-3/+10
R=ken2 CC=golang-dev http://codereview.appspot.com/883049
2010-04-11debug/elf: Fix doc commentsEvan Shaw2-36/+11
R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/849049 Committer: Russ Cox <rsc@golang.org>
2010-04-11exp/eval: Fix example and add target to MakefileEvan Shaw2-4/+10
R=rsc CC=golang-dev http://codereview.appspot.com/901042 Committer: Russ Cox <rsc@golang.org>
2010-04-11archive/tar: update documentation to match current coding styleChristopher Wedgwood2-8/+8
R=rsc, r CC=golang-dev http://codereview.appspot.com/903044 Committer: Rob Pike <r@golang.org>
2010-04-11nacl: update documentation to match current coding styleChristopher Wedgwood1-3/+3
R=rsc, r CC=golang-dev http://codereview.appspot.com/822047 Committer: Rob Pike <r@golang.org>
2010-04-11testing: update documentation to match current coding styleChristopher Wedgwood3-10/+10
R=rsc, r CC=golang-dev http://codereview.appspot.com/823045 Committer: Rob Pike <r@golang.org>
2010-04-11godoc: change od.Dir -> os.FileInfo in commentsChristopher Wedgwood1-2/+2
R=gri, r CC=golang-dev, rsc http://codereview.appspot.com/819042 Committer: Rob Pike <r@golang.org>
2010-04-11time: fix comment typoAndrew Gerrand1-1/+1
R=r CC=golang-dev http://codereview.appspot.com/811044
2010-04-10codereview: Mention that deleting a CL is a use of 'hg change' in its header.David Symonds1-2/+2
R=rsc CC=golang-dev http://codereview.appspot.com/903043 Committer: Russ Cox <rsc@golang.org>
2010-04-09strings: add IndexRune, Trim, TrimLeft, TrimRight, and the generic ↵Michael Hoisie2-11/+139
equivalents TrimFunc, TrimLeftFunc, TrimRightFunc R=rsc, r CC=golang-dev http://codereview.appspot.com/799048 Committer: Russ Cox <rsc@golang.org>
2010-04-09runtime: delete malx, skip_depth argument to mallocRuss Cox9-28/+49
remove internal functions from traces in gopprof instead. R=r CC=golang-dev http://codereview.appspot.com/855046
2010-04-09freebsd: fix build, maybeRuss Cox1-17/+17
R=r CC=golang-dev http://codereview.appspot.com/909041
2010-04-09math: use ** for exponentiation in commentsCharles L. Dorian17-91/+91
R=rsc CC=golang-dev http://codereview.appspot.com/908041 Committer: Russ Cox <rsc@golang.org>
2010-04-09cmath: use ** for exponentiation in commentsCharles L. Dorian4-5/+5
R=rsc CC=golang-dev http://codereview.appspot.com/831045 Committer: Russ Cox <rsc@golang.org>
2010-04-09Run initcgo for all amd64 targets, not just GNU/Linux.Ian Lance Taylor2-8/+8
This is required to make cgo export work on Darwin. Note that this corrects the stack alignment when calling initcgo to that required by gcc on amd64. R=rsc CC=golang-dev http://codereview.appspot.com/907041
2010-04-09A test case for cgo //export.Ian Lance Taylor5-0/+174
R=rsc CC=golang-dev http://codereview.appspot.com/881043
2010-04-09Add //export to cgo.Ian Lance Taylor3-6/+361
The new //export comment marks a Go function as callable from C. The syntax is "//export NAME" where NAME is the name of the function as seen from C. If such a comment is seen, cgo will generate two new files: _cgo_export.h and _cgo_export.c. The _cgo_export.h file provides declarations which C code may use to call Go functions. The _cgo_export.c file contains wrappers, and is to be compiled with gcc. The changes to Make.pkg support using this from a Go Makefile, though it could probably be more convenient. R=rsc CC=golang-dev http://codereview.appspot.com/853042
2010-04-09Library support for cgo export.Ian Lance Taylor6-5/+140
These functions are used to call from a C function back to a Go function. This only includes 386 support. R=rsc CC=golang-dev http://codereview.appspot.com/834045
2010-04-09Support cgo export on amd64.Ian Lance Taylor5-6/+160
R=rsc CC=golang-dev http://codereview.appspot.com/857045
2010-04-09Update roadmap: delete many accomplishmentsRob Pike1-22/+1
R=golang-dev, iant CC=golang-dev http://codereview.appspot.com/854045
2010-04-09rename os.Dir to os.FileInfoRob Pike14-142/+143
R=rsc CC=golang-dev http://codereview.appspot.com/902042
2010-04-08fix bug in os_test.go checkModeAlex Brainman1-1/+1
R=golang-dev, r CC=golang-dev http://codereview.appspot.com/872043 Committer: Rob Pike <r@golang.org>
2010-04-08runtime: fix build (panic) for FreeBSDRuss Cox7-9/+101
R=adg CC=golang-dev http://codereview.appspot.com/867046
2010-04-08runtime: turn divide by zero, nil dereference into panicsRuss Cox28-70/+837
tested on linux/amd64, linux/386, linux/arm, darwin/amd64, darwin/386. freebsd untested; will finish in a separate CL. for now all the panics are errorStrings. richer structures can be added as necessary once the mechanism is shaked out. R=r CC=golang-dev http://codereview.appspot.com/906041
2010-04-08runtime: fix bad status throwRuss Cox3-3/+11
when garbage collector sees recovering goroutine Fixes issue 711. R=r CC=golang-dev http://codereview.appspot.com/869045
2010-04-08runtime: work around kernel bug in Snow Leopard signal handlingRuss Cox2-63/+22
Could not take a signal on threads other than the main thread. If you look at the spinning binary with dtrace, you can see a fault happening over and over: $ dtrace -n ' fbt::user_trap:entry /execname=="boot32" && self->count < 10/ { self->count++; printf("%s %x %x %x %x", probefunc, arg1, arg2, arg3, arg4); stack(); tracemem(arg4, 256); }' dtrace: description 'fbt::user_trap:entry ' matched 1 probe CPU ID FUNCTION:NAME 1 17015 user_trap:entry user_trap 0 10 79af0a0 79af0a0 mach_kernel`lo_alltraps+0x12a 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 0: 0e 00 00 00 37 00 00 00 00 00 00 00 1f 00 00 00 ....7........... 10: 1f 00 00 00 a8 33 00 00 00 00 00 01 00 00 00 00 .....3.......... 20: 98 ba dc fe 07 09 00 00 00 00 00 00 98 ba dc fe ................ 30: 06 00 00 00 0d 00 00 00 34 00 00 00 9e 1c 00 00 ........4....... 40: 17 00 00 00 00 02 00 00 ac 30 00 00 1f 00 00 00 .........0...... 50: 00 00 00 00 00 00 00 00 0d 00 00 00 e0 e6 29 00 ..............). 60: 34 00 00 00 00 00 00 00 9e 1c 00 00 00 00 00 00 4............... 70: 17 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 ................ 80: ac 30 00 00 00 00 00 00 1f 00 00 00 00 00 00 00 .0.............. 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ a0: 48 00 00 00 10 00 00 00 85 00 00 00 a0 f2 29 00 H.............). b0: 69 01 00 02 00 00 00 00 e6 93 04 82 ff 7f 00 00 i............... c0: 2f 00 00 00 00 00 00 00 06 02 00 00 00 00 00 00 /............... d0: 78 ee 42 01 01 00 00 00 1f 00 00 00 00 00 00 00 x.B............. e0: 00 ed 9a 07 00 00 00 00 00 00 00 00 00 00 00 00 ................ f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ ... The memory dump shows a 32-bit exception frame: x86_saved_state32 gs = 0x37 fs = 0 es = 0x1f ds = 0x1f edi = 0x33a8 esi = 0x01000000 ebp = 0 cr2 = 0xfedcba98 ebx = 0x0907 edx = 0 ecx = 0xfedcba98 eax = 0x06 trapno = 0x0d err = 0x34 eip = 0x1c9e cs = 0x17 efl = 0x0200 uesp = 0x30ac ss = 0x1f The cr2 of 0xfedcba98 is the address that the new thread read to cause the fault, but note that the trap is now a GP fault with error code 0x34, meaning it's moved past the cr2 problem and on to an invaild segment selector. The 0x34 is suspiciously similar to the 0x37 in gs, and sure enough, OS X forces gs to have that value in the signal handler, and if your thread hasn't set up that segment (known as USER_CTHREAD), you'll fault on the IRET into the signal handler and never be able to handle a signal. The kernel bug is that it forces segment 0x37 without making sure it is a valid segment. Leopard also forced 0x37 but had the courtesy to set it up first. Since OS X requires us to set up that segment (using the thread_fast_set_cthread_self system call), we might as well use it instead of the more complicated i386_set_ldt call to set up our per-OS thread storage. Also add some more zeros to bsdthread_register for new arguments in Snow Leopard (apparently unnecessary, but being careful). Fixes issue 510. R=r CC=golang-dev http://codereview.appspot.com/824046
2010-04-08math: atan2 special cases (negative zero)Charles L. Dorian5-32/+91
Added Signbit(), revised Copysign() R=rsc CC=golang-dev http://codereview.appspot.com/822045 Committer: Russ Cox <rsc@golang.org>
2010-04-07runtime: use explicit flag when finalizer goroutine is waitingRuss Cox1-1/+6
Avoids spurious wakeups during other sleeping by that goroutine. Fixes issue 711. R=r CC=golang-dev http://codereview.appspot.com/902041
2010-04-07gotest: update URL printed by failure message.Rob Pike1-1/+1
Fixes issue 677. R=rsc CC=golang-dev http://codereview.appspot.com/834046
2010-04-08gp_spec typo fix: code example in the "Handling panics" sectionJoe Poirier1-1/+1
R=rsc, adg CC=golang-dev http://codereview.appspot.com/881047 Committer: Andrew Gerrand <adg@golang.org>
2010-04-07Language FAQ: editing tweaks after iant.Rob Pike1-3/+3
R=iant CC=golang-dev http://codereview.appspot.com/874043