Any NIF invocation that results in SALTY_ERROR behaves unpredictably, and/or crashes.
Things go completely broken. If lucky, {:error, :salty_error_unknown}
is returned, but I've also received
** (FunctionClauseError) no function clause matching in Inspect.Any.inspect/2
The following arguments were given to Inspect.Any.inspect/2:
# 1
118
# 2
%Inspect.Opts{
base: :decimal,
binaries: :infer,
char_lists: :infer,
charlists: :infer,
limit: 50,
pretty: true,
printable_limit: 4096,
safe: true,
structs: true,
syntax_colors: [
reset: [:reset, :yellow],
atom: :cyan,
string: :green,
list: :default_color,
boolean: :magenta,
nil: :magenta,
tuple: :default_color,
binary: :default_color,
map: :default_color
],
width: 80
}
Attempted function clauses (showing 1 out of 1):
def inspect(%module{} = struct, opts)
(elixir) lib/inspect.ex:375: Inspect.Any.inspect/2
(elixir) lib/kernel.ex:1929: Kernel.inspect/2
=CRASH REPORT==== 28-Aug-2018::15:58:44.635948 ===
crasher:
initial call: Elixir.IEx.Evaluator:init/4
pid: <0.161.0>
registered_name: []
exception error: no function clause matching
'Elixir.Inspect.Any':inspect("/../lib/logger/ebin/erl_error.beam",
#{'__struct__' =>
'Elixir.Inspect.Opts',
base => decimal,
binaries => infer,
char_lists => infer,
charlists => infer,
limit => 50,
pretty => true,
printable_limit => 4096,
safe => true,
structs => true,
syntax_colors =>
[{atom,cyan},
{string,green},
{list,default_color},
{boolean,magenta},
{nil,magenta},
{tuple,default_color},
{binary,default_color},
{map,default_color}],
width => 80}) (lib/inspect.ex, line 375)
in function 'Elixir.Kernel':inspect/2 (lib/kernel.ex, line 1929)
in call from 'Elixir.FunctionClauseError':'-blame/3-fun-0-'/2 (lib/exception.ex, line 1062)
in call from 'Elixir.Enum':'-map/2-lists^map/1-0-'/2 (lib/enum.ex, line 1314)
in call from 'Elixir.FunctionClauseError':blame/3 (lib/exception.ex, line 1061)
in call from 'Elixir.IEx.Evaluator':print_error/3 (lib/iex/evaluator.ex, line 294)
in call from 'Elixir.IEx.Evaluator':eval/3 (lib/iex/evaluator.ex, line 210)
in call from 'Elixir.IEx.Evaluator':loop/1 (lib/iex/evaluator.ex, line 94)
ancestors: [<0.70.0>]
message_queue_len: 0
messages: []
links: []
dictionary: []
trap_exit: false
status: running
heap_size: 6772
stack_size: 27
reductions: 30508
neighbours:
** (EXIT from #PID<0.161.0>) shell process exited with reason: an exception was raised:
** (FunctionClauseError) no function clause matching in Inspect.Any.inspect/2
(elixir) lib/inspect.ex:375: Inspect.Any.inspect('/../lib/logger/ebin/erl_error.beam', %Inspect.Opts{base: :decimal, binaries: :infer, char_lists: :infer, charlists: :infer, limit: 50, pretty: true, printable_limit: 4096, safe: true, structs: true, syntax_colors:
[atom: :cyan, string: :green, list: :default_color, boolean: :magenta, nil: :magenta, tuple: :default_color, binary: :default_color, map: :default_color], width: 80})
(elixir) lib/kernel.ex:1929: Kernel.inspect/2
(elixir) lib/exception.ex:1062: anonymous fn/2 in FunctionClauseError.blame/3
(elixir) lib/enum.ex:1314: Enum."-map/2-lists^map/1-0-"/2
(elixir) lib/exception.ex:1061: FunctionClauseError.blame/3
(iex) lib/iex/evaluator.ex:294: IEx.Evaluator.print_error/3
(iex) lib/iex/evaluator.ex:210: IEx.Evaluator.eval/3
(iex) lib/iex/evaluator.ex:94: IEx.Evaluator.loop/1
eheap_alloc: Cannot allocate 17517063650848 bytes of memory (of type "message").
Crash dump is being written to: erl_crash.dump...done
[1] 15766 segmentation fault (core dumped) iex -S mix