Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upsrc: add consistency check to node_platform.cc #21156
Conversation
addaleax
added
the
fast-track
label
Jun 5, 2018
nodejs-github-bot
added
the
C++
label
Jun 5, 2018
This comment has been minimized.
This comment has been minimized.
|
CI: https://ci.nodejs.org/job/node-test-commit/19006/ (only fixed typos in the commit message since CI)
|
addaleax
force-pushed the
addaleax:platform-loop-check-eq
branch
from
c85a2f8
to
4712611
Jun 5, 2018
addaleax
force-pushed the
addaleax:platform-loop-check-eq
branch
from
4712611
to
b950728
Jun 5, 2018
bnoordhuis
approved these changes
Jun 6, 2018
src/node_platform.h
Outdated
| @@ -72,6 +72,8 @@ class PerIsolatePlatformData : | |||
| bool FlushForegroundTasksInternal(); | |||
| void CancelPendingDelayedTasks(); | |||
|
|
|||
| uv_loop_t* event_loop() { return loop_; } | |||
This comment has been minimized.
This comment has been minimized.
cjihrig
approved these changes
Jun 6, 2018
This comment has been minimized.
This comment has been minimized.
addaleax
added
author ready
and removed
fast-track
labels
Jun 7, 2018
This comment has been minimized.
This comment has been minimized.
|
Landed in 505bfdc |
addaleax
closed this
Jun 7, 2018
addaleax
deleted the
addaleax:platform-loop-check-eq
branch
Jun 7, 2018
addaleax
added
the
lib / src
label
Jun 7, 2018
addaleax
added a commit
that referenced
this pull request
Jun 7, 2018
targos
added a commit
that referenced
this pull request
Jun 8, 2018
shisama
added a commit
to shisama/node
that referenced
this pull request
Jun 9, 2018
shisama
added a commit
to shisama/node
that referenced
this pull request
Jun 11, 2018
shisama
added a commit
to shisama/node
that referenced
this pull request
Jun 12, 2018
targos
added a commit
that referenced
this pull request
Jun 13, 2018
shisama
added a commit
to shisama/node
that referenced
this pull request
Jun 17, 2018
This was referenced Jun 20, 2018
calebeby
added a commit
to Pigmice2733/scouting-frontend
that referenced
this pull request
Jun 20, 2018
This was referenced Jun 21, 2018
blattersturm
added a commit
to citizenfx/node
that referenced
this pull request
Nov 3, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
addaleax commentedJun 5, 2018
•
edited
We use the
Isolate*pointer as the sole identifierfor a V8 Isolate. In some environments (e.g. multi-threaded),
Isolates may be destroyed and new ones created; then, it
may happen that the memory that was previously used for
one
Isolatecan be re-used for anotherIsolateafter the first one has been disposed of.
This check is a little guard against accidentally
re-using the same per-Isolate platform data structure
in such cases, i.e. making sure (to the degree to which
that is possible) that the old
Isolate*has been properlyunregistered before one at the same memory address is added.
(It’s not 100 % foolproof because the
uv_loop_t*pointer value could theoretically be the same as well.)
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes(Also, in case you were wondering, this is inspired by a 3-day debugging adventure for #20876.😶 )