-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
segfault if clearTimeout(interval) #9561
Copy link
Copy link
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
If using
clearTimeoutto clear an unreffedTimeoutobject returned bysetInterval(...).unref()you'll get a segfault the next time the interval would normally have fired.The following example program will segfault after 4 seconds:
The segfault doesn't happen if the
Timeoutobject isn't unreffed.Even though the user should just use
clearIntervalinstead, this at least shouldn't segfault.