Skip to content
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

Crash: digit separator in bitint #576

Closed
ehaas opened this issue Nov 21, 2023 · 0 comments
Closed

Crash: digit separator in bitint #576

ehaas opened this issue Nov 21, 2023 · 0 comments
Labels
bug Something isn't working crash A bug that causes the compiler to crash

Comments

@ehaas
Copy link
Collaborator

ehaas commented Nov 21, 2023

//aro-args -std=c23
int x = 1'2wb;
/Users/ehaas/local/zig-macos-x86_64-0.12.0-dev.1536+6b9f7e26c/lib/std/fmt.zig:1971:17: 0x10c1ac1a5 in charToDigit (arocc)
        else => return error.InvalidCharacter,
                ^
/Users/ehaas/local/zig-macos-x86_64-0.12.0-dev.1536+6b9f7e26c/lib/std/math/big/int.zig:318:23: 0x10c299e28 in setString (arocc)
            const d = try std.fmt.charToDigit(ch, base);
                      ^
/Users/ehaas/local/zig-macos-x86_64-0.12.0-dev.1536+6b9f7e26c/lib/std/math/big/int.zig:2786:9: 0x10c2997b7 in setString (arocc)
        try m.setString(base, value, limbs_buffer, self.allocator);
        ^
/Users/ehaas/source/arocc/src/aro/Parser.zig:8163:35: 0x10c2131d2 in bitInt (arocc)
        error.InvalidCharacter => unreachable, // digits validated by Tokenizer
                                  ^
@ehaas ehaas added bug Something isn't working crash A bug that causes the compiler to crash labels Nov 21, 2023
@Vexu Vexu closed this as completed in 2a03265 Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crash A bug that causes the compiler to crash
Projects
None yet
Development

No branches or pull requests

1 participant