mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
update
This commit is contained in:
@@ -592,6 +592,13 @@ pub fn deinit(dev: *DevServer) void {
|
||||
if (s.underlying) |websocket|
|
||||
websocket.close();
|
||||
}
|
||||
// Drain pending libuv close callbacks before freeing memory.
|
||||
// libuv closes handles asynchronously — without this, close
|
||||
// callbacks reference freed socket memory
|
||||
if (bun.Environment.isWindows) {
|
||||
const uv_loop = bun.windows.libuv.Loop.get();
|
||||
_ = bun.windows.libuv.uv_run(uv_loop, .nowait);
|
||||
}
|
||||
dev.active_websocket_connections.deinit(alloc);
|
||||
},
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { bunEnv, bunExe } from "harness";
|
||||
import { bunEnv, bunExe, isWindows } from "harness";
|
||||
|
||||
// Regression test for use-after-poison in builtin OutputTask callbacks
|
||||
// inside command substitution $().
|
||||
@@ -14,7 +14,7 @@ import { bunEnv, bunExe } from "harness";
|
||||
// with many /tmp entries and some permission-denied dirs reliably
|
||||
// triggers the ASAN use-after-poison.
|
||||
|
||||
describe("builtins in command substitution with errors should not crash", () => {
|
||||
describe.skipIf(isWindows)("builtins in command substitution with errors should not crash", () => {
|
||||
test("ls /tmp/* in command substitution", async () => {
|
||||
await using proc = Bun.spawn({
|
||||
cmd: [
|
||||
|
||||
Reference in New Issue
Block a user