Strange segfault null

unsure if im doing this right but im trying to load a dynamic library by explicit path then invoke a function on it.

Have not had any issues with dynlibs in macos or dlls in windows but have lots of strange issues in linux. in particular segfaults whenever i try to access any std functions

here’s a minimal repro.

searzocom/zig-015-shared-bug - Forgejo: Beyond coding. We forge.

see output.txt if you dont want to run it yourself. I’m on zig 0.15.2

Seems like a known issue with the x86_64 backend. Try targeting llvm and see if the crash disappears.

https://github.com/ziglang/zig/issues/25026
https://codeberg.org/ziglang/zig/issues/30048

yup setting use_llvm fixes the issue!

Fwiw i am on nixos and i dont see this issue on my ubuntu 24.04 LTS server…