Ciro Spaciari
3123c2b243
Merge branch 'main' into pfg/node-3
2025-07-25 13:01:41 -07:00
robobun
3e6d792b62
Fix PostgreSQL index out of bounds crash during batch inserts ( #21311 ) ( #21316 )
...
## Summary
Fixes the "index out of bounds: index 0, len 0" crash that occurs during
large batch PostgreSQL inserts, particularly on Windows systems.
The issue occurred when PostgreSQL DataRow messages contained data but
the `statement.fields` array was empty (len=0), causing crashes in
`DataCell.Putter.putImpl()`. This typically happens during large batch
operations where there may be race conditions or timing issues between
RowDescription and DataRow message processing.
## Changes
- **Add bounds checking** in `DataCell.Putter.putImpl()` before
accessing `fields` and `list` arrays
(src/sql/postgres/DataCell.zig:1043-1050)
- **Graceful degradation** - return `false` to ignore extra fields
instead of crashing
- **Debug logging** to help diagnose field metadata issues
- **Comprehensive regression tests** covering batch inserts, empty
results, and concurrent operations
## Test Plan
- [x] Added regression tests in `test/regression/issue/21311.test.ts`
- [x] Tests pass with the fix: All 3 tests pass with 212 expect() calls
- [x] Existing PostgreSQL tests still work (no regressions)
The fix prevents the crash while maintaining safe operation, allowing
PostgreSQL batch operations to continue working reliably.
## Root Cause
The crash occurred when:
1. `statement.fields` array was empty (len=0) due to timing issues
2. PostgreSQL DataRow messages contained actual data
3. Code tried to access `this.list[index]` and `this.fields[index]`
without bounds checking
This was particularly problematic on Windows during batch operations due
to potential differences in:
- Network stack message ordering
- Memory allocation behavior
- Threading/concurrency during batch operations
- Statement preparation timing
Fixes #21311
🤖 Generated with [Claude Code](https://claude.ai/code )
---------
Co-authored-by: Claude Bot <claude-bot@bun.sh >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
2025-07-25 12:53:49 -07:00
pfg
fe94a36dbc
Make execArgv empty when in compiled executable ( #21298 )
...
```ts
// a.js
console.log({
argv: process.argv,
execArgv: process.execArgv,
});
```
```diff
$> node a.js -a --b
{
argv: [
'/opt/homebrew/Cellar/node/24.2.0/bin/node',
'/tmp/a.js',
'-a',
'--b'
],
execArgv: []
}
$> bun a.js -a --b
{
argv: [ "/Users/pfg/.bun/bin/bun", "/tmp/a.js",
"-a", "--b"
],
execArgv: [],
}
$> bun build --compile a.js --outfile=a
[5ms] bundle 1 modules
[87ms] compile
$> ./a -a --b
{
argv: [ "bun", "/$bunfs/root/a", "-a", "--b" ],
- execArgv: [ "-a", "--b" ],
+ execArgv: [],
}
```
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-25 12:47:10 -07:00
pfg
cb2887feee
Fix Bun.resolve() returning a promise throwing a raw exception instead of an Error ( #21302 )
...
I haven't checked all uses of tryTakeException but this bug is probably
not the only one.
Caught by running fuzzy-wuzzy with debug logging enabled. It tried to
print the exception. Updates fuzzy-wuzzy to have improved logging that
can tell you what was last executed before a crash.
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-25 12:46:33 -07:00
Meghan Denny
72a6278b3f
Delete test/js/node/test/parallel/test-http-url.parse-https.request.js
...
flaky on macos ci atm
2025-07-24 19:06:38 -07:00
Meghan Denny
bd232189b4
node: fix test-http-server-keepalive-req-gc.js ( #21333 )
2025-07-24 13:46:50 -07:00
Meghan Denny
87df7527bb
node: fix test-http-url.parse-https.request.js ( #21335 )
2025-07-24 13:44:55 -07:00
190n
a1f756fea9
Fix running bun test on multiple node:test tests ( #19354 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-24 11:48:55 -07:00
190n
03dfd7d96b
Run callback passed to napi_module_register after dlopen returns instead of during call ( #20478 )
2025-07-24 11:46:56 -07:00
Meghan Denny
9fa8ae9a40
fixes #21274 ( #21278 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-23 22:31:42 -07:00
Ciro Spaciari
e4dd780c2a
fix(s3) ref before calling unlink ( #21317 )
...
Co-authored-by: Meghan Denny <meghan@bun.sh >
2025-07-23 22:23:58 -07:00
Dylan Conway
f90a007593
[PKG-513, ENG-19757] bun install: fix non-ascii edge case and simplify task lifetimes ( #21320 )
2025-07-23 19:23:54 -07:00
Meghan Denny
73d92c7518
Revert "Fix beforeAll hooks running for unmatched describe blocks when using test filters" ( #21292 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-22 12:53:53 -07:00
Meghan Denny
6d2a0e30f5
test: node: revert the previous tmpdirName commit
2025-07-21 21:34:00 -07:00
robobun
6383c8f94c
Fix beforeAll hooks running for unmatched describe blocks when using test filters ( #21195 )
...
Co-authored-by: Claude Bot <claude-bot@bun.sh >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-21 20:21:29 -07:00
Meghan Denny
d2a4fb8124
test: node: much more robust tmpdirName for use with --parallel
2025-07-21 15:56:32 -07:00
pfg
83760fc446
Sort imports in all files ( #21119 )
...
Co-authored-by: taylor.fish <contact@taylor.fish >
2025-07-21 13:26:47 -07:00
Jarred Sumner
a868e859d7
Run formatter
2025-07-21 01:19:09 -07:00
Zack Radisic
39dd5002c3
Fix CSS error with printing :is(...) pseudo class ( #21249 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-07-21 00:21:33 -07:00
robobun
7940861b87
Fix extra bracket in template literal syntax highlighting ( #17327 ) ( #21187 )
...
Co-authored-by: Claude Bot <claude-bot@bun.sh >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-20 23:38:24 -07:00
Jarred Sumner
bbc4f89c25
Deflake test-21049.test.ts
2025-07-20 23:02:10 -07:00
Zack Radisic
f4339df16b
SSG stuff ( #20998 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-07-20 22:37:50 -07:00
robobun
aad3abeadd
Update interactive spacing ( #21156 )
...
Co-authored-by: Claude Bot <claude-bot@bun.sh >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: RiskyMH <git@riskymh.dev >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-07-19 04:11:28 -07:00
Dylan Conway
1a9bc5da09
fix(install): isolated install aliased dependency name fix ( #21138 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
Co-authored-by: Meghan Denny <meghan@bun.sh >
2025-07-19 01:59:52 -07:00
taylor.fish
a1c0f74037
Simplify/fix threading utilities ( #21089 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-18 22:02:36 -07:00
Jarred Sumner
45e97919e5
Add bun bd to test/ folder and also run formatter
2025-07-17 22:20:02 -07:00
robobun
851fa7d3e6
Add support for AI agent environment variables to quiet test output ( #21135 )
...
Co-authored-by: Claude Bot <claude-bot@bun.sh >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-07-17 21:20:50 -07:00
Michael H
be03a537df
make bun ci work as alias of --frozen-lockfile (like npm ci) ( #20590 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-07-17 05:41:06 -07:00
Jarred Sumner
804e76af22
Introduce bun update --interactive ( #20850 )
...
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: Claude Bot <claude-bot@bun.sh >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-17 04:33:30 -07:00
190n
6b14f77252
fix nonsense test name and elapsed time when beforeEach callback has thrown ( #21118 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-17 02:02:57 -07:00
Meghan Denny
cc4f840e8b
test: remove accidental uses of test.only ( #20097 )
2025-07-16 23:07:23 -07:00
Dylan Conway
0bb7132f61
[ENG-15045] add --linker and copyfile fallback for isolated installs ( #21122 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-16 23:02:52 -07:00
Zack Radisic
45a0559374
Fix some shell things ( #20649 )
...
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Zack Radisic <zackradisic@users.noreply.github.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: robobun <robobun@oven.sh >
2025-07-16 19:46:31 -07:00
Michael H
15b7cd8c18
node:fs.glob support array of excludes and globs ( #20883 )
2025-07-16 03:08:54 -07:00
Michael H
0ee633663e
Implement bun why ( #20847 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-16 02:00:53 -07:00
Michael H
a717679fb3
support $variables in test.each ( #21061 )
2025-07-16 01:42:19 -07:00
Dylan Conway
2bc75a87f4
fix(install): fix resolving duplicate dependencies ( #21059 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-16 01:01:10 -07:00
Jarred Sumner
fdec7fc6e3
Simpler version of #20813 ( #21102 )
...
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <Jarred-Sumner@users.noreply.github.com >
2025-07-16 00:14:33 -07:00
Meghan Denny
875604a42b
safety: a lot more exception checker progress ( #20956 )
2025-07-16 00:11:19 -07:00
jarred-sumner-bot
32ce9a3890
Add Windows PE codesigning support for standalone executables ( #21091 )
...
Co-authored-by: Claude Bot <claude-bot@bun.sh >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-07-15 22:31:54 -07:00
Jarred Sumner
b0a5728b37
Allow "catalog" and "catalogs" in top-level package.json if it wasn't provided in "workspaces" object ( #21009 )
2025-07-15 22:14:27 -07:00
Michael H
20db4b636e
implement bun pm pkg ( #21046 )
2025-07-15 22:14:00 -07:00
jarred-sumner-bot
1cef9399e4
fix: CSS parser crashes with calc() NaN values and system colors in color-mix() ( #21079 )
...
Co-authored-by: Claude Bot <claude-bot@bun.sh >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com >
2025-07-15 22:02:03 -07:00
Michael H
f4444c0e4d
fix --tsconfig-override ( #21045 )
2025-07-15 22:00:17 -07:00
Dylan Conway
577b327fe5
[ENG-15008] fix #21086 ( #21093 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-07-15 21:59:41 -07:00
pfg
9d2eb78544
Fetch redirect fix ( #21064 )
...
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
2025-07-15 20:51:52 -07:00
Meghan Denny
4be43e2c52
de-flake spawn.test.ts
2025-07-15 17:18:46 -07:00
Ciro Spaciari
93cc51c974
fix(s3) handle slashs at end and start of bucket name ( #20997 )
2025-07-15 16:52:47 -07:00
Jarred Sumner
c2fc69302b
Try to deflake bun-install-lifecycle-scripts test ( #21070 )
2025-07-15 16:27:56 -07:00
Jarred Sumner
df7b6b4813
Add NODE_NO_WARNINGS ( #21075 )
2025-07-15 16:27:21 -07:00