Skip to content

[test] Disable OOP fixture under sanitizers and Emscripten.#944

Merged
vgvassilev merged 1 commit intocompiler-research:mainfrom
vgvassilev:test-skip-oop-asan-emscripten
Apr 27, 2026
Merged

[test] Disable OOP fixture under sanitizers and Emscripten.#944
vgvassilev merged 1 commit intocompiler-research:mainfrom
vgvassilev:test-skip-oop-asan-emscripten

Conversation

@vgvassilev
Copy link
Copy Markdown
Contributor

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.

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
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.73%. Comparing base (2626ddd) to head (56afb33).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

};

#if LLVM_VERSION_MAJOR > 21 && !defined(_WIN32)
#if LLVM_VERSION_MAJOR > 21 && !defined(_WIN32) && \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

@vgvassilev vgvassilev merged commit d23a821 into compiler-research:main Apr 27, 2026
27 checks passed
@vgvassilev vgvassilev deleted the test-skip-oop-asan-emscripten branch April 27, 2026 15:09
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.

1 participant