sokol: fix Wayland pipe descriptor ABI - #28751
Draft
medvednikov wants to merge 2 commits into
Draft
medvednikov wants to merge 2 commits into
medvednikov wants to merge 2 commits into
Conversation
This was referenced Sep 18, 2026
medvednikov
added a commit
that referenced
this pull request
Sep 18, 2026
Internal assembly on automation/wayland-pipe-base-4a2b695e only. Master and the review branch are unchanged. The full source diff is verified before making a clean follow-up on #28751.
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.
Summary
Fix Graphics CI's conflicting Wayland
C.pipedeclarations and the corresponding descriptor-storage bug in Sokol's drag-and-drop receiver.This PR was already open when the prepared follow-up was published. Commit
bfda53b2fb168f515a34d0499f4452be97bb60c3extends the original5ccb7b89without rewriting history or creating a duplicate fix PR. The original cross-module ABI regression and its workflow step are retained unchanged.The original PR is based on
2217aba7. Before publication, the affected master files were rechecked atec858c8b1cc19e62c510b18a0a44b7ce6de20cca; their complete blob hashes still match the prepared baselines. This is a fast-forward follow-up on the existing PR, not a rebase of its history.Fix
The completed Graphics CI job bootstrapped V and passed the legacy gg isolation check, then failed to compile
draw_rect_empty_test.vandframe_pacing_test.vwith-d gg_multiwindow -d sokol_wayland. Sokol declaredC.pipe(fds &int), whilex.multiwindowdeclaredC.pipe(fds &i32).fn C.pipe(fds &i32) i32in both modules, matching builtin's declaration.wl_create_drop_pipe() ![2]i32helper, using two C-width descriptor slots rather than two platform-width V integers. The drag-and-drop callback uses that same helper.Changing only the declaration would leave the underlying output buffer wrong. The helper makes the actual production descriptor-creation code testable without a compositor.
V regression coverage
Retained verbatim:
vlib/gg/wayland_pipe_abi_test.c.vimportssokol.sappandx.multiwindowtogether without redeclaringC.pipe. It checks canaries, native descriptor access modes, binary transfer including NUL/high-bit bytes, EOF, and cleanup. Its existing strict, bounded Graphics CI invocation is unchanged.Added: three tests in
vlib/sokol/sapp/sapp_wayland_pipe_linux_test.vcall the production helper and check:These tests require Linux with
sokol_waylandenabled but do not open a display. One bounded-new-compilerinvocation is added to the existing Multiwindow Linux checks block. All prior workflow commands, settings, flags, and tests remain intact. There is no new Python file, workflow job, retry, ignored failure, or test exclusion.This is not a live Wayland drag-and-drop/compositor test.
Validation
V compilation,
v fmt, the V regressions, and Graphics CI have not been executed locally. There is no local V executable; a fresh direct GitHub read still fails at DNS resolution. This PR remains draft pending V-level validation. The V test cases listed above are defined coverage, not locally passed V tests.Rerun for publication:
-std=c11 -O2 -Wall -Wextra -Werror -fsanitize=address,undefined.[3, 4]are interpreted as[17179869187, 0]in two zeroed 64-bit slots on this host. The probe closes the real descriptors, never the intentionally misinterpreted ones.pipeagainst the system header and accept the corrected 32-bit-pointer declaration.git diff --cached --checkpass. These local checks are not a complete checkout validation.9fffedcf3c82429e5401149f49c3729b6bf7025f; removing only the new helper-test invocation restores that entire workflow byte-for-byte.4807028964d285b90b1a455494c9e53aa6ebc6d0.Files in the PR
vlib/sokol/sapp/sapp_linux.c.vvlib/sokol/sapp/sapp_wayland_linux.vvlib/sokol/sapp/sapp_wayland_pipe_linux_test.vvlib/x/multiwindow/wayland_backend.c.vvlib/gg/wayland_pipe_abi_test.c.v— retained from the original commit, unchanged by the follow-up..github/workflows/gg_regressions_ci.ymlThis targets the confirmed Graphics CI declaration blocker and descriptor-storage defect. It does not claim that all subsequent graphics checks pass or resolve the separate MSVC, archived pkg-config-test, or reporter failures.