Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
a0b81097
Unverified
Commit
a0b81097
authored
May 13, 2019
by
Péter Szilágyi
Committed by
GitHub
May 13, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19562 from holiman/fix_tabcrash
p2p/discover: fix nil-dereference due to race
parents
ec2131c8
95263914
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
1 deletion
+2
-1
table.go
p2p/discover/table.go
+0
-1
table_util_test.go
p2p/discover/table_util_test.go
+1
-0
v4_udp.go
p2p/discover/v4_udp.go
+1
-0
No files found.
p2p/discover/table.go
View file @
a0b81097
...
@@ -119,7 +119,6 @@ func newTable(t transport, db *enode.DB, bootnodes []*enode.Node, log log.Logger
...
@@ -119,7 +119,6 @@ func newTable(t transport, db *enode.DB, bootnodes []*enode.Node, log log.Logger
tab
.
seedRand
()
tab
.
seedRand
()
tab
.
loadSeedNodes
()
tab
.
loadSeedNodes
()
go
tab
.
loop
()
return
tab
,
nil
return
tab
,
nil
}
}
...
...
p2p/discover/table_util_test.go
View file @
a0b81097
...
@@ -42,6 +42,7 @@ func init() {
...
@@ -42,6 +42,7 @@ func init() {
func
newTestTable
(
t
transport
)
(
*
Table
,
*
enode
.
DB
)
{
func
newTestTable
(
t
transport
)
(
*
Table
,
*
enode
.
DB
)
{
db
,
_
:=
enode
.
OpenDB
(
""
)
db
,
_
:=
enode
.
OpenDB
(
""
)
tab
,
_
:=
newTable
(
t
,
db
,
nil
,
log
.
Root
())
tab
,
_
:=
newTable
(
t
,
db
,
nil
,
log
.
Root
())
go
tab
.
loop
()
return
tab
,
db
return
tab
,
db
}
}
...
...
p2p/discover/v4_udp.go
View file @
a0b81097
...
@@ -253,6 +253,7 @@ func ListenV4(c UDPConn, ln *enode.LocalNode, cfg Config) (*UDPv4, error) {
...
@@ -253,6 +253,7 @@ func ListenV4(c UDPConn, ln *enode.LocalNode, cfg Config) (*UDPv4, error) {
return
nil
,
err
return
nil
,
err
}
}
t
.
tab
=
tab
t
.
tab
=
tab
go
tab
.
loop
()
t
.
wg
.
Add
(
2
)
t
.
wg
.
Add
(
2
)
go
t
.
loop
()
go
t
.
loop
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment