-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Panic: reached unreachable code under aarch64 Ampere A1 cpu (Oracle Linux 8) #20038
New issue
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
Comments
if it doesn't crash, can you paste output of |
This is the output of the command:
|
bump this up because I encountered the same issue on 0.13.0. const std = @import("std");
const print = std.debug.print;
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer print("leak: {any}\n", .{gpa.deinit()});
const allocator = gpa.allocator();
var a = std.ArrayList(i16).init(allocator);
try a.append(10);
} I'm able to build it to an executable.
After some test, this is the line causing problem: |
I'm getting a different (more informative) error on my OCI box, building either I'm on
|
This just looks like another page size issue; see #20511. |
@DylanLukes can you run command: getconf PAGESIZE |
@mikdusan Sure, it reports:
|
The workaround for now is to edit pub const page_size = switch (builtin.cpu.arch) {
.wasm32, .wasm64 => 64 * 1024,
.aarch64 => switch (builtin.os.tag) {
.macos, .ios, .watchos, .tvos, .visionos => 16 * 1024,
+ .linux => 65536, // or your page size, run `getconf PAGESIZE` to find it
else => 4 * 1024,
}, Once runtime page size detection is implemented, this won't be necessary anymore. |
if anyone is having this issue, this is a workaround. modify the above file, and things start working. Example Ziglings. thank you sir @pfgithub |
Zig Version
0.13.0-dev.242+6635360db
Steps to Reproduce and Observed Behavior
Zig doesn't support Ampere A1 cpu from OCI cloud machines, trying to run a pre-built binary results in the errors below.
Trying to either bootstrap or to build from source without LLVM support, results in the missing "id_aa64mmfr2_el1" cpu instruction error.
Result of zig env command (using a pre-built aarch64 binary)
Trying to run zls
Trying to build the ziglings.org exercises (using a pre-built aarch64 binary). But doing "zig run" individual .zig files works ok
Expected Behavior
Be able to build projects using zig language under an Arm Ampere based machine.
The text was updated successfully, but these errors were encountered: