Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/stdlib/src/beam_lib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1329,8 +1329,8 @@ pread(FD, AtPos, Size) ->

filename(BB) when is_binary(BB#bb.source) ->
BB#bb.source;
filename(BB) ->
list_to_atom(BB#bb.source).
filename(BB) ->
list_to_binary(BB#bb.source).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This crashes with ...

{badarg,[{erlang,list_to_binary,
                 [[47,98,117,105,108,100,114,111,111,116,47,111,116,112,47,69,
                   114,108,97,110,103,32,8709,8868,8478,47,108,105,98,47,101,
                   100,111,99,45,49,46,52,46,49,47,101,98,105,110,47,101,100,
                   111,99,46,98,101,97,109]],
                 [{error_info,#{module => erl_erts_errors}}]},
%% aka /buildroot/otp/Erlang ∅⊤℞/lib/edoc-1.4.1/ebin/edoc.beam

... I think we ought to use unicode:characters_to_binary/2 here.


beam_filename(Bin) when is_binary(Bin) ->
Bin;
Expand Down
Loading