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

287 Commits

Author SHA1 Message Date
Alex Brainman
bc4a9caa41 runtime: free memory returned by windows GetEnvironmentStrings
R=golang-dev
CC=golang-dev
https://golang.org/cl/1917048
2010-08-09 11:30:33 +10:00
Kai Backman
df88fc6109 arm: bugfixes and syscall
- integer divide by zero raises panic
- float comparisons involving NaNs work
- syscall interface actually handles return
  values and errno correctly.

R=rsc, bradfitzpatrick
CC=golang-dev
https://golang.org/cl/1847047
2010-08-06 16:57:49 -07:00
Russ Cox
e473f42b2d amd64: use segment memory for thread-local storage
Returns R14 and R15 to the available register pool.
Plays more nicely with ELF ABI C code.
In particular, our signal handlers will no longer crash
when a signal arrives during execution of a cgo C call.

Fixes #720.

R=ken2, r
CC=golang-dev
https://golang.org/cl/1847051
2010-08-04 17:50:22 -07:00
Russ Cox
3f19d8ae8d gc: empty select
R=ken2
CC=golang-dev
https://golang.org/cl/1871057
2010-08-03 01:07:57 -07:00
Russ Cox
9bac9d23d3 gc: index bounds tests and fixes
move constant index checking to front end
x[2:1] is a compile-time error now too

R=ken2
CC=golang-dev
https://golang.org/cl/1848056
2010-08-03 00:26:02 -07:00
Russ Cox
68b0a87966 runtime: do not fall through in SIGBUS/SIGSEGV
Faults beyond the first page are not expected
and should fail loudly.  They are not subject to recover.

R=r
CC=golang-dev
https://golang.org/cl/1915042
2010-07-30 11:32:55 -07:00
Alex Brainman
45e12c7cd3 runtime: fix bug introduced in revision 4a01b8d28570
R=rsc
CC=golang-dev
https://golang.org/cl/1874046
2010-07-29 16:54:01 +10:00
Kai Backman
fa4da33315 arm: minor bugfixes.
R=rsc
CC=golang-dev
https://golang.org/cl/1692057
2010-07-28 15:58:35 +03:00
Peter Mundy
036584395d runtime: fix goc2c for rename to goc2c and *.goc
Release 2010-04-27. runtime: rename cgo2c, *.cgo to goc2c, *.goc
to avoid confusion with real cgo.

R=rsc
CC=golang-dev
https://golang.org/cl/1868047
2010-07-26 16:21:27 -07:00
Alex Brainman
eee095399f syscall: improve windows errno handling
R=rsc, Joe Poirier, PeterGo
CC=golang-dev
https://golang.org/cl/1872045
2010-07-26 10:24:48 +10:00
Daniel Theophanes
7f9e247489 syscall: add ForkExec, Syscall12 on Windows
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1578041
2010-07-26 09:43:35 +10:00
Vinu Rajashekhar
e57657683f runtime/extern.go: clear a small error in a comment.
R=iant, rsc
CC=golang-dev
https://golang.org/cl/1741058
2010-07-24 19:10:21 -07:00
Kai Backman
36057e721e more soft float support. passes several basic tests
but with less precision than hardware counterparts.

fixed a number of tests to output BUG when they failed.
changed the runner to distinghuish between output
and output containing ^BUG

R=rsc
CC=dho, golang-dev
https://golang.org/cl/1778041
2010-07-20 15:53:16 +03:00
Russ Cox
2d6ae385e1 linux/386: use Xen-friendly ELF TLS instruction sequence
Fixes #465.

R=iant
CC=golang-dev
https://golang.org/cl/1665051
2010-07-17 16:54:03 -07:00
Ian Lance Taylor
385bfd4ca0 Remove unused declaration.
R=rsc
CC=golang-dev
https://golang.org/cl/1686054
2010-07-16 11:05:38 -07:00
Ian Lance Taylor
5958fd7f89 Clarify that a new goroutine is not started for each finalizer.
R=rsc
CC=golang-dev
https://golang.org/cl/1698051
2010-07-15 12:32:38 -07:00
Russ Cox
cec007d3d2 runtime: better error for send/recv on nil channel
R=ken2
CC=golang-dev
https://golang.org/cl/1835041
2010-07-13 17:27:26 -07:00
Andrew Gerrand
da795fcefc runtime/tiny: style and doc tweaks
R=r, rsc
CC=golang-dev
https://golang.org/cl/1821041
2010-07-13 10:47:52 +10:00
Markus Duft
d49c0d71f6 runtime/tiny: add destroyLock stub, and docs for additional VMs
updated thread.c to provide destroylock, which seems to be
	      required to link.
        updated README with different virtualization programs.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/1746047
2010-07-08 00:15:47 +10:00
Russ Cox
774333685e runtime: fix scheduling bug - world wasn't stopping
Fixes #886.

R=r
CC=golang-dev
https://golang.org/cl/1667051
2010-06-29 17:47:27 -07:00
Alex Brainman
059c7ba996 runtime: fix windows build
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/1747041
2010-06-29 07:12:14 -07:00
Ian Lance Taylor
807605d0fc Only catch all signals if os/signal package imported.
Fixes #776.

R=rsc
CC=golang-dev
https://golang.org/cl/1745041
2010-06-28 17:14:17 -07:00
Russ Cox
e63ae242e6 runtime: split extern.go into debug.go, extern.go, sig.go.
move mal next to the other malloc functions.

R=r
CC=golang-dev
https://golang.org/cl/1701045
2010-06-21 20:53:49 -07:00
Russ Cox
121a16fa95 runtime: delete old types
R=r
CC=golang-dev
https://golang.org/cl/1715043
2010-06-21 18:03:25 -07:00
Russ Cox
45bdf0367e reflect: add Kind, remove Int8Type, Int8Value, etc.
update other code to match.

R=r
CC=golang-dev
https://golang.org/cl/1680044
2010-06-20 12:16:25 -07:00
Russ Cox
21ff75bc0e complex divide: match C99 implementation
R=iant, ken2, r, r2, ken3
CC=golang-dev
https://golang.org/cl/1686044
2010-06-18 15:46:00 -07:00
Russ Cox
c9172fb2a3 runtime: correct fault for 16-bit divide on Leopard
R=r
CC=golang-dev
https://golang.org/cl/1703041
2010-06-14 18:07:17 -07:00
Russ Cox
53a529ab2b runtime: fix 386 signal handler bug
Cannot assume that g == m->curg at time of signal.
Must save actual g and restore.

Fixes flaky crashes with messages like

throw: malloc mlookup
throw: malloc/free - deadlock
throw: unwindstack on self
throw: free mlookup

(and probably others) when running cgo.

R=iant
CC=golang-dev
https://golang.org/cl/1648043
2010-06-12 10:48:04 -07:00
Alex Brainman
c1e20720f7 runtime: switch to OS stack during Windows syscall
R=rsc
CC=golang-dev
https://golang.org/cl/1381041
2010-06-11 01:38:12 -07:00
Alex Brainman
fdb460ec11 runtime: free lock handles on Windows
R=rsc
CC=golang-dev
https://golang.org/cl/1652041
2010-06-11 00:53:54 -07:00
Russ Cox
565b5dc076 gc: new typechecking rules
* Code for assignment, conversions now mirrors spec.
* Changed some snprint -> smprint.
* Renamed runtime functions to separate
  interface conversions from type assertions:
  convT2I, assertI2T, etc.
* Correct checking of \U sequences.

Fixes #840.
Fixes #830.
Fixes #778.

R=ken2
CC=golang-dev
https://golang.org/cl/1303042
2010-06-08 18:50:02 -07:00
Daniel Theophanes
129c6c14d1 runtime: finish pchw -> tiny, added gettime for tiny
R=rsc
CC=golang-dev
https://golang.org/cl/1514041
2010-06-07 14:18:42 -07:00
Evan Shaw
69879f0414 runtime: Fix printing -Inf
R=rsc
CC=golang-dev
https://golang.org/cl/1258044
2010-06-01 14:08:15 -07:00
Alex Brainman
d5a8647d80 syscall: windows SysAlloc should use stdcall_raw not syscall
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1382041
2010-05-28 11:47:09 -07:00
Russ Cox
21518ea2af runtime: free old hashmap pieces during resizing
R=r
CC=golang-dev
https://golang.org/cl/1254044
2010-05-24 14:31:10 -07:00
Russ Cox
f58ba18a08 runtime: correct tracebacks for nascent goroutines, even closures
Fixes #780.

R=r
CC=golang-dev
https://golang.org/cl/1221042
2010-05-21 14:40:21 -07:00
Russ Cox
4843b130bb runtime: avoid allocation for fixed strings
R=r
CC=golang-dev
https://golang.org/cl/1083041
2010-05-19 21:33:31 -07:00
Russ Cox
b198c8612e runtime: allow large map values
Fixes #772.

R=ken2
CC=golang-dev
https://golang.org/cl/1206043
2010-05-19 12:57:47 -07:00
Ian Lance Taylor
e1b47159ab Save the scheduling state even predawn.
This permits cgo callbacks to work when run in init code.
Otherwise cgocallback switches to the wrong stack address.

R=rsc
CC=golang-dev
https://golang.org/cl/1123043
2010-05-06 22:07:03 -07:00
Rob Pike
eb48bfbbda runtime.GOMAXPROCS: hack it to have it return the old value.
R=rsc
CC=golang-dev
https://golang.org/cl/1140041
2010-05-06 11:50:47 -07:00
Russ Cox
7d7ebd2fe1 runtime, strconv: tiny cleanups
R=r
CC=golang-dev
https://golang.org/cl/1081042
2010-05-03 17:47:40 -07:00
Russ Cox
23c0aa3916 runtime/arm: fix build
Import _mulv from Inferno again, change R9 to R2.
Not sure what the other differences were for, but
they weren't working.

TBR=kaib
CC=golang-dev
https://golang.org/cl/1079041
2010-05-03 13:24:39 -07:00
Giles Lean
3c32300c4d runtime: update godefs usage comment for GOARCH=386 GOOS={darwin,freebsd}
When trying to regenerate src/pkg/runtime/darwin/386/defs.h
on a 64 bit capable Snow Leopard (OS X 10.6.3) system I
needed to add -f -m32 to godefs, as this OS and hardware
combination defaults to 64 bit compilation.

For safety, make the same change to the 32 bit FreeBSD
instructions in .../freebsd/defs.c.  (Tested OK and no
problems introduced.)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1052042
2010-05-03 01:26:39 -07:00
Russ Cox
6361f52fc4 gc: be pickier about slice, chan, array, and map sizes
Fixes #589.

R=ken2
CC=golang-dev
https://golang.org/cl/1032044
2010-05-01 13:15:42 -07:00
Alex Brainman
f81d471940 rename GOOS=mingw to GOOS=windows
R=rsc, Joe Poirier
CC=golang-dev
https://golang.org/cl/1015043
2010-04-29 23:45:14 -07:00
Russ Cox
718da3339a darwin: bsdthread_create can fail; print good error
Fixes #549.

R=adg
CC=golang-dev
https://golang.org/cl/1019042
2010-04-28 19:36:42 -07:00
Russ Cox
000ab98df6 5l, 6l, 8l, runtime: make -s binaries work
5l, 6l, 8l: change ELF header so that strip doesn't destroy binary

Fixes #261.

R=iant, r
CC=golang-dev
https://golang.org/cl/994044
2010-04-27 22:40:26 -07:00
Russ Cox
c6138efbcb runtime: closures, defer bug fix for Native Client
Enable package tests for Native Client build.

R=r
CC=golang-dev
https://golang.org/cl/957042
2010-04-22 17:52:22 -07:00
Russ Cox
214a55b06a runtime: switch state back to Grunning after recovery
Fixes #733.

R=r
CC=golang-dev
https://golang.org/cl/958041
2010-04-21 16:27:41 -07:00
Russ Cox
20c50cf0f8 runtime: rename cgo2c, *.cgo to goc2c, *.goc
to avoid confusion with real cgo

R=r
CC=golang-dev
https://golang.org/cl/904046
2010-04-20 17:03:25 -07:00