-
-
Notifications
You must be signed in to change notification settings - Fork 312
Closed
Labels
BugSomething isn't workingSomething isn't workingFixed needs testingNeeds verification / testing that it now worksNeeds verification / testing that it now works
Milestone
Description
Command: c3c compile-run main.c3
Message: Error: The compiler ran out of memory! Over 512 MB was allocated from a single memory arena, perhaps you called some recursive macro?
Code:
macro @do_splat_thing(#args)
{
String[] args = { "program-name", ...(String[])#args };
// ...
}
fn int main(String[] args)
{
@do_splat_thing({ "str1","str1","str1","str1","str1","str1","str1" }); // 7 elements - ok
@do_splat_thing({ "str1","str1","str1","str1","str1","str1","str1","str1" }); // 8 elements - causes compiler OOM
return 0;
}Also happens with String[] args = { ...(String[])#args }; when the #args parameter is a slice containing 9 values.
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't workingFixed needs testingNeeds verification / testing that it now worksNeeds verification / testing that it now works