[PR #440] [MERGED] fix(test): static wayland registry listener #472

Closed
opened 2026-10-15 13:00:49 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/wolf/pull/440
Author: @JBailes
Created: 6/21/2026
Status: ✅ Merged
Merged: 6/21/2026
Merged by: @JBailes

Base: stable ← Head: fix/flaky-wayland-registry-listener


📝 Commits (1)

  • e1a0f03 fix(test): static wayland registry listener

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 tests/platforms/linux/wayland-client.hpp (+1 -1)

📄 Description

The [WAYLAND] "virtual inputs" test flakes with a SIGABRT (listener function for opcode 0 of wl_registry is NULL) only on the clang sanitizer variant.

Cause: in w_get_state the wl_registry_listener is a stack local. wl_registry_add_listener keeps the pointer for the registry's lifetime, but the registry outlives the function. A registry event after it returns dispatches through a dangling pointer garbage in, abort. Non-deterministic: depends on a late global + whether the stack got reused (so sanitizers hit it, others mostly do't).

Fix: make it static const, like every other listener in the file (e.g. xdg_wm_base_listener). One word.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/wolf/pull/440 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 6/21/2026 **Status:** ✅ Merged **Merged:** 6/21/2026 **Merged by:** [@JBailes](https://github.com/JBailes) **Base:** `stable` ← **Head:** `fix/flaky-wayland-registry-listener` --- ### 📝 Commits (1) - [`e1a0f03`](https://github.com/games-on-whales/wolf/commit/e1a0f03942432a26887aa8ff598f67cb1f621524) fix(test): static wayland registry listener ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/platforms/linux/wayland-client.hpp` (+1 -1) </details> ### 📄 Description The `[WAYLAND]` "virtual inputs" test flakes with a SIGABRT (`listener function for opcode 0 of wl_registry is NULL`) only on the clang sanitizer variant. Cause: in `w_get_state` the `wl_registry_listener` is a **stack local**. `wl_registry_add_listener` keeps the pointer for the registry's lifetime, but the registry outlives the function. A registry event after it returns dispatches through a dangling pointer garbage in, abort. Non-deterministic: depends on a late global + whether the stack got reused (so sanitizers hit it, others mostly do't). Fix: make it `static const`, like every other listener in the file (e.g. `xdg_wm_base_listener`). One word. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 13:00:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/wolf#472
No description provided.