Skip to content
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

internal/deviations/deviations.go is ... playing a risk game of roullete. #3569

Closed
morrowc opened this issue Nov 8, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@morrowc
Copy link
Contributor

morrowc commented Nov 8, 2024

Describe the bug

deviations.go is full of this pattern:
for _, platformExceptions := range metadata.Get().PlatformExceptions

which is effectively: "Here's a struct with a safe get/set method, but heck I'll just reach in there and .. boom panic" :(

To Reproduce

Don't know! :) but intenral testing blows up all over this, and simple proto/golang rules say: "never do this, cause boom panic!"

Expected behavior

do not panic ?

Logs

runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference

are these REALLY needed here? Nope cause this is super clearly wrong.

Network device platform (please complete the following information):

anything that touches this code path is gonna have a bad day

Additional context

nope?

@morrowc morrowc added the bug Something isn't working label Nov 8, 2024
@morrowc
Copy link
Contributor Author

morrowc commented Nov 11, 2024

Apparently I don't now how to link PRs with Issues :(
PR: #3570
was created and merged for this issue.

@morrowc morrowc closed this as completed Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant