Erlang OTP 23.0-rc2 is available for testing
John Högberg
john.hogberg@REDACTED
Thu Mar 26 15:47:00 CET 2020
Thanks for pointing this out, I'm looking into it.
/John
-----Original Message-----
From: erlang-questions <erlang-questions-bounces@REDACTED> On Behalf Of Kostis Sagonas
Sent: Thursday, March 26, 2020 15:30
To: erlang-questions@REDACTED
Subject: Re: Erlang OTP 23.0-rc2 is available for testing
On 3/25/20 3:24 PM, Kenneth Lundin wrote:
>
> OTP 23 Release Candidate 2
>
> This is the second of three planned release candidates before the OTP
> 23 release.
> The intention with this release is to get feedback from our users. All
> feedback is welcome, even if it is only to say that it works for you.
>
Hmmm,,. erlang:apply/3 seems to be broken, for me at least.
I had noticed some failures of PropEr
(https://github.com/proper-testing/proper) long ago on the 'master'
branch, but decided to investigate them yesterday and today.
Half day of debugging has produced the following (minimized) test case.
======================
-module(bug23).
-export([test/0]).
test() ->
symb_walk({call,lists,reverse,[[1,2,3]]}, fun erlang:apply/3).
symb_walk({call,Mod,Fun,Args}, HandleCall) ->
SymbWalk = fun(X) -> symb_walk(X, HandleCall) end,
HandledArgs = [SymbWalk(A) || A <- Args],
HandleCall(Mod, Fun, HandledArgs);
symb_walk(SymbTerm, HandleCall) ->
SymbWalk = fun(X) -> symb_walk(X, HandleCall) end,
do_symb_walk_gen(SymbWalk, SymbTerm).
do_symb_walk_gen(SymbWalk, SymbTerm) when is_list(SymbTerm) ->
safe_map_tr(SymbWalk, SymbTerm, []); do_symb_walk_gen(_, SymbTerm) ->
SymbTerm.
safe_map_tr(_Fun, [], AccList) ->
lists:reverse(AccList);
safe_map_tr(Fun, [Head | Tail], AccList) ->
safe_map_tr(Fun, Tail, [Fun(Head) | AccList]).
======================
Works OK on 22.x and prior but crashes with
42> bug23:test().
** exception error: bad argument
in function apply/3
called as apply(lists,reverse,[[1,2,3]])
on 23.0-rc2.
Kostis
More information about the erlang-questions
mailing list