Repository navigation
Declare the EventPipe provider callback is_enabled as uint32_t - #138179
Merged
Merged
Conversation
The callback mirrors the ETW EnableCallback and the profiler EventPipeProviderCallback, which both pass a 32-bit IsEnabled, and managed and native implementations take 32 bits. unsigned long is 64-bit on LP64 targets, which makes the indirect call a wasm64 signature mismatch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> (cherry picked from commit c2cad28)
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Member
Author
|
@lateralusX what is the correct thing here? |
The native EventPipe test runtime and test callbacks still declared the callback's control code as unsigned long, which no longer matches the EventPipeCallback typedef. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 009cdd9)
lewing
marked this pull request as ready for review
November 24, 2026 05:02
lewing
requested review from
MichalStrehovsky,
lateralusX,
mdh1418,
noahfalk,
steveisok and
vitek-karas
as code owners
November 24, 2026 05:02
This was referenced Nov 24, 2026
lateralusX
approved these changes
Nov 24, 2026
Member
There was a problem hiding this comment.
LGTM! CoreCLR/NativeAOT callbacks use ULONG, that gets typedef to unsigned int in the PAL and I guess the port of EventPipe over to C incorrectly mapped that parameter to unsinged long, but since that will be passed in a register on 64-bit architectures, it didn't cause any issues and remain hidden, until now.
Member
Author
|
/ba-g failures are known and unrelated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EventPipeCallbackmirrors the ETWEnableCallbackand the profilerEventPipeProviderCallback(corprof.idl), which both pass a 32-bitis_enabled.EventPipeCreateProvider2casts the profiler callback directly toEventPipeCallback, and the managed and native callbacks also take 32 bits. Declaring itunsigned longmade it 64-bit on LP64 targets. On wasm64, wherecall_indirectchecks signatures exactly, this crashesSystem.Diagnostics.Tracing.Testswith "function signature mismatch". Windows and 32-bit targets are unchanged.Note
This PR description was generated with GitHub Copilot.