Skip to content

Commit

Permalink
Try initializing local root with Val_unit instead of 0 to prevent GC …
Browse files Browse the repository at this point in the history
…crash
  • Loading branch information
sim642 committed Jun 27, 2024
1 parent 236d59e commit cf5d5b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/funct.ml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ let emit_function oc fundecl ins outs locals emit_call =
output_variable_declarations oc;
fprintf oc " value _vresult;\n";
fprintf oc " value _vres[%d] = { " num_outs;
for i = 1 to num_outs do fprintf oc "0, " done;
for i = 1 to num_outs do fprintf oc "Val_unit, " done;
fprintf oc "};\n\n"
end;
end_diversion oc;
Expand Down

0 comments on commit cf5d5b0

Please sign in to comment.