summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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
2010-04-07Language FAQ: update the entry on exceptions.Rob Pike1-14/+13
R=rsc, iant CC=golang-dev http://codereview.appspot.com/824045
2010-04-06arm: fix build, attempt #2Russ Cox1-2/+2
TBR=kaib CC=golang-dev http://codereview.appspot.com/897041
2010-04-06arm: fix build, attempt #1Russ Cox3-74/+133
TBR=kaib CC=golang-dev http://codereview.appspot.com/883046
2010-04-06another try at clearingKen Thompson1-9/+6
channel recv data. R=rsc CC=golang-dev http://codereview.appspot.com/896041
2010-04-06change channel read to clearKen Thompson1-3/+12
data just read from the channel. this will make it easier to recognize when to garbage collect and finalize. R=rsc CC=golang-dev http://codereview.appspot.com/882043
2010-04-06net: use chan bool instead of chan *netFD to avoid cycleRuss Cox1-8/+8
The cycle is *netFD -> cw chanl *netFD in struct -> same *netFD in channel read buffer. Because channels are finalized, the cycle makes them uncollectable. A better fix is to make channels not finalized anymore, and that will happen, but this is an easy, reasonable workaround until then. Another good fix would be to zero the channel receive buffer entry after the receive. That too will happen. R=r CC=golang-dev http://codereview.appspot.com/875043
2010-04-06flags: better tests.Rob Pike2-18/+138
R=rsc CC=golang-dev http://codereview.appspot.com/864044
2010-04-06runtime: two proc bug fixesRuss Cox2-6/+18
1. Fix bug in GOMAXPROCS when trying to cut number of procs Race could happen on any system but was manifesting only on Xen hosted Linux. 2. Fix recover on ARM, where FP != caller SP. R=r CC=golang-dev http://codereview.appspot.com/880043
2010-04-06Change goyacc to be reentrant.Roger Peppe3-605/+532
Instead of calling the package scope Lex function, Parse now takes an argument which is used to do the lexing. I reverted to having the generated switch code inside Parse rather than a separate function because the function needs 7 arguments or a context structure, which seems unnecessary. I used yyrun(), not the original $A so that it's possible to run the backquoted code through gofmt. R=rsc, ken2, ken3 CC=golang-dev http://codereview.appspot.com/879041 Committer: Ken Thompson <ken@golang.org>
2010-04-06replace original float instruction with jump to make branchesKai Backman1-11/+12
to float instructions work correctly. R=rsc CC=golang-dev http://codereview.appspot.com/870044
2010-04-06fix deps.bash. \t does not mean tab in some seds.Rob Pike1-2/+4
also: add /dev/null to the ls args to repair handling of empty dependency lists. R=rsc CC=golang-dev http://codereview.appspot.com/883045
2010-04-06syscall package: document that errno is zeroed on successGiles Lean1-0/+2
This is a documentation enhancement only, without any code change. The rationale for documenting this precisely is that Unix programmers who "know" that errno's value is undefined after a successful system call may be surprised otherwise and search to be sure that a zero errno may be relied upon after successful calls. R=r, rsc1, rsc CC=golang-dev http://codereview.appspot.com/812044 Committer: Russ Cox <rsc@golang.org>
2010-04-06GNU/Linux sed requires \? rather than ?. Just use * instead.Ian Lance Taylor1-1/+1
R=rsc, r CC=golang-dev http://codereview.appspot.com/810043 Committer: Russ Cox <rsc@golang.org>
2010-04-05libcgo: initial mingw port work - builds but untestedJoe Poirier5-2/+94
R=rsc CC=golang-dev http://codereview.appspot.com/812041 Committer: Russ Cox <rsc@golang.org>
2010-04-05io/ioutil: fix bug in ReadFile when Open succeeds but Stat failsRuss Cox1-1/+1
R=gri CC=golang-dev http://codereview.appspot.com/867044
2010-04-05runtime: fix CallerRuss Cox2-2/+2
log: add test of Caller New regexp in log test is picky and will require some maintenance, but it catches off-by-one mistakes too. Fixes issue 710. R=gri CC=esko.luontola, golang-dev http://codereview.appspot.com/887043
2010-04-05http: fix documentation exampleRuss Cox1-6/+7
R=adg CC=golang-dev http://codereview.appspot.com/813043
2010-04-05test/bench: add k-nucleotide-parallelKyle Consalus3-0/+184
R=rsc CC=golang-dev http://codereview.appspot.com/881042 Committer: Russ Cox <rsc@golang.org>
2010-04-05cmath: new packageCharles L. Dorian17-0/+1715
Complex math function package. Still needs more special case checking. R=rsc CC=golang-dev http://codereview.appspot.com/874041 Committer: Russ Cox <rsc@golang.org>
2010-04-05deps.bash: be less strict about format of x.go linesRuss Cox1-1/+1
R=iant CC=golang-dev http://codereview.appspot.com/862042
2010-04-06doc/go_mem: remove semicolonsDavid Symonds1-47/+47
R=adg CC=golang-dev http://codereview.appspot.com/893041 Committer: Andrew Gerrand <adg@golang.org>
2010-04-05runtime: handle malloc > 2GB correctlyRuss Cox4-18/+18
R=ken2 CC=golang-dev http://codereview.appspot.com/821048
2010-04-05crypto/tls: good defaultsRuss Cox2-1/+61
R=agl1 CC=golang-dev http://codereview.appspot.com/851041
2010-04-05runtime: various arm fixesRuss Cox35-341/+620
* correct symbol table size * do not reorder functions in output * traceback * signal handling * use same code for go + defer * handle leaf functions in symbol table R=kaib, dpx CC=golang-dev http://codereview.appspot.com/884041
2010-04-05programming_faq: added question on T vs *T method setsAndrew Gerrand1-1/+37
Adding this question on Russ' recommendation - not sure if there is some detail here I'm missing. The associated discussion was: http://groups.google.com/group/golang-nuts/t/ec6b27e332ed7f77 R=rsc, r CC=golang-dev http://codereview.appspot.com/887042
2010-04-04gc: good syntax error for defer func() {} - missing final ()Russ Cox1-0/+4
R=ken2 CC=golang-dev http://codereview.appspot.com/855044
2010-04-04nntp: new package, NNTP clientConrad Meyer4-0/+962
R=rsc, rsc1 CC=golang-dev http://codereview.appspot.com/808041 Committer: Russ Cox <rsc@golang.org>
2010-04-05run.bash: remove MAKEFLAGS=-j4 to prevent crashing on freebsdAndrew Gerrand1-1/+0
R=rsc CC=golang-dev http://codereview.appspot.com/881044
2010-04-05godashboard: fix benchmarks page (first pass)Andrew Gerrand3-132/+72
R=rsc CC=golang-dev http://codereview.appspot.com/844044
2010-04-02debug/proc: fix typo in package documentationRobert Griesemer1-1/+1
R=rsc CC=golang-dev http://codereview.appspot.com/829044