| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
The new ioq_submit() function is now necessary to call to ensure the
pending request batch is flushed.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This helps avoid situations where multiple waiters block on different
slots using the same monitor, which happened more often than expected
due to correlations caused by batching.
|
|
|
|
|
| |
Also, cache-align struct ioq_ent to avoid false sharing when two workers
are handling neighbouring requests.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the death look exactly like it would if we didn't handle the
signal at all. Coredumps will point at the right instruction, segfaults
will get logged in dmesg again, etc.
Technically POSIX says this is undefined, but if we get a fault, we've
already done something undefined anyway ;)
Link: https://github.com/rust-lang/rust/issues/26458
|
|
|
|
| |
QNX doesn't support SA_RESTART.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This allows us to build against liburing as old as version 2.0, which is
apparently shipped by the latest Amazon Linux distribution.
Fixes: https://github.com/tavianator/bfs/issues/147
|
|
|
|
|
| |
We might want to change the size of an allocated region without changing
which bytes are initialized.
|
| |
|
| |
|
|
|
|
|
|
|
| |
In trie_remove(), clearing the bit before trie_node_collapse() causes us
to free the old node with size 1 instead of 2, putting it on the wrong
freelist. This is technically safe with the current arena
implementation, but not intentional.
|
|
|
|
|
|
|
|
|
| |
Allowing unaligned sizes will allow us to allocate aligned slabs with
additional metadata in the tail without ballooning the allocation size
for large alignments.
Link: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2244.htm#dr_460
Link: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2072.htm
|
|
|
|
|
|
|
|
|
|
|
| |
On non-Linux systems, bfs_check_capabilities always returned -1, so
cpath_has_capabilities would always return true. If bfs was called with
an LS_COLORS containing the `ca` statement, e.g. `ca=30;41`, bfs would
color ALL the files. While including the `ca` statement in LS_COLORS
on non-Linux systems is unusual, this is not an error and is a valid
use-case (e.g. Using GNU ls or lsd).
Fixes: 1520d4d3 ("color: Don't color files like directories on ENOTDIR")
|
|
|
|
| |
Fixes: https://github.com/tavianator/bfs/issues/145
|
|
|
|
| |
And mark the fallible ones with _nodiscard.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, given
$ touch file
$ ln -s file/file notdir
$ bfs notdir/file
bfs would loop forever when printing the error message, since it
expected stripping the trailing slash from "notdir/" to fix the ENOTDIR
error, but the broken symlink still gave the same error.
Fixes: b4c3201 ("color: Only highlight the trailing slash on ENOTDIR")
|
|
|
|
|
|
|
| |
This was causing a UAF if we ever unregistered the last hook for a
signal and then re-registered one.
Fixes: 75b7f70 ("sighook: Make sigunhook() O(1)")
|
| |
|
|
|
|
|
|
| |
setitimer() is obsolescent in POSIX 2008 and removed from POSIX 2024.
However, at least macOS doesn't implement the new timer_create() API, so
we still need the setitimer() fallback.
|
| |
|
| |
|
|
|
|
|
|
| |
First of all, almost all checks were !trie_is_leaf(), so it makes sense
to use trie_is_node() instead. Secondly, using the tag bit for internal
nodes allows us to remove some NULL checks.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Leading NUL bytes (e.g. `*\0.gz=...`) could cause us to insert a
non-prefix-free set of strings into the case-insensitive extension trie,
which would lead to crashes like
bfs: trie_split@src/trie.c:538: Assertion failed: `key_nibble != rep_nibble`
and OOB accesses to trie leaf keys. Fix it by ignoring those
extensions, since filenames cannot contain NUL bytes.
Fixes: 08030aea ("color: Delay the case_sensitive decision")
|
| |
|
| |
|
|
|
|
|
|
| |
This avoids what might be a strict aliasing violation in some models.
Link: https://github.com/llvm/llvm-project/pull/108385#issuecomment-2352938645
|
| |
|
| |
|
|
|
|
| |
Fixes: 65a7814 ("opt: Don't raise RLIMIT_NOFILE if it would prevent using posix_spawn()")
|
|
|
|
|
|
|
| |
When optimizing -not \( -a , -b \), the child is a comma expression, not
the parent.
Fixes: 4a36bb9 ("expr: Make expressions variadic")
|
| |
|
| |
|
|
|
|
| |
Fixes: 9b8cf46 ("opt: Warn about all ignored tests")
|