Files
bun.sh/src
Claude Bot d78ab7ff05 Phase 2, Step 2.2: Fix Response Finalization Race
Fix critical race condition in Bun__FetchResponse_finalize where the function
accessed shared state without acquiring the mutex, racing with the HTTP
thread's callback() which does lock the mutex.

Changes:
- Add mutex acquisition at function entry with RAII defer unlock
- Inline ignoreRemainingResponseBody logic under lock protection
- Set abort flag atomically with .release ordering
- Clear buffers safely under lock (prevents concurrent modification)
- Invert promise check logic for clearer control flow

The dual ownership pattern (response_weak + native_response) is intentional
and remains unchanged for finalization tracking.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 13:55:49 +00:00
..
2025-10-16 21:52:22 -04:00
2025-07-21 13:26:47 -07:00
2025-10-04 02:17:55 -07:00
2025-07-29 19:35:46 -07:00
2025-07-21 13:26:47 -07:00
2025-07-21 13:26:47 -07:00
2025-09-09 20:41:10 -07:00
2025-10-23 17:52:13 -07:00
2025-09-11 23:29:53 -07:00
2025-10-25 00:05:28 -07:00
2025-09-09 20:41:10 -07:00
2025-07-21 13:26:47 -07:00
2025-02-01 01:11:02 -08:00
2025-07-21 13:26:47 -07:00
2025-07-21 13:26:47 -07:00