-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically infer function contract(nonnil->nonnil) #40
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #40 +/- ##
==========================================
+ Coverage 87.48% 87.49% +0.01%
==========================================
Files 59 61 +2
Lines 9651 10029 +378
==========================================
+ Hits 8443 8775 +332
- Misses 1033 1074 +41
- Partials 175 180 +5 ☔ View full report in Codecov by Sentry. |
@zzqatuber has implemented contract support in NilAway and has merged the manual contract support (i.e., via manual annotations such as `//contract(nonnil->nonnil)`) in main NilAway but hidden under a flag. After internal performance validations there are no major performance/functionality degradations of simply enabling this feature, therefore this PR removes the hidden flag and make it available in NilAway. After this PR, we will prioritize merging the automatic inference of the function contracts (i.e., PR #40 , PR #41 , and PR #42 ).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR had been reviewed internally with with all comments addressed. So approving it right away. LGTM :)
Golden TestWarning ❌ NilAway errors reported on stdlib are different 📉. 3265 errors on base branch (main, 25316dd) Diffs+ /opt/hostedtoolcache/go/1.22.0/x64/src/crypto/internal/edwards25519/scalar.go:233:33: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - edwards25519/scalar_test.go:134:33: result 0 of `SetBytesWithClamping()` lacking guarding; passed as arg `x` to `ScalarBaseMult()` at edwards25519/scalar_test.go:134:33 via the assignment(s):
+ - `new(...).SetBytesWithClamping(...)` to `s` at edwards25519/scalar_test.go:133:2
+ - edwards25519/scalarmult.go:47:12: function parameter `x` at edwards25519/scalar_test.go:134:33 used as receiver to call `signedRadix16()`
+ - edwards25519/scalar.go:322:7: read by method receiver `s` used as receiver to call `Bytes()`
+ - edwards25519/scalar.go:228:9: read by method receiver `s` used as receiver to call `bytes()`
+ - edwards25519/scalar.go:233:33: read by method receiver `s` accessed field `s`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/crypto/internal/edwards25519/scalar.go:233:33: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - edwards25519/scalar_test.go:142:32: result 0 of `SetBytesWithClamping()` lacking guarding; passed as arg `x` to `ScalarBaseMult()` at edwards25519/scalar_test.go:142:32 via the assignment(s):
+ - `new(...).SetBytesWithClamping(...)` to `s` at edwards25519/scalar_test.go:141:2
+ - edwards25519/scalarmult.go:47:12: function parameter `x` at edwards25519/scalar_test.go:142:32 used as receiver to call `signedRadix16()`
+ - edwards25519/scalar.go:322:7: read by method receiver `s` used as receiver to call `Bytes()`
+ - edwards25519/scalar.go:228:9: read by method receiver `s` used as receiver to call `bytes()`
+ - edwards25519/scalar.go:233:33: read by method receiver `s` accessed field `s`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/crypto/internal/edwards25519/scalar.go:233:33: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - edwards25519/scalar_test.go:150:32: result 0 of `SetBytesWithClamping()` lacking guarding; passed as arg `x` to `ScalarBaseMult()` at edwards25519/scalar_test.go:150:32 via the assignment(s):
+ - `new(...).SetBytesWithClamping(...)` to `s` at edwards25519/scalar_test.go:149:2
+ - edwards25519/scalarmult.go:47:12: function parameter `x` at edwards25519/scalar_test.go:150:32 used as receiver to call `signedRadix16()`
+ - edwards25519/scalar.go:322:7: read by method receiver `s` used as receiver to call `Bytes()`
+ - edwards25519/scalar.go:228:9: read by method receiver `s` used as receiver to call `bytes()`
+ - edwards25519/scalar.go:233:33: read by method receiver `s` accessed field `s`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/encoding/json/decode.go:269:19: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - json/encode_test.go:742:22: result 0 of `Marshal()` lacking guarding; passed as arg `data` to `Unmarshal()` via the assignment(s):
+ - `Marshal(...)` to `b` at json/encode_test.go:736:2
+ - json/decode.go:107:9: function parameter `data` passed as arg `data` to `init()` at json/decode.go:107:9
+ - json/decode.go:233:11: function parameter `data` at json/decode.go:107:9 assigned into field `data`
+ - json/decode.go:269:19: field `data` sliced into via the assignment(s):
+ - `d.data` to `data` at json/decode.go:266:5
+ /opt/hostedtoolcache/go/1.22.0/x64/src/encoding/json/decode.go:269:19: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - json/scanner_test.go:229:5: nilable value assigned into global variable `jsonBig`
+ - json/decode_test.go:1229:22: global variable `jsonBig` passed as arg `data` to `Unmarshal()`
+ - json/decode.go:107:9: function parameter `data` passed as arg `data` to `init()` at json/decode.go:107:9
+ - json/decode.go:233:11: function parameter `data` at json/decode.go:107:9 assigned into field `data`
+ - json/decode.go:269:19: field `data` sliced into via the assignment(s):
+ - `d.data` to `data` at json/decode.go:266:5
+ /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/stmt.go:1002:20: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - types/under.go:49:9: literal `nil` returned from `coreType()` in position 0
+ - types/stmt.go:988:30: result 0 of `coreType()` passed as arg `typ` to `arrayPtrDeref()` at types/stmt.go:988:30
+ - types/builtins.go:1034:9: function parameter `typ` at types/stmt.go:988:30 returned from `arrayPtrDeref()` in position 0 at types/stmt.go:988:16
+ - types/stmt.go:1002:20: result 0 of `arrayPtrDeref()` at types/stmt.go:988:16 accessed field `elem`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/internal/cpu/cpu_x86.go:1:1: INTERNAL ERROR(s):
+ nilaway_assertion_analyzer: nilaway_function_analyzer: nilaway_function_contracts_analyzer: INTERNAL PANIC: The function func(any) []byte has no blocks even though it declared return values
+ goroutine 78438 [running]:
+ runtime/debug.Stack()
+ /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/debug/stack.go:24 +0x5e
+ go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts.func1.1()
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:150 +0x58
+ panic({0x7f9ce0?, 0xc130755d80?})
+ /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/panic.go:770 +0x132
+ go.uber.org/nilaway/assertion/function/functioncontracts.inferContracts(0xc0e68ff1e0?)
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/infer.go:36 +0x117f
+ go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts.func1()
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:155 +0xa7
+ created by go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts in goroutine 53798
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:144 +0x9d0
+ /opt/hostedtoolcache/go/1.22.0/x64/src/internal/cpu/cpu_x86.go:1:1: INTERNAL ERROR(s):
+ nilaway_assertion_analyzer: nilaway_function_analyzer: nilaway_function_contracts_analyzer: INTERNAL PANIC: The function func(m any) any has no blocks even though it declared return values
+ goroutine 119553 [running]:
+ runtime/debug.Stack()
+ /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/debug/stack.go:24 +0x5e
+ go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts.func1.1()
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:150 +0x58
+ panic({0x7f9ce0?, 0xc1db12ae50?})
+ /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/panic.go:770 +0x132
+ go.uber.org/nilaway/assertion/function/functioncontracts.inferContracts(0xc1daaaf860?)
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/infer.go:36 +0x117f
+ go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts.func1()
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:155 +0xa7
+ created by go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts in goroutine 119315
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:144 +0x9d0
+ /opt/hostedtoolcache/go/1.22.0/x64/src/internal/cpu/cpu_x86.go:1:1: INTERNAL ERROR(s):
+ nilaway_assertion_analyzer: nilaway_function_analyzer: nilaway_function_contracts_analyzer: INTERNAL PANIC: The function func(m any) any has no blocks even though it declared return values
+ goroutine 78430 [running]:
+ runtime/debug.Stack()
+ /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/debug/stack.go:24 +0x5e
+ go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts.func1.1()
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:150 +0x58
+ panic({0x7f9ce0?, 0xc128c2b550?})
+ /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/panic.go:770 +0x132
+ go.uber.org/nilaway/assertion/function/functioncontracts.inferContracts(0xc1282ca340?)
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/infer.go:36 +0x117f
+ go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts.func1()
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:155 +0xa7
+ created by go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts in goroutine 78411
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:144 +0x9d0
+ /opt/hostedtoolcache/go/1.22.0/x64/src/internal/cpu/cpu_x86.go:1:1: INTERNAL ERROR(s):
+ nilaway_assertion_analyzer: nilaway_function_analyzer: nilaway_function_contracts_analyzer: INTERNAL PANIC: The function func(stk []uintptr) []uintptr has no blocks even though it declared return values
+ goroutine 92374 [running]:
+ runtime/debug.Stack()
+ /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/debug/stack.go:24 +0x5e
+ go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts.func1.1()
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:150 +0x58
+ panic({0x7f9ce0?, 0xc073ad2010?})
+ /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/panic.go:770 +0x132
+ go.uber.org/nilaway/assertion/function/functioncontracts.inferContracts(0xc0ba03dba0?)
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/infer.go:36 +0x117f
+ go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts.func1()
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:155 +0xa7
+ created by go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts in goroutine 37209
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:144 +0x9d0
+ /opt/hostedtoolcache/go/1.22.0/x64/src/internal/cpu/cpu_x86.go:1:1: INTERNAL ERROR(s):
+ nilaway_assertion_analyzer: nilaway_function_analyzer: nilaway_function_contracts_analyzer: INTERNAL PANIC: The function func(stk []uintptr) []uintptr has no blocks even though it declared return values
+ goroutine 94083 [running]:
+ runtime/debug.Stack()
+ /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/debug/stack.go:24 +0x5e
+ go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts.func1.1()
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:150 +0x58
+ panic({0x7f9ce0?, 0xc18d3b9570?})
+ /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/panic.go:770 +0x132
+ go.uber.org/nilaway/assertion/function/functioncontracts.inferContracts(0xc0f85f69c0?)
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/infer.go:36 +0x117f
+ go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts.func1()
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:155 +0xa7
+ created by go.uber.org/nilaway/assertion/function/functioncontracts.collectFunctionContracts in goroutine 69159
+ /home/runner/work/nilaway/nilaway/assertion/function/functioncontracts/analyzer.go:144 +0x9d0
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - bbig/big.go:26:10: literal `nil` returned from `Dec()` in position 0
+ - rsa/rsa.go:320:39: result 0 of `Dec()` passed as arg `n` to `NewModulusFromBig()` via the assignment(s):
+ - `bbig.Dec(bN)` to `N` at rsa/rsa.go:307:3
+ - bigmod/nat.go:389:10: function parameter `n` used as receiver to call `Bits()`
+ - big/int.go:113:9: read by method receiver `x` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - bbig/big.go:26:10: literal `nil` returned from `Dec()` in position 0
+ - rsa/rsa.go:324:39: result 0 of `Dec()` passed as arg `n` to `NewModulusFromBig()` via the assignment(s):
+ - `bbig.Dec(bP)` to `P` at rsa/rsa.go:310:3
+ - bigmod/nat.go:389:10: function parameter `n` used as receiver to call `Bits()`
+ - big/int.go:113:9: read by method receiver `x` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - bbig/big.go:26:10: literal `nil` returned from `Dec()` in position 0
+ - rsa/rsa.go:328:39: result 0 of `Dec()` passed as arg `n` to `NewModulusFromBig()` via the assignment(s):
+ - `bbig.Dec(bQ)` to `Q` at rsa/rsa.go:311:3
+ - bigmod/nat.go:389:10: function parameter `n` used as receiver to call `Bits()`
+ - big/int.go:113:9: read by method receiver `x` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - big/int.go:917:10: literal `nil` returned from `ModInverse()` in position 0
+ - bigmod/nat_test.go:333:23: result 0 of `ModInverse()` passed as arg `n` to `setBig()` at bigmod/nat_test.go:333:23 via the assignment(s):
+ - `new(...).ModInverse(...)` to `i` at bigmod/nat_test.go:330:2
+ - bigmod/nat.go:119:11: function parameter `n` at bigmod/nat_test.go:333:23 used as receiver to call `Bits()`
+ - big/int.go:113:9: read by method receiver `x` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - bigmod/nat_test.go:323:23: result 0 of `SetString()` lacking guarding; passed as arg `n` to `setBig()` at bigmod/nat_test.go:323:23 via the assignment(s):
+ - `new(...).SetString(...)` to `a` at bigmod/nat_test.go:318:2
+ - bigmod/nat.go:119:11: function parameter `n` at bigmod/nat_test.go:323:23 used as receiver to call `Bits()`
+ - big/int.go:113:9: read by method receiver `x` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - bigmod/nat_test.go:324:23: result 0 of `SetString()` lacking guarding; passed as arg `n` to `setBig()` at bigmod/nat_test.go:324:23 via the assignment(s):
+ - `new(...).SetString(...)` to `b` at bigmod/nat_test.go:319:2
+ - bigmod/nat.go:119:11: function parameter `n` at bigmod/nat_test.go:324:23 used as receiver to call `Bits()`
+ - big/int.go:113:9: read by method receiver `x` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - bigmod/nat_test.go:331:27: result 0 of `SetString()` lacking guarding; passed as arg `n` to `NewModulusFromBig()` via the assignment(s):
+ - `new(...).SetString(...)` to `b` at bigmod/nat_test.go:319:2
+ - bigmod/nat.go:389:10: function parameter `n` used as receiver to call `Bits()`
+ - big/int.go:113:9: read by method receiver `x` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - bigmod/nat_test.go:332:22: result 0 of `SetString()` lacking guarding; passed as arg `n` to `setBig()` at bigmod/nat_test.go:332:22 via the assignment(s):
+ - `new(...).SetString(...)` to `a` at bigmod/nat_test.go:318:2
+ - bigmod/nat.go:119:11: function parameter `n` at bigmod/nat_test.go:332:22 used as receiver to call `Bits()`
+ - big/int.go:113:9: read by method receiver `x` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:1319:21: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - big/int_test.go:1793:22: result 0 of `SetString()` lacking guarding; passed as arg `x` to `Sqrt()` at big/int_test.go:1793:22 via the assignment(s):
+ - `new(Int).SetString(...)` to `n` at big/int_test.go:1792:3
+ - big/int.go:1319:21: function parameter `x` at big/int_test.go:1793:22 accessed field `abs`
+
+ (Same nil source could also cause potential nil panic(s) at 1 other place(s): "big/int.go:1315:5".)
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:1319:21: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - big/int_test.go:1833:10: result 0 of `SetString()` lacking guarding; passed as arg `x` to `Sqrt()` at big/int_test.go:1833:10 via the assignment(s):
+ - `new(Int).SetString(...)` to `n` at big/int_test.go:1829:2
+ - big/int.go:1319:21: function parameter `x` at big/int_test.go:1833:10 accessed field `abs`
+
+ (Same nil source could also cause potential nil panic(s) at 1 other place(s): "big/int.go:1315:5".)
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:147:28: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - bigmod/nat_test.go:330:34: result 0 of `SetString()` lacking guarding; passed as arg `n` to `ModInverse()` via the assignment(s):
+ - `new(...).SetString(...)` to `b` at bigmod/nat_test.go:319:2
+ - big/int.go:923:13: function parameter `n` passed as arg `y` to `Add()`
+ - big/int.go:147:28: function parameter `y` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:621:33: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - big/int_test.go:905:27: result 0 of `SetString()` lacking guarding; passed as arg `a` to `testGcd()` via the assignment(s):
+ - `new(Int).SetString(...)` to `a` at big/int_test.go:902:3
+ - big/int_test.go:832:26: function parameter `a` passed as arg `a` to `GCD()`
+ - big/int.go:621:33: function parameter `a` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:621:33: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - big/int_test.go:906:25: result 0 of `SetString()` lacking guarding; passed as arg `a` to `testGcd()` via the assignment(s):
+ - `new(Int).SetString(...)` to `a` at big/int_test.go:902:3
+ - big/int_test.go:832:26: function parameter `a` passed as arg `a` to `GCD()`
+ - big/int.go:621:33: function parameter `a` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:621:33: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - big/int_test.go:907:25: result 0 of `SetString()` lacking guarding; passed as arg `a` to `testGcd()` via the assignment(s):
+ - `new(Int).SetString(...)` to `a` at big/int_test.go:902:3
+ - big/int_test.go:832:26: function parameter `a` passed as arg `a` to `GCD()`
+ - big/int.go:621:33: function parameter `a` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:621:33: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - big/int_test.go:908:23: result 0 of `SetString()` lacking guarding; passed as arg `a` to `testGcd()` via the assignment(s):
+ - `new(Int).SetString(...)` to `a` at big/int_test.go:902:3
+ - big/int_test.go:832:26: function parameter `a` passed as arg `a` to `GCD()`
+ - big/int.go:621:33: function parameter `a` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:621:45: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - big/int_test.go:905:30: result 0 of `SetString()` lacking guarding; passed as arg `b` to `testGcd()` via the assignment(s):
+ - `new(Int).SetString(...)` to `b` at big/int_test.go:903:3
+ - big/int_test.go:832:29: function parameter `b` passed as arg `b` to `GCD()`
+ - big/int.go:621:45: function parameter `b` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:621:45: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - big/int_test.go:906:28: result 0 of `SetString()` lacking guarding; passed as arg `b` to `testGcd()` via the assignment(s):
+ - `new(Int).SetString(...)` to `b` at big/int_test.go:903:3
+ - big/int_test.go:832:29: function parameter `b` passed as arg `b` to `GCD()`
+ - big/int.go:621:45: function parameter `b` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:621:45: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - big/int_test.go:907:28: result 0 of `SetString()` lacking guarding; passed as arg `b` to `testGcd()` via the assignment(s):
+ - `new(Int).SetString(...)` to `b` at big/int_test.go:903:3
+ - big/int_test.go:832:29: function parameter `b` passed as arg `b` to `GCD()`
+ - big/int.go:621:45: function parameter `b` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:621:45: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - big/int_test.go:908:26: result 0 of `SetString()` lacking guarding; passed as arg `b` to `testGcd()` via the assignment(s):
+ - `new(Int).SetString(...)` to `b` at big/int_test.go:903:3
+ - big/int_test.go:832:29: function parameter `b` passed as arg `b` to `GCD()`
+ - big/int.go:621:45: function parameter `b` accessed field `abs`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - elliptic/elliptic_test.go:240:9: result 1 of `GenerateKey()` lacking guarding; passed as arg `x` to `Neg()` via the assignment(s):
+ - `GenerateKey(...)` to `x` at elliptic/elliptic_test.go:236:5
+ - big/int.go:136:8: function parameter `x` passed as arg `x` to `Set()` at big/int.go:136:8
+ - big/int.go:99:11: function parameter `x` at big/int.go:136:8 accessed field `neg`
+ /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
+ - elliptic/elliptic_test.go:242:9: result 2 of `GenerateKey()` lacking guarding; passed as arg `x` to `Neg()` via the assignment(s):
+ - `GenerateKey(...)` to `y` at elliptic/elliptic_test.go:236:8
+ - big/int.go:136:8: function parameter `x` passed as arg `x` to `Set()` at big/int.go:136:8
+ - big/int.go:99:11: function parameter `x` at big/int.go:136:8 accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/crypto/internal/edwards25519/scalar.go:233:33: Potential nil panic detected. Observed nil flow from source to dereference point:
- - edwards25519/scalar_test.go:134:33: result 0 of `SetBytesWithClamping()` lacking guarding; passed as arg `x` to `ScalarBaseMult()` via the assignment(s):
- - `new(...).SetBytesWithClamping(...)` to `s` at edwards25519/scalar_test.go:133:2
- - edwards25519/scalarmult.go:47:12: function parameter `x` used as receiver to call `signedRadix16()`
- - edwards25519/scalar.go:322:7: read by method receiver `s` used as receiver to call `Bytes()`
- - edwards25519/scalar.go:228:9: read by method receiver `s` used as receiver to call `bytes()`
- - edwards25519/scalar.go:233:33: read by method receiver `s` accessed field `s`
- /opt/hostedtoolcache/go/1.22.0/x64/src/crypto/internal/edwards25519/scalar.go:233:33: Potential nil panic detected. Observed nil flow from source to dereference point:
- - edwards25519/scalar_test.go:142:32: result 0 of `SetBytesWithClamping()` lacking guarding; passed as arg `x` to `ScalarBaseMult()` via the assignment(s):
- - `new(...).SetBytesWithClamping(...)` to `s` at edwards25519/scalar_test.go:141:2
- - edwards25519/scalarmult.go:47:12: function parameter `x` used as receiver to call `signedRadix16()`
- - edwards25519/scalar.go:322:7: read by method receiver `s` used as receiver to call `Bytes()`
- - edwards25519/scalar.go:228:9: read by method receiver `s` used as receiver to call `bytes()`
- - edwards25519/scalar.go:233:33: read by method receiver `s` accessed field `s`
- /opt/hostedtoolcache/go/1.22.0/x64/src/crypto/internal/edwards25519/scalar.go:233:33: Potential nil panic detected. Observed nil flow from source to dereference point:
- - edwards25519/scalar_test.go:150:32: result 0 of `SetBytesWithClamping()` lacking guarding; passed as arg `x` to `ScalarBaseMult()` via the assignment(s):
- - `new(...).SetBytesWithClamping(...)` to `s` at edwards25519/scalar_test.go:149:2
- - edwards25519/scalarmult.go:47:12: function parameter `x` used as receiver to call `signedRadix16()`
- - edwards25519/scalar.go:322:7: read by method receiver `s` used as receiver to call `Bytes()`
- - edwards25519/scalar.go:228:9: read by method receiver `s` used as receiver to call `bytes()`
- - edwards25519/scalar.go:233:33: read by method receiver `s` accessed field `s`
- /opt/hostedtoolcache/go/1.22.0/x64/src/encoding/json/decode.go:269:19: Potential nil panic detected. Observed nil flow from source to dereference point:
- - json/encode_test.go:742:22: result 0 of `Marshal()` lacking guarding; passed as arg `data` to `Unmarshal()` via the assignment(s):
- - `Marshal(...)` to `b` at json/encode_test.go:736:2
- - json/decode.go:107:9: function parameter `data` passed as arg `data` to `init()`
- - json/decode.go:233:11: function parameter `data` assigned into field `data`
- - json/decode.go:269:19: field `data` sliced into via the assignment(s):
- - `d.data` to `data` at json/decode.go:266:5
- /opt/hostedtoolcache/go/1.22.0/x64/src/encoding/json/decode.go:269:19: Potential nil panic detected. Observed nil flow from source to dereference point:
- - json/scanner_test.go:229:5: nilable value assigned into global variable `jsonBig`
- - json/decode_test.go:1229:22: global variable `jsonBig` passed as arg `data` to `Unmarshal()`
- - json/decode.go:107:9: function parameter `data` passed as arg `data` to `init()`
- - json/decode.go:233:11: function parameter `data` assigned into field `data`
- - json/decode.go:269:19: field `data` sliced into via the assignment(s):
- - `d.data` to `data` at json/decode.go:266:5
- /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/stmt.go:1002:20: Potential nil panic detected. Observed nil flow from source to dereference point:
- - types/under.go:47:10: unassigned variable `su` returned from `coreType()` in position 0
- - types/stmt.go:988:30: result 0 of `coreType()` passed as arg `typ` to `arrayPtrDeref()`
- - types/builtins.go:1034:9: function parameter `typ` returned from `arrayPtrDeref()` in position 0
- - types/stmt.go:1002:20: result 0 of `arrayPtrDeref()` accessed field `elem`
- /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/stmt.go:1002:20: Potential nil panic detected. Observed nil flow from source to dereference point:
- - types/under.go:49:9: literal `nil` returned from `coreType()` in position 0
- - types/stmt.go:988:30: result 0 of `coreType()` passed as arg `typ` to `arrayPtrDeref()`
- - types/builtins.go:1034:9: function parameter `typ` returned from `arrayPtrDeref()` in position 0
- - types/stmt.go:1002:20: result 0 of `arrayPtrDeref()` accessed field `elem`
- /opt/hostedtoolcache/go/1.22.0/x64/src/internal/profile/encode.go:102:2: Potential nil panic detected. Observed nil flow from source to dereference point:
- - profile/profile.go:157:9: result 0 of `parseLegacy()` lacking guarding; returned from `Parse()` in position 0 via the assignment(s):
- - `parseLegacy(...)` to `p` at profile/profile.go:148:3
- - pprof/proto_test.go:37:9: result 0 of `Parse()` returned from `translateCPUProfile()` in position 0
- - pprof/proto_test.go:57:12: result 0 of `translateCPUProfile()` used as receiver to call `Write()` via the assignment(s):
- - `translateCPUProfile(...)` to `p` at pprof/proto_test.go:53:2
- - profile/profile.go:229:2: read by method receiver `p` used as receiver to call `preEncode()`
- - profile/encode.go:102:2: read by method receiver `p` accessed field `stringTable`
- /opt/hostedtoolcache/go/1.22.0/x64/src/maps/example_test.go:18:2: Potential nil panic detected. Observed nil flow from source to dereference point:
- - maps/maps.go:44:10: literal `nil` returned from `Clone()` in position 0
- - maps/example_test.go:18:2: result 0 of `Clone()` written to at an index via the assignment(s):
- - `maps.Clone(m1)` to `m2` at maps/example_test.go:17:2
- /opt/hostedtoolcache/go/1.22.0/x64/src/maps/maps_test.go:93:2: Potential nil panic detected. Observed nil flow from source to dereference point:
- - maps/maps.go:44:10: literal `nil` returned from `Clone()` in position 0
- - maps/maps_test.go:93:2: result 0 of `Clone()` written to at an index via the assignment(s):
- - `Clone(m1)` to `mc` at maps/maps_test.go:89:2
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
- - bbig/big.go:26:10: literal `nil` returned from `Dec()` in position 0
- - rsa/rsa.go:320:39: result 0 of `Dec()` passed as arg `n` to `NewModulusFromBig()` via the assignment(s):
- - `bbig.Dec(bN)` to `N` at rsa/rsa.go:307:3
- - bigmod/nat.go:395:26: function parameter `n` passed as arg `n` to `setBig()`
- - bigmod/nat.go:119:11: function parameter `n` used as receiver to call `Bits()`
- - big/int.go:113:9: read by method receiver `x` accessed field `abs`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
- - bbig/big.go:26:10: literal `nil` returned from `Dec()` in position 0
- - rsa/rsa.go:324:39: result 0 of `Dec()` passed as arg `n` to `NewModulusFromBig()` via the assignment(s):
- - `bbig.Dec(bP)` to `P` at rsa/rsa.go:310:3
- - bigmod/nat.go:395:26: function parameter `n` passed as arg `n` to `setBig()`
- - bigmod/nat.go:119:11: function parameter `n` used as receiver to call `Bits()`
- - big/int.go:113:9: read by method receiver `x` accessed field `abs`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
- - bbig/big.go:26:10: literal `nil` returned from `Dec()` in position 0
- - rsa/rsa.go:328:39: result 0 of `Dec()` passed as arg `n` to `NewModulusFromBig()` via the assignment(s):
- - `bbig.Dec(bQ)` to `Q` at rsa/rsa.go:311:3
- - bigmod/nat.go:395:26: function parameter `n` passed as arg `n` to `setBig()`
- - bigmod/nat.go:119:11: function parameter `n` used as receiver to call `Bits()`
- - big/int.go:113:9: read by method receiver `x` accessed field `abs`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
- - big/int.go:917:10: literal `nil` returned from `ModInverse()` in position 0
- - bigmod/nat_test.go:333:23: result 0 of `ModInverse()` passed as arg `n` to `setBig()` via the assignment(s):
- - `new(...).ModInverse(...)` to `i` at bigmod/nat_test.go:330:2
- - bigmod/nat.go:119:11: function parameter `n` used as receiver to call `Bits()`
- - big/int.go:113:9: read by method receiver `x` accessed field `abs`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
- - bigmod/nat_test.go:323:23: result 0 of `SetString()` lacking guarding; passed as arg `n` to `setBig()` via the assignment(s):
- - `new(...).SetString(...)` to `a` at bigmod/nat_test.go:318:2
- - bigmod/nat.go:119:11: function parameter `n` used as receiver to call `Bits()`
- - big/int.go:113:9: read by method receiver `x` accessed field `abs`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
- - bigmod/nat_test.go:324:23: result 0 of `SetString()` lacking guarding; passed as arg `n` to `setBig()` via the assignment(s):
- - `new(...).SetString(...)` to `b` at bigmod/nat_test.go:319:2
- - bigmod/nat.go:119:11: function parameter `n` used as receiver to call `Bits()`
- - big/int.go:113:9: read by method receiver `x` accessed field `abs`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
- - bigmod/nat_test.go:331:27: result 0 of `SetString()` lacking guarding; passed as arg `n` to `NewModulusFromBig()` via the assignment(s):
- - `new(...).SetString(...)` to `b` at bigmod/nat_test.go:319:2
- - bigmod/nat.go:395:26: function parameter `n` passed as arg `n` to `setBig()`
- - bigmod/nat.go:119:11: function parameter `n` used as receiver to call `Bits()`
- - big/int.go:113:9: read by method receiver `x` accessed field `abs`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:113:9: Potential nil panic detected. Observed nil flow from source to dereference point:
- - bigmod/nat_test.go:332:22: result 0 of `SetString()` lacking guarding; passed as arg `n` to `setBig()` via the assignment(s):
- - `new(...).SetString(...)` to `a` at bigmod/nat_test.go:318:2
- - bigmod/nat.go:119:11: function parameter `n` used as receiver to call `Bits()`
- - big/int.go:113:9: read by method receiver `x` accessed field `abs`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:1319:21: Potential nil panic detected. Observed nil flow from source to dereference point:
- - big/int_test.go:1793:22: result 0 of `SetString()` lacking guarding; passed as arg `x` to `Sqrt()` via the assignment(s):
- - `new(Int).SetString(...)` to `n` at big/int_test.go:1792:3
- - big/int.go:1319:21: function parameter `x` accessed field `abs`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:1319:21: Potential nil panic detected. Observed nil flow from source to dereference point:
- - big/int_test.go:1833:10: result 0 of `SetString()` lacking guarding; passed as arg `x` to `Sqrt()` via the assignment(s):
- - `new(Int).SetString(...)` to `n` at big/int_test.go:1829:2
- - big/int.go:1319:21: function parameter `x` accessed field `abs`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - big/int_test.go:905:27: result 0 of `SetString()` lacking guarding; passed as arg `a` to `testGcd()` via the assignment(s):
- - `new(Int).SetString(...)` to `a` at big/int_test.go:902:3
- - big/int_test.go:883:20: function parameter `a` passed as arg `x` to `Set()`
- - big/int.go:99:11: function parameter `x` accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - big/int_test.go:905:30: result 0 of `SetString()` lacking guarding; passed as arg `b` to `testGcd()` via the assignment(s):
- - `new(Int).SetString(...)` to `b` at big/int_test.go:903:3
- - big/int_test.go:884:20: function parameter `b` passed as arg `x` to `Set()`
- - big/int.go:99:11: function parameter `x` accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - big/int_test.go:906:25: result 0 of `SetString()` lacking guarding; passed as arg `a` to `testGcd()` via the assignment(s):
- - `new(Int).SetString(...)` to `a` at big/int_test.go:902:3
- - big/int_test.go:883:20: function parameter `a` passed as arg `x` to `Set()`
- - big/int.go:99:11: function parameter `x` accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - big/int_test.go:906:28: result 0 of `SetString()` lacking guarding; passed as arg `b` to `testGcd()` via the assignment(s):
- - `new(Int).SetString(...)` to `b` at big/int_test.go:903:3
- - big/int_test.go:884:20: function parameter `b` passed as arg `x` to `Set()`
- - big/int.go:99:11: function parameter `x` accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - big/int_test.go:907:25: result 0 of `SetString()` lacking guarding; passed as arg `a` to `testGcd()` via the assignment(s):
- - `new(Int).SetString(...)` to `a` at big/int_test.go:902:3
- - big/int_test.go:883:20: function parameter `a` passed as arg `x` to `Set()`
- - big/int.go:99:11: function parameter `x` accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - big/int_test.go:907:28: result 0 of `SetString()` lacking guarding; passed as arg `b` to `testGcd()` via the assignment(s):
- - `new(Int).SetString(...)` to `b` at big/int_test.go:903:3
- - big/int_test.go:884:20: function parameter `b` passed as arg `x` to `Set()`
- - big/int.go:99:11: function parameter `x` accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - big/int_test.go:908:23: result 0 of `SetString()` lacking guarding; passed as arg `a` to `testGcd()` via the assignment(s):
- - `new(Int).SetString(...)` to `a` at big/int_test.go:902:3
- - big/int_test.go:883:20: function parameter `a` passed as arg `x` to `Set()`
- - big/int.go:99:11: function parameter `x` accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - big/int_test.go:908:26: result 0 of `SetString()` lacking guarding; passed as arg `b` to `testGcd()` via the assignment(s):
- - `new(Int).SetString(...)` to `b` at big/int_test.go:903:3
- - big/int_test.go:884:20: function parameter `b` passed as arg `x` to `Set()`
- - big/int.go:99:11: function parameter `x` accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - bigmod/nat_test.go:330:34: result 0 of `SetString()` lacking guarding; passed as arg `n` to `ModInverse()` via the assignment(s):
- - `new(...).SetString(...)` to `b` at bigmod/nat_test.go:319:2
- - big/int.go:906:14: function parameter `n` passed as arg `x` to `Neg()`
- - big/int.go:136:8: function parameter `x` passed as arg `x` to `Set()`
- - big/int.go:99:11: function parameter `x` accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - elliptic/elliptic_test.go:240:9: result 1 of `GenerateKey()` lacking guarding; passed as arg `x` to `Neg()` via the assignment(s):
- - `GenerateKey(...)` to `x` at elliptic/elliptic_test.go:236:5
- - big/int.go:136:8: function parameter `x` passed as arg `x` to `Set()`
- - big/int.go:99:11: function parameter `x` accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/math/big/int.go:99:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - elliptic/elliptic_test.go:242:9: result 2 of `GenerateKey()` lacking guarding; passed as arg `x` to `Neg()` via the assignment(s):
- - `GenerateKey(...)` to `y` at elliptic/elliptic_test.go:236:8
- - big/int.go:136:8: function parameter `x` passed as arg `x` to `Set()`
- - big/int.go:99:11: function parameter `x` accessed field `neg`
- /opt/hostedtoolcache/go/1.22.0/x64/src/net/http/client.go:167:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - http/clone.go:24:10: literal `nil` returned from `cloneURL()` in position 0
- - http/request.go:385:11: result 0 of `cloneURL()` assigned into field `URL`
- - http/client.go:687:28: field `URL` passed as arg `lastReq` to `refererForURL()`
- - http/client.go:167:11: function parameter `lastReq` accessed field `User`
- /opt/hostedtoolcache/go/1.22.0/x64/src/reflect/abi_test.go:983:33: Potential nil panic detected. Observed nil flow from source to dereference point:
- - reflect/value.go:684:9: unassigned variable `ret` returned from `call()` in position 0
- - reflect/value.go:380:9: result 0 of `call()` returned from `Call()` in position 0
- - reflect/abi_test.go:983:33: result 0 of `Call()` sliced into via the assignment(s):
- - `reflect.ValueOf(...)` to `v` at reflect/abi_test.go:979:2
-
- (Same nil source could also cause potential nil panic(s) at 32 other place(s): "reflect/all_test.go:2239:7", "reflect/all_test.go:2281:10", "reflect/all_test.go:2305:6", "reflect/all_test.go:2580:6", "reflect/all_test.go:2572:6", "reflect/all_test.go:2553:6", "reflect/all_test.go:2545:6", "reflect/all_test.go:2533:6", "reflect/all_test.go:2525:6", "reflect/all_test.go:2495:6", "reflect/all_test.go:2486:6", "reflect/all_test.go:2472:6", "reflect/all_test.go:2463:7", "reflect/all_test.go:2679:6", "reflect/all_test.go:2671:6", "reflect/all_test.go:2652:6", "reflect/all_test.go:2644:6", "reflect/all_test.go:2630:6", "reflect/all_test.go:2622:6", "reflect/all_test.go:2609:6", "reflect/all_test.go:2601:6", "reflect/all_test.go:2713:7", "reflect/all_test.go:2761:12", "reflect/all_test.go:2749:12", "reflect/all_test.go:2910:7", "reflect/all_test.go:3361:10", "reflect/all_test.go:3356:10", "reflect/all_test.go:3702:46", "reflect/all_test.go:3701:5", "reflect/all_test.go:5890:57", "reflect/all_test.go:5889:18", and "reflect/all_test.go:6544:7".)
- /opt/hostedtoolcache/go/1.22.0/x64/src/reflect/all_test.go:2310:6: Potential nil panic detected. Observed nil flow from source to dereference point:
- - reflect/value.go:684:9: unassigned variable `ret` returned from `call()` in position 0
- - reflect/value.go:393:9: result 0 of `call()` returned from `CallSlice()` in position 0
- - reflect/all_test.go:2310:6: result 0 of `CallSlice()` sliced into
-
- (Same nil source could also cause potential nil panic(s) at 1 other place(s): "reflect/all_test.go:2717:6".)
- /opt/hostedtoolcache/go/1.22.0/x64/src/reflect/all_test.go:2929:5: Potential nil panic detected. Observed nil flow from source to dereference point:
- - reflect/type.go:1098:21: literal `nil` assigned into field `Index`
- - reflect/all_test.go:2929:5: field `Index` sliced into via the assignment(s):
- - `type1.FieldByName(...)` to `field` at reflect/all_test.go:2926:5
- /opt/hostedtoolcache/go/1.22.0/x64/src/reflect/type.go:1337:9: Potential nil panic detected. Observed nil flow from source to dereference point:
- - abi/type.go:213:10: literal `nil` returned from `Methods()` in position 0
- - reflect/type.go:1337:9: result 0 of `Methods()` sliced into via the assignment(s):
- - `v.Methods()` to `vmethods` at reflect/type.go:1333:2
-
- (Same nil source could also cause potential nil panic(s) at 1 other place(s): "reflect/export_test.go:124:7".)
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/pprof.go:391:37: Potential nil panic detected. Observed nil flow from source to dereference point:
- - pprof/pprof.go:268:9: deep read from field `m` lacking guarding; returned from `Lookup()` in position 0
- - pprof/pprof_test.go:1177:2: result 0 of `Lookup()` used as receiver to call `WriteTo()`
- - pprof/pprof.go:391:37: read by method receiver `p` accessed field `name`
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/pprof.go:391:37: Potential nil panic detected. Observed nil flow from source to dereference point:
- - pprof/pprof.go:268:9: deep read from field `m` lacking guarding; returned from `Lookup()` in position 0
- - pprof/pprof_test.go:1443:2: result 0 of `Lookup()` used as receiver to call `WriteTo()` via the assignment(s):
- - `Lookup(...)` to `goroutineProf` at pprof/pprof_test.go:1440:2
- - pprof/pprof.go:391:37: read by method receiver `p` accessed field `name`
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/pprof.go:391:37: Potential nil panic detected. Observed nil flow from source to dereference point:
- - pprof/pprof.go:268:9: deep read from field `m` lacking guarding; returned from `Lookup()` in position 0
- - pprof/pprof_test.go:1469:2: result 0 of `Lookup()` used as receiver to call `WriteTo()` via the assignment(s):
- - `Lookup(...)` to `goroutineProf` at pprof/pprof_test.go:1440:2
- - pprof/pprof.go:391:37: read by method receiver `p` accessed field `name`
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/pprof.go:391:37: Potential nil panic detected. Observed nil flow from source to dereference point:
- - pprof/pprof.go:268:9: deep read from field `m` lacking guarding; returned from `Lookup()` in position 0
- - pprof/proto_test.go:421:12: result 0 of `Lookup()` used as receiver to call `WriteTo()`
- - pprof/pprof.go:391:37: read by method receiver `p` accessed field `name`
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/pprof.go:391:37: Potential nil panic detected. Observed nil flow from source to dereference point:
- - pprof/pprof.go:268:9: deep read from field `m` lacking guarding; returned from `Lookup()` in position 0
- - testdeps/deps.go:56:9: result 0 of `Lookup()` used as receiver to call `WriteTo()`
- - pprof/pprof.go:391:37: read by method receiver `p` accessed field `name`
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/pprof.go:696:37: Potential nil panic detected. Observed nil flow from source to dereference point:
- - pprof/pprof.go:696:37: unassigned variable `memStats` accessed field `DebugGC` via the assignment(s):
- - `memStats` to `s` at pprof/pprof.go:666:2
-
- (Same nil source could also cause potential nil panic(s) at 28 other place(s): "pprof/pprof.go:695:43", "pprof/pprof.go:694:41", "pprof/pprof.go:693:35", "pprof/pprof.go:692:38", "pprof/pprof.go:691:37", "pprof/pprof.go:690:36", "pprof/pprof.go:689:36", "pprof/pprof.go:687:38", "pprof/pprof.go:686:35", "pprof/pprof.go:685:41", "pprof/pprof.go:684:41", "pprof/pprof.go:684:56", "pprof/pprof.go:683:40", "pprof/pprof.go:683:54", "pprof/pprof.go:682:40", "pprof/pprof.go:682:54", "pprof/pprof.go:680:41", "pprof/pprof.go:679:42", "pprof/pprof.go:678:39", "pprof/pprof.go:677:38", "pprof/pprof.go:676:37", "pprof/pprof.go:675:39", "pprof/pprof.go:673:35", "pprof/pprof.go:672:37", "pprof/pprof.go:671:37", "pprof/pprof.go:670:33", "pprof/pprof.go:669:40", and "pprof/pprof.go:668:35".)
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/pprof_test.go:1524:20: Potential nil panic detected. Observed nil flow from source to dereference point:
- - pprof/pprof_test.go:1486:27: result 0 of `Parse()` lacking guarding; passed as arg `prof` to `containsCountsLabels()` via the assignment(s):
- - `profile.Parse(...)` to `p` at pprof/pprof_test.go:1470:2
- - pprof/pprof_test.go:1524:20: function parameter `prof` accessed field `Sample`
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/pprof_test.go:291:22: Potential nil panic detected. Observed nil flow from source to dereference point:
- - profile/profile.go:157:9: result 0 of `parseLegacy()` lacking guarding; returned from `Parse()` in position 0 via the assignment(s):
- - `parseLegacy(...)` to `p` at profile/profile.go:148:3
- - pprof/pprof_test.go:413:9: result 0 of `Parse()` returned from `parseProfile()` in position 0 via the assignment(s):
- - `profile.Parse(...)` to `p` at pprof/pprof_test.go:405:2
- - pprof/pprof_test.go:581:9: result 0 of `parseProfile()` returned from `profileOk()` in position 0 via the assignment(s):
- - `parseProfile(...)` to `p` at pprof/pprof_test.go:550:2
- - pprof/pprof_test.go:487:11: result 0 of `profileOk()` returned from `testCPUProfile()` in position 0 via the assignment(s):
- - `profileOk(...)` to `p` at pprof/pprof_test.go:486:6
- - pprof/pprof_test.go:291:22: result 0 of `testCPUProfile()` accessed field `Location` via the assignment(s):
- - `testCPUProfile(...)` to `p` at pprof/pprof_test.go:286:2
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/pprof_test.go:297:27: Potential nil panic detected. Observed nil flow from source to dereference point:
- - profile/encode.go:233:26: deep read from local variable `functions` lacking guarding; assigned into field `Function`
- - pprof/pprof_test.go:297:27: field `Function` accessed field `Name`
-
- (Same nil source could also cause potential nil panic(s) at 13 other place(s): "pprof/pprof_test.go:294:7", "pprof/pprof_test.go:362:15", "pprof/pprof_test.go:535:24", "pprof/pprof_test.go:763:28", "pprof/pprof_test.go:998:23", "pprof/pprof_test.go:1195:15", "pprof/pprof_test.go:1193:8", "pprof/pprof_test.go:2018:26", "pprof/pprof_test.go:1995:22", "pprof/pprof_test.go:2007:25", "pprof/pprof_test.go:1993:12", "pprof/pprof_test.go:2420:8", and "pprof/protomem_test.go:114:25".)
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/pprof_test.go:409:25: Potential nil panic detected. Observed nil flow from source to dereference point:
- - profile/profile.go:157:9: result 0 of `parseLegacy()` lacking guarding; returned from `Parse()` in position 0 via the assignment(s):
- - `parseLegacy(...)` to `p` at profile/profile.go:148:3
- - pprof/pprof_test.go:409:25: result 0 of `Parse()` accessed field `Sample` via the assignment(s):
- - `profile.Parse(...)` to `p` at pprof/pprof_test.go:405:2
-
- (Same nil source could also cause potential nil panic(s) at 5 other place(s): "pprof/pprof_test.go:1186:20", "pprof/proto_test.go:442:20", "pprof/proto_test.go:435:22", "pprof/proto_test.go:429:9", and "pprof/protomem_test.go:209:25".)
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/proto.go:294:10: Potential nil panic detected. Observed nil flow from source to dereference point:
- - pprof/pprof.go:851:30: result 1 of `readProfile()` lacking guarding; passed as arg `tags` to `addCPUData()` via the assignment(s):
- - `readProfile()` to `tags` at pprof/pprof.go:850:9
- - pprof/proto.go:294:10: function parameter `tags` sliced into
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/proto.go:553:11: Potential nil panic detected. Observed nil flow from source to dereference point:
- - pprof/proto.go:539:13: nilable value assigned into field `frames`
- - pprof/proto.go:553:11: field `frames` sliced into
-
- (Same nil source could also cause potential nil panic(s) at 2 other place(s): "pprof/proto.go:606:53", and "pprof/proto.go:589:16".)
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/proto_test.go:197:13: Potential nil panic detected. Observed nil flow from source to dereference point:
- - profile/profile.go:157:9: result 0 of `parseLegacy()` lacking guarding; returned from `Parse()` in position 0 via the assignment(s):
- - `parseLegacy(...)` to `p` at profile/profile.go:148:3
- - pprof/proto_test.go:73:18: result 0 of `Parse()` passed as arg `p` to `checkProfile()` via the assignment(s):
- - `profile.Parse(...)` to `p` at pprof/proto_test.go:61:2
- - pprof/proto_test.go:197:13: function parameter `p` accessed field `Sample`
-
- (Same nil source could also cause potential nil panic(s) at 9 other place(s): "pprof/proto_test.go:192:20", "pprof/proto_test.go:188:51", "pprof/proto_test.go:187:26", "pprof/proto_test.go:185:52", "pprof/proto_test.go:184:24", "pprof/proto_test.go:182:52", "pprof/proto_test.go:181:24", "pprof/proto_test.go:179:38", and "pprof/proto_test.go:178:5".)
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/protobuf.go:45:8: Potential nil panic detected. Observed nil flow from source to dereference point:
- - pprof/proto.go:147:15: nilable value assigned into field `data`
- - pprof/protobuf.go:45:8: field `data` sliced into
-
- (Same nil source could also cause potential nil panic(s) at 11 other place(s): "pprof/protobuf.go:44:8", "pprof/protobuf.go:44:29", "pprof/protobuf.go:43:18", "pprof/protobuf.go:84:8", "pprof/protobuf.go:83:8", "pprof/protobuf.go:83:29", "pprof/protobuf.go:82:18", "pprof/protobuf.go:139:7", "pprof/protobuf.go:138:7", "pprof/protobuf.go:138:28", and "pprof/protobuf.go:137:17".)
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/protomem_test.go:105:10: Potential nil panic detected. Observed nil flow from source to dereference point:
- - profile/encode.go:267:16: literal `nil` assigned into field `Location`
- - pprof/protomem_test.go:105:10: field `Location` sliced into
-
- (Same nil source could also cause potential nil panic(s) at 1 other place(s): "pprof/protomem_test.go:218:9".)
- /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/pprof/protomem_test.go:96:20: Potential nil panic detected. Observed nil flow from source to dereference point:
- - profile/profile.go:157:9: result 0 of `parseLegacy()` lacking guarding; returned from `Parse()` in position 0 via the assignment(s):
- - `parseLegacy(...)` to `p` at profile/profile.go:148:3
- - pprof/protomem_test.go:143:29: result 0 of `Parse()` passed as arg `p` to `profileToStrings()` via the assignment(s):
- - `profile.Parse(buf)` to `p` at pprof/protomem_test.go:138:2
- - pprof/protomem_test.go:96:20: function parameter `p` accessed field `Sample` |
d7eb673
to
ade60da
Compare
ade60da
to
9a435c7
Compare
3e259f4
to
53d4d87
Compare
53d4d87
to
1243676
Compare
c870389
to
6824133
Compare
Automatically infer contract(nonnil->nonnil) for every function, by doing path-sensitive nilness predicate analysis for every variable and check if the contract holds at all return sites.