Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
src: fix nullptr dereference for signal during startup
This fixes a test failure when running
`test/parallel/test-child-process-spawnsync-kill-signal.js`
under load. What would happen is that `SignalExit()` tries
to shutdown the tracing agent, which might not have been set
up by the point that Node.js receives the signal.
  • Loading branch information
addaleax committed May 9, 2018
commit 3c4c7b2145566457a7e04e2a3daf6295b3f54cf8
3 changes: 2 additions & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ static struct {
}

void StopTracingAgent() {
tracing_agent_->Stop();
if (tracing_agent_)
tracing_agent_->Stop();
}

tracing::Agent* GetTracingAgent() const {
Expand Down