[test] Disable OOP fixture under sanitizers and Emscripten.#944
Merged
vgvassilev merged 1 commit intocompiler-research:mainfrom Apr 27, 2026
Merged
Conversation
Two configurations the `OutOfProcessJIT` typed-test fixture can't
survive:
- Sanitizer builds (ASan/MSan/TSan): upstream LLVM ORC asserts on
`Resolving symbol with incorrect flags`
(`llvm/lib/ExecutionEngine/Orc/Core.cpp::OL_notifyResolved`).
Sanitizer-instrumented common symbols carry flags the host
process never declared; the EPC boundary surfaces the
mismatch. Earlier per-test skips landed in
`EnumReflection_GetEnums` and
`FunctionReflection_InstantiateTemplateFunctionFromString`,
but a wider repro shows the failure is structural -- nearly
every test that JITs nontrivial code crashes.
- Emscripten: the OOP path requires fork/exec and a separate
`llvm-jitlink-executor` binary; the wasm runtime provides
neither.
Move both gates from per-test sites into the typed-test config in
`unittests/CppInterOp/Utils.h` via a single `CPPINTEROP_OOP_DISABLED`
macro that combines `__has_feature(...sanitizer)` /
`__SANITIZE_ADDRESS__` / `__SANITIZE_THREAD__` / `__EMSCRIPTEN__`.
Both the `OutOfProcessJITConfig` struct and the `CppInterOpTestTypes`
typedef key off the same macro, so under any disabled configuration
only `InProcessJIT` registers and no per-test boilerplate is needed.
Drops the inline sanitizer skip blocks the previous round added
to `EnumReflection_GetEnums` and
`FunctionReflection_InstantiateTemplateFunctionFromString` -- the
fixture-level gate covers them.
The CI fixture-registration assertion in
`.github/actions/Build_and_Test_CppInterOp/action.yml` already
allows `OutOfProcessJIT` to be missing on `clang-runtime >= 22`
rows (transitional permissiveness for cache rows without
compiler-rt). Sanitizer and emscripten rows piggyback on that
permissiveness; no CI change needed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #944 +/- ##
==========================================
+ Coverage 81.67% 81.73% +0.06%
==========================================
Files 15 15
Lines 4743 4759 +16
==========================================
+ Hits 3874 3890 +16
Misses 869 869 🚀 New features to boost your workflow:
|
| }; | ||
|
|
||
| #if LLVM_VERSION_MAJOR > 21 && !defined(_WIN32) | ||
| #if LLVM_VERSION_MAJOR > 21 && !defined(_WIN32) && \ |
Contributor
There was a problem hiding this comment.
warning: no header providing "LLVM_VERSION_MAJOR" is directly included [misc-include-cleaner]
unittests/CppInterOp/Utils.h:3:
- #include "../../lib/CppInterOp/Compatibility.h"
+ #include <llvm/Config/llvm-config.h>
+ #include "../../lib/CppInterOp/Compatibility.h"
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.
Two configurations the
OutOfProcessJITtyped-test fixture can't survive:Resolving symbol with incorrect flags(llvm/lib/ExecutionEngine/Orc/Core.cpp::OL_notifyResolved). Sanitizer-instrumented common symbols carry flags the host process never declared; the EPC boundary surfaces the mismatch. Earlier per-test skips landed inEnumReflection_GetEnumsandFunctionReflection_InstantiateTemplateFunctionFromString, but a wider repro shows the failure is structural -- nearly every test that JITs nontrivial code crashes.llvm-jitlink-executorbinary; the wasm runtime provides neither.Move both gates from per-test sites into the typed-test config in
unittests/CppInterOp/Utils.hvia a singleCPPINTEROP_OOP_DISABLEDmacro that combines__has_feature(...sanitizer)/__SANITIZE_ADDRESS__/__SANITIZE_THREAD__/__EMSCRIPTEN__. Both theOutOfProcessJITConfigstruct and theCppInterOpTestTypestypedef key off the same macro, so under any disabled configuration onlyInProcessJITregisters and no per-test boilerplate is needed.Drops the inline sanitizer skip blocks the previous round added to
EnumReflection_GetEnumsandFunctionReflection_InstantiateTemplateFunctionFromString-- the fixture-level gate covers them.The CI fixture-registration assertion in
.github/actions/Build_and_Test_CppInterOp/action.ymlalready allowsOutOfProcessJITto be missing onclang-runtime >= 22rows (transitional permissiveness for cache rows without compiler-rt). Sanitizer and emscripten rows piggyback on that permissiveness; no CI change needed.