[erlang-bugs] Crash on compile with deprecated functions (18-rc1)
Björn Gustavsson
bjorn@REDACTED
Mon May 4 12:38:03 CEST 2015
On Sat, May 2, 2015 at 5:11 PM, Loïc Hoguin <essen@REDACTED> wrote:
> Hello,
>
> Some of my applications don't compile anymore because they have the
> ssl:negotiated_next_protocol instead of negotiated_protocol.
>
> Problem is there is a crash instead of a nice error:
>
> src/gun.erl: internal error in lint_module;
> crash reason: {case_clause,{deprecated,{ssl,negotiated_protocol}}}
This bug was introduced in https://github.com/erlang/otp/commit/7cf85926
> in function otp_internal:obsolete/3 (otp_internal.erl, line 33)
> in call from erl_lint:deprecated_function/5 (erl_lint.erl, line 3551)
> in call from erl_lint:check_remote_function/5 (erl_lint.erl, line 3527)
> in call from erl_lint:expr/3 (erl_lint.erl, line 2166)
> in call from erl_lint:expr/3 (erl_lint.erl, line 2111)
> in call from erl_lint:expr/3 (erl_lint.erl, line 2250)
> in call from erl_lint:exprs/3 (erl_lint.erl, line 2044)
> in call from erl_lint:icrt_clause/3 (erl_lint.erl, line 3029)
>
> When I sent the PR I just copied the code around this clause so I'm pretty
> sure this crash will happen on many more functions. Not sure what action to
> take about it.
No. All other functions are fine. They specify a
replacement function as a complete {M,F,A}
tuple. You left out the arity.
The correction is here:
https://github.com/erlang/otp/commit/85dbd5ff
There is a test suite that can find similar bugs
automatically. It is run like this:
ts:run(system, otp_SUITE, [batch]).
/Björn
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-bugs
mailing list