From aa9425a6a7a512c1f8cf35d626d138cff275d027 Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Thu, 15 Jan 2026 10:57:40 +0100 Subject: [PATCH 1/3] Guard against null heap profile (#252) --- bindings/profilers/heap.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bindings/profilers/heap.cc b/bindings/profilers/heap.cc index 7c6eaad4..fa81f742 100644 --- a/bindings/profilers/heap.cc +++ b/bindings/profilers/heap.cc @@ -571,6 +571,9 @@ NAN_METHOD(HeapProfiler::GetAllocationProfile) { auto isolate = info.GetIsolate(); std::unique_ptr profile( isolate->GetHeapProfiler()->GetAllocationProfile()); + if (!profile) { + return Nan::ThrowError("Heap profiler is not enabled."); + } v8::AllocationProfile::Node* root = profile->GetRootNode(); auto state = PerIsolateData::For(isolate)->GetHeapProfilerState(); if (state) { From 535d86d20c7d7031d9d7b81f44c262cf11b2d366 Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Thu, 15 Jan 2026 11:35:53 +0100 Subject: [PATCH 2/3] Remove the check for dead isolate (#253) --- bindings/profilers/wall.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/profilers/wall.cc b/bindings/profilers/wall.cc index 11564677..80be444e 100644 --- a/bindings/profilers/wall.cc +++ b/bindings/profilers/wall.cc @@ -396,7 +396,7 @@ void SignalHandler::HandleProfilerSignal(int sig, return; } auto isolate = Isolate::GetCurrent(); - if (!isolate || isolate->IsDead()) { + if (!isolate) { return; } WallProfiler* prof = g_profilers.GetProfiler(isolate); From 55f066dcbe13b1595af02bbb1c23b682828d91cd Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Thu, 15 Jan 2026 11:42:34 +0100 Subject: [PATCH 3/3] v5.13.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7c42b2fe..c84ba0f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@datadog/pprof", - "version": "5.13.1", + "version": "5.13.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@datadog/pprof", - "version": "5.13.1", + "version": "5.13.2", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 5cb4e842..50ddf003 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@datadog/pprof", - "version": "5.13.1", + "version": "5.13.2", "description": "pprof support for Node.js", "repository": { "type": "git",