diff -Nru golang-uber-goleak-1.1.10/CHANGELOG.md golang-uber-goleak-1.1.12/CHANGELOG.md --- golang-uber-goleak-1.1.10/CHANGELOG.md 2020-07-21 18:42:16.000000000 +0000 +++ golang-uber-goleak-1.1.12/CHANGELOG.md 2021-10-04 22:15:00.000000000 +0000 @@ -4,7 +4,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [1.1.0] +## [1.1.12] +### Fixed +- Fixed logic for ignoring trace related goroutines on Go versions 1.16 and above. + +## [1.1.11] +### Fixed +- Documentation fix on how to test. +- Update dependency on stretchr/testify to v1.7.0. (#59) +- Update dependency on golang.org/x/tools to address CVE-2020-14040. (#62) + +## [1.1.10] ### Added - [#49]: Add option to ignore current goroutines, which checks for any additional leaks and allows for incremental adoption of goleak in larger projects. diff -Nru golang-uber-goleak-1.1.10/debian/changelog golang-uber-goleak-1.1.12/debian/changelog --- golang-uber-goleak-1.1.10/debian/changelog 2021-09-07 19:37:09.000000000 +0000 +++ golang-uber-goleak-1.1.12/debian/changelog 2022-01-07 01:09:47.000000000 +0000 @@ -1,3 +1,11 @@ +golang-uber-goleak (1.1.12-1) unstable; urgency=medium + + * New upstream release. + * reverse dependencies successfully built with ratt: + - prometheus + + -- Thorsten Alteholz Fri, 07 Jan 2022 02:09:47 +0100 + golang-uber-goleak (1.1.10-1) unstable; urgency=medium * New upstream release diff -Nru golang-uber-goleak-1.1.10/debian/gitlab-ci.yml golang-uber-goleak-1.1.12/debian/gitlab-ci.yml --- golang-uber-goleak-1.1.10/debian/gitlab-ci.yml 2021-09-07 19:35:22.000000000 +0000 +++ golang-uber-goleak-1.1.12/debian/gitlab-ci.yml 2022-01-07 01:09:44.000000000 +0000 @@ -1,26 +1,6 @@ # auto-generated, DO NOT MODIFY. # The authoritative copy of this file lives at: -# https://salsa.debian.org/go-team/ci/blob/master/config/gitlabciyml.go - -image: stapelberg/ci2 - -test_the_archive: - artifacts: - paths: - - before-applying-commit.json - - after-applying-commit.json - script: - # Create an overlay to discard writes to /srv/gopath/src after the build: - - "rm -rf /cache/overlay/{upper,work}" - - "mkdir -p /cache/overlay/{upper,work}" - - "mount -t overlay overlay -o lowerdir=/srv/gopath/src,upperdir=/cache/overlay/upper,workdir=/cache/overlay/work /srv/gopath/src" - - "export GOPATH=/srv/gopath" - - "export GOCACHE=/cache/go" - # Build the world as-is: - - "ci-build -exemptions=/var/lib/ci-build/exemptions.json > before-applying-commit.json" - # Copy this package into the overlay: - - "GBP_CONF_FILES=:debian/gbp.conf gbp buildpackage --git-no-pristine-tar --git-ignore-branch --git-ignore-new --git-export-dir=/tmp/export --git-no-overlay --git-tarball-dir=/nonexistant --git-cleaner=/bin/true --git-builder='dpkg-buildpackage -S -d --no-sign'" - - "pgt-gopath -dsc /tmp/export/*.dsc" - # Rebuild the world: - - "ci-build -exemptions=/var/lib/ci-build/exemptions.json > after-applying-commit.json" - - "ci-diff before-applying-commit.json after-applying-commit.json" +# https://salsa.debian.org/go-team/infra/pkg-go-tools/blob/master/config/gitlabciyml.go +--- +include: + - https://salsa.debian.org/go-team/infra/pkg-go-tools/-/raw/master/pipeline/test-archive.yml diff -Nru golang-uber-goleak-1.1.10/.github/workflows/fossa.yaml golang-uber-goleak-1.1.12/.github/workflows/fossa.yaml --- golang-uber-goleak-1.1.10/.github/workflows/fossa.yaml 1970-01-01 00:00:00.000000000 +0000 +++ golang-uber-goleak-1.1.12/.github/workflows/fossa.yaml 2021-10-04 22:15:00.000000000 +0000 @@ -0,0 +1,17 @@ +name: FOSSA Analysis +on: push + +jobs: + + build: + runs-on: ubuntu-latest + if: github.repository_owner == 'uber-go' + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: FOSSA analysis + uses: fossas/fossa-action@v1 + with: + api-key: ${{ secrets.FOSSA_API_KEY }} + diff -Nru golang-uber-goleak-1.1.10/.github/workflows/go.yml golang-uber-goleak-1.1.12/.github/workflows/go.yml --- golang-uber-goleak-1.1.10/.github/workflows/go.yml 1970-01-01 00:00:00.000000000 +0000 +++ golang-uber-goleak-1.1.12/.github/workflows/go.yml 2021-10-04 22:15:00.000000000 +0000 @@ -0,0 +1,49 @@ +name: Go + +on: + push: + branches: ['*'] + tags: ['v*'] + pull_request: + branches: ['*'] + +jobs: + + build: + runs-on: ubuntu-latest + strategy: + matrix: + go: ["1.14.x", "1.15.x", "1.16.x", "1.17.x"] + include: + - go: 1.17.x + latest: true + + steps: + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Load cached dependencies + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Download Dependencies + run: go mod download + + - name: Lint + if: matrix.latest + run: make lint + + - name: Test + run: make cover + + - name: Upload coverage to codecov.io + uses: codecov/codecov-action@v1 diff -Nru golang-uber-goleak-1.1.10/go.mod golang-uber-goleak-1.1.12/go.mod --- golang-uber-goleak-1.1.10/go.mod 2020-07-21 18:42:16.000000000 +0000 +++ golang-uber-goleak-1.1.12/go.mod 2021-10-04 22:15:00.000000000 +0000 @@ -4,8 +4,8 @@ require ( github.com/kr/pretty v0.1.0 // indirect - github.com/stretchr/testify v1.4.0 + github.com/stretchr/testify v1.7.0 golang.org/x/lint v0.0.0-20190930215403-16217165b5de - golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 // indirect + golang.org/x/tools v0.1.5 // indirect gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect ) diff -Nru golang-uber-goleak-1.1.10/go.sum golang-uber-goleak-1.1.12/go.sum --- golang-uber-goleak-1.1.10/go.sum 2020-07-21 18:42:16.000000000 +0000 +++ golang-uber-goleak-1.1.12/go.sum 2021-10-04 22:15:00.000000000 +0000 @@ -8,23 +8,41 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q7xh/zOyNnYUtDKaQ3x0E= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff -Nru golang-uber-goleak-1.1.10/options.go golang-uber-goleak-1.1.12/options.go --- golang-uber-goleak-1.1.10/options.go 2020-07-21 18:42:16.000000000 +0000 +++ golang-uber-goleak-1.1.12/options.go 2021-10-04 22:15:00.000000000 +0000 @@ -154,11 +154,3 @@ // Using signal.Notify will start a runtime goroutine. return strings.Contains(s.Full(), "runtime.ensureSigM") } - -func isTraceStack(s stack.Stack) bool { - if f := s.FirstFunction(); f != "runtime.goparkunlock" { - return false - } - - return strings.Contains(s.Full(), "runtime.ReadTrace") -} diff -Nru golang-uber-goleak-1.1.10/README.md golang-uber-goleak-1.1.12/README.md --- golang-uber-goleak-1.1.10/README.md 2020-07-21 18:42:16.000000000 +0000 +++ golang-uber-goleak-1.1.12/README.md 2021-10-04 22:15:00.000000000 +0000 @@ -46,7 +46,7 @@ # Run each test individually, printing "." for successful tests, or the test name # for failing tests. -$ for test in $(go test -list . | grep -E "^(Test|Example)"); do ./tests -test.run "^$test\$" &>/dev/null && echo -n "." || echo "\n$test failed"; done +$ for test in $(go test -list . | grep -E "^(Test|Example)"); do ./tests -test.run "^$test\$" &>/dev/null && echo -n "." || echo -e "\n$test failed"; done ``` This will only print names of failing tests which can be investigated individually. E.g., @@ -65,7 +65,7 @@ [doc-img]: https://godoc.org/go.uber.org/goleak?status.svg [doc]: https://godoc.org/go.uber.org/goleak -[ci-img]: https://travis-ci.com/uber-go/goleak.svg?branch=master -[ci]: https://travis-ci.com/uber-go/goleak +[ci-img]: https://github.com/uber-go/goleak/actions/workflows/go.yml/badge.svg +[ci]: https://github.com/uber-go/goleak/actions/workflows/go.yml [cov-img]: https://codecov.io/gh/uber-go/goleak/branch/master/graph/badge.svg [cov]: https://codecov.io/gh/uber-go/goleak diff -Nru golang-uber-goleak-1.1.10/signal_test.go golang-uber-goleak-1.1.12/signal_test.go --- golang-uber-goleak-1.1.10/signal_test.go 2020-07-21 18:42:16.000000000 +0000 +++ golang-uber-goleak-1.1.12/signal_test.go 2021-10-04 22:15:00.000000000 +0000 @@ -35,7 +35,7 @@ require.NoError(t, goleak.Find(), "Found leaks caused by signal import") // Register some signal handlers and ensure there's no leaks. - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) require.NoError(t, goleak.Find(), "Found leaks caused by signal.Notify") diff -Nru golang-uber-goleak-1.1.10/tools.go golang-uber-goleak-1.1.12/tools.go --- golang-uber-goleak-1.1.10/tools.go 2020-07-21 18:42:16.000000000 +0000 +++ golang-uber-goleak-1.1.12/tools.go 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// +build tools - -package goleak - -import ( - // Tools we use during development. - _ "golang.org/x/lint/golint" -) diff -Nru golang-uber-goleak-1.1.10/tools_test.go golang-uber-goleak-1.1.12/tools_test.go --- golang-uber-goleak-1.1.10/tools_test.go 1970-01-01 00:00:00.000000000 +0000 +++ golang-uber-goleak-1.1.12/tools_test.go 2021-10-04 22:15:00.000000000 +0000 @@ -0,0 +1,29 @@ +// Copyright (c) 2019 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//go:build tools +// +build tools + +package goleak + +import ( + // Tools we use during development. + _ "golang.org/x/lint/golint" +) diff -Nru golang-uber-goleak-1.1.10/tracestack_new.go golang-uber-goleak-1.1.12/tracestack_new.go --- golang-uber-goleak-1.1.10/tracestack_new.go 1970-01-01 00:00:00.000000000 +0000 +++ golang-uber-goleak-1.1.12/tracestack_new.go 2021-10-04 22:15:00.000000000 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2021 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//go:build go1.16 +// +build go1.16 + +package goleak + +import ( + "strings" + + "go.uber.org/goleak/internal/stack" +) + +func isTraceStack(s stack.Stack) bool { + return strings.Contains(s.Full(), "runtime.ReadTrace") +} diff -Nru golang-uber-goleak-1.1.10/tracestack_old.go golang-uber-goleak-1.1.12/tracestack_old.go --- golang-uber-goleak-1.1.10/tracestack_old.go 1970-01-01 00:00:00.000000000 +0000 +++ golang-uber-goleak-1.1.12/tracestack_old.go 2021-10-04 22:15:00.000000000 +0000 @@ -0,0 +1,38 @@ +// Copyright (c) 2021 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//go:build !go1.16 +// +build !go1.16 + +package goleak + +import ( + "strings" + + "go.uber.org/goleak/internal/stack" +) + +func isTraceStack(s stack.Stack) bool { + if f := s.FirstFunction(); f != "runtime.goparkunlock" { + return false + } + + return strings.Contains(s.Full(), "runtime.ReadTrace") +} diff -Nru golang-uber-goleak-1.1.10/.travis.yml golang-uber-goleak-1.1.12/.travis.yml --- golang-uber-goleak-1.1.10/.travis.yml 2020-07-21 18:42:16.000000000 +0000 +++ golang-uber-goleak-1.1.12/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -sudo: false -language: go -go_import_path: go.uber.org/goleak - -env: - global: - - GO111MODULE=on - -matrix: - include: - - go: 1.12.x - - go: 1.13.x - - go: 1.14.x - env: LINT=1 - -install: - - make install - -script: - - test -z "$LINT" || make lint - - make test - -after_success: - - make cover - - bash <(curl -s https://codecov.io/bash)