electron/patches/node/fix_-wmismatched-new-delete_in_debug_utils_cc.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
1.2 KiB
Diff
Raw Normal View History

chore: bump node to v22.17.0 (38-x-y) (#47556) * chore: bump node in DEPS to v22.17.0 * build: use //third_party/simdutf by default in GN https://github.com/nodejs/node/pull/58115 * chore: adjust crypto specs: - https://github.com/nodejs/node/pull/58117 - https://github.com/nodejs/node/pull/58387 * deps: update libuv to 1.51.0 https://github.com/nodejs/node/pull/58124 * test: fix test-buffer-tostring-range on allocation failure https://github.com/nodejs/node/pull/58416 * build: use FILE_OFFSET_BITS=64 esp. on 32-bit arch https://github.com/nodejs/node/pull/58090 * build: use //third_party/simdutf by default in GN https://github.com/nodejs/node/pull/58115 * inspector: add protocol method Network.dataReceived https://github.com/nodejs/node/pull/58001 * test: force slow JSON.stringify path for overflow https://github.com/nodejs/node/pull/58181 * chore: fixup patch indices * 6049967: Remove protocol::Maybe and roll inspector_protocol https://chromium-review.googlesource.com/c/chromium/src/+/6049967 * chore: fixup crypto test patch * src: fix module buffer allocation https://github.com/nodejs/node/pull/57738 * crypto: expose process.features.openssl_is_boringssl https://github.com/nodejs/node/pull/58387 * util: add internal assignFunctionName() function https://github.com/nodejs/node/pull/57916 * build: fix pointer compression builds https://github.com/nodejs/node/pull/58171 * chore: put back config options * fixup! deps: update libuv to 1.51.0 * chore: update patches --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-06-30 14:49:12 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Thu, 26 Jun 2025 12:46:41 +0000
Subject: fix: -Wmismatched-new-delete in debug_utils.cc
Fixes the following error:
Error: ../../third_party/electron_node/src/debug_utils.cc(491,11): error: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Werror,-Wmismatched-new-delete]
491 | delete str;
| ^
| []
../../third_party/electron_node/src/debug_utils.cc(487,23): note: allocated with 'new[]' here
487 | char* str = new char[size];
| ^
1 error generated.
Upstreamed in https://github.com/nodejs/node/pull/58844.
diff --git a/src/debug_utils.cc b/src/debug_utils.cc
index 97884b9a0f8d6d88e36da06b05642505c767338d..65283ef31da35d0f08fcff7a5e79bf960d861126 100644
--- a/src/debug_utils.cc
+++ b/src/debug_utils.cc
@@ -488,7 +488,7 @@ std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
WideCharToMultiByte(
CP_UTF8, 0, module_name, -1, str, size, nullptr, nullptr);
list.emplace_back(str);
- delete str;
+ delete[] str;
}
}
}