mitchellh / libxev

libxev is a cross-platform, high-performance event loop that provides abstractions for non-blocking IO, timers, events, and more and works on Linux (io_uring or epoll), macOS (kqueue), and Wasm + WASI. Available as both a Zig and C API.
MIT License
2.07k stars 74 forks source link

Fix benchmark step storing code in `build.zig` #40

Closed Corendos closed 1 year ago

Corendos commented 1 year ago

In build.zig, in benchTargets(...) I came across an issue while building where the StringHashMap growing code would reach an unreachable codepath.

It was due to the StringHashMap being given a local string value that was not copied. Simply making a copy of the string before passing it to the map solved the issue.