Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


WINDOWS: Fix perfctr crash on Windows XP and Windows Server 2003 #4511

wants to merge 2 commits into from

3 participants

Scott Blomquist Ben Noordhuis Bert Belder
Scott Blomquist

fixes #4462

Ben Noordhuis

The first line of the commit log should be 50 characters max but otherwise LGTM.

Bert Belder

I don't think that Scott has commit bits yet, I will reword and land.

Bert Belder piscisaureus closed this pull request from a commit
Scott Blomquist sblom windows: fix perfctr crash on XP and 2003
Some performance counter related functions are not available on Windows
XP and Windows Server 2003, which caused node to call a NULL pointer.

Closes #4462
Closes #4511
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/
7 src/
@@ -172,6 +172,13 @@ void InitPerfCountersWin32() {
ZeroMemory(&providerContext, sizeof(providerContext));
providerContext.ContextSize = sizeof(providerContext);
+ if (!perfctr_startProvider ||
+ !perfctr_setCounterSetInfo ||
+ !perfctr_createInstance) {
+ NodeCounterProvider = NULL;
+ return;
+ }
status = perfctr_startProvider(&NodeCounterSetGuid,
Something went wrong with that request. Please try again.