Skip to content

Fix VM signal chaining and build eos-vm from a submodule - #757

Open
huangminghuang wants to merge 4 commits into
masterfrom
fix/oc-signal-chaining
Open

huangminghuang wants to merge 4 commits into
masterfrom
fix/oc-signal-chaining

Conversation

@huangminghuang

@huangminghuang huangminghuang commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Signal chaining can call a legacy handler through the wrong ABI in the OC executor, or treat SIG_IGN/SIG_DFL as callback addresses when SA_SIGINFO is set. Preserve each predecessor's calling convention and consume the merged non-OC fix directly from eos-vm.

  • Add a typed OC predecessor adapter, reject sentinel dispositions before decoding the callback union, and initialize both sigaction structures. Keep the executor's existing default-fault fallback.
  • Add libraries/sys-vm as a submodule pinned to 2c8d4b283b500f56241450bdc60a594455a972d9, the merged eos-vm #16. Remove the wire-sys-vm vcpkg dependency, version override, registry entry, and package lookups. Softfloat remains a vcpkg dependency; no VM registry revision is needed.
  • Integrate the header-only VM target with source/install include paths and C++20 requirements. Isolate its standalone test/tool, compiler-launcher, profiling, sanitizer, and installation settings from Sysio, preserving shared dependent-option cache values. Ship VM headers/CMake exports in the development component and its license in the runtime component.
  • Update submodule initialization instructions. Add a CMake integration regression that builds and runs source-tree and installed consumers, verifies option isolation and component separation, and checks the missing-submodule diagnostic.
  • Register the OC signal regression once, exclude it from per-runtime discovery, and retain it in the CI/coverage filter. Remove the redundant end anchor that broke the coverage target under Ninja and Make.

Validation:

  • Fresh Clang 18 Release configure and complete native build pass. The new vcpkg installation contains neither the VM port nor old VM headers; runtime compilation resolves libraries/sys-vm/include. Of the 42 VM headers, only signals.hpp differs from the previous package.
  • Integration/SDK regression passes with Clang/Ninja, GCC 14.2/Make, and Clang/Ninja Multi-Config. A fresh checkout fetches the exact merged submodule commit and passes the same regression.
  • Full Sysio dev/base staging checks the VM header hash, CMake export, component separation, and license; an exported-target consumer builds and runs with the vcpkg softfloat package.
  • The merged VM signal probe passes Clang ASan, UBSan, and function-call sanitization. clangd checks the interpreter translation unit with zero errors; the complete PR diff passes whitespace checks.
  • The OC adapter's isolated regression passes 3 cases / 15 assertions under GCC 14.2 and Clang 18, including Clang UBSan/function sanitization. Registration checks cover both three-runtime and interpreter-only configurations. The actual coverage block builds and executes its selected CTest entries under Ninja and Make with report tools stubbed.
  • The upstream eos-vm change passed all 269 VM cases / 1,506 assertions plus focused GCC and sanitizer regressions before merge.
  • Full native suites pass: interpreter chain 1,729 cases / 1,359,774 assertions; plugin 321 / 60,790; contracts 1,090 / 481,935; FC 752 / 5,014,808.
  • All 28 selected CTest entries pass, covering JIT/OC WASM/configuration and deadline tests, OC limits/interrupts, OC execution without FSGSBASE, the signal regression, and both CMake regressions.

Change-Id: I5c03bce57647708db0d9fb473b310f4099266c56
heifner
heifner previously approved these changes Nov 10, 2026

@heifner heifner left a comment

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.

wire-sys-vm's chain_previous_signal_handler has the second of these defects: it tests SA_SIGINFO first and calls sa_sigaction without checking for SIG_IGN / SIG_DFL. It is what decodes the predecessor on a node without OC, so it is worth the same fix there.

Use sig consistently for handler arguments. Register the runtime-independent signal suite once, exclude it from per-runtime discovery, and keep it in the CI unit-test filter.

Change-Id: I4cebf3ce64be3ec8a5a950bd3f81bb894b640236
@huangminghuang

Copy link
Copy Markdown
Contributor Author

The non-OC sentinel issue is reproduced and fixed in Wire-Network/eos-vm#16. The new tests fail against the original header and pass with GCC 14 and Clang sanitizers; the complete VM unit suite passes 269 cases. A registry port revision will be needed after that fix merges to bring it into Sysio.

Comment thread unittests/CMakeLists.txt Resolved
Drop the redundant trailing anchor from the runtime-independent unit-test filter. The non-VERBATIM coverage command otherwise produces invalid Ninja syntax and an unterminated Make shell quote. Validate the actual coverage command block with Ninja and Unix Makefiles.

Change-Id: I631ca2914d7c49c0b40615c20dbe5709ecca532c
heifner
heifner previously approved these changes Nov 10, 2026
Change-Id: I6b3db83c4b7b165296728dcfc72b7c78176ba255
@huangminghuang huangminghuang changed the title Fix OC signal-handler chaining for legacy and ignored actions Fix VM signal chaining and build eos-vm from a submodule Nov 10, 2026

This branch has not been deployed

No deployments
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