- 12 Apr, 2018 3 commits
-
-
Benny Siegert authored
Move the test skip to use testenv.SkipFlaky and link to the Go issue. Update #24826 Change-Id: I7a0ea3325ffcaa790b25f8cdc429fb52e96a41c7 Reviewed-on: https://go-review.googlesource.com/106636Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Hudson-Doyle authored
As the comment above the code I'm changing says, when building with -buildmode=exe, the default compiler flags produce code incompatible with PIE. But when -linkshared is passed, the default compiler flags are not used so this does not apply. And now I've found a system (linux/arm64 with glibc 2.27) where this combination of flags causes a problem, albeit for reasons I don't really understand, so stop passing -no-pie when -linkshared is passed. Change-Id: I412ec7941dc0cb89e6d1b171fc29288aadcb9f20 Reviewed-on: https://go-review.googlesource.com/104815 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
fraenkel authored
Fixes #24692 Change-Id: I14058cd3968d08fbcfc275f1b13b6dba9e3c5068 Reviewed-on: https://go-review.googlesource.com/106535 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 11 Apr, 2018 27 commits
-
-
Josh Bleecher Snyder authored
I was wrong. There was a need to loop here. Fixes #24761 Change-Id: If13b3ab72febde930bdaebdddd1c05e0d0446020 Reviewed-on: https://go-review.googlesource.com/105615 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Matthew Dempsky authored
The standard library has plenty of polished encoder/decoder implementations. No need for another ad-hoc one. I considered using encoding/gob instead, but these strings go into the package data part of the object file, so it's important they don't contain "\n$$\n". Package json escapes newlines in strings, so it's safe to use here. Change-Id: I998655524ccee7365c2c8e9a843e6975e95a3e62 Reviewed-on: https://go-review.googlesource.com/106463 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
And fix the nacl implementation. Fixes #24710 Change-Id: I31ffeea03a72dac5021ffb183fde31e9ffd060ad Reviewed-on: https://go-review.googlesource.com/106464Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Elias Naur authored
CL 106096 changed the iOS exec wrapper to directly run the binary without waiting for a SIGINT signal, but did so in a way that expects a "(lldb)" response from lldb in 2 seconds. Lldb might not out output anything until the program finishes, so change the exec wrapper to just fire and forget the the run command and go straight to waiting for exit, successfully or otherwise. Change-Id: I6a2dc63f9b29fe44edb3591afb048b9a8e2e0822 Reviewed-on: https://go-review.googlesource.com/106176 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
A raw string containing newlines breaks whatever columns structure has been established so far. Recognize the situation and force a new section of alignment with the first line break seen after the the raw string. Applied gofmt to src and misc. Fixes #9064. Change-Id: I961e94b529b1fd421908311f366b113e2ec9b7f0 Reviewed-on: https://go-review.googlesource.com/105040Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Robert Griesemer authored
The file ordering.go referred to in the comment was removed with commit dd448957. There's no duplicate use of the deps field anymore. Change-Id: Ia6490e9f0839d4f755e8063758819e29b3d3b248 Reviewed-on: https://go-review.googlesource.com/106459Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Ian Lance Taylor authored
Fixes #20348 Change-Id: I831aeeee8e20d55b3e47dea67786e883b213cd58 Reviewed-on: https://go-review.googlesource.com/106457 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Aram Hăvărneanu <aram@mgk.ro> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
bontequero authored
Fixes golint warning about comment on exported function. Change-Id: Ia6a910e2dca2cd31d8de64419e36add6191e804d Reviewed-on: https://go-review.googlesource.com/105495Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Yann Hodique authored
Presumably each line in the descriptor should match the corresponding operation. Change-Id: I7726befcd62147324764d15c26e737357122be51 GitHub-Last-Rev: 85e610e3045950b8688a7a506b37a2a92ac7445c GitHub-Pull-Request: golang/go#24807 Reviewed-on: https://go-review.googlesource.com/106355Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Eric Rykwalder authored
The previous implementation would return "sql: Rows are closed" for any context errors, which can be confusing for context timeouts or cancelations. Fixes #24431 Change-Id: I884904ec43204c43f4e94e2335b2802aab77a888 Reviewed-on: https://go-review.googlesource.com/104276Reviewed-by: Daniel Theophanes <kardianos@gmail.com> Run-TryBot: Daniel Theophanes <kardianos@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Daniel Theophanes authored
It wasn't clear for existing docs if DB.Close forcefully closed connections or waited for them to finish. Fixes #23753 Change-Id: Id7df31224c93181c8d01bab7b0b23da25b42a288 Reviewed-on: https://go-review.googlesource.com/103397Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Bryan C. Mills authored
The process reading the output of the binary may read stderr and stdout separately, and may interleave reads from the two streams arbitrarily. Because we explicitly serialize writes on the writer side, we can reuse a timestamp within a single stream without losing information; however, if we use the same timestamp for write on both streams, the reader can't tell how to interleave them. This change ensures that every time we change between the two fds, we also bump the timestamp. That way, writes within a stream continue to show the same timestamp, but a sorted merge of the contents of the two streams always interleaves them in the correct order. This still requires a corresponding change to the Playground parser to actually reconstruct the correct interleaving. It currently merges the two streams without reordering them; it should instead buffer them separately and perform a sorted merge. (See https://golang.org/cl/105496.) Updates golang/go#24615. Updates golang/go#24659. Change-Id: Id789dfcc02eb4247906c9ddad38dac50cf829979 Reviewed-on: https://go-review.googlesource.com/105235 Run-TryBot: Bryan C. Mills <bcmills@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Yury Smolsky <yury@smolsky.by> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Cherry Zhang authored
Mac otool and llvm-objdump distinguishes a Mach-O section is text or data by looking at S_ATTR_PURE_INSTRUCTIONS bit. Without this bit it thinks our function symbols are data, not functions. Set this bit for text section to make otool/objdump happy. Fixes #24706. Change-Id: I5236482cb9a72474c23fbea0f35d5b5cc8491ea4 Reviewed-on: https://go-review.googlesource.com/105256 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Nick Patavalis authored
If NewFile is called with a file descriptor that is already set to non-blocking mode, it tries to return a pollable file (one for which SetDeadline methods work) by adding the filedes to the poll/netpoll mechanism. If called with a filedes in blocking mode, it returns a non-pollable file, as it always did. Fixes #22939 Updates #24331 Change-Id: Id54c8be1b83e6d35e14e76d7df0e57a9fd64e176 Reviewed-on: https://go-review.googlesource.com/100077 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Chase authored
When a neither of a conditional block's successors follows, the block must end with a conditional branch followed by a an unconditional branch. If the (conditional) branch is "unlikely", invert it and swap successors to make it likely instead. This doesn't matter to most benchmarks on amd64, but in one instance on amd64 it caused a 30% improvement, and it is otherwise harmless. The problematic loop is for i := 0; i < w; i++ { if pw[i] != 0 { return true } } compiled under GOEXPERIMENT=preemptibleloops This the very worst-case benchmark for that experiment. Also in this CL is a commoning up of heavily-repeated boilerplate, which made it much easier to see that the changes were applied correctly. In the future this should allow un-exporting of SSAGenState.Branches once the boilerplate-replacement is done everywhere. Change-Id: I0e5ded6eeb3ab1e3e0138e12d54c7e056bd99335 Reviewed-on: https://go-review.googlesource.com/104977 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Robert Griesemer authored
Change-Id: I804d5ab111e33bd2c2554e2bac75b5273b0b4160 Reviewed-on: https://go-review.googlesource.com/106121 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Benny Siegert authored
TestServerDuplicateBackgroundRead has been causing crashes on the netbsd-arm-bsiegert builder, with the system becoming completely unresponsive (probably deadlocked). Skip this test while the crash is under investigation. Upstream bug report is http://gnats.netbsd.org/53173. Change-Id: Ib48f19005cf2cbba8a27e75e689c2acb025d8870 Reviewed-on: https://go-review.googlesource.com/106295 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
-
Alberto Donizetti authored
And delete them from asm_test. Also delete an arm64 cmov test has been already ported to the new test harness. Change-Id: I4458721e1f512bc9ecbbe1c22a2c9c7109ad68fe Reviewed-on: https://go-review.googlesource.com/106335 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Giovanni Bajo <rasky@develer.com>
-
Ben Shi authored
SWPD/SWPW/SWPH/SWPB were introduced in ARMv8.1. They swap content of register and memory atomically. And their difference is SWPD: 64-bit double word data SWPW: 32-bit word data (zero extended to 64-bit) SWPH: 16-bit half word data (zero extended to 64-bit) SWPB: 8-bit byte data (zero extended to 64-bit) This CL implements them in the arm64 assembler. Change-Id: I2d9fb2310674bd92693531210e187143e7eed602 Reviewed-on: https://go-review.googlesource.com/101516Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tobias Klauser authored
In #17528 it was discussed (off-topic to the actual issue) to reserve GOARCH names for the RISC-V architecture. With the first RISC-V Linux-capable development boards released (e.g. HiFive Unleashed), Linux distributions being ported to RISC-V (e.g. Debian, Fedora) and RISC-V support being added to gccgo (CL 96377), it becomes more likely that Go software (and maybe Go itself) will be ported as well. Add riscv and riscv64 (which is already used by gccgo), so Go 1.11 will already recognize "*_riscv{,64}.go" as reserved files. Change-Id: I042aab19c68751d82ea513e40f7b1d7e1ad924ea Reviewed-on: https://go-review.googlesource.com/106256 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
fanzha02 authored
Use LDP instructions to load 16 bytes per loop when the source length is long. Specially process the 8 bytes length, 4 bytes length and 2 bytes length to get a better performance. Benchmark result: name old time/op new time/op delta BytesCompare/1-8 21.0ns ± 0% 10.5ns ± 0% ~ (p=0.079 n=4+5) BytesCompare/2-8 11.5ns ± 0% 10.5ns ± 0% -8.70% (p=0.008 n=5+5) BytesCompare/4-8 13.5ns ± 0% 10.0ns ± 0% -25.93% (p=0.008 n=5+5) BytesCompare/8-8 28.8ns ± 0% 9.5ns ± 0% ~ (p=0.079 n=4+5) BytesCompare/16-8 40.5ns ± 0% 10.5ns ± 0% -74.07% (p=0.008 n=5+5) BytesCompare/32-8 64.6ns ± 0% 12.5ns ± 0% -80.65% (p=0.008 n=5+5) BytesCompare/64-8 112ns ± 0% 16ns ± 0% -85.27% (p=0.008 n=5+5) BytesCompare/128-8 208ns ± 0% 24ns ± 0% -88.22% (p=0.008 n=5+5) BytesCompare/256-8 400ns ± 0% 50ns ± 0% -87.62% (p=0.008 n=5+5) BytesCompare/512-8 785ns ± 0% 82ns ± 0% -89.61% (p=0.008 n=5+5) BytesCompare/1024-8 1.55µs ± 0% 0.14µs ± 0% ~ (p=0.079 n=4+5) BytesCompare/2048-8 3.09µs ± 0% 0.27µs ± 0% ~ (p=0.079 n=4+5) CompareBytesEqual-8 39.0ns ± 0% 12.0ns ± 0% -69.23% (p=0.008 n=5+5) CompareBytesToNil-8 8.57ns ± 5% 8.23ns ± 2% -3.99% (p=0.016 n=5+5) CompareBytesEmpty-8 7.37ns ± 0% 7.36ns ± 4% ~ (p=0.690 n=5+5) CompareBytesIdentical-8 7.39ns ± 0% 7.46ns ± 2% ~ (p=0.667 n=5+5) CompareBytesSameLength-8 17.0ns ± 0% 10.5ns ± 0% -38.24% (p=0.008 n=5+5) CompareBytesDifferentLength-8 17.0ns ± 0% 10.5ns ± 0% -38.24% (p=0.008 n=5+5) CompareBytesBigUnaligned-8 1.58ms ± 0% 0.19ms ± 0% -88.31% (p=0.016 n=4+5) CompareBytesBig-8 1.59ms ± 0% 0.19ms ± 0% -88.27% (p=0.016 n=5+4) CompareBytesBigIdentical-8 7.01ns ± 0% 6.60ns ± 3% -5.91% (p=0.008 n=5+5) name old speed new speed delta CompareBytesBigUnaligned-8 662MB/s ± 0% 5660MB/s ± 0% +755.15% (p=0.016 n=4+5) CompareBytesBig-8 661MB/s ± 0% 5636MB/s ± 0% +752.57% (p=0.016 n=5+4) CompareBytesBigIdentical-8 150TB/s ± 0% 159TB/s ± 3% +6.27% (p=0.008 n=5+5) This is resubmit of CL90175. Change-Id: Ie841daedb3123a68dd2554f27ebef0b3f8a855c2 Reviewed-on: https://go-review.googlesource.com/101635 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
fanzha02 authored
The patch adds support for arm64 instructions LDRB, LDRH, LDRSB, LDRSH, LDRSW, STR, STRB and STRH with register offset. Test cases are also added. Change-Id: I8d17fddd2963c0bc366e12b00bac49b93f3f0957 Reviewed-on: https://go-review.googlesource.com/91575Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tobias Klauser authored
After CL 104636 cpu.X86.HasAVX is set early enough that it can be used to determine useAVXmemmove. Use it and remove support_avx. Change-Id: Ib7a627bede2bf96c92362507e742bd833cb42a74 Reviewed-on: https://go-review.googlesource.com/106235 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alberto Donizetti authored
Also, make the variables list sorted. Fixes #24794 Change-Id: I55f77004b00391875d26df8e55e54d79cef168dc Reviewed-on: https://go-review.googlesource.com/106255Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
Point out that one can just run the commands now; it's not necessary to log out first. Change-Id: I48d0cc0273d97ba54ce59b3a3bbcae0b5af9aaef Reviewed-on: https://go-review.googlesource.com/106195Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Jeremy Schlatter authored
This is the standard that gofmt uses. Change-Id: I30e70611ccd0d3bbaa500fa84e9d1ba75970f0bc GitHub-Last-Rev: b2b7af0df9759ad447b6fd3551ea356804d136b2 GitHub-Pull-Request: golang/go#24802 Reviewed-on: https://go-review.googlesource.com/106123Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
Fixes #23617 Note that this CL does not affect darwin/arm and darwin/arm64, still TBD what, if anything, needs to be done for those. This is a fix of CL 105975 which was reverted in CL 106155. Needed to use movl instead of movq for 386. Change-Id: I0db7f8087173869e60cc22c6c3124fa0a0739b46 Reviewed-on: https://go-review.googlesource.com/106156 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 10 Apr, 2018 10 commits
-
-
Robert Griesemer authored
Fixes #14321. Change-Id: I9c92c767b01cf7938c4808a8fef9f2936fc667bc Reviewed-on: https://go-review.googlesource.com/106119Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Matthew Dempsky authored
The check was previously disallowing package main from even importing a non-function symbol named "main". Fixes #24801. Change-Id: I849b9713890429f0a16860ef16b5dc7e970d04a4 Reviewed-on: https://go-review.googlesource.com/106120 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Matthew Dempsky authored
We'll always generate method expression wrappers for declared interface types in their own package, so no need to generate them in downstream packages. Noticed by gri@ while looking into #21282. Change-Id: I4fb7051b4e15297933da05fdd2b111d6b8f4178e Reviewed-on: https://go-review.googlesource.com/106175 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Agniva De Sarker authored
Previously, we used to associate a function with its first returned type assuming that it is a factory function for that type. However, a function may return multiple types in which case it is usually doing something else. Check for multiple return types, and treat it as a normal function in that case. Maintain same behavior if the function returns just one type. Fixes #12839 Change-Id: Ic4ac11d322996f216f593b71f4e61ad4270d5213 Reviewed-on: https://go-review.googlesource.com/105575Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Hana Kim authored
/spanio, /spanblock, /spansched, /spansyscall provide the pprof-style summary of span execution's io, block, scheduling, syscall latency distributions respectively. The computation logic for /io, /block, /sched, /syscall analysis was refactored and extended for reuse in these new types of analysis. Upon the analysis query, we create a map of goroutine id to time intervals based on the query parameter, that represents the interesting time intervals of matching goroutines. Only the events from the matching goroutines that fall into the intervals are considered in the pprof computation. The new endpoints are not yet hooked into other span analysis page (e.g. /userspan) yet. Change-Id: I80c3396e45a2d6631758710de67d132e5832c7ce Reviewed-on: https://go-review.googlesource.com/105822Reviewed-by: Heschi Kreinick <heschi@google.com> Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
This reverts commit 76e92d1c. Reason for revert: Seems to have broken the darwin/386 builder, the toolchain is barfing on the new inline assembly. Change-Id: Ic83fa3c85148946529c5fd47d1e1669898031ace Reviewed-on: https://go-review.googlesource.com/106155Reviewed-by: Keith Randall <khr@golang.org>
-
Vlad Krasnov authored
Minor modifications to the optimized amd64 implememntation. * Reduce window size: reduces size of the lookup tables by 40% * Revised scalar inversion formula, with less operations * Field square function now uses intental loop, saving call overhead This change will serve as a basis for an arm64 implementation. Performance results on Skylake MacBook Pro: pkg:crypto/elliptic goos:darwin goarch:amd64 BaseMultP256 17.8µs ± 1% 17.5µs ± 1% -1.41% (p=0.003 n=10+10) ScalarMultP256 70.7µs ± 1% 68.9µs ± 2% -2.57% (p=0.000 n=9+9) pkg:crypto/ecdsa goos:darwin goarch:amd64 SignP256 32.7µs ± 1% 31.4µs ± 1% -3.96% (p=0.000 n=10+8) VerifyP256 95.1µs ± 1% 93.5µs ± 2% -1.73% (p=0.001 n=10+9) name old alloc/op new alloc/op delta pkg:crypto/elliptic goos:darwin goarch:amd64 BaseMultP256 288B ± 0% 288B ± 0% ~ (all equal) ScalarMultP256 256B ± 0% 256B ± 0% ~ (all equal) pkg:crypto/ecdsa goos:darwin goarch:amd64 SignP256 2.90kB ± 0% 2.90kB ± 0% ~ (all equal) VerifyP256 976B ± 0% 976B ± 0% ~ (all equal) name old allocs/op new allocs/op delta pkg:crypto/elliptic goos:darwin goarch:amd64 BaseMultP256 6.00 ± 0% 6.00 ± 0% ~ (all equal) ScalarMultP256 5.00 ± 0% 5.00 ± 0% ~ (all equal) pkg:crypto/ecdsa goos:darwin goarch:amd64 SignP256 34.0 ± 0% 34.0 ± 0% ~ (all equal) VerifyP256 17.0 ± 0% 17.0 ± 0% ~ (all equal) Change-Id: I3f0e2e197a54e7bc7916dedc5dbf085e2c4aea24 Reviewed-on: https://go-review.googlesource.com/99622Reviewed-by: Vlad Krasnov <vlad@cloudflare.com> Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Vlad Krasnov <vlad@cloudflare.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Hana Kim authored
All tests involving trace collection and parsing still need handling of failures caused by #16755 (Timestamp issue) Fixes #24738 Change-Id: I6cd0f9c6f49854a22fad6fce1a00964c168aa614 Reviewed-on: https://go-review.googlesource.com/105821Reviewed-by: Peter Weinberger <pjw@google.com>
-
Mike Samuel authored
The docs for ResponseWriter.Write say // If the Header // does not contain a Content-Type line, Write adds a Content-Type set // to the result of passing the initial 512 bytes of written data to // DetectContentType. The header X-Content-Type-Options:nosniff is an explicit directive that content-type should not be sniffed. This changes the behavior of Response.WriteHeader so that, when there is an X-Content-Type-Options:nosniff header, but there is no Content-type header, the following happens: 1. A Content-type:application/octet-stream is added 2. A warning is logged via the server's logging mechanism. Previously, a content-type would have been silently added based on heuristic analysis of the first 512B which might allow a hosted GIF like http://www.thinkfu.com/blog/gifjavascript-polyglots to be categorized as JavaScript which might allow a CSP bypass, loading as a script despite `Content-Security-Policy: script-src 'self' `. ---- https://fetch.spec.whatwg.org/#x-content-type-options-header defines the X-Content-Type-Options header. ["Polyglots: Crossing Origins by Crossing Formats"](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.905.2946&rep=rep1&type=pdf) explains Polyglot attacks in more detail. Change-Id: I2c8800d2e4b4d10d9e08a0e3e5b20334a75f03c0 Reviewed-on: https://go-review.googlesource.com/89275Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Elias Naur authored
To enable the exec wrapper go_darwin_arm_exec.go to run binaries on iOS devices, the GOIOS_DEV_ID variable needs to be set to a code signing identity. The program detect.go attempts to detect suitable values for GOIOS_DEV_ID (along with GOIOS_APP_ID and GOIOS_TEAM_ID). Before this change, detect.go would use "security find-identity -p codesigning -v" to list all available identities for code signing and pick the first one with "iPhone Developer" in its name. However, that pick might be invalid since if it was replaced by an identity issued later. For example, on the mobile builder: $ security find-identity -p codesigning -v 1) 0E251DE41FE4490574E475AC320B47F58D6D3635 "lldb_codesign" 2) 0358588D07AA6A19478981BA405F40A97F95F187 "iPhone Developer: xxx@xxx (2754T98W8E)" 3) FC6D96F24A3223C98BF7A2C2C5194D82E04CD23E "iPhone Developer: xxx@xxx (2754T98W8E)" 3 valid identities found In this case, the identity 0358588D07AA6A19478981BA405F40A97F95F187 is picked by detect.go even though it has been invalidated by FC6D96F24A3223C98BF7A2C2C5194D82E04CD23E. Instead of attempting to find an identity from the "security find-identity" list, use the identity from the CommonName in the embedded certificate in the provisioning file. The CommonName only lists the identity name (iPhone Developer: xxx@xxx (2754T98W8E)), not the fingerprint (FC6D96F24A3223C98BF7A2C2C5194D82E04CD23E), but fortunately the codesign tool accepts both. Identity names may not be unique, as demonstrated by the example, but that will result in an ambiguity error at codesigning instead of a more obscure error about an invalid identity when go_darwin_arm_exec.go runs a binary. The fix is then to delete the invalid identity from the system keychain. While here, find all connected devices instead of the first connected and only consider provision files that covers them all. This matters for the mobile builder where two devices are connected. Change-Id: I6beb59ace3fc5e071ba76222a20a607765943989 Reviewed-on: https://go-review.googlesource.com/105436 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-