ci: Compile capnproto with GCC in gnu32 job #383

pull xyzconstant wants to merge 1 commits into bitcoin-core:master from xyzconstant:2026-10-26-fix-gnu32-job-abi-mismatch changing 1 files +6 −1
  1. xyzconstant commented at 11:18 PM on October 27, 2026: contributor

    The gnu32 job segfaulted in #382 because of an i686 ABI mismatch between Clang-compiled libkj (the nixpkgs default for capnproto) and GCC-compiled libmultiprocess.

    Clang and GCC handle empty struct arguments differently on i686: Clang omits them, while GCC reserves a stack slot.

    When the fn.invoke() call in the PassField overload for Proxy.Context fails with an uncaught exception, kj::str(exception) calls kj::operator*(kj::_::Stringifier, const kj::Exception&) with Stringifier as an empty struct. As a result, the Clang-compiled callee reads Exception& from the stack slot reserved by the GCC-compiled caller for Stringifier, thereby causing an invalid read.

    This PR builds capnproto with GCC in the gnu32 job, so both sides agree on the layout.

    The same crash happened in #218, where it was worked around with getDescription().

  2. ci: Compile capnproto with GCC in gnu32 job
    In the gnu32 job, capnproto (libkj) is compiled with Clang while
    libmultiprocess is compiled with GCC, but they handle empty structs
    differently on i686. Clang omits them, while GCC reserves a stack slot
    for them.
    
    This causes a segfault in calls to functions like
    `kj::str(kj::Exception)`, which internally pass an empty `Stringifier`
    object.
    
    This commit fixes the issue by compiling capnproto with the same
    toolchain as libmultiprocess (GCC) when i686 is detected in shell.nix.
    04a0465d67
  3. DrahtBot commented at 11:18 PM on October 27, 2026: none

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK Sjors

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. Sjors commented at 2:33 AM on October 28, 2026: member

    Using consistent toolchains makes sense in general.

    ACK 04a0465d67a58040013c74dbb92e0f7a0572cc0e


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-28 08:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me