Skip to content

Fix FireEtXplatGCBulkRootStaticVar guard to use FEATURE_EVENTSOURCE_XPLAT#128782

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-issues-with-fireetxplat
Closed

Fix FireEtXplatGCBulkRootStaticVar guard to use FEATURE_EVENTSOURCE_XPLAT#128782
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-issues-with-fireetxplat

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

The #else branch for HOST_UNIX unconditionally compiled the FireEtXplatGCBulkRootStaticVar call on all Unix targets, but the PR #128745 changes generated FireEtXplat* declarations to only exist under FEATURE_EVENTSOURCE_XPLAT. Non-browser Unix targets (macOS, Android, WASI) that don't define this feature flag would fail to build.

  • Changed guard from bare #else to #elif defined(FEATURE_EVENTSOURCE_XPLAT) with ERROR_SUCCESS fallback when neither Windows ETW nor LTTng/Xplat is available
  • Searched all compiled C++ (*.cpp, *.h) in src/coreclr for other FireEtXplat call sites — this is the only one
#if !defined(HOST_UNIX)
    ULONG result = EventWrite(...);
#elif defined(FEATURE_EVENTSOURCE_XPLAT)
    ULONG result = FireEtXplatGCBulkRootStaticVar(...);
#else
    ULONG result = ERROR_SUCCESS;
#endif

Copilot AI self-assigned this May 29, 2026
Copilot AI review requested due to automatic review settings May 29, 2026 19:30
Copilot AI review requested due to automatic review settings May 29, 2026 19:30
…PLAT

The #else branch for HOST_UNIX would compile the FireEtXplat* call on
non-browser Unix targets (macOS, Android) that don't define
FEATURE_EVENTSOURCE_XPLAT, causing build failures since the PR changes
the generated FireEtXplat* declarations to only exist under that feature
flag. Use #elif defined(FEATURE_EVENTSOURCE_XPLAT) and fall back to
ERROR_SUCCESS when neither Windows ETW nor LTTng/Xplat is available.

Co-authored-by: pavelsavara <271576+pavelsavara@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants