robobun
c8cb7713fc
Fix Windows crash in process.title when console title is empty ( #23184 )
...
## Summary
Fixes a segmentation fault on Windows 11 when accessing `process.title`
in certain scenarios (e.g., when fetching system information or making
Discord webhook requests).
## Root Cause
The crash occurred in libuv's `uv_get_process_title()` at `util.c:413`
in the `strlen()` call. The issue is that `uv__get_process_title()`
could return success (0) but leave `process_title` as NULL in edge cases
where:
1. `GetConsoleTitleW()` returns an empty string
2. `uv__convert_utf16_to_utf8()` succeeds but doesn't allocate memory
for the empty string
3. The subsequent `assert(process_title)` doesn't catch this in release
builds
4. `strlen(process_title)` crashes with a null pointer dereference
## Changes
Added defensive checks in `BunProcess.cpp`:
1. Initialize the title buffer to an empty string before calling
`uv_get_process_title()`
2. Check if the buffer is empty after the call returns
3. Fall back to "bun" if the title is empty or the call fails
## Testing
Added regression test in `test/regression/issue/23183.test.ts` that
verifies:
- `process.title` doesn't crash when accessed
- Returns a valid string (either the console title or "bun")
Fixes #23183
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-authored-by: Claude Bot <claude-bot@bun.sh >
Co-authored-by: Claude <noreply@anthropic.com >
2025-10-03 02:54:23 -07:00
..
2025-09-30 05:26:32 -07:00
2025-07-22 17:51:38 -07:00
2025-09-01 02:35:55 -07:00
2025-10-02 14:11:29 -07:00
2025-08-11 20:19:34 -07:00
2025-09-30 05:26:32 -07:00
2025-07-22 17:51:38 -07:00
2025-10-03 02:54:23 -07:00
2025-10-02 14:11:29 -07:00
2025-10-02 20:12:59 -07:00
2025-10-01 17:16:25 -07:00
2025-09-26 15:19:45 -07:00
2025-09-14 04:14:48 -07:00
2025-10-02 14:11:29 -07:00
2025-09-26 18:57:06 -07:00
2025-07-21 13:26:47 -07:00
2025-07-22 17:51:38 -07:00
2025-09-29 02:21:13 -07:00
2025-09-30 05:26:32 -07:00
2025-07-17 03:13:48 -07:00
2025-10-03 02:38:55 -07:00
2025-09-14 02:27:53 -07:00
2025-09-27 00:45:29 -07:00
2025-10-02 14:55:28 -07:00
2025-07-21 13:26:47 -07:00
2025-07-22 17:51:38 -07:00
2025-09-07 17:53:00 -07:00
2025-07-31 22:07:17 -07:00
2025-09-30 00:10:15 -07:00
2025-09-26 19:46:50 -07:00
2025-09-20 05:50:30 -07:00
2025-09-25 16:08:06 -07:00
2025-09-09 20:41:10 -07:00
2025-09-22 19:28:26 -07:00
2025-09-26 22:23:06 -07:00
2025-09-30 05:26:32 -07:00
2025-10-02 19:00:14 -07:00
2025-09-30 05:26:32 -07:00
2025-09-27 00:45:29 -07:00
2025-07-21 13:26:47 -07:00
2025-09-26 13:47:24 -07:00
2025-10-02 18:50:05 -07:00
2025-06-04 19:41:26 -07:00
2025-08-11 20:19:34 -07:00
2025-09-26 13:47:24 -07:00
2025-09-27 00:45:29 -07:00
2025-05-14 18:42:42 -07:00
2025-07-29 19:35:46 -07:00
2025-07-22 17:51:38 -07:00
2025-07-22 17:51:38 -07:00
2025-09-30 05:26:32 -07:00
2025-04-17 14:17:08 -07:00
2025-07-22 17:51:38 -07:00
2025-09-03 18:57:39 -07:00
2025-07-22 17:51:38 -07:00
2025-07-20 23:04:17 -07:00
2025-09-30 05:26:32 -07:00
2025-09-30 16:13:23 -07:00
2025-09-23 23:01:15 -07:00
2025-06-12 14:20:28 -07:00
2025-09-18 19:37:24 -07:00
2025-07-21 13:26:47 -07:00
2025-10-02 18:43:10 -07:00
2025-09-26 15:19:45 -07:00
2025-09-03 18:57:39 -07:00
2025-07-31 00:56:50 -07:00
2025-08-11 20:19:34 -07:00
2025-09-04 18:14:47 -07:00
2025-07-22 17:51:38 -07:00
2025-07-21 13:26:47 -07:00
2025-09-26 22:21:00 -07:00
2025-09-19 02:06:02 -07:00
2025-07-21 13:26:47 -07:00
2025-09-25 19:03:22 -07:00
2025-07-28 00:13:17 -07:00
2025-08-22 23:04:58 -07:00
2025-05-08 23:22:16 -07:00
2025-05-08 23:22:16 -07:00
2025-08-14 18:03:26 -07:00
2025-08-27 06:39:11 -07:00
2025-05-08 23:22:16 -07:00
2025-08-21 15:28:15 -07:00
2025-09-19 02:06:02 -07:00
2025-08-23 06:55:30 -07:00
2025-06-03 23:51:03 -07:00
2025-09-24 00:47:52 -07:00
2025-10-02 14:11:29 -07:00
2025-09-19 02:38:38 -07:00
2025-07-22 17:51:38 -07:00
2025-07-22 17:51:38 -07:00
2025-09-09 20:41:10 -07:00
2025-09-25 16:08:06 -07:00
2025-07-09 00:19:57 -07:00
2025-07-22 17:51:38 -07:00
2025-07-22 17:51:38 -07:00
2025-08-23 06:55:30 -07:00
2025-07-22 17:51:38 -07:00
2025-09-20 00:29:15 -07:00
2025-09-26 13:47:24 -07:00
2025-09-30 05:26:32 -07:00
2025-09-11 23:29:53 -07:00
2025-09-09 20:41:10 -07:00
2025-07-22 17:51:38 -07:00
2025-08-14 21:12:22 -07:00
2025-07-21 13:26:47 -07:00
2025-07-22 17:51:38 -07:00
2025-08-26 12:50:25 -07:00
2025-07-22 17:51:38 -07:00
2025-09-30 16:14:55 -07:00
2025-09-03 15:40:44 -07:00
2025-07-22 17:51:38 -07:00
2025-09-14 04:14:48 -07:00
2025-09-20 05:50:30 -07:00
2025-09-09 21:42:01 -07:00
2025-07-22 17:51:38 -07:00
2025-09-12 23:59:24 -07:00
2025-09-30 00:10:15 -07:00
2025-09-25 18:03:27 -07:00
2025-07-21 13:26:47 -07:00
2025-09-09 20:41:10 -07:00
2025-07-21 13:26:47 -07:00
2025-09-26 15:15:58 -07:00
2025-07-22 17:51:38 -07:00
2025-08-26 12:50:25 -07:00
2025-09-26 22:21:00 -07:00
2025-09-26 22:21:00 -07:00
2025-09-03 15:40:44 -07:00
2025-09-22 19:28:26 -07:00
2025-07-21 13:26:47 -07:00
2025-09-26 17:18:30 -07:00
2025-07-21 13:26:47 -07:00
2025-08-31 18:27:51 -07:00
2025-07-13 04:27:43 -07:00
2025-07-13 04:27:43 -07:00
2025-07-13 04:27:43 -07:00
2025-09-25 22:34:49 -07:00
2025-09-25 22:34:49 -07:00
2025-07-21 13:26:47 -07:00
2025-09-03 15:40:44 -07:00
2025-07-25 12:38:06 -07:00
2025-07-21 13:26:47 -07:00
2025-09-19 02:06:02 -07:00
2025-05-08 23:22:16 -07:00
2025-07-21 13:26:47 -07:00
2025-08-11 20:19:34 -07:00
2025-07-21 13:26:47 -07:00
2025-10-03 02:38:55 -07:00
2025-08-26 12:50:25 -07:00
2025-07-22 17:51:38 -07:00
2025-08-11 20:19:34 -07:00
2025-07-20 23:04:17 -07:00
2025-08-23 06:55:30 -07:00
2025-07-21 13:26:47 -07:00
2025-07-22 17:51:38 -07:00
2025-07-21 13:26:47 -07:00
2025-09-03 18:57:39 -07:00