We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This example from the language reference is crashing stage2:
stage3/bin/zig build-exe test.zig thread 1564356 panic: reached unreachable code ???:?:?: 0x6a455c3 in ??? (???) ???:?:?: 0x7220050 in ??? (???) ???:?:?: 0x73cc5d9 in ??? (???) ???:?:?: 0x71931ab in ??? (???) ???:?:?: 0x701c448 in ??? (???) ???:?:?: 0x701acfb in ??? (???) ???:?:?: 0x73cbef9 in ??? (???) ???:?:?: 0x71e1218 in ??? (???) ???:?:?: 0x70228a6 in ??? (???) ???:?:?: 0x701acfb in ??? (???) ???:?:?: 0x6ed3c77 in ??? (???) ???:?:?: 0x6d50795 in ??? (???) ???:?:?: 0x6d4effd in ??? (???) ???:?:?: 0x6c86e2a in ??? (???) ???:?:?: 0x6c83fa1 in ??? (???) ???:?:?: 0x6ca9329 in ??? (???) ???:?:?: 0x6aacd79 in ??? (???) ???:?:?: 0x6a4463d in ??? (???) ???:?:?: 0x6a43eb7 in ??? (???) Aborted (core dumped)
pub fn main() noreturn { const msg = "hello world\n"; _ = syscall3(SYS_write, STDOUT_FILENO, @ptrToInt(msg), msg.len); _ = syscall1(SYS_exit, 0); unreachable; } pub const SYS_write = 1; pub const SYS_exit = 60; pub const STDOUT_FILENO = 1; pub fn syscall1(number: usize, arg1: usize) usize { return asm volatile ("syscall" : [ret] "={rax}" (-> usize), : [number] "{rax}" (number), [arg1] "{rdi}" (arg1), : "rcx", "r11" ); } pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { return asm volatile ("syscall" : [ret] "={rax}" (-> usize), : [number] "{rax}" (number), [arg1] "{rdi}" (arg1), [arg2] "{rsi}" (arg2), [arg3] "{rdx}" (arg3), : "rcx", "r11" ); }
Bonus points if you fix the missing stage3 stack traces before fixing the underlying issue.
The text was updated successfully, but these errors were encountered:
This hello world is no longer crashing
Sorry, something went wrong.
How can I make this into a regression test? Where should I put it?
No branches or pull requests
This example from the language reference is crashing stage2:
Bonus points if you fix the missing stage3 stack traces before fixing the underlying issue.
The text was updated successfully, but these errors were encountered: