-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Milestone
Description
Here is a reproduction, simplified as much as I could:
pub fn main() anyerror!void {
crashing_function(foo); // has to be inside its own function, or else compilation seems to succeed
}
pub fn crashing_function(i: fn()void) void {
switch(i) {
foo => {}, // from my testing, the results can be anything, still hangs
bar => {},
baz => {},
qux => {},
// four functions/cases seems to be the minimum to get this behavior to occur
else => {}
}
}
pub fn foo() void {}
pub fn bar() void {}
pub fn baz() void {}
pub fn qux() void {}
Tested on zig 0.7.1
on Arch Linux x86_64.
Upon compilation of this code, the compiler seems to hang and continually use more and more memory. I've only been able to test it for a few seconds before it got to about 9GB of memory used, and I had to kill the process to avoid running out of memory.
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior