<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wayland/src, branch main</title>
<subtitle>[no description]</subtitle>
<id>http://git.sudomsg.com/mirror/wayland/atom/src?h=main</id>
<link rel='self' href='http://git.sudomsg.com/mirror/wayland/atom/src?h=main'/>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/'/>
<updated>2026-08-30T13:03:14Z</updated>
<entry>
<title>connection: Replace calloc() by zalloc()</title>
<updated>2026-08-30T13:03:14Z</updated>
<author>
<name>¥IGA</name>
<email>yiga.steam@gmail.com</email>
</author>
<published>2026-08-30T12:17:27Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=381af21cf84f13be0ca24aed756a9cded3290d49'/>
<id>urn:sha1:381af21cf84f13be0ca24aed756a9cded3290d49</id>
<content type='text'>
Signed-off-by: ¥IGA &lt;yiga.steam@gmail.com&gt;
</content>
</entry>
<entry>
<title>client: Document thread safety concerns in `wl_display_connect()`</title>
<updated>2026-08-27T15:50:20Z</updated>
<author>
<name>Ian Douglas Scott</name>
<email>idscott@system76.com</email>
</author>
<published>2026-08-25T19:09:24Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=bd616d428acc804ab1e2245cf44431184ff2c8a9'/>
<id>urn:sha1:bd616d428acc804ab1e2245cf44431184ff2c8a9</id>
<content type='text'>
I believe this wording is accurate. The thread safety risks here are real, if
uncommon in practice (partly since `WAYLAND_SOCKET` isn't set in the context
most clients are run), and is non-obvious, so at least documenting it seems
appropriate.

It's also left unstated that a bogus `WAYLAND_SOCKET` value could cause all
sorts of weirdness if it tries to treat some other socket file descriptor as a
Wayland socket. That should generally only happen if `WAYLAND_SOCKET` is set
by buggy or malicious code though.

Fixes https://gitlab.freedesktop.org/wayland/wayland/-/work_items/424.

Signed-off-by: Ian Douglas Scott &lt;idscott@system76.com&gt;
</content>
</entry>
<entry>
<title>meson: Use can_run_host_binaries to test if the build machine can execute</title>
<updated>2026-08-17T15:40:57Z</updated>
<author>
<name>Jeremy Huddleston Sequoia</name>
<email>jeremyhu@apple.com</email>
</author>
<published>2026-08-10T12:58:18Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=28e08252c7dfd71ebc31a0c006d3dad05b0b4c68'/>
<id>urn:sha1:28e08252c7dfd71ebc31a0c006d3dad05b0b4c68</id>
<content type='text'>
Use of a cross file does not in itself indicate that we're unable to
execute the built wayland-scanner.

Switch to using meson.can_run_host_binaries(), which is the correct
check for this.

Reviewed-by: Simon Ser &lt;contact@emersion.fr&gt;
Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;
</content>
</entry>
<entry>
<title>client: Use poll() as fallback when ppoll() is unavailable</title>
<updated>2026-08-03T14:47:24Z</updated>
<author>
<name>Jeremy Huddleston Sequoia</name>
<email>jeremyhu@apple.com</email>
</author>
<published>2026-04-19T17:35:49Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=a4009b7073a96d2da46e6d8b70a3cbf4d976eeaf'/>
<id>urn:sha1:a4009b7073a96d2da46e6d8b70a3cbf4d976eeaf</id>
<content type='text'>
On platforms like darwin that lack ppoll(), fall back to poll() with
a millisecond timeout. Since the ppoll() call uses a NULL signal mask,
the behavior is equivalent.

Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;
</content>
</entry>
<entry>
<title>shm: Avoid unused variable warning !HAVE_MEMFD_CREATE case</title>
<updated>2026-08-03T14:47:24Z</updated>
<author>
<name>Jeremy Huddleston Sequoia</name>
<email>jeremyhu@apple.com</email>
</author>
<published>2023-01-28T03:44:15Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=cc4f2dda67f7dc867ec055ca3e349bb45220e4a0'/>
<id>urn:sha1:cc4f2dda67f7dc867ec055ca3e349bb45220e4a0</id>
<content type='text'>
../src/wayland-shm.c:307:14: warning: unused variable 'statbuf'
        struct stat statbuf;
                    ^
../src/wayland-shm.c:308:6: warning: unused variable 'seals'
        int seals;
            ^
2 warnings generated.

Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;
</content>
</entry>
<entry>
<title>os: Provide wl_os_socketpair_cloexec wrapper for systems without SOCK_CLOEXEC</title>
<updated>2026-08-03T14:47:24Z</updated>
<author>
<name>Weijia Wang</name>
<email>contact@weijia.wang</email>
</author>
<published>2022-07-27T23:37:50Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=332dafb5c962bd9def3fd5e897e1206aee35e47a'/>
<id>urn:sha1:332dafb5c962bd9def3fd5e897e1206aee35e47a</id>
<content type='text'>
Reviewed-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;
Signed-off-by: Weijia Wang &lt;contact@weijia.wang&gt;
</content>
</entry>
<entry>
<title>os: Use fallback implementations when *_CLOEXEC are unavailable at build time</title>
<updated>2026-08-03T14:47:24Z</updated>
<author>
<name>Jeremy Huddleston Sequoia</name>
<email>jeremyhu@apple.com</email>
</author>
<published>2023-01-27T22:52:05Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=eb098bc693cff3908e1025a5674758a4547ec285'/>
<id>urn:sha1:eb098bc693cff3908e1025a5674758a4547ec285</id>
<content type='text'>
On platforms without F_DUPFD_CLOEXEC, MSG_CMSG_CLOEXEC, or SOCK_CLOEXEC, we
should skip past their usage and just use the fcntl() fallback.

Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;
</content>
</entry>
<entry>
<title>os: Key wl_os_socket_peercred() on LOCAL_PEERCRED, not FreeBSD</title>
<updated>2026-08-03T14:47:24Z</updated>
<author>
<name>Jeremy Huddleston Sequoia</name>
<email>jeremyhu@apple.com</email>
</author>
<published>2026-08-03T07:43:51Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=67c70441637568b287f1f5de18ed9d15d31ed2d1'/>
<id>urn:sha1:67c70441637568b287f1f5de18ed9d15d31ed2d1</id>
<content type='text'>
The LOCAL_PEERCRED socket option and its struct xucred contract are not
unique to FreeBSD; darwin provides them as well. Key the existing
implementation off the socket option rather than the host OS so that
those platforms stop tripping the "Don't know how to read ucred on this
platform" #error.

Platforms whose struct xucred carries no cr_pid member (eg: darwin)
still report a pid of 0 here. This limitation can be addressed through
the use of LOCAL_PEERPID (see !290 for more details).

Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;
</content>
</entry>
<entry>
<title>build: remove redundant Meson version conditionals</title>
<updated>2026-07-20T05:24:49Z</updated>
<author>
<name>Benjamin Gilbert</name>
<email>bgilbert@backtick.net</email>
</author>
<published>2026-07-20T05:21:46Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=5a819837646842aa74cb0a1b3c74d2fe14694ac6'/>
<id>urn:sha1:5a819837646842aa74cb0a1b3c74d2fe14694ac6</id>
<content type='text'>
Fixes warning with Meson 1.12:

    src/meson.build:221: WARNING: Conditional on version '&gt;= 0.54.0' always evaluates to true

Signed-off-by: Benjamin Gilbert &lt;bgilbert@backtick.net&gt;
</content>
</entry>
<entry>
<title>WAYLAND_DEBUG: produce comparable timestamp values</title>
<updated>2026-07-09T09:00:51Z</updated>
<author>
<name>Benjamin Otte</name>
<email>otte@redhat.com</email>
</author>
<published>2026-06-02T05:29:37Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=60d6bb946c1d8a81a92830e3da557c3b1bcb31a4'/>
<id>urn:sha1:60d6bb946c1d8a81a92830e3da557c3b1bcb31a4</id>
<content type='text'>
The previous way to print timestamps would overflow and produce numbers
that didn't match any other system.
The format was also somewhat unintuitive because it was milliseconds
with the microseconds as fraction, which is a rarely used format.

Instead, use a simple HH:MM:SS.xxxxxx format that is hopefully
intuitively understandable as the POSIX/ISO8601 time format followed
by the microseconds.

Signed-off-by: Benjamin Otte &lt;otte@redhat.com&gt;
</content>
</entry>
<entry>
<title>server: add wl_display_remove_socket_fd()</title>
<updated>2026-07-03T10:57:58Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-06-05T10:04:39Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=67af3659fac3050b422198700643f5ee13932ebd'/>
<id>urn:sha1:67af3659fac3050b422198700643f5ee13932ebd</id>
<content type='text'>
Undoes wl_display_add_socket_fd(). Useful for protocols such as:
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/68

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>scanner: Remove now unused arg_count</title>
<updated>2026-04-14T12:11:51Z</updated>
<author>
<name>Hannes Schulze</name>
<email>haschu0103@outlook.de</email>
</author>
<published>2026-04-09T13:59:45Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=25da99a7e5459bd9ad565d8a5d1e0e4857f4e5f7'/>
<id>urn:sha1:25da99a7e5459bd9ad565d8a5d1e0e4857f4e5f7</id>
<content type='text'>
Signed-off-by: Hannes Schulze &lt;contact@haschu.me&gt;
</content>
</entry>
<entry>
<title>scanner: Fix types emitted for new_id arguments</title>
<updated>2026-04-14T12:11:51Z</updated>
<author>
<name>Hannes Schulze</name>
<email>haschu0103@outlook.de</email>
</author>
<published>2026-04-09T13:58:41Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=b93a50abd99e6eb547a088329b3cf0023801c746'/>
<id>urn:sha1:b93a50abd99e6eb547a088329b3cf0023801c746</id>
<content type='text'>
Previously, wayland-scanner would only emit one NULL entry in the
wl_message.types array for every argument, even though requests with
new_id arguments without an interface type additionally take a string
and a uint argument.

Signed-off-by: Hannes Schulze &lt;contact@haschu.me&gt;
</content>
</entry>
<entry>
<title>scanner: drop redundant exit() after fail()</title>
<updated>2026-04-04T03:56:38Z</updated>
<author>
<name>YaoBing Xiao</name>
<email>xiaoyaobing@uniontech.com</email>
</author>
<published>2026-04-03T09:14:24Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=74becc87619519a06c5b646b87d2469278959fd7'/>
<id>urn:sha1:74becc87619519a06c5b646b87d2469278959fd7</id>
<content type='text'>
fail() already calls exit(), so the extra exit() is never reached.
Remove it to avoid dead code.

Signed-off-by: YaoBing Xiao &lt;xiaoyaobing@uniontech.com&gt;
</content>
</entry>
<entry>
<title>util: fix use-after-free in for_each_helper</title>
<updated>2026-03-30T00:52:42Z</updated>
<author>
<name>YaNing Lu</name>
<email>luyaning@uniontech.com</email>
</author>
<published>2026-03-26T08:38:38Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=e647f6304d7491fa436047908dc559f5badf613e'/>
<id>urn:sha1:e647f6304d7491fa436047908dc559f5badf613e</id>
<content type='text'>
for_each_helper caches the entries-&gt;data pointer and array size before
iterating. If a compositor calls wl_client_for_each_resource() and the
provided callback triggers the creation of a new client object, the
underlying wl_array may be reallocated via realloc().

When this happens, the cached start pointer becomes dangling. Subsequent
iterations will read from the freed memory block, causing already-destroyed
resources to be destroyed a second time (e.g., leading to a double-free
crash in wl_list_remove()).

Fix this by dynamically re-fetching entries-&gt;data and entries-&gt;size on
every loop iteration, ensuring the iterator always accesses the valid
live array.

Signed-off-by: YaNing Lu &lt;luyaning@uniontech.com&gt;
</content>
</entry>
<entry>
<title>Send wl_registry.global_remove to global's offer list</title>
<updated>2026-03-24T11:45:00Z</updated>
<author>
<name>Vlad Zahorodnii</name>
<email>vlad.zahorodnii@kde.org</email>
</author>
<published>2026-03-14T09:03:26Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=44b26e34e510e4f31266a1e8a85986d437d0e781'/>
<id>urn:sha1:44b26e34e510e4f31266a1e8a85986d437d0e781</id>
<content type='text'>
Since the globals track the registries that received global
announcements, we can use that instead of going through all present
registries and duplicate some filtering logic.

Signed-off-by: Vlad Zahorodnii &lt;vlad.zahorodnii@kde.org&gt;
</content>
</entry>
<entry>
<title>Add wl_fixes.ack_global_remove()</title>
<updated>2026-03-24T11:45:00Z</updated>
<author>
<name>Vlad Zahorodnii</name>
<email>vlad.zahorodnii@kde.org</email>
</author>
<published>2026-03-13T15:35:27Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=c048101ca92c91b22d8504bc2beee683a629f758'/>
<id>urn:sha1:c048101ca92c91b22d8504bc2beee683a629f758</id>
<content type='text'>
The wl_global_remove() function was introduce to help mitigate clients
getting unintentionally disconnected if a global is added and removed in
a short burst.

The intended usage was:

 - the compositor calls wl_global_remove()
 - after a certain period of time, the compositor calls
   wl_global_destroy()

Unfortunately, it did not fully fix the issue due to the way monotonic
clock works on Linux. Specifically, it can tick even during sleep.

This change adds a slightly better way to handle global removal. With
the proposed changes, the clients need to signal to the compositor that
they won't bind the global anymore.

After all clients have acknowledged a wl_registry.global_remove, the
compositor can finally destroy the global.

Signed-off-by: Vlad Zahorodnii &lt;vlad.zahorodnii@kde.org&gt;
</content>
</entry>
<entry>
<title>server: improve wl_registry.bind error messages</title>
<updated>2026-03-05T17:34:24Z</updated>
<author>
<name>Kirill Primak</name>
<email>vyivel@eclair.cafe</email>
</author>
<published>2026-03-03T18:07:42Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=13d906a629650198a2b8ca47b83e2707093033e3'/>
<id>urn:sha1:13d906a629650198a2b8ca47b83e2707093033e3</id>
<content type='text'>
- Consistently use PRIu32 for global names (uint32_t)
- Use expected/got instead of have/wanted (which were used differently anyway)

Signed-off-by: Kirill Primak &lt;vyivel@eclair.cafe&gt;
</content>
</entry>
<entry>
<title>server: don't disclose the existence of invisible globals</title>
<updated>2026-03-05T17:34:24Z</updated>
<author>
<name>Kirill Primak</name>
<email>vyivel@eclair.cafe</email>
</author>
<published>2026-03-03T18:01:00Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=69aabecd1871a2544b12a9498ec614e705eecedd'/>
<id>urn:sha1:69aabecd1871a2544b12a9498ec614e705eecedd</id>
<content type='text'>
Otherwise, a client iterate over a range of names binding with deliberately
incorrect interfaces and receive error messages with expected interfaces
regardless of global visibility.

Signed-off-by: Kirill Primak &lt;vyivel@eclair.cafe&gt;
</content>
</entry>
<entry>
<title>scanner: enforce frozen attribute</title>
<updated>2026-03-05T12:00:35Z</updated>
<author>
<name>Isaac Freund</name>
<email>mail@isaacfreund.com</email>
</author>
<published>2026-02-24T11:51:02Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=c0a6e73606edb2477dc491496b0235ce1212de59'/>
<id>urn:sha1:c0a6e73606edb2477dc491496b0235ce1212de59</id>
<content type='text'>
Signed-off-by: Isaac Freund &lt;mail@isaacfreund.com&gt;
</content>
</entry>
<entry>
<title>server: improve version mismatch error message</title>
<updated>2026-03-05T11:18:53Z</updated>
<author>
<name>Kirill Primak</name>
<email>vyivel@eclair.cafe</email>
</author>
<published>2026-03-03T17:32:24Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=4d13366fcc3213f197074a3f716aec41f32f81ef'/>
<id>urn:sha1:4d13366fcc3213f197074a3f716aec41f32f81ef</id>
<content type='text'>
"1 &lt; 2" is obviously true but not very useful information by itself. Provide a
bit more context.

Signed-off-by: Kirill Primak &lt;vyivel@eclair.cafe&gt;
</content>
</entry>
<entry>
<title>util: assert alloc is consistent with data in wl_array_add()</title>
<updated>2026-03-03T09:31:53Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2026-01-30T08:57:36Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=fe3a02c18a897c7cd89d50c1300305ffb7f55d86'/>
<id>urn:sha1:fe3a02c18a897c7cd89d50c1300305ffb7f55d86</id>
<content type='text'>
struct wl_array may be constructed by users manually from a
foreign data pointer:

    uint32_t states[] = {1, 2, 3};
    struct wl_array arr = {
        .data = states,
        .size = sizeof(states) / sizeof(states[0]),
    };

This is useful to avoid the need to allocate when sending Wayland
messages.

Users need to be careful not to use wl_array_add() on such arrays:
the function will misbehave by leaving garbage at the start of the
new buffer when reallocating.

Add an assert to guard against wl_array_add() calls in this
situation, to have a clear crash instead of undefined behavior.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>client: fix crash when creating proxies with no queue</title>
<updated>2026-03-01T01:03:37Z</updated>
<author>
<name>Loïc Yhuel</name>
<email>loic.yhuel@softathome.com</email>
</author>
<published>2025-09-16T11:15:34Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=cd4e6a14517c71285acc976fe10b12e490d72a59'/>
<id>urn:sha1:cd4e6a14517c71285acc976fe10b12e490d72a59</id>
<content type='text'>
Before, it worked if the client did set a queue on the proxy before any event was received.
Now we have the "warning: queue xxx destroyed while proxies still attached", then a crash if one of
the proxies is used to create a proxy.

Fixes: 674145dc3f ("client: Track the proxies attached to a queue")
Fixes: 0ba650202e ("client: Warn when a queue is destroyed with attached proxies")
Signed-off-by: Loïc Yhuel &lt;loic.yhuel@softathome.com&gt;
</content>
</entry>
<entry>
<title>server: document protocol logger callback function</title>
<updated>2026-01-03T14:16:50Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2026-01-03T14:16:13Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=f72e3fae4a56f1e15e667cf4efc2271b8f12e31b'/>
<id>urn:sha1:f72e3fae4a56f1e15e667cf4efc2271b8f12e31b</id>
<content type='text'>
This fixes a validation error in the documentation which are not fatal.

The idea is the same as in 12ec67a ("server: document listener fields
and a vfunc"), which seems to have missed the reference to the
wl_protocol_logger_func_t from the note in wl_log_func_t.

Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>server: document listener fields and a vfunc</title>
<updated>2025-12-29T14:27:14Z</updated>
<author>
<name>Pekka Paalanen</name>
<email>pq@iki.fi</email>
</author>
<published>2025-12-28T10:33:32Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=12ec67aed517b88375d10c73ce7380ef52e515c4'/>
<id>urn:sha1:12ec67aed517b88375d10c73ce7380ef52e515c4</id>
<content type='text'>
Adding these simple documentation comments allows us to have meaningful
link targets in the generated API documentation. That will help getting
rid of broken links which cause XML validation to fail.

Signed-off-by: Pekka Paalanen &lt;pq@iki.fi&gt;
</content>
</entry>
<entry>
<title>server: fix wl_signal_add Doxygen warning</title>
<updated>2025-12-29T09:19:01Z</updated>
<author>
<name>Pekka Paalanen</name>
<email>pq@iki.fi</email>
</author>
<published>2025-12-28T08:36:16Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=d1b8f352c3f68c8394f0a3f362d19ac18479d95f'/>
<id>urn:sha1:d1b8f352c3f68c8394f0a3f362d19ac18479d95f</id>
<content type='text'>
$ meson compile -C build -v xml-Server-doc
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /home/pq/git/wayland/build -v doc/doxygen/xml/Server/combine.xslt doc/doxygen/xml/Server/index.xml
ninja: Entering directory `/home/pq/git/wayland/build'
[1/1] /home/pq/git/wayland/doc/doxygen/gen-doxygen.py --builddir=doc/doxygen/xml/Server --section=Server --output-format=xml doc/doxygen/wayland.doxygen ../doc/doxygen/../../src/wayland-util.h ../doc/doxygen/../../src/event-loop.c ../doc/doxygen/../../src/wayland-server.c ../doc/doxygen/../../src/wayland-server.h ../doc/doxygen/../../src/wayland-server-core.h ../doc/doxygen/../../src/wayland-shm.c
/home/pq/git/wayland/src/wayland-server-core.h:394: warning: explicit link request to 'wl_signal_add' could not be resolved

I don't know why, but the "explicit link" mark-up fails, while the
automatic link mark-up works. This warning disappears.

Signed-off-by: Pekka Paalanen &lt;pq@iki.fi&gt;
</content>
</entry>
<entry>
<title>build: Bump to meson version 0.64.0</title>
<updated>2025-11-27T15:39:11Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2025-10-28T11:11:10Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=c8a09967039f14081d1a36c5899cebed95210443'/>
<id>urn:sha1:c8a09967039f14081d1a36c5899cebed95210443</id>
<content type='text'>
This version will be required in the next commit.

Bumps the CI image to get the required version from the debian package
instead of from pip.

Removes the bindir builtin directory from pkgconfig.generate() which is
deprecated since 0.62.0. It will be automatically included when
referenced.

Use `meson setup` everywhere instead of relying on deprecated automatic
detection of the setup command.

Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>client: add wl_display_dispatch_pending_single</title>
<updated>2025-09-16T08:48:33Z</updated>
<author>
<name>Isaac Freund</name>
<email>mail@isaacfreund.com</email>
</author>
<published>2025-07-02T10:15:33Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=d81525a235e48cc5de3e4005a16ddb1fbdfd9d7c'/>
<id>urn:sha1:d81525a235e48cc5de3e4005a16ddb1fbdfd9d7c</id>
<content type='text'>
As well as wl_display_dispatch_queue_pending_single.

The motivation is writing libwayland bindings for a dynamic language
with exceptions/non-local returns. Since it is invalid for a
wl_dispatcher_func_t callback provided to libwayland to not return,
there is no way to prevent dispatching of further events in the case of
an exception in the dynamic language event handler.

Furthermore, since creating/destroying Wayland objects in an event
handler affects the dispatching of subsequent events by libwayland,
it is not possible to collect Wayland events in a queue outside
libwayland and dispatch them one-by-one after
wl_display_dispatch_pending() returns.

Adding libwayland API to dispatch at most one pending event solves this
problem cleanly. The bindings can have libwayland dispatch a single
event, wait for wl_display_dispatch_pending_single() to return, run the
dynamic language event handler (which may longjmp away), and continue
the loop for as long as there are more events to dispatch.

References: https://codeberg.org/ifreund/janet-wayland
Signed-off-by: Isaac Freund &lt;mail@isaacfreund.com&gt;
</content>
</entry>
<entry>
<title>connection: Add a thread ID to WAYLAND_DEBUG output.</title>
<updated>2025-09-15T13:45:53Z</updated>
<author>
<name>Kyle Brenneman</name>
<email>kbrenneman@nvidia.com</email>
</author>
<published>2024-09-10T20:36:06Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=4673ef7e9ce5de21051b64c39816a98187611966'/>
<id>urn:sha1:4673ef7e9ce5de21051b64c39816a98187611966</id>
<content type='text'>
If WAYLAND_DEBUG contains the token "thread_id", and gettid() is
available, then include the current thread ID in the output from
wl_closure_print.

If multiple threads are sending requests, then those requests can get
interleaved. That's usually fine, but for wl_surface requests and
commits, that can cause problems ranging from incorrect behavior to
protocol errors.

Being able to see which requests are sent by different threads would
make such problems much easier to diagnose.

Signed-off-by: Kyle Brenneman &lt;kbrenneman@nvidia.com&gt;
</content>
</entry>
<entry>
<title>connection: Add a function to parse WAYLAND_DEBUG tokens</title>
<updated>2025-09-15T13:45:53Z</updated>
<author>
<name>Kyle Brenneman</name>
<email>kbrenneman@nvidia.com</email>
</author>
<published>2024-09-17T23:27:37Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=77730f10a0eaac1c654d1bdc689783292bdb5f2d'/>
<id>urn:sha1:77730f10a0eaac1c654d1bdc689783292bdb5f2d</id>
<content type='text'>
Add a new function, wl_check_env_token, to scan for a token in a
comma-separated string.

Change wl_display_create in wayland-server.c and
wl_display_connect_to_fd in wayland-client.c to use that instead of a
simple substring search.

This means that WAYLAND_DEBUG will accept a value like "client,server"
but not "clientserver". But, this will make it easier to add other
tokens without worrying about overlap between them.

Signed-off-by: Kyle Brenneman &lt;kbrenneman@nvidia.com&gt;
</content>
</entry>
<entry>
<title>connection: Do not busy-loop if a message exceeds the buffer size</title>
<updated>2025-06-21T11:29:04Z</updated>
<author>
<name>Demi Marie Obenour</name>
<email>demi@invisiblethingslab.com</email>
</author>
<published>2024-08-15T01:14:49Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=adf84614ca6189fa4efc522408ffbbc4b27ae497'/>
<id>urn:sha1:adf84614ca6189fa4efc522408ffbbc4b27ae497</id>
<content type='text'>
If the length of a message exceeds the maximum length of the buffer, the
buffer size will reach its maximum value and stay there forever, with no
message ever being successfully processed.  Since libwayland uses
level-triggered epoll, this will cause the compositor to loop forever
and consume CPU time.  In libwayland 1.22 and below, there was an
explicit check that caused messages exceeding 4096 bytes to result in an
EOVERFLOW error, preventing the loop.  However, this check was removed
between d074d5290263 ("connection: Dynamically resize connection buffers").

To prevent this problem, always limit the size of messages to 4096 bytes.
Since the default and minimum buffer size is 4096 bytes, this ensures
that a single message will always fit in the buffer.  It would be
possible to allow larger messages if the buffer size was larger, but the
maximum size of a message should not depend on the buffer size chosen by
the compositor.

Rejecting messages that exceed 4092 bytes seems to have the advantage of
reserving 4 bits, not 3, in the size field for future use.  However,
message sizes in the range [0x0, 0x7] are invalid, so one can obtain a
fourth bit by negating the meaning of bit 12 if bits 0 through 11
(inclusive) are 0.  Allowing 4096-byte messages provides the far more
important advantage that regressions compared to 1.22 are impossible
and regressions compared to 1.23 are extremely unlikely.  The only case
where a regression is possible is:

- The receiving side is using libwayland 1.23.
- The sending side is either using libwayland 1.23 or is not using
  libwayland.
- The sender sends a message exceeding 4096 bytes.
- If the sender of the large message is the client, the server has
  increased the buffer size from the default value.

This combination is considered extremely unlikely, as libwayland 1.22
and below would disconnect upon receiving such a large message.
4096-byte messages, however, have always worked, so there was no reason
to avoid sending them.

Fixes: d074d5290263 ("connection: Dynamically resize connection buffers").
Fixes: #494
Signed-off-by: Demi Marie Obenour &lt;demi@invisiblethingslab.com&gt;
</content>
</entry>
<entry>
<title>server: Document wl_display_add_socket_auto</title>
<updated>2025-06-08T16:20:35Z</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2021-03-03T04:24:16Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=387adc6a794df6bee114396612d5a6accab318c3'/>
<id>urn:sha1:387adc6a794df6bee114396612d5a6accab318c3</id>
<content type='text'>
The exact sequence of names tried has de facto become part of the API.

Signed-off-by: Manuel Stoeckl &lt;code@mstoeckl.com&gt;
</content>
</entry>
<entry>
<title>client: fix conversion specifier in the discarded event log message</title>
<updated>2025-06-01T11:56:34Z</updated>
<author>
<name>Kirill Primak</name>
<email>vyivel@eclair.cafe</email>
</author>
<published>2025-05-28T18:40:17Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=6281ccbd3d98ef0a6503425e3e7d705e3075e265'/>
<id>urn:sha1:6281ccbd3d98ef0a6503425e3e7d705e3075e265</id>
<content type='text'>
Signed-off-by: Kirill Primak &lt;vyivel@eclair.cafe&gt;
</content>
</entry>
<entry>
<title>debug: Colorize output for easier reading</title>
<updated>2025-06-01T11:21:36Z</updated>
<author>
<name>Caitlyn</name>
<email>caitlynrosestewart@gmail.com</email>
</author>
<published>2025-05-27T21:40:14Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=ecff0ee10c335f8f71251e67d615f4f719b6cbe1'/>
<id>urn:sha1:ecff0ee10c335f8f71251e67d615f4f719b6cbe1</id>
<content type='text'>
Signed-off-by: Caitlyn &lt;caitlynrosestewart@gmail.com&gt;
</content>
</entry>
<entry>
<title>connection: fix segfault in wl_closure_invoke()</title>
<updated>2025-05-27T13:45:32Z</updated>
<author>
<name>Caitlyn Stewart</name>
<email>caitlynrosestewart@gmail.com</email>
</author>
<published>2025-05-27T12:09:24Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=827d0c30adc4519fafa7a9c725ff355b1d4fa3bd'/>
<id>urn:sha1:827d0c30adc4519fafa7a9c725ff355b1d4fa3bd</id>
<content type='text'>
Signed-off-by: Caitlyn Stewart &lt;caitlynrosestewart@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fix typos</title>
<updated>2025-05-20T20:49:32Z</updated>
<author>
<name>Tobias Stoeckmann</name>
<email>tobias@stoeckmann.org</email>
</author>
<published>2024-09-12T13:26:26Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=cc06c3825f38ab069ff787311c9ec9f172579347'/>
<id>urn:sha1:cc06c3825f38ab069ff787311c9ec9f172579347</id>
<content type='text'>
Typos found with codespell and during code audit.

Signed-off-by: Tobias Stoeckmann &lt;tobias@stoeckmann.org&gt;
</content>
</entry>
<entry>
<title>server: add wl_resource_get_interface()</title>
<updated>2025-05-20T20:31:16Z</updated>
<author>
<name>Isaac Freund</name>
<email>mail@isaacfreund.com</email>
</author>
<published>2025-05-06T21:48:57Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=8cad6f7b826546e4faa2d366aed898b5651f73b4'/>
<id>urn:sha1:8cad6f7b826546e4faa2d366aed898b5651f73b4</id>
<content type='text'>
This is useful for the wayland bindings/scanner I'm working on for a
dynamically typed language.

Signed-off-by: Isaac Freund &lt;mail@isaacfreund.com&gt;
</content>
</entry>
<entry>
<title>client: add wl_proxy_get_interface()</title>
<updated>2025-05-20T20:31:16Z</updated>
<author>
<name>Isaac Freund</name>
<email>mail@isaacfreund.com</email>
</author>
<published>2025-05-06T21:45:17Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=44972321025e6b34cd5544c2053559c64f1b29af'/>
<id>urn:sha1:44972321025e6b34cd5544c2053559c64f1b29af</id>
<content type='text'>
This is useful for the wayland bindings/scanner I'm working on for a
dynamically typed language.

Signed-off-by: Isaac Freund &lt;mail@isaacfreund.com&gt;
</content>
</entry>
<entry>
<title>shm: linkify function references in docs</title>
<updated>2025-05-20T20:14:52Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2025-03-15T22:52:50Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=66fc3f007dca7b3e526e86475d3ec74d30d363b8'/>
<id>urn:sha1:66fc3f007dca7b3e526e86475d3ec74d30d363b8</id>
<content type='text'>
Parentheses make it so the generated HTML documentation contains
links, which makes navigation easier.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>shm: fix comment about wl_shm_buffer_begin_access() safety</title>
<updated>2025-05-20T20:14:52Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2025-03-15T22:49:43Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=9dd1b2d7e3eb89b5161431c99a6aca8f284621ae'/>
<id>urn:sha1:9dd1b2d7e3eb89b5161431c99a6aca8f284621ae</id>
<content type='text'>
The paragraph later says that accessing different buffers is
allowed. The function checks whether the same pool is accessed.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>shm: Generate an error when shm access failed even without a resource</title>
<updated>2025-05-20T19:50:22Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2025-03-21T18:43:23Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=d2a3d33063ea0266eee55a54c8bb1d65a7acaca9'/>
<id>urn:sha1:d2a3d33063ea0266eee55a54c8bb1d65a7acaca9</id>
<content type='text'>
Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>shm: Add wl_shm_buffer ref and unref functions</title>
<updated>2025-05-20T19:50:22Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2025-03-21T18:42:52Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=9367c4da76c9fd118d505e40ad5d554e8fe249a1'/>
<id>urn:sha1:9367c4da76c9fd118d505e40ad5d554e8fe249a1</id>
<content type='text'>
Shared memory buffers are currently tied to the lifetime of their
underlying wl_buffer resource. This becomes problematic when the client
destroys the resource after committing new state which references the
wl_buffer because a compositor might have to defer applying the commit.

This commit adds methods to keep the wl_shm_buffer alive longer than the
underlying resource. This implicitly also keeps the buffer pool alive
and because the wl_shm_buffer uses offsets into the pool, it even works
when the underlying storage gets remapped somewhere else, which can
happen when the client resizes the pool.

Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>shm: Remove refcount check which cannot be triggered</title>
<updated>2025-05-20T19:50:09Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2025-05-20T19:39:45Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=af453f876e44f4cb990acc92b50d130e6efed667'/>
<id>urn:sha1:af453f876e44f4cb990acc92b50d130e6efed667</id>
<content type='text'>
If the pool refcount reaches zero, it is freed, so accessing its members
is UB which ASan would catch.

Also simplify check for negative refcounts.

Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>shm: Linkify wl_shm_pool_unref in the ref_pool documentation</title>
<updated>2025-05-20T19:30:56Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2025-05-20T19:30:56Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=9ec01ab2dc08c1c60ec4fcf7df8defa652c52ae8'/>
<id>urn:sha1:9ec01ab2dc08c1c60ec4fcf7df8defa652c52ae8</id>
<content type='text'>
Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>client: document get_listener behavior for dispatchers</title>
<updated>2025-03-15T23:07:39Z</updated>
<author>
<name>Julian Orth</name>
<email>ju.orth@gmail.com</email>
</author>
<published>2025-03-12T20:13:40Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=7033e74857a01cd8fc07cd2e6336d8bfe43cbed5'/>
<id>urn:sha1:7033e74857a01cd8fc07cd2e6336d8bfe43cbed5</id>
<content type='text'>
This seems to have been the case since 2013.

This is useful for wrappers that need two pointers to identify proxies.
One pointer (stored in the user data) pointing to a singleton object to
identify that the proxy has a known structure. And one pointer (stored
in the dispatcher data) pointing to per-proxy data.

Signed-off-by: Julian Orth &lt;ju.orth@gmail.com&gt;
</content>
</entry>
<entry>
<title>scanner: use separate guards for validator functions</title>
<updated>2025-02-23T22:38:15Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2025-02-23T22:38:15Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=dbfa8d784eed0949f3dd50c19a58873b5deb32c6'/>
<id>urn:sha1:dbfa8d784eed0949f3dd50c19a58873b5deb32c6</id>
<content type='text'>
Generated XXX_is_valid() functions for enums are guarded behind the
same #define as the enum itself. This worked fine until recently,
but since fbd7460737c9 ("scanner: add new enum-header mode") we're
also generating enum-only headers.

When including the enum-only header first, and then the server
header, the validator functions are missing.

Define a separate guard to fix this.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>Forward declarate timespec struct</title>
<updated>2025-02-06T10:18:17Z</updated>
<author>
<name>Vlad Zahorodnii</name>
<email>vlad.zahorodnii@kde.org</email>
</author>
<published>2025-02-05T20:41:33Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=1ab6b693b16e1d9734496fe60c8a6ed277e4dec3'/>
<id>urn:sha1:1ab6b693b16e1d9734496fe60c8a6ed277e4dec3</id>
<content type='text'>
The `timespec` struct is defined in `time.h` header but only if
`_POSIX_C_SOURCE` is set or when using the C11 standard.

Signed-off-by: Vlad Zahorodnii &lt;vlad.zahorodnii@kde.org&gt;
</content>
</entry>
<entry>
<title>Also use [[deprecated]] when compiling with at least C++14</title>
<updated>2025-02-05T08:43:21Z</updated>
<author>
<name>David Redondo</name>
<email>kde@david-redondo.de</email>
</author>
<published>2025-02-05T08:27:22Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=afd498b6f561b82b88bf1b647209c9ef0dca9e94'/>
<id>urn:sha1:afd498b6f561b82b88bf1b647209c9ef0dca9e94</id>
<content type='text'>
Signed-off-by: David Redondo &lt;kde@david-redondo.de&gt;
</content>
</entry>
<entry>
<title>Make wayland-util.h -Wundef safe when compiled by a C++ compiler</title>
<updated>2025-02-05T08:21:43Z</updated>
<author>
<name>David Redondo</name>
<email>kde@david-redondo.de</email>
</author>
<published>2025-02-05T08:21:43Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=7c2ffb0d712ca1aafbfa94c71f80226490bcbd28'/>
<id>urn:sha1:7c2ffb0d712ca1aafbfa94c71f80226490bcbd28</id>
<content type='text'>
Fixes #522
Signed-off-by: David Redondo &lt;kde@david-redondo.de&gt;
</content>
</entry>
<entry>
<title>build: Add -lm to pkg-config dependencies</title>
<updated>2025-02-05T06:52:53Z</updated>
<author>
<name>Daniel Stone</name>
<email>daniels@collabora.com</email>
</author>
<published>2025-01-29T13:27:44Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=02ad102e2d2d0dbb9529d00ab52ca4ff276d2ae3'/>
<id>urn:sha1:02ad102e2d2d0dbb9529d00ab52ca4ff276d2ae3</id>
<content type='text'>
Now that wl_fixed_from_double() calls round() from a function declared
in a header, our users need to explicitly pick that dependency up in
order to avoid build errors.

Signed-off-by: Daniel Stone &lt;daniels@collabora.com&gt;
Closes: wayland/weston#991
</content>
</entry>
<entry>
<title>client: Add wl_display_dispatch_timeout</title>
<updated>2025-02-04T14:09:51Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2024-02-07T17:59:14Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=00dcf6b32386a63055fc04817256dc71efad1800'/>
<id>urn:sha1:00dcf6b32386a63055fc04817256dc71efad1800</id>
<content type='text'>
A variant of wl_display_dispatch_queue_timeout for the default queue.

Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>client: Add wl_display_dispatch_queue_timeout</title>
<updated>2025-02-04T14:09:51Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2024-02-07T18:00:46Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=ddd348da7ea0889056843cf252729185d306b7b8'/>
<id>urn:sha1:ddd348da7ea0889056843cf252729185d306b7b8</id>
<content type='text'>
For dispatching messages on a queue with a timeout.

This slightly changes the samantics of wl_display_dispatch. Previously
it was possible for it to return even though there wasn't a single
dispatched event. The function correctly returned 0 in this case but it
is now used to indicate a timeout.

Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>event-loop: Use timespec utils instead of hand-rolling our own</title>
<updated>2025-02-04T14:09:51Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2024-02-07T17:46:58Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=ff8b88552358b6977043db0d6ee0cac7d7abfa0c'/>
<id>urn:sha1:ff8b88552358b6977043db0d6ee0cac7d7abfa0c</id>
<content type='text'>
Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>timespec: Implement saturating timespec substraction</title>
<updated>2025-02-04T14:09:51Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2024-02-07T17:53:16Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=893e4fc46d31d1cc51c1e39481f5659a40152233'/>
<id>urn:sha1:893e4fc46d31d1cc51c1e39481f5659a40152233</id>
<content type='text'>
Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>timespec: Pull in timespec_after and timespec_add from mesa</title>
<updated>2025-02-04T14:09:51Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2024-02-07T17:51:39Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=9d5de6062ba82a56d25d8a53ccace3afecbf50e5'/>
<id>urn:sha1:9d5de6062ba82a56d25d8a53ccace3afecbf50e5</id>
<content type='text'>
Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>timespec: Pull in timespec.h from weston</title>
<updated>2025-02-04T14:09:51Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2024-02-07T18:00:37Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=37469d5ceda49ef7551a0fe94f7886f863f76408'/>
<id>urn:sha1:37469d5ceda49ef7551a0fe94f7886f863f76408</id>
<content type='text'>
Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>server: add const qualifier to function arguments where possible</title>
<updated>2025-01-22T14:28:50Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2023-07-06T16:18:37Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=bdba21ec92bf582f606806ad5fd15107979d8947'/>
<id>urn:sha1:bdba21ec92bf582f606806ad5fd15107979d8947</id>
<content type='text'>
Makes it possible to e.g. `call wl_client_get_credentials` with a `const
struct wl_client *` from a global filter callback.

Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>util: reduce error of wl_fixed_from_double()</title>
<updated>2025-01-09T00:58:32Z</updated>
<author>
<name>Haihua Hu</name>
<email>jared.hu@nxp.com</email>
</author>
<published>2025-01-06T12:55:37Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=f246e619d17deb92f414315d1747a9b7aca659b9'/>
<id>urn:sha1:f246e619d17deb92f414315d1747a9b7aca659b9</id>
<content type='text'>
when cast double to fixed pointer, there will be big
error, eg 1919.9998 to 1919. Call round before cast
to get nearest value 1920 of 1919.9998

Signed-off-by: Haihua Hu &lt;jared.hu@nxp.com&gt;
</content>
</entry>
<entry>
<title>connection: Fix wrong format string</title>
<updated>2024-11-30T21:02:55Z</updated>
<author>
<name>Demi Marie Obenour</name>
<email>demi@invisiblethingslab.com</email>
</author>
<published>2024-08-05T16:59:21Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=9cb3d7aa9dc995ffafdbdef7ab86a949d0fb0e7d'/>
<id>urn:sha1:9cb3d7aa9dc995ffafdbdef7ab86a949d0fb0e7d</id>
<content type='text'>
Prevents undefined behavior if there is not enough space in the buffer
for a queued message.

Signed-off-by: Demi Marie Obenour &lt;demi@invisiblethingslab.com&gt;
</content>
</entry>
<entry>
<title>connection: Avoid undefined pointer arithmetic</title>
<updated>2024-11-30T00:19:45Z</updated>
<author>
<name>Demi Marie Obenour</name>
<email>demi@invisiblethingslab.com</email>
</author>
<published>2024-07-25T01:18:40Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=4273a5edc862bd5f620ad0c7f11d20cd040e005c'/>
<id>urn:sha1:4273a5edc862bd5f620ad0c7f11d20cd040e005c</id>
<content type='text'>
Creating a pointer that is more than one element past the end of an
array is undefined behavior, even if the pointer is not dereferenced.
Avoid this undefined behavior by using `p &gt;= end` instead of
`p + 1 &gt; end` and `SOMETHING &gt; end - p` instead of
`p + SOMETHING &gt; end`.

Signed-off-by: Demi Marie Obenour &lt;demi@invisiblethingslab.com&gt;
</content>
</entry>
<entry>
<title>connection: Reject strings containing NUL bytes</title>
<updated>2024-08-18T17:08:56Z</updated>
<author>
<name>Demi Marie Obenour</name>
<email>demi@invisiblethingslab.com</email>
</author>
<published>2024-07-25T01:20:12Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=6c4a695045155583a99f3fbce7bb745f79c2e726'/>
<id>urn:sha1:6c4a695045155583a99f3fbce7bb745f79c2e726</id>
<content type='text'>
libwayland cannot construct these messages as it uses strlen() to
determine string lengths.  libwayland is also guaranteed to misinterpret
these messages, since message handlers only get a pointer and no length.
Therefore, reject strings containing NUL bytes.

Also remove a redundant check from the unmarshalling code.  The
zero-length case has already been checked for.

Signed-off-by: Demi Marie Obenour &lt;demi@invisiblethingslab.com&gt;
</content>
</entry>
<entry>
<title>client: Log the object and methods when marshalling or sending fails</title>
<updated>2024-08-12T19:49:14Z</updated>
<author>
<name>Fangzhou Ge</name>
<email>fangzhoug@chromium.org</email>
</author>
<published>2024-08-07T18:21:20Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=5b692b50b9e3d379005633d4ac20068d2069849d'/>
<id>urn:sha1:5b692b50b9e3d379005633d4ac20068d2069849d</id>
<content type='text'>
The log that appears before a display_error can be captured as crash
signature. Useful to know what it is.

This is cherry-picked from chromium https://crrev.com/c/4697877

Signed-off-by: Fangzhou Ge &lt;fangzhoug@chromium.org&gt;
</content>
</entry>
<entry>
<title>src: Finish assert() clean-up</title>
<updated>2024-08-09T20:38:52Z</updated>
<author>
<name>Derek Foreman</name>
<email>derek.foreman@collabora.com</email>
</author>
<published>2024-07-16T11:31:13Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=58bb6c721126c12ab644bee557bef6825562440a'/>
<id>urn:sha1:58bb6c721126c12ab644bee557bef6825562440a</id>
<content type='text'>
From cleanup commit 0cecde304:
assert()s can be compiled away by #defining NDEBUG. Some build systems
do this. Using wl_abort gives a human readable error message and it
isn't compiled away.

That commit missed one final assert, presumably due to missing it with
grep because of a coding style issue. Fix that up, and remove inclusion
of &lt;assert.h&gt; as appropriate.

Signed-off-by: Derek Foreman &lt;derek.foreman@collabora.com&gt;
</content>
</entry>
<entry>
<title>server: expose wl_resource_post_error_vargs()</title>
<updated>2024-08-09T20:29:24Z</updated>
<author>
<name>Kirill Primak</name>
<email>vyivel@eclair.cafe</email>
</author>
<published>2024-05-23T16:25:40Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=65454cf7db29933d4931dfbe14461a59cc64944d'/>
<id>urn:sha1:65454cf7db29933d4931dfbe14461a59cc64944d</id>
<content type='text'>
Signed-off-by: Kirill Primak &lt;vyivel@eclair.cafe&gt;
</content>
</entry>
<entry>
<title>server: add wl_resource_post_error() docs</title>
<updated>2024-08-09T20:29:24Z</updated>
<author>
<name>Kirill Primak</name>
<email>vyivel@eclair.cafe</email>
</author>
<published>2024-05-23T16:25:05Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=64248963d31395b373e095972f46f61fb95bf462'/>
<id>urn:sha1:64248963d31395b373e095972f46f61fb95bf462</id>
<content type='text'>
Signed-off-by: Kirill Primak &lt;vyivel@eclair.cafe&gt;
</content>
</entry>
<entry>
<title>Put WL_DEPRECATED in front of the function declarations</title>
<updated>2024-08-09T20:25:11Z</updated>
<author>
<name>Kirill Primak</name>
<email>vyivel@eclair.cafe</email>
</author>
<published>2024-06-29T12:05:00Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=a6a4e081da12140ffe1881d83be0981966ba6daf'/>
<id>urn:sha1:a6a4e081da12140ffe1881d83be0981966ba6daf</id>
<content type='text'>
This fixes the following clang error when using C23:

../src/wayland-server-core.h:680:41: error: 'deprecated' attribute cannot be applied to types
  680 |                      int32_t stride, uint32_t format) WL_DEPRECATED;
      |                                                       ^
../src/wayland-util.h:52:25: note: expanded from macro 'WL_DEPRECATED'
   52 | #define WL_DEPRECATED [[deprecated]]
      |                         ^

Signed-off-by: Kirill Primak &lt;vyivel@eclair.cafe&gt;
</content>
</entry>
<entry>
<title>client: Handle proxies with no queue</title>
<updated>2024-07-26T16:33:28Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian.wick@redhat.com</email>
</author>
<published>2024-07-26T14:35:15Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=f6f0a3cdec1c23c0adfe1deb9c53e8fdbb998ea4'/>
<id>urn:sha1:f6f0a3cdec1c23c0adfe1deb9c53e8fdbb998ea4</id>
<content type='text'>
wl_proxy_get_queue can return NULL if the queue of the proxy was already
destroyed with wl_event_queue_destroy. In this case, the queue also has
no name anymore.

Fixes: b42218f ("client: Allow setting names for queues")
Signed-off-by: Sebastian Wick &lt;sebastian.wick@redhat.com&gt;
</content>
</entry>
<entry>
<title>src: switch asserts to wl_abort</title>
<updated>2024-07-11T17:44:04Z</updated>
<author>
<name>meltq</name>
<email>tejasvipin76@gmail.com</email>
</author>
<published>2024-06-30T17:06:11Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=0cecde304f4f78b439d2edaaab6d9b543b30a5c0'/>
<id>urn:sha1:0cecde304f4f78b439d2edaaab6d9b543b30a5c0</id>
<content type='text'>
assert()s can be compiled away by #defining NDEBUG. Some build systems
do this. Using wl_abort gives a human readable error message and it
isn't compiled away. This commit closes issue #230.

Signed-off-by: meltq &lt;tejasvipin76@gmail.com&gt;
</content>
</entry>
<entry>
<title>scanner: fix validator for bitfields</title>
<updated>2024-07-09T16:22:10Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2024-07-07T16:39:51Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=c669d992599d74af2762fbf71a4336af2e311c45'/>
<id>urn:sha1:c669d992599d74af2762fbf71a4336af2e311c45</id>
<content type='text'>
Bitfields are valid if the value only contains bits inside of
the supported entries for the given version.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>scanner: extract validator function emission to helper function</title>
<updated>2024-07-09T16:22:10Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2024-07-07T16:21:30Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=caaa308c0d4025928917115c98c75edf7c796cd4'/>
<id>urn:sha1:caaa308c0d4025928917115c98c75edf7c796cd4</id>
<content type='text'>
This function will grow in the next commit.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>server: document wl_display_add_socket_fd() ownership</title>
<updated>2024-05-22T08:55:03Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-06-05T09:59:31Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=4bade6293806986500c517d3b0df571b1bf95d2d'/>
<id>urn:sha1:4bade6293806986500c517d3b0df571b1bf95d2d</id>
<content type='text'>
wl_socket_destroy() will close the socket.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>server: Clarify fd ownership in wl_client_create()</title>
<updated>2024-05-16T09:57:42Z</updated>
<author>
<name>Vlad Zahorodnii</name>
<email>vlad.zahorodnii@kde.org</email>
</author>
<published>2024-05-16T09:39:17Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=17965d99e85410f20896c8d353082bd88ba87569'/>
<id>urn:sha1:17965d99e85410f20896c8d353082bd88ba87569</id>
<content type='text'>
It's unclear whether one needs to call close() if wl_client_create()
fails. Hopefully this change makes it more clear.

Signed-off-by: Vlad Zahorodnii &lt;vlad.zahorodnii@kde.org&gt;
</content>
</entry>
<entry>
<title>client: print debug events that have no listener</title>
<updated>2024-04-24T16:40:18Z</updated>
<author>
<name>Derek Foreman</name>
<email>derek.foreman@collabora.com</email>
</author>
<published>2024-04-20T16:21:04Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=e60c631ff2860de1d9f064f4f438c0412a6dea6b'/>
<id>urn:sha1:e60c631ff2860de1d9f064f4f438c0412a6dea6b</id>
<content type='text'>
Currently WAYLAND_DEBUG text ignores events that have no listener.

It can be helpful to know when you're receiving unhandled events,
as you may have forgotten to add a listener, or adding a dispatch
may have magically seemed to fix code that doesn't appear to be
dispatching anything.

Signed-off-by: Derek Foreman &lt;derek.foreman@collabora.com&gt;
</content>
</entry>
<entry>
<title>client: fix invalid doc command for WL_MARSHAL_FLAG_DESTROY</title>
<updated>2024-04-24T16:27:50Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2024-04-17T11:39:27Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=6e1db539168562020203498d97f8222cd06a4a43'/>
<id>urn:sha1:6e1db539168562020203498d97f8222cd06a4a43</id>
<content type='text'>
Fixes the following warning:

    src/wayland-client-core.h:125: warning: Found non-existing group 'wl_proxy' for the command '@ingroup', ignoring command

"\memberof" cannot be used here because it only works on functions.
The docs for "\memberof" say that "\relates" works in a similar way.

While at it, use a "\" command instead of a "@" command for
consistency with the rest of the file.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>Add support for the deprecated-since XML attribute</title>
<updated>2024-04-24T16:18:28Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-07-19T10:50:34Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=ee12e69b8fb8c55460126e4e527eb4f7fee5526e'/>
<id>urn:sha1:ee12e69b8fb8c55460126e4e527eb4f7fee5526e</id>
<content type='text'>
This marks a request, event or enum entry as deprecated since a
given version.

Note that it's not clear what it means if an entry is deprecated
at some version, and the enum is used from some completely different
interface than where it was defined. However, that's a more general
issue with enums, see:
https://gitlab.freedesktop.org/wayland/wayland/-/issues/435

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
References: https://gitlab.freedesktop.org/wayland/wayland/-/issues/89
</content>
</entry>
<entry>
<title>scanner: add validators for enums</title>
<updated>2024-04-23T09:17:02Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2022-09-17T08:53:56Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=b258d5f36137088e5cb5ae097db7964290da7d55'/>
<id>urn:sha1:b258d5f36137088e5cb5ae097db7964290da7d55</id>
<content type='text'>
Right now compositors need to manually check that enum values sent
by the client are valid. In particular:

- Check that the value sent by the client is not outside of the enum.
- Check that the version of the enum entry is consistent with the
  object version.

Automatically generate validator functions to perform these tasks.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/104
</content>
</entry>
<entry>
<title>connection: Dynamically resize connection buffers</title>
<updated>2024-04-08T14:05:32Z</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2021-09-26T02:34:44Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=d074d52902633d8700ce06b484508db0f8fba02b'/>
<id>urn:sha1:d074d52902633d8700ce06b484508db0f8fba02b</id>
<content type='text'>
When using fixed size connection buffers, if either the client or the
server is sending requests faster than the other end can cope with, the
connection buffers will fill up, eventually killing the connection.

This can be a problem for example with Xwayland mapping a lot of
windows, faster than the Wayland compositor can cope with, or a
high-rate mouse flooding the Wayland client with pointer events.

To avoid the issue, resize the connection buffers dynamically when they
get full.

Both data and fd buffers are resized on demand.

The default max buffer size is controlled via the wl_display interface
while each client's connection buffer size is adjustable for finer
control.

The purpose is to explicitly have larger connection buffers for specific
clients such as Xwayland, or set a larger buffer size for the client
with pointer focus to deal with a higher input events rate.

v0: Manuel:
   Dynamically resize connection buffers - Both data and fd buffers are
   resized on demand.
v1: Olivier
1. Add support for unbounded buffers on the client side and growable
   (yet limited) connection buffers on the server side.
2. Add the API to set the default maximum size and a limit for a given
   client.
3. Add tests for growable connection buffers and adjustable limits.
v2: Additional fixes by John:
1. Fix the size calculation in ring_buffer_check_space()
2. Fix wl_connection_read() to return gracefully once it has read up to
   the max buffer size, rather than returning an error.
3. If wl_connection_flush() fails with EAGAIN but the transmit
   ring-buffer has space remaining (or can be expanded),
   wl_connection_queue() should store the message rather than
   returning an error.
4. When the receive ring-buffer is at capacity but more data is
   available to be read, wl_connection_read() should attempt to
   expand the ring-buffer in order to read the remaining data.
v3: Thomas Lukaszewicz &lt;tluk@chromium.org&gt;
   Add a test for unbounded buffers
v4: Add a client API as well to force bounded buffers (unbounded
    by default (Olivier)
v5: Simplify ring_buffer_ensure_space() (Sebastian)

Co-authored-by: Olivier Fourdan &lt;ofourdan@redhat.com&gt;
Co-authored-by: John Lindgren &lt;john@jlindgren.net&gt;
Co-authored-by: Sebastian Wick &lt;sebastian@sebastianwick.net&gt;
Signed-off-by: Manuel Stoeckl &lt;code@mstoeckl.com&gt;
Signed-off-by: Olivier Fourdan &lt;ofourdan@redhat.com&gt;
Signed-off-by: John Lindgren &lt;john@jlindgren.net&gt;
Signed-off-by: Sebastian Wick &lt;sebastian@sebastianwick.net&gt;
Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/237
</content>
</entry>
<entry>
<title>util: convert macros to inline functions</title>
<updated>2024-03-28T16:56:34Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2024-03-28T14:33:41Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=36cef8653fe57eff7d38fc0f4877bb900b1a21ea'/>
<id>urn:sha1:36cef8653fe57eff7d38fc0f4877bb900b1a21ea</id>
<content type='text'>
Functionally equivalent except the usual macro footguns are avoided
and type safety is increased.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>scanner: add new enum-header mode</title>
<updated>2024-03-28T13:21:28Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-05-03T10:18:07Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=fbd7460737c9cbae943bbc5d68a0fc6ca753c4d8'/>
<id>urn:sha1:fbd7460737c9cbae943bbc5d68a0fc6ca753c4d8</id>
<content type='text'>
This generates a header with only enum definitions. This is useful
to share enum headers between libraries and library users.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>util: fix undefined behavior in wl_array_for_each</title>
<updated>2024-03-25T00:00:01Z</updated>
<author>
<name>David Benjamin</name>
<email>davidben@google.com</email>
</author>
<published>2024-03-24T23:43:58Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=8a7ecd774c4032f30949665b42910c2d2cae53f2'/>
<id>urn:sha1:8a7ecd774c4032f30949665b42910c2d2cae53f2</id>
<content type='text'>
If a wl_array has size zero, wl_array_for_each computes NULL + 0 to get
to the end pointer. This should be fine, and indeed it would be fine in
C++. But the C specification has a mistake here and it is actually
undefined behavior. See
https://davidben.net/2024/01/15/empty-slices.html

Clang's -fsanitize=undefined flags this. I ran into this in Chromium's
build with wayland-scanner on one of our XML files.

../../third_party/wayland/src/src/scanner.c:1853:2: runtime error: applying zero offset to null pointer
    #0 0x55c979b8e02c in emit_code third_party/wayland/src/src/scanner.c:1853:2
    #1 0x55c979b89323 in main third_party/wayland/src/src/scanner.c
    #2 0x7f8dfdb8c6c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #3 0x7f8dfdb8c784 in __libc_start_main csu/../csu/libc-start.c:360:3
    #4 0x55c979b70f39 in _start (...)

An empty XML file is sufficient to hit this case, so I've added it as a
test. To reproduce, undo the fix and include only the test, then build
with:

  CC=clang CFLAGS="-fno-sanitize-recover=undefined" meson build/ -Db_sanitize=undefined -Db_lundef=false
  ninja -C build test

Signed-off-by: David Benjamin &lt;davidben@google.com&gt;
</content>
</entry>
<entry>
<title>connection: use enum wl_arg_type in wl_message_count_arrays()</title>
<updated>2024-03-06T18:09:35Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2024-03-06T18:08:53Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=44b1c0c737f3e877d98ea99459cda828bc1ff0a5'/>
<id>urn:sha1:44b1c0c737f3e877d98ea99459cda828bc1ff0a5</id>
<content type='text'>
Missed it in 155dd63b58b8 ("Introduce enum wl_arg_type").

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>client: simplify create_proxies() loop</title>
<updated>2024-03-06T13:18:37Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2024-02-27T11:30:03Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=440defbd2ba3379b0519ce4f0381bdbe181ce58d'/>
<id>urn:sha1:440defbd2ba3379b0519ce4f0381bdbe181ce58d</id>
<content type='text'>
Decrease the indentation a bit. No functional change.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>client: simplify create_outgoing_proxy() loop</title>
<updated>2024-03-06T13:18:18Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2024-02-27T11:28:39Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=7a1e7dd54963fad696aa7a1305440945ba3761d1'/>
<id>urn:sha1:7a1e7dd54963fad696aa7a1305440945ba3761d1</id>
<content type='text'>
Decrease the indentation a bit. No functional change.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>connection: simplify wl_closure_lookup_objects() loop</title>
<updated>2024-03-06T13:18:18Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2024-02-27T11:23:34Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=830883e5b2d3ec20a4f73258bdd97d12e5e9c9bc'/>
<id>urn:sha1:830883e5b2d3ec20a4f73258bdd97d12e5e9c9bc</id>
<content type='text'>
Decrease the indentation a bit. No functional change.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>Introduce enum wl_arg_type</title>
<updated>2024-03-06T13:17:48Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2024-02-15T09:37:34Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=155dd63b58b8fc10d58fa03d6398d1673cea6062'/>
<id>urn:sha1:155dd63b58b8fc10d58fa03d6398d1673cea6062</id>
<content type='text'>
This is less cryptic to read than letters, and allows the compiler
to check switch statements exhaustiveness.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>Mitigate UAF crashes due to wl_client_destroy reentrancy</title>
<updated>2024-02-23T00:40:32Z</updated>
<author>
<name>Thomas Lukaszewicz</name>
<email>tluk@chromium.org</email>
</author>
<published>2024-01-05T00:50:49Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=47de87263c88d3e23c7d7eb6d56ff75ddc8a02ef'/>
<id>urn:sha1:47de87263c88d3e23c7d7eb6d56ff75ddc8a02ef</id>
<content type='text'>
There are situations in which a call into wl_client_destroy() can
result in a reentrant call into wl_client_destroy() - which
results in UAF / double free crashes.

For example, this can occur in the following scenario.

1. Server receives a message notifying it that a client has
   disconnected (WL_EVENT_HANGUP [1])

2. This beings client destruction with a call to wl_client_destroy()

3. wl_client_destroy() kicks off callbacks as client-associated
   resources are cleaned up and their destructors and destruction
   signals are invoked.

4. These callbacks eventually lead to an explicit call to
   wl_display_flush_clients() as the server attempts to flush
   events to other connected clients.

5. Since the client has already begun destruction, when it is
   reached in the iteration the flush fails wl_client_destroy()
   is called again [2].

This patch guards against this reentrant condition by removing
the client from the display's client list when wl_client_destroy()
is first called. This prevents access / iteration over the client
after wl_client_destroy() is called.

In the example above, wl_display_flush_clients() will pass over
the client currently undergoing destruction and the reentrant
call is avoided.

[1] https://gitlab.freedesktop.org/wayland/wayland/-/blob/8f499bf4045f88f3a4b4b0a445befca467bebe20/src/wayland-server.c#L342

[2] https://gitlab.freedesktop.org/wayland/wayland/-/blob/8f499bf4045f88f3a4b4b0a445befca467bebe20/src/wayland-server.c#L1512

Signed-off-by: Thomas Lukaszewicz [thomaslukaszewicz@gmail.com](mailto:thomaslukaszewicz@gmail.com)
</content>
</entry>
<entry>
<title>build: fix build and provide compat for OpenBSD</title>
<updated>2024-02-21T15:46:41Z</updated>
<author>
<name>Sébastien Marie</name>
<email>semarie@online.fr</email>
</author>
<published>2024-01-19T16:09:27Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=d80bce5f1a0917c013aac54e3f951ffe740d0cbe'/>
<id>urn:sha1:d80bce5f1a0917c013aac54e3f951ffe740d0cbe</id>
<content type='text'>
- wayland-egl-abi-check: try to use llvm-nm first instead of BSD nm (incompatible options)
- avoid forcing _POSIX_C_SOURCE=200809L (SOCK_CLOEXEC become available)
- epoll(7) is provided by a userspace wrapper around kqueue(2) as FreeBSD
- when using SO_PEERCRED, the struct to use is `struct sockpeercred` instead of `struct ucred` on OpenBSD
- provide a compatibility layer for count_open_fds() using sysctl(2) as FreeBSD

Signed-off-by: Sebastien Marie &lt;semarie@online.fr&gt;
</content>
</entry>
<entry>
<title>server: add wl_client_get_user_data/wl_client_set_user_data</title>
<updated>2024-02-15T10:53:21Z</updated>
<author>
<name>Sebastian Wick</name>
<email>sebastian@sebastianwick.net</email>
</author>
<published>2021-10-25T02:34:49Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=9c4213ed3eb3942766712df936775d827b846d0b'/>
<id>urn:sha1:9c4213ed3eb3942766712df936775d827b846d0b</id>
<content type='text'>
The only way to attach some data to a wl_client seems to be setting up a
destroy listener and use wl_container_of. Let's make it straight forward
to attach some data.

Having an explicit destroy callback for the user data makes managing the
user data lifetime much more convenient. All other callbacks, be they
wl_resource request listeners, destroy listeners or destructors, or
wl_client destroy listeners, can assume that the wl_client user data
still exists if it was set. Otherwise making that guarantee would be
complicated.

Co-authored-by: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Signed-off-by: Sebastian Wick &lt;sebastian@sebastianwick.net&gt;
</content>
</entry>
<entry>
<title>event-loop: use wl_priv_signal for the destroy signal</title>
<updated>2024-02-08T17:18:28Z</updated>
<author>
<name>Kirill Primak</name>
<email>vyivel@eclair.cafe</email>
</author>
<published>2024-01-25T17:48:57Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=6a7284c63234c465a194b23ad28d527fa997bbcc'/>
<id>urn:sha1:6a7284c63234c465a194b23ad28d527fa997bbcc</id>
<content type='text'>
Signed-off-by: Kirill Primak &lt;vyivel@eclair.cafe&gt;
</content>
</entry>
<entry>
<title>Mitigate UAF crashes due to iteration over freed wl_resources</title>
<updated>2024-02-07T09:45:41Z</updated>
<author>
<name>Thomas Lukaszewicz</name>
<email>tluk@chromium.org</email>
</author>
<published>2024-01-08T00:36:10Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=d275bc7f84f1cffb62cfb31f55f00dc2c5968cc9'/>
<id>urn:sha1:d275bc7f84f1cffb62cfb31f55f00dc2c5968cc9</id>
<content type='text'>
Currently it is possible to iterate over client-owned resources
during client destruction that have had their associated memory
released.

This can occur when client code calls wl_client_destroy(). The
following sequence illustrates how this may occur.

 1. The server initiates destruction of the connected client via
    call to wl_client_destroy().

 2. Resource destroy listeners / destructors are invoked and
    resource memory is freed one resource at a time [1].

 3. If a listener / destructor for a resource results in a call
    to wl_client_for_each_resource(), the iteration will proceed
    over resources that have been previously freed in step 2,
    resulting in UAFs / crashes.

The issue is that resources remain in the client's object map
even after they have had their memory freed, and are removed
from the map only after each individual resource has had its
memory released.

This patch corrects this by ensuring resource destruction first
invokes listeners / destructors and then removing them from the
client's object map before releasing the associated memory.

[1] https://gitlab.freedesktop.org/wayland/wayland/-/blob/main/src/wayland-server.c?ref_type=heads#L928

Signed-off-by: Thomas Lukaszewicz thomaslukaszewicz@gmail.com
</content>
</entry>
<entry>
<title>client: Allow setting names for queues</title>
<updated>2024-01-22T12:34:14Z</updated>
<author>
<name>Derek Foreman</name>
<email>derek.foreman@collabora.com</email>
</author>
<published>2023-11-10T20:21:48Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=b42218f790033c496c48c7d5ba1f8421db794d0b'/>
<id>urn:sha1:b42218f790033c496c48c7d5ba1f8421db794d0b</id>
<content type='text'>
Allow setting a name for an event queue. The queue is used only for
printing additional debug information.

Debug output can now show the name of the event queue an event is
dispatched from, or the event queue of a proxy when a request is made.

Signed-off-by: Derek Foreman &lt;derek.foreman@collabora.com&gt;
</content>
</entry>
<entry>
<title>connection: Spruce up logging for client errors.</title>
<updated>2024-01-19T15:51:33Z</updated>
<author>
<name>Erik Chen</name>
<email>erikchen@chromium.org</email>
</author>
<published>2022-09-29T23:39:40Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=2f17d480e848dc8cbd047fab9f322f326da54df9'/>
<id>urn:sha1:2f17d480e848dc8cbd047fab9f322f326da54df9</id>
<content type='text'>
Some code paths that lead to a client error and connection termination
have no associated logging, or insufficient logging. This makes it
difficult to understand what went wrong. This commit adds or supplements
logging for all these code paths.

Signed-off-by: Erik Chen &lt;erikchen@chromium.org&gt;
</content>
</entry>
<entry>
<title>connection: Small simplification to wl_connection_write()</title>
<updated>2024-01-19T15:25:54Z</updated>
<author>
<name>John Lindgren</name>
<email>john@jlindgren.net</email>
</author>
<published>2022-02-28T13:54:47Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=9867bdb111f827e8e6f43e1c1111bb513811f3f1'/>
<id>urn:sha1:9867bdb111f827e8e6f43e1c1111bb513811f3f1</id>
<content type='text'>
wl_connection_write() contained an exact copy of the logic in
wl_connection_queue().  Simplify things by just calling
wl_connection_queue() from wl_connection_write().

Signed-off-by: John Lindgren &lt;john@jlindgren.net&gt;
</content>
</entry>
<entry>
<title>Consider pkgconfig sysroot for pkgdatadir</title>
<updated>2024-01-19T15:18:23Z</updated>
<author>
<name>Andreas Cord-Landwehr</name>
<email>cordlandwehr@kde.org</email>
</author>
<published>2022-09-24T14:47:46Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=8c49ee311245cbe615061e5a20a5e11648be324f'/>
<id>urn:sha1:8c49ee311245cbe615061e5a20a5e11648be324f</id>
<content type='text'>
For libs/cflags this is done automatically, but not for manually accessed
variables. This matches what wayland-protocols does.

Signed-off-by: Andreas Cord-Landwehr &lt;cordlandwehr@kde.org&gt;
</content>
</entry>
<entry>
<title>shm: implement version 2</title>
<updated>2024-01-19T15:12:29Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-11-21T15:59:20Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=fd42f70bafa26fcf6f39f034b581b35838be71aa'/>
<id>urn:sha1:fd42f70bafa26fcf6f39f034b581b35838be71aa</id>
<content type='text'>
This version adds a release request.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>shm: fix resource versions</title>
<updated>2024-01-19T15:12:29Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-11-21T15:57:31Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=9e233e31a21b0f58639c261d4dd4d72caa0bbd66'/>
<id>urn:sha1:9e233e31a21b0f58639c261d4dd4d72caa0bbd66</id>
<content type='text'>
This was hardcoded to 1 regardless of the version passed to the
callback or the version of the parent resource.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>util: use C23 deprecated attribute</title>
<updated>2024-01-19T14:21:59Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-07-25T19:54:49Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=647398ead44ed12556ac61d61e8ae6d9012a18e2'/>
<id>urn:sha1:647398ead44ed12556ac61d61e8ae6d9012a18e2</id>
<content type='text'>
Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>util: use C23 typeof if available</title>
<updated>2024-01-19T14:21:59Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-07-25T19:48:27Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=56b9c92b9881527d05ea9caa34c2c87e5927aa71'/>
<id>urn:sha1:56b9c92b9881527d05ea9caa34c2c87e5927aa71</id>
<content type='text'>
Instead of using the non-standard __typeof__, prefer the standard
typeof operator introduced in C23.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>util: simplify wl_fixed_from_double()</title>
<updated>2023-11-21T15:47:13Z</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-10-26T16:28:25Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=2a91f01d6c617f8f2bd1c5bf18cfa9bd21a732f6'/>
<id>urn:sha1:2a91f01d6c617f8f2bd1c5bf18cfa9bd21a732f6</id>
<content type='text'>
Same as 0e0ae7e290f2 ("util: simplify wl_fixed_to_double()"), but
for the reverse function.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
</content>
</entry>
<entry>
<title>connection: avoid calling memcpy on NULL, 0</title>
<updated>2023-11-08T13:41:16Z</updated>
<author>
<name>David Benjamin</name>
<email>davidben@google.com</email>
</author>
<published>2023-11-08T03:38:52Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=50ea9c5b1c08bac30be365dca05716a97ea65a92'/>
<id>urn:sha1:50ea9c5b1c08bac30be365dca05716a97ea65a92</id>
<content type='text'>
Due to what is arguably a mistake in the C language specification,
passing NULL to memcpy and friends is undefined behavior (UB) even when
the count is 0. C additionally mistakenly leaves NULL + 0 and NULL -
NULL undefined. (C++ fixes this mistake.) These are very problematic
because (NULL, 0) is a natural representation of the empty slice.

Some details:
https://github.com/llvm/llvm-project/issues/49459
https://www.imperialviolet.org/2016/06/26/nonnull.html

Unfortunately, despite how clearly this is a mistake, glibc headers and
GCC now try to exploit this specification mistake and will miscompile
code, so C projects need to workaround this. In particular, UBSan from
Clang will flag this as a bug (although Clang itself has the good sense
to never lean on this bug). We've run into a few UBSan errors in
Chromium stemming from Wayland's memcpy calls. Add runtime guards as
needed to avoid these cases.

Note: Chromium's copy of wayland has
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/188
applied. It is possible the ring_buffer_copy UB cases are only reachable
with that MR applied, I'm not sure. But it seemed simplest to just add
the fix to wayland as-is. Then when/if that MR lands, it will pick this
up.

Signed-off-by: David Benjamin &lt;davidben@google.com&gt;
</content>
</entry>
</feed>
