Skip to content

Misplaced/dead Windows code in node.cc? #52404

Closed
@targos

Description

In

node/src/node.cc

Lines 633 to 640 in 756acd0

#if NODE_USE_V8_WASM_TRAP_HANDLER
#if defined(_WIN32)
{
constexpr ULONG first = TRUE;
per_process::old_vectored_exception_handler =
AddVectoredExceptionHandler(first, TrapWebAssemblyOrContinue);
}
#else
, we have Windows-specific code.
The problem is that this code is inside a #ifdef __POSIX__ section:
#ifdef __POSIX__

This seems to be unexpected dead code for Windows.
I found this from a compiler warning: src\node.cc(428,13): warning : unused function 'TrapWebAssemblyOrContinue' [-Wunused-function] [D:\Git\nodejs\node\libnode.vcxproj]

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.good first issueIssues that are suitable for first-time contributors.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions