From ff8774b5ce3f6b37e5152d0dc06ae46b7a36d1da Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 28 May 2026 10:43:37 +0300 Subject: close_range: honor last bound and CLOSE_RANGE_CLOEXEC flag close_range was captured as a single-fd fd_event carrying only first, so the runtime evicted every tracked fd >= first, ignoring the last upper bound and the flags. Bounded calls wrongly dropped still-open higher fds, and CLOSE_RANGE_CLOEXEC (which keeps fds open) was treated as a full close. Reclassify close_range to the two_fd_event kind, mapping fd_a/fd_b/extra to first/last/flags. The runtime now closes only the inclusive [first, last] range (a negative last from ~0U means unbounded) and skips eviction when CLOSE_RANGE_CLOEXEC is set or the syscall fails. Co-Authored-By: Claude Opus 4.7 --- internal/c/generated_tracepoints_result.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/c/generated_tracepoints_result.txt') diff --git a/internal/c/generated_tracepoints_result.txt b/internal/c/generated_tracepoints_result.txt index 4d44867..7918006 100644 --- a/internal/c/generated_tracepoints_result.txt +++ b/internal/c/generated_tracepoints_result.txt @@ -24,7 +24,7 @@ sys_enter_clock_settime is a struct null_event (kind=null) sys_enter_clone is a struct null_event (kind=proc) sys_enter_clone3 is a struct null_event (kind=proc) sys_enter_close is a struct fd_event (kind=fd) -sys_enter_close_range is a struct fd_event (kind=fd) +sys_enter_close_range is a struct two_fd_event (kind=two-fd) sys_enter_connect is a struct fd_event (kind=fd) sys_enter_copy_file_range is a struct fd_event (kind=fd) sys_enter_creat is a struct path_event (kind=pathname) -- cgit v1.2.3