Skip to content

Windows native-module build regression (__builtin_frame_address in headers) #51678

Closed

Description

@timfish

Preflight Checklist

Electron Version

42.x.y

What operating system(s) are you using?

Windows

Operating System Version

GHA Windows 2022

What arch are you using?

x64

Last Known Working Electron version

41.5.0

Does the issue also appear in Chromium / Google Chrome?

I don't know how to test

Expected Behavior

Native modules rebuilt against Electron 42 headers on Windows with MSVC should not fail to build

Actual Behavior

Electron 42 ships a cppgc/heap.h header that unconditionally calls:

__builtin_frame_address(0)

MSVC does not support __builtin_frame_address, so the build fails with an error like:

error C3861: '__builtin_frame_address': identifier not found

Testcase Gist URL

No response

Additional Information

This may need fixing upstream in Node but thought I would open here first for visibility.

Users are adding their own workarounds to get their native modules building with Electron v42:
zwfthcks/memoryjs#2

Activity

  1. added theissue type on May 18, 2026
  2. moved this to 👀 Unsorted Items in 42-x-yon May 18, 2026
  3. changed the title [-]Electron 42 Windows native-module build regression[/-] [+]Windows native-module build regression (`__builtin_frame_address` in headers)[/+] on May 18, 2026
  4. nikwen commented on May 18, 2026

    @nikwen
    Member

    Thanks for reporting!

    If you have a minimal repro project for this, that would help a lot with fixing it!

  5. added
    has-repro-comment
    bug/regression ↩️
    on May 18, 2026
  6. timfish commented on May 18, 2026

    @timfish
    ContributorAuthor

    Struggled to reproduce this on my mac before remembering this is Windows only 😂

    On my Windows arm64 machine:

    npm i && npm run build with this package.json is enough to reproduce the build error:

    {
      "name": "repro",
      "version": "1.0.0",
      "main": "index.js",
      "scripts": {
        "build": "electron-rebuild -w @sentry-internal/node-native-stacktrace -p all"
      },
      "devDependencies": {
        "@electron/rebuild": "^4.0.4",
        "electron": "42.1.0"
      },
      "dependencies": {
        "@sentry-internal/node-native-stacktrace": "0.5.0"
      }
    }

    Results in:

    > [email protected] build
    > electron-rebuild -w @sentry-internal/node-native-stacktrace -p all
    
    Searching dependency tree
    Building modules: @sentry-internal/node-native-stacktrace
    
    
      module.cc
    C:\Users\tim\.electron-gyp\_p\node-native-stacktrace\42.1.0\include\node\cppgc\heap.h(40,37): error C3861: '__builtin_frame_address': identifier not found 
    ... snip
    
  7. dsanders11 commented on May 18, 2026

    @dsanders11
    Member

    @timfish, thanks for reporting this and isolating a repro. If you wouldn't mind, could you try tweaking your repro to use the --use-electron-clang flag with electron-rebuild and see if that helps?

  8. timfish commented on May 19, 2026

    @timfish
    ContributorAuthor

    With --use-electron-clang I get a 404 error fetching clang:

      electron-rebuild checking @sentry-internal/node-native-stacktrace against [] +13ms
      electron-rebuild fetching clang for Electron: 42.1.0 +0ms
      electron-rebuild downloading: https://raw.githubusercontent.com/electron/electron/v42.1.0/DEPS +0ms
      electron-rebuild response came back OK +93ms
      electron-rebuild fetching clang for Chromium: 148.0.7778.97 +97ms
      electron-rebuild downloading: https://chromium.googlesource.com/chromium/src.git/+/148.0.7778.97/tools/clang/scripts/update.py?format=TEXT +4ms
      electron-rebuild response came back OK +204ms
      electron-rebuild fetching clang: llvmorg-23-init-5669-g8a0be0bc-4 +208ms
      electron-rebuild downloading: https://commondatastorage.googleapis.com/chromium-browser-clang/Win/clang-llvmorg-23-init-5669-g8a0be0bc-4.tgz +4ms
      electron-rebuild got bad status code: 404 +200ms
      electron-rebuild downloading: https://commondatastorage.googleapis.com/chromium-browser-clang/Win/clang-llvmorg-23-init-5669-g8a0be0bc-4.tgz +2s
      electron-rebuild got bad status code: 404 +138ms
      electron-rebuild downloading: https://commondatastorage.googleapis.com/chromium-browser-clang/Win/clang-llvmorg-23-init-5669-g8a0be0bc-4.tgz +2s
      electron-rebuild got bad status code: 404 +141ms
    ✖ Rebuild Failed
    
    An unhandled error occurred inside electron-rebuild
    Failed to fetch a clang resource, run with DEBUG=electron-rebuild for more information
    
    Error: Failed to fetch a clang resource
    
  9. moved this from 👀 Unsorted Items to 🛠️ Fixed for Next Release in 42-x-yon May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    42-x-ybug 🪲bug/regression ↩️has-repro-commentplatform/windows

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions