- 16 May, 2022 1 commit
-
-
Derek Foreman authored
Since server IDs are basically indistinguishable from really big client IDs at many points in the source, it's theoretically possible to overflow a map and either overflow server IDs into the client ID space, or grow client IDs into the server ID space. This would currently take a massive amount of RAM, but the definition of massive changes yearly. Prevent this by placing a ridiculous but arbitrary upper bound on the number of items we can put in a map: 0xF00000, somewhere over 15 million. This should satisfy pathological clients without restriction, but stays well clear of the 0xFF000000 transition point between server and client IDs. It will still take an improbable amount of RAM to hit this, and a client could still exhaust all RAM in this way, but our goal is to prevent overflow and undefined behaviour. Fixes #224 Signed-off-by:
Derek Foreman <derek.foreman@collabora.com>
-
- 11 May, 2022 1 commit
-
-
Without this, DocBook picks the output encoding and on some setups we end up with ISO-8859-1. Tested by booting a fresh Alpine VM, verifying that the generated HTML is using the incorrect charset, applying the patch, and verifying that the generated HTML is fixed. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
- 10 May, 2022 1 commit
-
-
Simon Ser authored
Fail when tests/documentation is enabled without libraries. Fail when neither scanner nor libraries is enabled, because we don't build anything in that case. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
- 06 May, 2022 1 commit
-
-
Simon Ser authored
Signed-off-by:
Simon Ser <contact@emersion.fr>
-
- 05 May, 2022 1 commit
-
-
Simon Ser authored
We don't use this script anymore. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
- 11 Apr, 2022 2 commits
-
-
Even though it is part of wayland.xml, wl_shell is not mandatory for compositors to implement, and may be removed in a future version. Signed-off-by:
Demi Marie Obenour <demiobenour@gmail.com>
-
Simon Ser authored
FreeBSD doesn't support mremap [1], so we have a fallback implementation based on munmap+mmap. We memcpy from the old memory region to the new one, however this is unnecessary because the new mapping references the same file as the old one. Use msync to make sure any pending write is flushed to the underlying file before we map the new region. [1]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=59912 Signed-off-by:
Simon Ser <contact@emersion.fr>
-
- 05 Apr, 2022 1 commit
-
-
Commit 5a981ee8 implemented a fallback path for platforms which do not support mremap() such as FreeBSD. To do so, the file descriptor for the mmap() is not closed immediately but instead kept as long as the pool exists. That induces more file descriptors kept open for longer, which in turn may cause problems as wl_shm may be using a lot of file descriptors, especially with Xwayland which can create a lot of pixmaps on behalf of its X11 clients. For platforms where mremap() is available, keeping those file descriptors opened is a bit of a waste and may cause exhaustion of file descriptors sooner that before commit 5a981ee8 . Only keep the mmap() file descriptor open on platforms which do not implement mremap() and close it immediately as before on others. Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Closes: xorg/xserver#1283
-
- 03 Apr, 2022 2 commits
-
-
To avoid implicit conversion since msg_control's type is size_t. Signed-off-by:
Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
-
Initialiaze the entire msghdr struct to 0 before use. Example of the report fixed with this change: AddressSanitizer:DEADLYSIGNAL ================================================================= ==20035==ERROR: AddressSanitizer: SEGV on unknown address 0x2dad4dbffffa0d (pc 0x0055555c7488 bp 0x007fffffc760 sp 0x007fffffc760 T0) ==20035==The signal is caused by a READ memory access. #0 0x55555c7488 in read_msghdr(void*, __sanitizer::__sanitizer_msghdr*, long) (/home/ftrvx/w/_/uxn/bin/uxnemu+0x77488) #1 0x55555c810c in sendmsg (/home/ftrvx/w/_/uxn/bin/uxnemu+0x7810c) #2 0x7ff7f2db20 in wl_connection_flush /home/ftrvx/q/wayland/build/../src/connection.c:315:10 #3 0x7ff7f2d014 in wl_display_flush /home/ftrvx/q/wayland/build/../src/wayland-client.c:2154:9 #4 0x7ff7e80bc0 (/lib/libSDL2-2.0.so.0+0x104bc0) #5 0x7ff7e523b0 (/lib/libSDL2-2.0.so.0+0xd63b0) #6 0x7ff7e534e4 (/lib/libSDL2-2.0.so.0+0xd74e4) #7 0x7ff7e535e8 (/lib/libSDL2-2.0.so.0+0xd75e8) #8 0x7ff7daad54 (/lib/libSDL2-2.0.so.0+0x2ed54) #9 0x7ff7dab130 (/lib/libSDL2-2.0.so.0+0x2f130) #10 0x555565bb40 in main /home/ftrvx/w/_/uxn/src/uxnemu.c:519:2 #11 0x7ff7f62484 in libc_start_main_stage2 /builddir/musl-1.1.24/src/env/__libc_start_main.c:94:2 AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/home/ftrvx/w/_/uxn/bin/uxnemu+0x77488) in read_msghdr(void*, __sanitizer::__sanitizer_msghdr*, long) ==20035==ABORTING Signed-off-by:
Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
-
- 02 Apr, 2022 1 commit
-
-
illiliti authored
Fix invalid usage of bools which violates official meson specification and thus breaks muon, an implementation of meson written in C. Signed-off-by:
illiliti <illiliti@protonmail.com>
-
- 28 Mar, 2022 2 commits
-
-
Simon Ser authored
wl_signal_emit doesn't handle well situations where a listener removes another listener. This can happen in practice: wlroots and Weston [1] both have private helpers to workaround this defect. wl_signal_emit can't be fixed without breaking the API. Instead, introduce a new function. Callers need to make sure to always remove listeners when they are free'd. [1]: weston!457 Signed-off-by:
Simon Ser <contact@emersion.fr> Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com>
-
These events are for high-resolution wheels. Each logical wheel click represents an axis value120 value of 120, fractions of a wheel click an integer fraction thereof. The new event replaces wl_pointer.axis_discrete for wl_pointer versions 8 and above. Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 25 Mar, 2022 7 commits
-
-
Signed-off-by:
Aleksandr Mezin <mezin.alexander@gmail.com>
-
And add errno checks in callers, where it seems to be necessary. Signed-off-by:
Aleksandr Mezin <mezin.alexander@gmail.com>
-
And also fix wl_connection_demarshal() to pass through that errno. Signed-off-by:
Aleksandr Mezin <mezin.alexander@gmail.com>
-
Not checking the result of wl_array_add() can cause writes past the end of the allocated buffer if realloc fails. Signed-off-by:
Aleksandr Mezin <mezin.alexander@gmail.com>
-
Simon Ser authored
We don't get a warning for it yet, but get_pkgconfig_variable() is deprecated. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Fixes the following warning: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Fixes the following warning: WARNING: Project targeting '>= 0.56.0' but tried to use feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead Signed-off-by:
Simon Ser <contact@emersion.fr>
-
- 08 Mar, 2022 1 commit
-
-
Alexander Irion authored
When multiple threads are used, output from different threads was intermixed in one line. That what breaking parsing of the log messages. Now, intermixing is prevented by using a memstream. Signed-off-by:
Alexander Irion <alexander_irion@mentor.com>
-
- 21 Feb, 2022 1 commit
-
-
Mikhail Gusarov authored
Protocol documentation mistakenly specified that wl_shm.format events are sent at connection setup time, but that's impossible (clients do not yet know ID of wl_shm object at the time) and contradicts implementation in libwayland. Signed-off-by:
Mikhail Gusarov <dottedmag@dottedmag.net>
-
- 05 Feb, 2022 6 commits
-
-
Simon Ser authored
The relative paths are incorrect when running as a subproject. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
Simon Ser authored
meson.build_root() returns the parent's build directory if Wayland is a subproject. This fails with: error: tag OUTPUT_DIRECTORY: Output directory '<parent-build-dir>/doc/doxygen' does not exist and cannot be created Instead, use meson.project_build_root(), which returns the subproject's build directory. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
Simon Ser authored
meson.project_build_root() is only available with 0.56.0. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
XcursorLibraryLoadImages() function is unused and not exported according to objdump, so its removal should be an ABI compatible change. Signed-off-by:
Vlad Zahorodnii <vlad.zahorodnii@kde.org>
-
Several tests in this suite use setting and checking client.display_stopped (in test-compositor.h) to synchronise between threads. This is a data race because display_stopped is a non-atomic int. Fix this by making it an atomic_bool instead. We don't need to change the access code because reads and writes are sequentially consistent by default. This can be reproduced (with both clang and gcc) by running ``` meson -Db_sanitize=thread build cd build ninja meson test ``` Signed-off-by:
Fergus Dall <sidereal@google.com>
-
Simon Ser authored
When allocating memory for structs, use zalloc instead of malloc. This ensures the memory is zero-initialized, and reduces the risk of forgetting to initialize all struct fields. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
- 02 Feb, 2022 1 commit
-
-
Simon Ser authored
Fixes the following warning: WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300 Signed-off-by:
Simon Ser <contact@emersion.fr>
-
- 31 Jan, 2022 1 commit
-
-
Closes #270 Signed-off-by:
Julian Orth <ju.orth@gmail.com>
-
- 10 Jan, 2022 6 commits
-
-
Simon Ser authored
Set explicitly the C standard to use to make sure we don't use features not available on our target platforms. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Currently libwayland assumes GNU extensions will be available, but doesn't define the C standard to use. Instead, let's unconditionally enable POSIX extensions, and enable GNU extensions on a case-by-case basis as needed. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
Simon Ser authored
typeof is a GNU extension. Compiler extensions should be prefixed with __ per the C standard. Signed-off-by:
Simon Ser <contact@emersion.fr>
-
Simon Ser authored
-
Signed-off-by:
Taishi Eguchi <taishi2060@gmail.com>
-
tc_client_fd_leaks and tc_client_fd_leaks_exec are currently the exact same test. It seems clear from the name that the latter was intended to spawn sanity_fd_leak_exec instead of sanity_fd_leak. Fixes #121 Signed-off-by:
Derek Foreman <derek.foreman@collabora.com>
-
- 07 Jan, 2022 1 commit
-
-
Add a note that the request only changes the size of the memory mapping and does not touch the mapped file. Signed-off-by:
Max Ihlenfeldt <mihlenfeldt@igalia.com>
-
- 18 Dec, 2021 1 commit
-
-
Mikhail Gusarov authored
Signed-off-by:
Mikhail Gusarov <dottedmag@dottedmag.net>
-
- 12 Dec, 2021 1 commit
-
-
Mikhail Gusarov authored
The specification left the position and order of file descriptors unspecified. Specify that - order of file descriptors is maintained - position of file descriptors is bounded, but loose Signed-off-by:
Mikhail Gusarov <dottedmag@dottedmag.net>
-
- 09 Dec, 2021 1 commit
-
-
Simon Ser authored
-