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: bitwise XOR #667

Closed
ehaas opened this issue Apr 5, 2024 · 0 comments · Fixed by #672
Closed

Crash: bitwise XOR #667

ehaas opened this issue Apr 5, 2024 · 0 comments · Fixed by #672
Labels
bug Something isn't working crash A bug that causes the compiler to crash

Comments

@ehaas
Copy link
Collaborator

ehaas commented Apr 5, 2024

_Static_assert((1 ^ - 1) == -2, "");
panic: index out of bounds: index 2, len 1
/Users/ehaas/local/zig-macos-x86_64-0.12.0-dev.3508+a6ed3e6d2/lib/std/math/big/int.zig:1974:36: 0x10a34123b in normalize (arocc)
        r.len = llnormalize(r.limbs[0..length]);
                                   ^
/Users/ehaas/local/zig-macos-x86_64-0.12.0-dev.3508+a6ed3e6d2/lib/std/math/big/int.zig:1283:24: 0x10a41c35e in bitXor (arocc)
            r.normalize(b.limbs.len + @intFromBool(a.positive != b.positive));
                       ^
/Users/ehaas/source/arocc/src/aro/Value.zig:749:25: 0x10a41bf85 in bitXor (arocc)
    result_bigint.bitXor(lhs_bigint, rhs_bigint);
                        ^
@ehaas ehaas added bug Something isn't working crash A bug that causes the compiler to crash labels Apr 5, 2024
ehaas added a commit to ehaas/arocc that referenced this issue Apr 6, 2024
@Vexu Vexu closed this as completed in #672 Apr 6, 2024
Vexu pushed a commit that referenced this issue Apr 6, 2024
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

Successfully merging a pull request may close this issue.

1 participant