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

net: call getSystemDNSConfig inside lookupWithFake to avoid nil dereference panic when running tests alone #56759

Conversation

mateusz834
Copy link
Member

@mateusz834 mateusz834 commented Nov 16, 2022

It happens with tests that only call lookupWithFake, and before them no-one calls resolverConf.tryUpdate. running alone one of these: TestIssue8434, TestIssueNoSuchHostExists cause a nil dereference panic.

@mateusz834 mateusz834 changed the title net: fix panic inside lookupWithFake when running tests that do not call tryUpdate before. net: call getSystemDNSConfig inside lookupWithFake to avoid nil dereference panic when running tests alone Nov 16, 2022
@mateusz834 mateusz834 force-pushed the net-fix-panic-TestIssueNoSuchHostExists branch from 0f1a592 to 7456fd1 Compare November 17, 2022 08:50
@gopherbot
Copy link

This PR (HEAD: 7456fd1) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/450856 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link

Message from Damien Neil:

Patch Set 3: Code-Review+2


Please don’t reply on this GitHub thread. Visit golang.org/cl/450856.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Mateusz Poliwczak:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450856.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 3: Auto-Submit+1 Code-Review+1 Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/450856.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gopher Robot:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450856.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gopher Robot:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450856.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gopher Robot:

Patch Set 3: TryBot-Result-1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450856.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 4: Auto-Submit+1 Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/450856.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gopher Robot:

Patch Set 4:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/450856.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Mar 24, 2023
…erence panic when running tests alone

It happens with tests that only call lookupWithFake, and before them no-one calls resolverConf.tryUpdate. running alone one of these: TestIssue8434, TestIssueNoSuchHostExists cause a nil dereference panic.

Change-Id: I3fccd96dff5b3c77b5420a7f73742acbafa80142
GitHub-Last-Rev: 7456fd1
GitHub-Pull-Request: #56759
Reviewed-on: https://go-review.googlesource.com/c/go/+/450856
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
@gopherbot
Copy link

This PR is being closed because golang.org/cl/450856 has been merged.

@gopherbot gopherbot closed this Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants