Repository navigation
JIT: Preserve the JIT assert definition - #137916
Merged
Merged
Conversation
dotnet#137624 stopped `utilcode.h` from including `corhlprpriv.h` in the JIT. As a result, `corhlpr.h` (and with it the UCRT `<assert.h>`) was first included after `host.h`, replacing the JIT's `assert` with the CRT one. Include `corhlpr.h` before `host.h` in `jit.h`, and mark `_wassert` as deprecated in DEBUG MSVC builds so a later CRT `<assert.h>` that replaces the JIT's `assert` fails the build. Co-authored-by: Copilot <[email protected]> Copilot-Session: c6ad27fe-95af-450c-8689-8aba56c073cf
|
Azure Pipelines: Successfully started running 5 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
`gcinfoencoder.h` does not use anything from `eexcp.h`, and that was the only way the JIT reached `corhlpr.h` and its late `<assert.h>` include. Remove the `eexcp.h` include and the `corhlpr.h` include ordering workaround in `jit.h`. Co-authored-by: Copilot <[email protected]> Copilot-Session: c6ad27fe-95af-450c-8689-8aba56c073cf
Member
Author
|
PTAL @dotnet/jit-contrib Simple change that makes |
EgorBo
approved these changes
Nov 19, 2026
Member
Author
|
/ba-g Timeouts |
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.
#137624 stopped
utilcode.hfrom includingcorhlprpriv.hin the JIT. As a result,corhlpr.h(and with it the UCRT<assert.h>) was first included afterhost.h, replacing the JIT'sassertwith the CRT one.Remove the include eexcp.h from gcinfoencoder.h which is what ends up defining C assert. It does not seem to be necessary anymore.
Deprecate the
_wassertsymbol to detect this happening in the future.