Skip to content

Conversation

@jacobly0
Copy link
Member

@jacobly0 jacobly0 commented May 5, 2023

isAlwaysVoid was being called with the undefined tag added by addOne, causing non-deterministic behavior failures with release builds of the compiler. Prevents the following random failure:

test/behavior/defer.zig:120:40: error: expected type 'error{One}', found 'void'

`isAlwaysVoid` was being called with the undefined tag added by
`addOne`, causing non-deterministic behavior failures with release
builds of the compiler.  Prevents the following random failure:

    test/behavior/defer.zig:120:40: error: expected type 'error{One}', found 'void'
@jacobly0 jacobly0 force-pushed the undef-errdefer-capture branch from 0dd7f7e to da878dc Compare May 5, 2023 19:09
@andrewrk andrewrk enabled auto-merge (rebase) May 5, 2023 19:12
Allocating an extended tag is much cleaner and easier to reason about
than reusing an existing tag.  The previous `.data = undefined` was a
clear indication that we don't have any data to store, and so might as
well store an extended tag in that space almost for free.
auto-merge was automatically disabled May 5, 2023 20:10

Head branch was pushed to by a user without write access

@andrewrk andrewrk enabled auto-merge May 5, 2023 20:24
@andrewrk andrewrk merged commit 1e98110 into ziglang:master May 6, 2023
@jacobly0 jacobly0 deleted the undef-errdefer-capture branch May 6, 2023 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants