mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
### What does this PR do? The DevSever's `IncrementalGraph` uses a data-oriented design memory management style, storing data in lists and using indices instead of pointers. In conventional memory management, when we free a pointer and accidentally use it will trip up asan. Obviously this doesn't apply when using lists and indices, so this PR adds a check in debug & asan builds. Everytime we free an `Edge` we better make sure that there are no more dangling references to that spot. This caught a case where we weren't setting `g.first_import[file_index] = .none` when deleting a file's imports, causing a dangling reference and out of bounds access. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
10 lines
606 B
Zig
10 lines
606 B
Zig
pub const Mutex = @import("./threading/Mutex.zig");
|
|
pub const Futex = @import("./threading/Futex.zig");
|
|
pub const Condition = @import("./threading/Condition.zig");
|
|
pub const GuardedValue = @import("./threading/guarded_value.zig").GuardedValue;
|
|
pub const DebugGuardedValue = @import("./threading/guarded_value.zig").DebugGuardedValue;
|
|
pub const WaitGroup = @import("./threading/WaitGroup.zig");
|
|
pub const ThreadPool = @import("./threading/ThreadPool.zig");
|
|
pub const Channel = @import("./threading/channel.zig").Channel;
|
|
pub const UnboundedQueue = @import("./threading/unbounded_queue.zig").UnboundedQueue;
|