From 21ddd17186e1ab0e8e7323b0b2eb6e5507cfc6d3 Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Mon, 8 Aug 2016 22:28:41 +0100 Subject: [PATCH] Update go-patricia to 2.2.5 Fixes an issue that showed up on gccgo. Fix #25360 Signed-off-by: Justin Cormack Upstream-commit: e4402b285ba0a764ea1cffc1487c92b05b59a0ea Component: engine --- components/engine/hack/vendor.sh | 2 +- .../src/github.com/tchap/go-patricia/patricia/children.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/engine/hack/vendor.sh b/components/engine/hack/vendor.sh index c03c70a435..8406c5b9f3 100755 --- a/components/engine/hack/vendor.sh +++ b/components/engine/hack/vendor.sh @@ -53,7 +53,7 @@ clone git github.com/gorilla/mux e444e69cbd clone git github.com/kr/pty 5cf931ef8f clone git github.com/mattn/go-shellwords v1.0.0 clone git github.com/mattn/go-sqlite3 v1.1.0 -clone git github.com/tchap/go-patricia v2.2.4 +clone git github.com/tchap/go-patricia v2.2.5 clone git github.com/vdemeester/shakers 24d7f1d6a71aa5d9cbe7390e4afb66b7eef9e1b3 # forked golang.org/x/net package includes a patch for lazy loading trace templates clone git golang.org/x/net 2beffdc2e92c8a3027590f898fe88f69af48a3f8 https://github.com/tonistiigi/net.git diff --git a/components/engine/vendor/src/github.com/tchap/go-patricia/patricia/children.go b/components/engine/vendor/src/github.com/tchap/go-patricia/patricia/children.go index ef1f6142d4..a0848141ed 100644 --- a/components/engine/vendor/src/github.com/tchap/go-patricia/patricia/children.go +++ b/components/engine/vendor/src/github.com/tchap/go-patricia/patricia/children.go @@ -70,9 +70,8 @@ func (list *sparseChildList) add(child *Trie) childList { func (list *sparseChildList) remove(b byte) { for i, node := range list.children { if node.prefix[0] == b { - list.children, list.children[len(list.children)-1] = - append(list.children[:i], list.children[i+1:]...), - nil + copy(list.children[i:], list.children[i+1:]) + list.children = list.children[:len(list.children)-1] return } }