-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
wrong line number in stack trace #12818
Labels
Milestone
Comments
|
Duplicate/related #12725, stack trace points to correct line with this patch: diff --git a/lib/std/crypto/chacha20.zig b/lib/std/crypto/chacha20.zig
index 2a43f4b94..2d9c67502 100644
--- a/lib/std/crypto/chacha20.zig
+++ b/lib/std/crypto/chacha20.zig
@@ -381,8 +381,7 @@ fn extend(key: [32]u8, nonce: [24]u8, comptime rounds_nb: usize) struct { key: [
};
}
-fn ChaChaIETF(comptime rounds_nb: usize) type {
- return struct {
+fn ChaChaIETF(comptime rounds_nb: usize) type { return struct {
/// Nonce length in bytes.
pub const nonce_length = 12;
/// Key length in bytes.
|
|
Thank you - I see that you have already a reduction and have narrowed down the problem to AstGen 👍 |
Vexu
added a commit
to Vexu/zig
that referenced
this issue
Sep 29, 2022
Previously AstGen would set decl_line for containers so that declarations inside them would be relative to the start of the container but Sema was not aware of the line offset of the container and would make them relative to the containers parent decl which would then break for generic structs. In the future when working on incremental compilation it will likely be better to communicate the line delta to Sema but for now this is a simpler fix that correctly handles the non-incremental case. Closes ziglang#12725 Closes ziglang#12818
Vexu
added a commit
to Vexu/zig
that referenced
this issue
Sep 29, 2022
Previously AstGen would set decl_line for containers so that declarations inside them would be relative to the start of the container but Sema was not aware of the line offset of the container and would make them relative to the containers parent decl which would then break for generic structs. In the future when working on incremental compilation it will likely be better to communicate the line delta to Sema but for now this is a simpler fix that correctly handles the non-incremental case. Closes ziglang#12725 Closes ziglang#12818
Vexu
added a commit
to Vexu/zig
that referenced
this issue
Sep 29, 2022
Previously AstGen would set decl_line for containers so that declarations inside them would be relative to the start of the container but Sema was not aware of the line offset of the container and would make them relative to the containers parent decl which would then break for generic structs. In the future when working on incremental compilation it will likely be better to communicate the line delta to Sema but for now this is a simpler fix that correctly handles the non-incremental case. Closes ziglang#12725 Closes ziglang#12818
Vexu
added a commit
to Vexu/zig
that referenced
this issue
Sep 29, 2022
Previously AstGen would set decl_line for containers so that declarations inside them would be relative to the start of the container but Sema was not aware of the line offset of the container and would make them relative to the containers parent decl which would then break for generic structs. In the future when working on incremental compilation it will likely be better to communicate the line delta to Sema but for now this is a simpler fix that correctly handles the non-incremental case. Closes ziglang#12725 Closes ziglang#12818
wooster0
pushed a commit
to wooster0/zig
that referenced
this issue
Oct 4, 2022
Previously AstGen would set decl_line for containers so that declarations inside them would be relative to the start of the container but Sema was not aware of the line offset of the container and would make them relative to the containers parent decl which would then break for generic structs. In the future when working on incremental compilation it will likely be better to communicate the line delta to Sema but for now this is a simpler fix that correctly handles the non-incremental case. Closes ziglang#12725 Closes ziglang#12818
Vexu
added a commit
to Vexu/zig
that referenced
this issue
Oct 10, 2022
Previously AstGen would set decl_line for containers so that declarations inside them would be relative to the start of the container but Sema was not aware of the line offset of the container and would make them relative to the containers parent decl which would then break for generic structs. In the future when working on incremental compilation it will likely be better to communicate the line delta to Sema but for now this is a simpler fix that correctly handles the non-incremental case. Closes ziglang#12725 Closes ziglang#12818
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Zig Version:
0.10.0-dev.3981+60678f5baSteps to reproduce:
The second frame points at
xorbut it should point at the next line, atThe text was updated successfully, but these errors were encountered: