ikskuh / zig-network

A smallest-common-subset of socket functions for crossplatform networking, TCP & UDP
MIT License
484 stars 59 forks source link

SocketSet.deinit frees memory with wrong alignment on Windows #62

Closed zeroZshadow closed 9 months ago

zeroZshadow commented 1 year ago

On windows, the following step in deinit is problematic due to an alignment mismatch (1 instead of 8)

self.read_fd_set.deinit(self.allocator)

The cause is due to memSlice in allocator.free(self.memSlice()); not setting the alignment when casting pointer type.

Weldify commented 1 year ago

@zeroZshadow I fixed this in the latest PR

mochalins commented 9 months ago

I believe this can be closed now @zeroZshadow @MasterQ32