mergerfs/vendored/libfuse/lib
Antonio S. Musumeci 4516685ca7 libfuse: harden fuse.cpp against NULL nodes; use lock guards; check allocations
Collapse get_node/get_node_nocheck into a single function that
returns NULL when the node is absent rather than abort()ing.
Callers that previously assumed non-NULL now check the return value
and either reply ESTALE/ENOMEM or fall through gracefully; a few
places where the node is load-bearing (e.g. unhash during remove)
use fatal::abort with a descriptive message.

Switch mutex_lock / mutex_unlock pairs to mutex_lockguard so early
returns on error paths no longer leak the lock, and add NULL-safety
around fuse_dh in readdir/readdir_plus, fuse_dirents_init error
returns, the getattr path when both name and fh are empty, and the
msgbuf allocation in fuse_lib_read.

Pull the new xstrdup/xmalloc wrappers from xalloc.hpp for the root
node name so the common-case OOM path terminates with a diagnostic
instead of a silent corrupted node.

Also guard fuse_session_destroy against a NULL session - called
from error-recovery paths.
2026-04-18 13:47:23 -05:00
..
cpu.cpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
cpu.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
crc32b.cpp Convert vendored/libfuse C sources to C++17 2026-03-24 21:13:34 -04:00
crc32b.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
debug.cpp log: default debug log path to empty; skip set when empty 2026-04-18 13:47:23 -05:00
format.cpp Move fmtlib to vendored and upgrade to 12.1.0 2026-03-02 01:09:16 -05:00
fuse.cpp libfuse: harden fuse.cpp against NULL nodes; use lock guards; check allocations 2026-04-18 13:47:23 -05:00
fuse_cfg.cpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_dirents.cpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_i.hpp libfuse: remove userdata from init/destroy APIs; drop unused fuse_reply_ioctl_iov 2026-04-18 13:47:23 -05:00
fuse_loop.cpp Move fuse_session to C++ and make exit flag atomic 2026-03-24 21:13:34 -04:00
fuse_lowlevel.cpp libfuse: remove userdata from init/destroy APIs; drop unused fuse_reply_ioctl_iov 2026-04-18 13:47:23 -05:00
fuse_msgbuf.cpp More aggressive error handing with pagesize queries 2026-03-24 21:13:34 -04:00
fuse_opt.cpp Convert vendored/libfuse C sources to C++17 2026-03-24 21:13:34 -04:00
fuse_req.cpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_session.cpp libfuse: harden fuse.cpp against NULL nodes; use lock guards; check allocations 2026-04-18 13:47:23 -05:00
fuse_signals.cpp Convert vendored/libfuse C sources to C++17 2026-03-24 21:13:34 -04:00
helper.cpp Additional check for ENOTCONN on mount 2026-03-24 21:13:34 -04:00
lock.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
maintenance_thread.cpp Move maintainence thread func take u64 rather than int 2026-03-24 21:13:34 -04:00
mount.cpp Convert vendored/libfuse C sources to C++17 2026-03-24 21:13:34 -04:00
mount.hpp Convert vendored/libfuse C sources to C++17 2026-03-24 21:13:34 -04:00
mount_bsd.h Convert vendored/libfuse C sources to C++17 2026-03-24 21:13:34 -04:00
mount_generic.h Fallback to fusermount3 where available 2026-03-24 21:13:34 -04:00
mount_util.h replace raw C-strings with std::string in converted libfuse files 2026-03-24 21:13:34 -04:00
node.cpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
node.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
pin_threads.cpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
pin_threads.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
xalloc.hpp libfuse: harden fuse.cpp against NULL nodes; use lock guards; check allocations 2026-04-18 13:47:23 -05:00