- 05 Apr, 2016 2 commits
-
-
Hiroshi Ioka authored
Current implementation uses GetShortPathName and GetLongPathName to get a normalized path. That approach sometimes fails because user can disable short path name anytime. This CL provides an alternative approach suggested by MSDN. https://msdn.microsoft.com/en-us/library/windows/desktop/aa364989(v=vs.85).aspx Fixes #13980 Change-Id: Icf4afe4c9c4b507fc110c1483bf8db2c3f606b0a Reviewed-on: https://go-review.googlesource.com/20860Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
This copies the golang.org/x/net/context package to the standard library. It is imported from the x/net repo's git rev 1d9fd3b8333e (the most recent modified to x/net/context as of 2016-03-07). The corresponding change to x/net/context is in https://golang.org/cl/20347 Updates #14660 Change-Id: Ida14b1b7e115194d6218d9ac614548b9f41641cc Reviewed-on: https://go-review.googlesource.com/20346Reviewed-by: Sameer Ajmani <sameer@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 04 Apr, 2016 16 commits
-
-
Matthew Dempsky authored
Briefly document what the importfoo functions do. Get rid of importsym's unused result parameter. Get rid of the redundant calls to importsym(s, OTYPE) after we've already called pkgtype(s). Passes toolstash -cmp. Change-Id: I4c057358144044f5356e4dec68907ec85f1fe806 Reviewed-on: https://go-review.googlesource.com/21498 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Mikio Hara authored
Also updates documentation. Change-Id: Idb0fc0feed61407f7f07eab81ce82b55ffde5040 Reviewed-on: https://go-review.googlesource.com/21446Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Alos moves TestTCPSelfConnect into tcpsock_test.go Change-Id: I3e1cbd029594ecb36a67f42bc3ecdbc7176a95dc Reviewed-on: https://go-review.googlesource.com/21447 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Shahar Kohanim authored
Counting the final buffer size usually doesn't result in the buffer growing, so assume that it doesn't need to grow and only grow if necessary. name old secs new secs delta LinkCmdGo 0.49 ± 4% 0.48 ± 3% -1.31% (p=0.000 n=95+95) name old MaxRSS new MaxRSS delta LinkCmdGo 122k ± 4% 121k ± 5% ~ (p=0.065 n=96+100) Change-Id: I85e7f5688a61ef5ef2b1b7afe56507e71c5bd5b1 Reviewed-on: https://go-review.googlesource.com/21509Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Shahar Kohanim <skohanim@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Robert Griesemer authored
Completed implementation for exporting inlined functions using the new binary export format. This change passes (export GO_GCFLAGS=-newexport; make all.bash) but for gc's builtin_test.go which we need to adjust before enabling this code by default. For a high-level description of the export format see the comment at the top of bexport.go. Major changes: 1) The export format for the platform independent export data changed: When we export inlined function bodies, additional objects (other functions, types, etc.) that are referred to by the function bodies will need to be exported. While this doesn't affect the platform-independent portion directly, it adds more objects to the exportlist while we are exporting. Instead of trying to sort the objects into groups, just export objects as they appear in the export list. This is slightly less compact (one extra byte per object), but it is simpler and much more flexible. 2) The export format contains now three sections: 1) The plat- form independent objects, 2) the objects pulled in for export via inlined function bodies, and 3) the inlined function bodies. 3) Completed the exporting and importing code for inlined function bodies. The format is completely compiler-specific and easily changeable w/o affecting other tools. There is still quite a bit of room for denser encoding. This can happen at any time in the future. This change contains also the adjustments for go/internal/gcimporter, necessary because of the export format change 1) mentioned above. For #13241. Change-Id: I86bca0bd984b12ccf13d0d30892e6e25f6d04ed5 Reviewed-on: https://go-review.googlesource.com/21172 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Change-Id: I14cff013ef4920d33b5ead0c75d51681bb4f635a Reviewed-on: https://go-review.googlesource.com/21337 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Marcel van Lohuizen authored
by only testing the lower bound of memalloc Fixes #15063 Change-Id: Iab2fdd75e9ce98c641bfbce57f142fa47176772d Reviewed-on: https://go-review.googlesource.com/21507Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
-
Alexandru Moșoi authored
Fixes #15079 Change-Id: Ib4dd9eab322da39234008e040100e75cb58761b3 Reviewed-on: https://go-review.googlesource.com/21501Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alexandru Moșoi authored
In b we only need the division by 0 check. func b(i uint, v []byte) byte { return v[i%uint(len(v))] } Updates #15079. Change-Id: Ic7491e677dd57cd6ba577efbce576dbb6e023cbd Reviewed-on: https://go-review.googlesource.com/21502 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Ahmed Waheed <oneofone@gmail.com>
-
Austin Clements authored
When we grow the heap, we create a temporary "in use" span for the memory acquired from the OS and then free that span to link it into the heap. Hence, we (1) increase pagesInUse when we make the temporary span so that (2) freeing the span will correctly decrease it. However, currently step (1) increases pagesInUse by the number of pages requested from the heap, while step (2) decreases it by the number of pages requested from the OS (the size of the temporary span). These aren't necessarily the same, since we round up the number of pages we request from the OS, so steps 1 and 2 don't necessarily cancel out like they're supposed to. Over time, this can add up and cause pagesInUse to underflow and wrap around to 2^64. The garbage collector computes the sweep ratio from this, so if this happens, the sweep ratio becomes effectively infinite, causing the first allocation on each P in a sweep cycle to sweep the entire heap. This makes sweeping effectively STW. Fix this by increasing pagesInUse in step 1 by the number of pages requested from the OS, so that the two steps correctly cancel out. We add a test that checks that the running total matches the actual state of the heap. Fixes #15022. For 1.6.x. Change-Id: Iefd9d6abe37d0d447cbdbdf9941662e4f18eeffc Reviewed-on: https://go-review.googlesource.com/21280 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
David Crawshaw authored
To refer to types and names by offsets, we want to keep the symbols in the same sections. Do this by making all types .relro for now. Once name offsets are further along, name data can move out of relro. Change-Id: I1cbd2e914bd180cdf25c4aeb13d9c1c734febe69 Reviewed-on: https://go-review.googlesource.com/21394Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Caio Marcelo de Oliveira Filho authored
Identify this assignment case and instead of the more general error prog.go:6: cannot assign to students["sally"].age (value of type int) produce prog.go:6: cannot directly assign to struct field students["sally"].age in map that explains why the assignment is not possible. Used ExprString instead of String of operand since the type of the field is not relevant to the error. Updates #13779. Change-Id: I581251145ae6336ddd181b9ddd77f657c51b5aff Reviewed-on: https://go-review.googlesource.com/21463Reviewed-by: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Caio Marcelo de Oliveira Filho authored
Identify this assignment case and instead of the more general error prog.go:6: cannot assign to students["sally"].age produce prog.go:6: cannot directly assign to struct field students["sally"].age in map that explains why the assignment is not possible. Fixes #13779. Change-Id: I90c10b445f907834fc1735aa66e44a0f447aa74f Reviewed-on: https://go-review.googlesource.com/21462Reviewed-by: David Chase <drchase@google.com>
-
Alex Brainman authored
It appears that windows osyield is just 15ms sleep on my computer (see benchmarks below). Replace NtWaitForSingleObject in osyield with SwitchToThread (as suggested by Dmitry). Also add issue #14790 related benchmarks, so we can track perfomance changes in CL 20834 and CL 20835 and beyond. Update #14790 benchmark old ns/op new ns/op delta BenchmarkChanToSyscallPing1ms 1953200 1953000 -0.01% BenchmarkChanToSyscallPing15ms 31562904 31248400 -1.00% BenchmarkSyscallToSyscallPing1ms 5247 4202 -19.92% BenchmarkSyscallToSyscallPing15ms 5260 4374 -16.84% BenchmarkChanToChanPing1ms 474 494 +4.22% BenchmarkChanToChanPing15ms 468 489 +4.49% BenchmarkOsYield1ms 980018 75.5 -99.99% BenchmarkOsYield15ms 15625200 75.8 -100.00% Change-Id: I1b4cc7caca784e2548ee3c846ca07ef152ebedce Reviewed-on: https://go-review.googlesource.com/21294 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Rob Pike authored
This makes these names even less likely to collide with a real user-defined function. Fixes #13852. Change-Id: If5a8562c6797ced19c355c7ab2c86fc4401a8674 Reviewed-on: https://go-review.googlesource.com/21490 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Christopher Nelson authored
Add supporting code for runtime initialization, including both 32- and 64-bit x86 architectures. Add .ctors section on Windows to PE .o files, and INITENTRY to .ctors section to plug in to the GCC C/C++ startup initialization mechanism. This allows the Go runtime to initialize itself. Add .text section symbol for .ctor relocations. Note: This is unlikely to be useful for MSVC-based toolchains. Fixes #13494 Change-Id: I4286a96f70e5f5228acae88eef46e2bed95813f3 Reviewed-on: https://go-review.googlesource.com/18057Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
-
- 03 Apr, 2016 12 commits
-
-
Brad Fitzpatrick authored
Change-Id: I03621db79637b04982e1f0e7b4268c4ed2db6d22 Reviewed-on: https://go-review.googlesource.com/21484Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Now that cmd/link uses bufio.Reader, take advantage of it. I find this new version easier to reason about. Reduces allocations by 1.1% when linking a basic HTTP server. Numbers are stable with each round measuring using: rm prof.mem; go tool link -o foo -memprofile=prof.mem -memprofilerate=1 foo.a Before: 65.36MB of 74.53MB total (87.70%) Dropped 157 nodes (cum <= 0.37MB) Showing top 10 nodes out of 39 (cum >= 1.47MB) flat flat% sum% cum cum% 21.48MB 28.81% 28.81% 21.48MB 28.81% cmd/link/internal/ld.Linklookup 16.04MB 21.52% 50.33% 16.04MB 21.52% cmd/link/internal/ld.(*objReader).readSlices 4.61MB 6.19% 56.52% 4.61MB 6.19% cmd/link/internal/ld.(*objReader).readSymName 4.51MB 6.05% 62.57% 6.32MB 8.48% cmd/link/internal/ld.writelines 4.50MB 6.03% 68.60% 4.50MB 6.03% cmd/link/internal/ld.Symgrow 4.02MB 5.39% 73.99% 4.02MB 5.39% cmd/link/internal/ld.linknew 3.98MB 5.34% 79.33% 3.98MB 5.34% cmd/link/internal/ld.setaddrplus 2.96MB 3.97% 83.30% 28.78MB 38.62% cmd/link/internal/ld.(*objReader).readRef 1.81MB 2.43% 85.73% 1.81MB 2.43% cmd/link/internal/ld.newcfaoffsetattr 1.47MB 1.97% 87.70% 1.47MB 1.97% cmd/link/internal/ld.(*objReader).readSym After: 64.66MB of 73.87MB total (87.53%) Dropped 156 nodes (cum <= 0.37MB) Showing top 10 nodes out of 40 (cum >= 1.47MB) flat flat% sum% cum cum% 21.48MB 29.08% 29.08% 21.48MB 29.08% cmd/link/internal/ld.Linklookup 16.04MB 21.71% 50.79% 16.04MB 21.71% cmd/link/internal/ld.(*objReader).readSlices 4.51MB 6.10% 56.90% 6.32MB 8.56% cmd/link/internal/ld.writelines 4.50MB 6.09% 62.99% 4.50MB 6.09% cmd/link/internal/ld.Symgrow 4.02MB 5.44% 68.42% 4.02MB 5.44% cmd/link/internal/ld.linknew 3.98MB 5.38% 73.81% 3.98MB 5.38% cmd/link/internal/ld.setaddrplus 3.90MB 5.28% 79.09% 3.90MB 5.28% cmd/link/internal/ld.(*objReader).readSymName 2.96MB 4.01% 83.09% 28.08MB 38.01% cmd/link/internal/ld.(*objReader).readRef 1.81MB 2.45% 85.55% 1.81MB 2.45% cmd/link/internal/ld.newcfaoffsetattr 1.47MB 1.99% 87.53% 1.47MB 1.99% cmd/link/internal/ld.(*objReader).readSym Also tested locally with asserts that that the calculated length is always correct and thus the adjName buf never reallocates. Change-Id: I19e3e8bfa6a12bcd8b5216f6232f42c122e4f80e Reviewed-on: https://go-review.googlesource.com/21481Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Hudson-Doyle authored
Rather than having half a dozen switch statements. Also remove some c2go dregs. Change-Id: I19af5b64f73369126020e15421c34cad5bbcfbf8 Reviewed-on: https://go-review.googlesource.com/21442Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Munday authored
On s390x char is unsigned. We cannot force it to be signed using -fsigned-char (see arm64) because the s390x gccgo API is already public and we need to stick as closely as possible to it to avoid breaking existing projects. In order to match the gccgo API we also force the RawSockaddr.Data and RawSockaddrUnix.Path fields to be signed. This CL adds a post-processing pass (mkpost.go) to mkall.sh in order to export the types of fields in PtraceRegs on s390x without affecting the API on other platforms. The types of these fields match their counterparts in gccgo. mkpost.go also cleans up the Pad_cgo* fields and X_* fields (these fields are not exported by gccgo currently). It could be extended to add build tags on platforms that need them. Change-Id: I66bdf5b86ec98af70baf666989027bb354df9e3e Reviewed-on: https://go-review.googlesource.com/20961Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shahar Kohanim authored
name old secs new secs delta LinkCmdGo 0.52 ± 3% 0.52 ± 7% ~ (p=0.325 n=93+100) name old MaxRSS new MaxRSS delta LinkCmdGo 120k ± 1% 118k ± 4% -1.10% (p=0.000 n=87+96) Change-Id: I967660b8dc6036d28eeea1b6b30f400fadd57b05 Reviewed-on: https://go-review.googlesource.com/21372 Run-TryBot: Shahar Kohanim <skohanim@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Eric Engestrom authored
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Change-Id: I91873aaebf79bdf1c00d38aacc1a1fb8d79656a7 Reviewed-on: https://go-review.googlesource.com/21433Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
This makes clear that Go's path.Join and filepath.Join are different from the Python os.path.join (and perhaps others). Requested in private mail. Change-Id: Ie5dfad8a57f9baa5cca31246af1fd4dd5b1a64ee Reviewed-on: https://go-review.googlesource.com/20711Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Munday authored
Supports basic internal linking, external linking and shared library linking. Change-Id: Ic9693dd94df561b0f9df9880009b1e8ab9d59b92 Reviewed-on: https://go-review.googlesource.com/20879 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
-
Brad Fitzpatrick authored
And adds missing tests. Fixes #14970 Change-Id: I0dba02603bc245f555498cb5dd3e0a9d87c52353 Reviewed-on: https://go-review.googlesource.com/21467Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
This code made sense before fmt switched to using sync.Pool, but a sync.Pool clears all items on GC, so not reusing something based on size is just a waste of memory. Change-Id: I201312b0ee6c572ff3c0ffaf71e42623a160d23f Reviewed-on: https://go-review.googlesource.com/21480Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Munday authored
Introduces the new relocation variant RV_390_DBL which indicates that the relocation value should be shifted right by 1 (to make it 2-byte aligned). Change-Id: I03fa96b4759ee19330c5298c3720746622fb1a03 Reviewed-on: https://go-review.googlesource.com/20878 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Generated with eg. Passes toolstash -cmp. Change-Id: I3af35191e73a558080f777a4eed93bcec7dfe1f5 Reviewed-on: https://go-review.googlesource.com/21469 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 02 Apr, 2016 7 commits
-
-
Joe Tsai authored
Rather than specifying every field that should be cleared in Reset, it is better to just zero the entire struct and only preserve or set the fields that we actually care about. This ensures that the Header field is reset for the next use. Fixes #15077 Change-Id: I41832e506d2d64c62b700aa1986e7de24a577511 Reviewed-on: https://go-review.googlesource.com/21465 Run-TryBot: Joe Tsai <joetsai@digital-static.net> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alexandru Moșoi authored
Handle this case: if 0 <= i && i < len(a) { use a[i] } Shaves about 5k from pkg/tools/linux_amd64/*. Change-Id: I6675ff49aa306b0d241b074c5738e448204cd981 Reviewed-on: https://go-review.googlesource.com/21431 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Fixes #13705 Change-Id: I86c60c78ce0394f830f904c9cba83ebbf3efc046 Reviewed-on: https://go-review.googlesource.com/21328 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Joe Tsai authored
Changes made: * Reader.flg is not used anywhere else other than readHeader and does not need to be stored. * Store Reader.digest and Writer.digest as uint32s rather than as a hash.Hash32 and use the crc32.Update function instead. This simplifies initialization logic since the zero value of uint32 is the initial CRC-32 value. There are no performance detriments to doing this since the hash.Hash32 returned by crc32 simply calls crc32.Update as well. * s/[0:/[:/ Consistently use shorter notation for slicing. * s/RFC1952/RFC 1952/ Consistently use RFC notation. Change-Id: I55416a19f4836cbed943adaa3f672538ea5d166d Reviewed-on: https://go-review.googlesource.com/21429Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Joe Tsai <joetsai@digital-static.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Todd Neal authored
The issue was seen when inlining an exported function that contained a fallthrough statement. Fixes #15071 Change-Id: I1e8215ad49d57673dba7e8f8bd2ed8ad290dc452 Reviewed-on: https://go-review.googlesource.com/21452Reviewed-by: Dave Cheney <dave@cheney.net>
-
Brad Fitzpatrick authored
Updates the syscall generator for patchset 4 of https://golang.org/cl/21388. Updates #14959 Change-Id: Icbd6df489887d3dcc076dfc73d4feb1376abaf8b Reviewed-on: https://go-review.googlesource.com/21428Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Matthew Dempsky authored
The IsStruct case is meant to handle cases like append(f()) where f's result parameters are something like ([]int, int, int). However, at this point in the compiler we've already rewritten append(f()) into "tmp1, tmp2, tmp3 := f(); append(tmp1, tmp2, tmp3)". As further evidence, the t.Elem() is not a valid method call for a struct type anyway, which would trigger the Fatalf call in Type.Elem if this code was ever hit. Change-Id: Ia066f93df66ee3fadc9a9a0f687be7b5263af163 Reviewed-on: https://go-review.googlesource.com/21427 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 01 Apr, 2016 3 commits
-
-
Brad Fitzpatrick authored
Make sure that for any DLL that Go uses itself, we only look for the DLL in the Windows System32 directory, guarding against DLL preloading attacks. (Unless the Windows version is ancient and LoadLibraryEx is unavailable, in which case the user probably has bigger security problems anyway.) This does not change the behavior of syscall.LoadLibrary or NewLazyDLL if the DLL name is something unused by Go itself. This change also intentionally does not add any new API surface. Instead, x/sys is updated with a LoadLibraryEx function and LazyDLL.Flags in: https://golang.org/cl/21388 Updates #14959 Change-Id: I8d29200559cc19edf8dcf41dbdd39a389cd6aeb9 Reviewed-on: https://go-review.googlesource.com/21140Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Fixes #15061. Change-Id: I71f69f398d1c5f3a884bbd044786f1a5600d0fae Reviewed-on: https://go-review.googlesource.com/21398 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
gorename -from '"cmd/compile/internal/gc".Node.Int' -to 'Int64' Change-Id: I2fe3bf9a26ae6b0600d990d0c981e4b8b53020a4 Reviewed-on: https://go-review.googlesource.com/21426Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-