Commits on Source (33)
-
Manuel Stoeckl authored
Also briefly explain comment policy in CONTRIBUTING.md.
10657947 -
Manuel Stoeckl authored
Now `fuzz_hook_ext` provides fuzzing of the outside (Wayland protocol) connections, while `fuzz_hook_int` provides a fuzzer hook for the internal (waypip protocol) connections.
fb9a9200 -
Manuel Stoeckl authored2cd85d98
-
Manuel Stoeckl authored0b724fe0
-
Manuel Stoeckl authored294e61c4
-
Manuel Stoeckl authoredd0d1f4ac
-
Manuel Stoeckl authored7731e857
-
Manuel Stoeckl authored0c3d630a
-
Manuel Stoeckl authored9d92a83e
-
Manuel Stoeckl authored1999d239
-
Manuel Stoeckl authored
This makes it possible to lock the transfer queue inside the transfer_add function.
ce8bae7e -
Manuel Stoeckl authored
... by splitting struct transfer_data into a struct transfer_queue, which needs to be locked to work correctly, and a struct chan_write_queue, which the mainloop uses as an input to writev, and which does not have any locks. As writev sometimes takes 0.1msec, and used to be performed under the transfer_data lock, this change reduces lock acquisition times significantly for worker threads that try to add new messages to be transferred.
2b3c7a64 -
Manuel Stoeckl authored
While the null dereference errors in video.c are fixed, the possible memory leaks were not fixed by this change.
19c30406 -
Manuel Stoeckl authored36b9aa2b
-
Manuel Stoeckl authoredbddf290b
-
Jan Beich authored
../test/fuzz_hook_ext.c:75:2: error: use of undeclared identifier 'new_fileno' new_fileno = shm_open(SHM_ANON, O_RDWR, 0600); ^ ../test/fuzz_hook_ext.c:84:6: error: use of undeclared identifier 'new_fileno' if (new_fileno == -1) { ^ ../test/fuzz_hook_ext.c:87:23: error: use of undeclared identifier 'new_fileno' } else if (ftruncate(new_fileno, (off_t)sz) == -1) { ^ ../test/fuzz_hook_ext.c:89:9: error: use of undeclared identifier 'new_fileno' close(new_fileno); ^ ../test/fuzz_hook_ext.c:92:9: error: use of undeclared identifier 'new_fileno' return new_fileno; ^ ../test/fuzz_hook_int.c:95:2: error: use of undeclared identifier 'new_fileno' new_fileno = shm_open(SHM_ANON, O_RDWR, 0600); ^ ../test/fuzz_hook_int.c:104:6: error: use of undeclared identifier 'new_fileno' if (new_fileno == -1) { ^ ../test/fuzz_hook_int.c:107:23: error: use of undeclared identifier 'new_fileno' } else if (ftruncate(new_fileno, (off_t)sz) == -1) { ^ ../test/fuzz_hook_int.c:109:9: error: use of undeclared identifier 'new_fileno' close(new_fileno); ^ ../test/fuzz_hook_int.c:112:9: error: use of undeclared identifier 'new_fileno' return new_fileno; ^
d562c9f9 -
Manuel Stoeckl authored99768879
-
Manuel Stoeckl authoredf708e488
-
Manuel Stoeckl authored7876e78d
-
Manuel Stoeckl authorede2eb94f7
-
Manuel Stoeckl authored
This change partially undoes 2b3c7a64. Now the queue of messages to be transferred has two parts; a (main thread only) queue that gets used by writev, and a static array that receives messages from all asynchronous work tasks. There are two main benefits: * Only the async receive queue needs a lock, and that lock is held for very short periods of time. * The new async receive queue array can be allocated by the main thread in advance, so adding messages to it can not fail. (Granted, moving messages onto the main thread queue can require resize operations, but said resize operations no longer must happen under a lock.)
6b839fe1 -
Manuel Stoeckl authored
This change also fixes a shadow structure leak for pipes, and reorganizes the pipe handling code to make the local and remote read/write capabilities of each replicated pipe/sfd pair explicit.
062cae01 -
Manuel Stoeckl authored
This fixes builds with -Werror and musl.
5400f919 -
Manuel Stoeckl authored
For buffer and pipe updates, it is relatively safe to drop data when there is not enough memory.
30821ef7 -
Manuel Stoeckl authored
DEFAULT_SOURCE was chosen in favor of POSIX_C_SOURCE 200809L because the former includes CMSG_LEN/CMSG_SPACE, which are needed to portably align cmsg entries. The OS-specific code has been moved to platform.c. As IOV_MAX is an upper bound (and at runtime, the value is allowed to be different), it is now determined using sysconf(). The pipe_mirror test has been adjusted to allow extra transfer modes when pipes are bidirectional.
75487ecf -
Manuel Stoeckl authored
Some compiler versions don't support the equivalent _cvtmask16_u32.
9037dd24 -
Manuel Stoeckl authoredaa556100
-
Manuel Stoeckl authored
The main loop code (and some of shadow.c) has been adjusted to use different error codes for allocation failure and for regular errors. If there is an error, then the connection closing message will indicate the type (oom/error/natural connection close). For the first two types, a corresponding error event will also be sent to the Wayland application.
05017ad8 -
Manuel Stoeckl authoredc5706867
-
Manuel Stoeckl authored
Depending on how messages are grouped, it was possible to transfer data to a pipe shadow structure and then shutdown the pipe before the data is written. This commit adds a new state flag, 'pending_w_shutdown', which is used to delay the shutdown.
3c9c901a -
Manuel Stoeckl authored35be3567
-
Manuel Stoeckl authoredba478e27
-
Manuel Stoeckl authored
This diff is collapsed.