summaryrefslogtreecommitdiff
path: root/internal/statsengine/aggregate.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-29 22:43:38 +0300
committerPaul Buetow <paul@buetow.org>2026-05-29 22:43:38 +0300
commit7a2207e215dfde246f0e9c4e415eff962f4c044c (patch)
tree22a155f51bc61accfb3a21133cf69ab58265263a /internal/statsengine/aggregate.go
parent8da6c62f617d6351a4ab6062bf2ea104b3b31ec2 (diff)
test(dup2): lock in fd_event handler captures oldfd (args[0])
Audit of dup2(2) found the tracing implementation already correct and consistent with its dup/dup3 siblings: dup2 is KindFd (a plain fd_event), the enter handler captures ev->fd from args[0] (oldfd) per the KindFd convention, it is in the FS family, and its exit returns the new fd (newfd/-1) as a plain UNCLASSIFIED ret_event (never a byte-count transfer). Unlike dup3 it carries no flags and clears O_CLOEXEC on the duplicate, which the eventloop registerDup path already honors. No discrepancies were found, so add a lock-in test (matching prior audits) that asserts the generated BPF C for dup2 captures fd from args[0] (not args[1]/newfd), emits an fd_event (not a dup3_event), wires no flags, and classifies the exit UNCLASSIFIED. Adds FormatExitDup2 testdata to drive the exit handler assertions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/statsengine/aggregate.go')
0 files changed, 0 insertions, 0 deletions