Michael Hudson-Doyle [Thu, 29 Oct 2015 22:48:43 +0000 (11:48 +1300)]
cmd/go, runtime: define GOBUILDMODE_shared rather than shared when dynamically linking
To avoid collisions with what existing code may already be doing.
Change-Id: Ice639440aafc0724714c25333d90a49954372230
Reviewed-on: https://go-review.googlesource.com/16503 Reviewed-by: Ian Lance Taylor <iant@golang.org>
net: make Dial, Listen{,Packet} for TCP/UDP with invalid port fail
This change makes Dial, Listen and ListenPacket with invalid port fail
whatever GODEBUG=netdns is.
Please be informed that cgoLookupPort with an out of range literal
number may return either the lower or upper bound value, 0 or 65535,
with no error on some platform.
Fixes #11715.
Change-Id: I43f9c4fb5526d1bf50b97698e0eb39d29fd74c35
Reviewed-on: https://go-review.googlesource.com/12447 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Ian Lance Taylor [Sat, 31 Oct 2015 21:44:48 +0000 (14:44 -0700)]
cmd/link: support new 386/amd64 relocations
The GNU binutils recently picked up support for new 386/amd64
relocations. Add support for them in the Go linker when doing an
internal link.
The 386 relocation R_386_GOT32X was proposed in
https://groups.google.com/forum/#!topic/ia32-abi/GbJJskkid4I . It can
be treated as identical to the R_386_GOT32 relocation.
The amd64 relocations R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX were
proposed in
https://groups.google.com/forum/#!topic/x86-64-abi/n9AWHogmVY0 . They
can both be treated as identical to the R_X86_64_GOTPCREL relocation.
The purpose of the new relocations is to permit additional linker
relaxations in some cases. We do not attempt to support those cases.
While we're at it, remove the unused and in some cases out of date
_COUNT names from ld/elf.go.
Fixes #13114.
Change-Id: I34ef07f6fcd00cdd2996038ecf46bb77a49e968b
Reviewed-on: https://go-review.googlesource.com/16529 Reviewed-by: Minux Ma <minux@golang.org>
Matthew Dempsky [Thu, 29 Oct 2015 01:55:30 +0000 (18:55 -0700)]
go/types: fix TypeString(nil, nil)
The code is meant to return "<nil>", but because of a make([]Type, 8)
call that should be make([]Type, 0, 8), the nil Type happens to
already appear in the array.
Change-Id: I2db140046e52f27db1b0ac84bde2b6680677dd95
Reviewed-on: https://go-review.googlesource.com/16464
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Matthew Dempsky [Fri, 30 Oct 2015 02:16:20 +0000 (19:16 -0700)]
math: fix bad shift in Expm1
Noticed by cmd/vet.
Expected values array produced by Python instead of Keisan because:
1) Keisan's website calculator is painfully difficult to copy/paste
values into and out of, and
2) after tediously computing e^(vf[i] * 10) - 1 via Keisan I
discovered that Keisan computing vf[i]*10 in a higher precision was
giving substantially different output values.
Also, testing uses "close" instead of "veryclose" because 386's
assembly implementation produces values for some of the test cases
that fail "veryclose". Curiously, Expm1(vf[i]*10) is identical to
Exp(vf[i]*10)-1 on 386, whereas with the portable implementation
they're only "veryclose".
Investigating these questions is left to someone else. I just wanted
to fix the cmd/vet warning.
Fixes #13101.
Change-Id: Ica8f6c267d01aa4cc31f53593e95812746942fbc
Reviewed-on: https://go-review.googlesource.com/16505
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Klaus Post <klauspost@gmail.com> Reviewed-by: Robert Griesemer <gri@golang.org>
Austin Clements [Mon, 19 Oct 2015 17:46:32 +0000 (13:46 -0400)]
runtime: perform concurrent scan in GC workers
Currently the concurrent root scan is performed in its entirety by the
GC coordinator before entering concurrent mark (which enables GC
workers). This scan is done sequentially, which can prolong the scan
phase, delay the mark phase, and means that the scan phase does not
obey the 25% CPU goal. Furthermore, there's no need to complete the
root scan before starting marking (in fact, we already allow GC
assists to happen during the scan phase), so this acts as an
unnecessary barrier between root scanning and marking.
This change shifts the root scan work out of the GC coordinator and in
to the GC workers. The coordinator simply sets up the scan state and
enqueues the right number of root scan jobs. The GC workers then drain
the root scan jobs prior to draining heap scan jobs.
This parallelizes the root scan process, makes it obey the 25% CPU
goal, and effectively eliminates root scanning as an isolated phase,
allowing the system to smoothly transition from root scanning to heap
marking. This also eliminates a major non-STW responsibility of the GC
coordinator, which will make it easier to switch to a decentralized
state machine. Finally, it puts us in a good position to perform root
scanning in assists as well, which will help satisfy assists at the
beginning of the GC cycle.
This is mostly straightforward. One tricky aspect is that we have to
deal with preemption deadlock: where two non-preemptible gorountines
are trying to preempt each other to perform a stack scan. Given the
context where this happens, the only instance of this is two
background workers trying to scan each other. We avoid this by simply
not scanning the stacks of background workers during the concurrent
phase; this is safe because we'll scan them during mark termination
(and their stacks are *very* small and should not contain any new
pointers).
This change also switches the root marking during mark termination to
use the same gcDrain-based code path as concurrent mark. This
shouldn't affect performance because STW root marking was already
parallel and tasks switched to heap marking immediately when no more
root marking tasks were available. However, it simplifies the code and
unifies these code paths.
This has negligible effect on the go1 benchmarks. It slightly slows
down the garbage benchmark, possibly by making GC run slightly more
frequently.
name old time/op new time/op delta
XBenchGarbage-12 5.10ms ± 1% 5.24ms ± 1% +2.87% (p=0.000 n=18+18)
Austin Clements [Mon, 19 Oct 2015 17:35:25 +0000 (13:35 -0400)]
runtime: consolidate "out of GC work" checks
We already have gcMarkWorkAvailable, but the check for GC mark work is
open-coded in several places. Generalize gcMarkWorkAvailable slightly
and replace these open-coded checks with calls to gcMarkWorkAvailable.
In addition to cleaning up the code, this puts us in a better position
to make this check slightly more complicated.
cmd/compile/internal: named types for Etype and Op in struct Node
Type Op is enfored now.
Type EType will need further CLs.
Added TODOs where Node.EType is used as a union type.
The TODOs have the format `TODO(marvin): Fix Node.EType union type.`.
Furthermore:
-The flag of Econv function in fmt.go is removed, since unused.
-Some cleaning along the way, e.g. declare vars first when getting initialized.
Passes go build -toolexec 'toolstash -cmp' -a std.
Russ Cox [Fri, 30 Oct 2015 15:03:02 +0000 (11:03 -0400)]
runtime: introduce GOTRACEBACK=single, now the default
Abandon (but still support) the old numbering system.
GOTRACEBACK=none is old 0
GOTRACEBACK=single is the new behavior
GOTRACEBACK=all is old 1
GOTRACEBACK=system is old 2
GOTRACEBACK=crash is unchanged
See doc comment change in runtime1.go for details.
Filed #13107 to decide whether to change default back to GOTRACEBACK=all for Go 1.6 release.
If you run into programs where printing only the current goroutine omits
needed information, please add details in a comment on that issue.
Todd Neal [Tue, 25 Aug 2015 00:45:59 +0000 (19:45 -0500)]
cmd/compile: add support for a go:noinline directive
Some tests need to disable inlining of a function. It's currently done
in one of a few ways (adding a function call, an empty switch, or a
defer). Add support for a less fragile 'go:noinline' directive that
prevents inlining.
Michael Hudson-Doyle [Thu, 29 Oct 2015 21:13:13 +0000 (10:13 +1300)]
cmd/internal/obj, cmd/link, runtime: handle TLS more like a platform linker on ppc64
On ppc64x, the thread pointer, held in R13, points 0x7000 bytes past where
thread-local storage begins (presumably to maximize the amount of storage that
can be accessed with a 16-bit signed displacement). The relocations used to
indicate thread-local storage to the platform linker account for this, so to be
able to support external linking we need to change things so the linker applies
this offset instead of the runtime assembly.
Brad Fitzpatrick [Thu, 29 Oct 2015 20:02:28 +0000 (13:02 -0700)]
math: fix typo and braino in my earlier commit
The bug number was a typo, and I forgot to switch the implementation
back to if statements after the change from Float64bits in the first
patchset back to branching.
if statements can currently be inlined, but switch cannot (#13071)
Taru Karttunen [Fri, 16 Oct 2015 10:26:20 +0000 (13:26 +0300)]
net/http: extra documentation for Redirect and RedirectHandler
Errors with http.Redirect and http.StatusOk seem
to occur from time to time on the irc channel.
This change adds documentation suggesting
to use one of the 3xx codes and not StatusOk
with Redirect.
Michael Hudson-Doyle [Thu, 29 Oct 2015 07:24:29 +0000 (20:24 +1300)]
cmd/compile, cmd/go, cmd/link: enable -buildmode=shared and related flags on linux/arm64
Change-Id: Ibddbbf6f4a5bd336a8b234d40fad0fcea574cd6e
Reviewed-on: https://go-review.googlesource.com/13994 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Michael Hudson-Doyle [Wed, 28 Oct 2015 23:17:43 +0000 (12:17 +1300)]
cmd/link: always resolve functions locally when linking dynamically
When dynamically linking, we want references to functions defined
in this module to always be to the function object, not to the
PLT. We force this by writing an additional local symbol for
every global function symbol and making all relocations against
the global symbol refer to this local symbol instead. This is
approximately equivalent to the ELF linker -Bsymbolic-functions
option, but that is buggy on several platforms.
Change-Id: Ie6983eb4d1947f8543736fd349f9a90df3cce91a
Reviewed-on: https://go-review.googlesource.com/16436 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Michael Hudson-Doyle [Thu, 3 Sep 2015 20:31:03 +0000 (08:31 +1200)]
runtime/cgo: export _cgo_reginit on ppc64x
This is needed to make external linking work.
Change-Id: I4cf7edb4ea318849cab92a697952f8745eed40c4
Reviewed-on: https://go-review.googlesource.com/14237 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Michael Hudson-Doyle [Thu, 3 Sep 2015 00:33:06 +0000 (12:33 +1200)]
cmd/go: implicitly include math in a shared library on arm
In the same manner in which runtime/cgo is included on other architectures.
Change-Id: I90a5ad8585248b2566d763d33994a600508d89cb
Reviewed-on: https://go-review.googlesource.com/14221 Reviewed-by: Ian Lance Taylor <iant@golang.org>
David Crawshaw [Tue, 27 Oct 2015 23:47:54 +0000 (19:47 -0400)]
runtime: c-shared entrypoint for linux/arm64
Change-Id: I7dab124842f5209097a8d5a802fcbdde650654fa
Reviewed-on: https://go-review.googlesource.com/16395 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Hyang-Ah Hana Kim [Fri, 16 Oct 2015 18:04:29 +0000 (14:04 -0400)]
runtime, cmd: TLS setup for android/amd64.
Android linker does not handle TLS for us. We set up the TLS slot
for g, as darwin/386,amd64 handle instead. This is disgusting and
fragile. We will eventually fix this ugly hack by taking advantage
of the recent TLS IE model implementation. (Instead of referencing
an GOT entry, make the code sequence look into the TLS variable that
holds the offset.)
The TLS slot for g in android/amd64 assumes a fixed offset from %fs.
See runtime/cgo/gcc_android_amd64.c for details.
For golang/go#10743
Change-Id: I1a3fc207946c665515f79026a56ea19134ede2dd
Reviewed-on: https://go-review.googlesource.com/15991 Reviewed-by: David Crawshaw <crawshaw@golang.org>
David du Colombier [Wed, 28 Oct 2015 05:44:26 +0000 (06:44 +0100)]
runtime: don't use FP when calling nextSample in the Plan 9 sighandler
In the Go signal handler on Plan 9, when a signal with
the _SigThrow flag is received, we call startpanic before
printing the stack trace.
The startpanic function calls systemstack which calls
startpanic_m. In the startpanic_m function, we call
allocmcache to allocate _g_.m.mcache. The problem is
that allocmcache calls nextSample, which does a floating
point operation to return a sampling point for heap profiling.
However, Plan 9 doesn't support floating point in the
signal handler.
This change adds a new function nextSampleNoFP, only
called when in the Plan 9 signal handler, which is
similar to nextSample, but avoids floating point.
Change-Id: Iaa30437aa0f7c8c84d40afbab7567ad3bd5ea2de
Reviewed-on: https://go-review.googlesource.com/16307 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Michael Hudson-Doyle [Tue, 27 Oct 2015 03:40:30 +0000 (16:40 +1300)]
runtime: invoke vsyscall helper via TCB when dynamic linking on linux/386
The dynamic linker on linux/386 stores the address of the vsyscall helper at a
fixed offset from the %gs register on linux/386 for easy access from PIC code.
Change-Id: I635305cfecceef2289985d62e676e16810ed6b94
Reviewed-on: https://go-review.googlesource.com/16346 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Michael Hudson-Doyle [Tue, 27 Oct 2015 03:39:00 +0000 (16:39 +1300)]
cmd/compile, cmd/go, cmd/link: enable -buildmode=shared and related flags on linux/386
Change-Id: If3417135ca474468a480b08cf46334fda28f79b4
Reviewed-on: https://go-review.googlesource.com/16345 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Matthew Dempsky [Tue, 27 Oct 2015 00:53:22 +0000 (17:53 -0700)]
runtime: eliminate some unnecessary uintptr conversions
arena_{start,used,end} are already uintptr, so no need to convert them
to uintptr, much less to convert them to unsafe.Pointer and then to
uintptr. No binary change to pkg/linux_amd64/runtime.a.
David du Colombier [Sat, 24 Oct 2015 11:28:00 +0000 (13:28 +0200)]
syscall: define common notes on Plan 9
There is no signal list on Plan 9, since notes
are strings. However, some programs expect
signals to be defined in the syscall package.
Hence, we define a list of the most common notes.
Updates #11975.
Change-Id: I852e14fd98777c9595a406e04125be1cbebed0fb
Reviewed-on: https://go-review.googlesource.com/16301 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Matthew Dempsky [Mon, 26 Oct 2015 19:38:47 +0000 (12:38 -0700)]
runtime: fix tiny allocator
When a new tiny block is allocated because we're allocating an object
that won't fit into the current block, mallocgc saves the new block if
it has more space leftover than the old block. However, the logic for
this was subtly broken in golang.org/cl/2814, resulting in never
saving (or consequently reusing) a tiny block.
Change-Id: Ib5f6769451fb82877ddeefe75dfe79ed4a04fd40
Reviewed-on: https://go-review.googlesource.com/16330
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Austin Clements [Fri, 16 Oct 2015 20:52:26 +0000 (16:52 -0400)]
runtime: partition data and BSS root marking
Currently data and BSS root marking are each a single markroot job.
This makes them difficult to load balance, which can draw out mark
termination time if they are large.
Fix this by splitting both in to 256K chunks. While we're putting in
the infrastructure for dynamic roots, we also replace the fixed
sharding of the span roots with sharding in to fixed sizes. In
addition to helping balance root marking, this also paves the way to
parallelizing concurrent scan and to letting assists help with root
marking.
Updates #10345. This fixes the data and BSS aspects of that bug; it
does not partition scanning of large heap objects.
This has negligible effect on either the go1 benchmarks or the garbage
benchmark:
name old time/op new time/op delta
XBenchGarbage-12 4.90ms ± 1% 4.91ms ± 2% ~ (p=0.058 n=17+16)
David Crawshaw [Mon, 26 Oct 2015 15:15:09 +0000 (11:15 -0400)]
androidtest.bash: set GOARM=7
It's the only ARM version we have ever supported on android.
(Not setting it caused some builder timeouts.)
Change-Id: I26061434252ff2a236bb31d95787a1c582d24b3f
Reviewed-on: https://go-review.googlesource.com/16295 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
David Crawshaw [Tue, 15 Sep 2015 16:22:46 +0000 (12:22 -0400)]
runtime: use a 64kb system stack on arm
I went looking for an arm system whose stacks are by default smaller
than 64KB. In fact the smallest common linux target I could find was
Android, which like iOS uses 1MB stacks.
Fixes #11873
Change-Id: Ieeb66ad095b3da18d47ba21360ea75152a4107c6
Reviewed-on: https://go-review.googlesource.com/14602 Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com> Reviewed-by: Minux Ma <minux@golang.org>
Marcel van Lohuizen [Mon, 31 Aug 2015 20:24:07 +0000 (22:24 +0200)]
cmd/compile/internal/gc: make embedded unexported structs RO
gc will need to be rebuild.
Package that assume f.PkgPath != nil means a field is unexported and
must be ignored must be revised to check for
f.PkgPath != nil && !f.Anonymous,
so that they do try to walk into the embedded fields to look for
exported fields contained within.
Closes #12367, fixes #7363, fixes #11007, and fixes #7247.
Cover some functions that weren't benched before and add InString
variants if the underlying implementation is different.
Note: compare (Valid|RuneCount)InString* to their (Valid|RuneCount)*
counterparts. It shows, somewhat unexpectedly, that ranging over
a string is *much* slower than using calls to DecodeRune.
Results:
In order to avoid a discrepancy in measuring the performance
of core we could leave the names of the string-based measurements
unchanged and suffix the added alternatives with Bytes.
Marcel van Lohuizen [Fri, 28 Aug 2015 07:33:51 +0000 (09:33 +0200)]
reflect: adjust access to unexported embedded structs
This CL changes reflect to allow access to exported fields and
methods in unexported embedded structs for gccgo and after gc
has been adjusted to disallow access to embedded unexported structs.
David Crawshaw [Mon, 19 Oct 2015 20:31:20 +0000 (16:31 -0400)]
cmd/go, cmd/link: -buildmode=pie for linux/amd64
Depends on external linking right now. I have no immediate use for
this, but wanted to check how hard it is to support as android/amd64
is coming and it will require PIE.
Change-Id: I65c6b19159f40db4c79cf312cd0368c2b2527bfd
Reviewed-on: https://go-review.googlesource.com/16072 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Didier Spezia [Fri, 28 Aug 2015 17:36:35 +0000 (17:36 +0000)]
regexp: fix slice bounds out of range panics
Regular expressions involving a (x){0} term are
simplified by removing this term from the
expression, just before the expression is compiled.
The number of subexpressions is evaluated before
the simplification. The number of capture instructions
in the compiled expressions is not necessarily in line
with the number of subexpressions.
When the ReplaceAll(String) methods are used, a number
of capture slots (nmatch) is evaluated as 2*(s+1)
(s being the number of subexpressions).
In some case, it can be higher than the number of capture
instructions evaluated at compile time, resulting in a
panic when the internal slices of regexp.machine
are resized to this value.
Fixed by capping the number of capture slots to the number
of capture instructions.
I must say I do not really see the benefits of setting
nmatch lower than re.prog.NumCap using this 2*(s+1) formula,
so perhaps this can be further simplified.
Robert Griesemer [Fri, 14 Aug 2015 02:05:37 +0000 (19:05 -0700)]
cmd/compile/internal/gc: compact binary export format
The binary import/export format is significantly more
compact than the existing textual format. It should
also be faster to read and write (to be measured).
Use -newexport to enable, for instance:
export GO_GCFLAGS=-newexport; make.bash
The compiler can import packages using both the old
and the new format ("mixed mode").
Missing: export info for inlined functions bodies
(performance issue, does not affect correctness).
Disabled by default until we have inlined function
bodies and confirmation of no regression and equality
of binaries.
Austin Clements [Thu, 13 Aug 2015 03:43:43 +0000 (23:43 -0400)]
runtime: add pcvalue cache to improve stack scan speed
The cost of scanning large stacks is currently dominated by the time
spent looking up and decoding the pcvalue table. However, large stacks
are usually large not because they contain calls to many different
functions, but because they contain many calls to the same, small set
of recursive functions. Hence, walking large stacks tends to make the
same pcvalue queries many times.
Based on this observation, this commit adds a small, very simple, and
fast cache in front of pcvalue lookup. We thread this cache down from
operations that make many pcvalue calls, such as gentraceback, stack
scanning, and stack adjusting.
This simple cache works well because it has minimal overhead when it's
not effective. I also tried a hashed direct-map cache, CLOCK-based
replacement, round-robin replacement, and round-robin with lookups
disabled until there had been at least 16 probes, but none of these
approaches had obvious wins over the random replacement policy in this
commit.
This nearly doubles the overall performance of the deep stack test
program from issue #10898:
name old time/op new time/op delta
Issue10898 16.5s ±12% 9.2s ±12% -44.37% (p=0.008 n=5+5)
It's a very slight win on the garbage benchmark:
name old time/op new time/op delta
XBenchGarbage-12 4.92ms ± 1% 4.89ms ± 1% -0.75% (p=0.000 n=18+19)
It's a wash (but doesn't harm performance) on the go1 benchmarks,
which don't have particularly deep stacks:
In earlier versions of Go, times were only encoded as an ASN.1 UTCTIME and
crypto/tls/generate_cert.go limited times to the maximum UTCTIME value.
Revision 050b60a3 added support for ASN.1 GENERALIZEDTIME, allowing larger
time values to be represented (per RFC 5280).
As a result, when the httptest certificate was regenerated in revision 9b2d84ef, the Not After date changed to Jan 29 16:00:00 2084 GMT. Update
the comment to reflect this.
Change-Id: I1bd66e011f2749f9372b5c7506f52ea34e264ce9
Reviewed-on: https://go-review.googlesource.com/16193 Reviewed-by: Adam Langley <agl@golang.org>
Matthew Dempsky [Thu, 15 Oct 2015 22:59:49 +0000 (15:59 -0700)]
runtime: add mSpanList type to represent lists of mspans
This CL introduces a new mSpanList type to replace the empty mspan
variables that were previously used as list heads.
To be type safe, the previous circular linked list data structure is
now a tail queue instead. One complication of this is
mSpanList_Remove needs to know the list a span is being removed from,
but this appears to be computable in all circumstances.
As a temporary sanity check, mSpanList_Insert and mSpanList_InsertBack
record the list that an mspan has been inserted into so that
mSpanList_Remove can verify that the correct list was specified.
Whereas mspan is 112 bytes on amd64, mSpanList is only 16 bytes. This
shrinks the size of mheap from 50216 bytes to 12584 bytes.
Alex Brainman [Wed, 9 Sep 2015 00:54:25 +0000 (10:54 +1000)]
path/filepath: test EvalSymlinks returns canonical path on windows
When you create C:\A.TXT file on windows, you can open it as c:\a.txt.
EvalSymlinks("c:\a.txt") returns C:\A.TXT. This is all EvalSymlinks
did in the past, but recently symlinks functionality been implemented on
some Windows version (where symlinks are supported). So now EvalSymlinks
handles both: searching for file canonical name and resolving symlinks.
Unfortunately TestEvalSymlinks has not been adjusted properly. The test
tests either canonical paths or symlinks, but not both. This CL separates
canonical paths tests into new TestEvalSymlinksCanonicalNames, so all
functionality is covered. Tests are simplified somewhat too.
Also remove EvalSymlinksAbsWindowsTests - it seems not used anywhere.
Change-Id: Id12e9f1441c1e30f15c523b250469978e4511a84
Reviewed-on: https://go-review.googlesource.com/14412 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Shenghou Ma [Wed, 21 Oct 2015 21:04:49 +0000 (17:04 -0400)]
runtime: fix typos
Change-Id: Iffc25fc80452baf090bf8ef15ab798cfaa120b8e
Reviewed-on: https://go-review.googlesource.com/16154 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Matthew Dempsky [Wed, 21 Oct 2015 19:12:25 +0000 (12:12 -0700)]
runtime: make iface/eface handling more type safe
Change compiler-invoked interface functions to directly take
iface/eface parameters instead of fInterface/interface{} to avoid
needing to always convert.
For the handful of functions that legitimately need to take an
interface{} parameter, add efaceOf to type-safely convert *interface{}
to *eface.
Change-Id: I8928761a12fd3c771394f36adf93d3006a9fcf39
Reviewed-on: https://go-review.googlesource.com/16166
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Ian Lance Taylor [Wed, 21 Oct 2015 20:41:30 +0000 (13:41 -0700)]
doc: go1.6.txt: -msan option for cmd/{go,compile,link}
Change-Id: I8b41de496e4b58214b98267b529f3525ff6d9745
Reviewed-on: https://go-review.googlesource.com/16171 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Ian Lance Taylor [Wed, 21 Oct 2015 19:33:56 +0000 (12:33 -0700)]
cmd/go: add -msan option
The -msan option compiles Go code to use the memory sanitizer. This is
intended for use when linking with C/C++ code compiled with
-fsanitize=memory. When memory blocks are passed back and forth between
C/C++ and Go, code in both languages will agree as to whether the memory
is correctly initialized or not, and will report errors for any use of
uninitialized memory.
Change-Id: I2dbdbd26951eacb7d84063cfc7297f88ffadd70c
Reviewed-on: https://go-review.googlesource.com/16169 Reviewed-by: David Crawshaw <crawshaw@golang.org>
Keith Randall [Wed, 21 Oct 2015 19:32:14 +0000 (12:32 -0700)]
cmd/internal/obj: fix PSRLW opcode
The reg-reg version compiled to PSRAW, not PSRLW (arithmetic
instead of logical shift right).
Fixes #13010.
Change-Id: I69a47bd83c8bbe66c7f8d82442ab45e9bf3b94fb
Reviewed-on: https://go-review.googlesource.com/16168 Reviewed-by: Ian Lance Taylor <iant@golang.org>