-
-
Notifications
You must be signed in to change notification settings - Fork 37.2k
segfault if clearTimeout(interval) #9561
Copy link
Copy link
Closed
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.timersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().Issues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().
Description
Activity
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.timersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().Issues and PRs related to timers, setImmediate(), setInterval(), and 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.