Skip to content

Commit

Permalink
compiler: fix nondeterministic behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
delitrem committed Jun 16, 2024
1 parent 2b3a727 commit d71c0ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/compiler/src/compile.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,7 @@ metadata_add_features(Ftrs, #compile{extra_chunks = Extra} = St) ->
proplists:from_map(maps:put(?META_USED_FEATURES, NewFtrs,
proplists:to_map(MetaData))),
Extra1 = proplists:from_map(maps:put(?META_CHUNK_NAME,
erlang:term_to_binary(MetaData1),
term_to_binary(MetaData1, [deterministic]),
proplists:to_map(Extra))),
St#compile{extra_chunks = Extra1}.

Expand Down Expand Up @@ -2467,8 +2467,8 @@ debug_info_chunk(#compile{mod_options=ModOpts0,
false ->
{erl_abstract_code,{none,AbstOpts},ModOpts0}
end,
DebugInfo = erlang:term_to_binary({debug_info_v1,Backend,Metadata},
[compressed]),
DebugInfo = term_to_binary({debug_info_v1,Backend,Metadata},
[deterministic, compressed]),
{DebugInfo, ModOpts}.

encrypt_debug_info(DebugInfo, Key, Opts) ->
Expand Down

0 comments on commit d71c0ad

Please sign in to comment.