Changelog

oven-sh/bun · · 2 commits

Windows watcher crash fixed; CSS parsers cleaned up

A Windows fs.watch segfault was fixed, alongside CSS parser cleanup for a subtle Zig error-handling leak pattern.

Windows fs.watch retry no longer segfaults (dylan-conway2dc1533)

fs.watch() on Windows could leave behind a poisoned watcher entry when the first attempt failed and the caller retried the same path, leading to a crash on the next lookup. The fix cleans up the half-initialized watcher inline and adds a regression test that reproduces the failure mode with dangling junctions.

CSS parsers now free partially built state on parse errors (dylan-conway9f9b681)

A bug pattern in Result(T)-returning CSS parsers was leaving allocated parser state alive because errdefer never ran on return .{ .err = ... }. This patch moves cleanup into the error paths for declaration parsing and light-dark() custom property parsing, preventing leaks and tightening the error handling.

Other misc changes

  • None.