Files
bun.sh/test/regression
Claude Bot c1b80836e0 Add stack overflow checks to URL pathname and string conversion
This prevents crashes when setting URL properties (like pathname) to objects
with deeply recursive toString() methods.

The fix adds stack safety checks in two key locations:
1. URL pathname setter - checks stack before attempting string conversion
2. String conversion functions (valueToUSVString, valueToByteString, etc.) -
   checks stack before calling toWTFString/toString

When the stack is near its limit, a RangeError is thrown instead of crashing
with an ASAN assertion failure or stack overflow.

Tests verify that:
- Limited recursion (100 calls) throws a proper error instead of crashing
- toString methods that modify URLs work correctly
- Deep recursion (10000 calls) either succeeds or throws RangeError

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 19:58:29 +00:00
..