You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ zig run test.zig
Error: nu::shell::terminated_by_signal
└─ mem.sliceAsBytes__anon_19529
× External command was terminated by a signal
╭─[entry #12:1:1]1 │ zig run test2.zig
· ─┬─
· ╰── terminated by SIGSEGV (11)
╰────
Expected Behavior
expect the output to be similar to;
// v- is badexternfnbad([]constu8) void;
pubfnmain() void {
bad();
}
which produces;
❯ zig run test2.zig
test2.zig:2:15: error: parameter of type'[]const u8' not allowed infunctionwith calling convention 'x86_64_sysv'
extern fn bad([]const u8) void;
^~~~~~~~~~
test2.zig:2:15: note: slices have no guaranteed in-memory representation
referenced by:
main: test2.zig:4:5
posixCallMainAndExit: /nix/store/5ijjcxhqcjc96q0pkqrnh97mkxpcqvwg-zig-0.14.0-dev.3286+05d8b565a/lib/std/start.zig:647:22
4 reference(s) hidden; use '-freference-trace=6' to see all references
The text was updated successfully, but these errors were encountered:
paperdev-code
changed the title
malformed extern decl containing slice causes segfault rather than error message
malformed extern fn decl containing slice causes segfault rather than error message
Feb 22, 2025
Zig Version
0.14.0-dev.3286+05d8b565a
Steps to Reproduce and Observed Behavior
given the following code;
attempt at compilation;
Expected Behavior
expect the output to be similar to;
which produces;
The text was updated successfully, but these errors were encountered: