Jesper Louis Andersen | 16 Dec 01:07 2014
Picon

Dialyzer can't compile map correctly

Hi OTP team and other interested parties.

While I was building up the enacl application, I have discovered a problem where I can crash the dialyzer. Attached are two minimized files which exposes the problem. To compile this I did:

erlc +debug_info *.erl
dialyzer --build_plt --apps kernel stdlib
dialyzer *.beam

and it produces the following IDE (Internal Dialyzer Error):

erlc +debug_info *.erl
dialyzer *.beam
  Checking whether the PLT /home/jlouis/.dialyzer_plt is up-to-date... yes
  Proceeding with analysis...
=ERROR REPORT==== 16-Dec-2014::01:00:27 ===
Error in process <0.48.0> with exit value: {{case_clause,map},[{dialyzer_dataflow,find_terminals,1,[{file,"dialyzer_dataflow.erl"},{line,3451}]},{dialyzer_dataflow,find_terminals_list,3,[{file,"dialyzer_dataflow.erl"},{line,3504}]},{dialyzer_dataflow,classify_returns... 


dialyzer: Analysis failed with error:
{{case_clause,map},
 [{dialyzer_dataflow,find_terminals,1,
                     [{file,"dialyzer_dataflow.erl"},{line,3451}]},
  {dialyzer_dataflow,find_terminals_list,3,
                     [{file,"dialyzer_dataflow.erl"},{line,3504}]},
  {dialyzer_dataflow,classify_returns,1,
                     [{file,"dialyzer_dataflow.erl"},{line,3443}]},
  {dialyzer_dataflow,'-state__get_warnings/2-fun-0-',7,
                     [{file,"dialyzer_dataflow.erl"},{line,2908}]},
  {lists,foldl,3,[{file,"lists.erl"},{line,1261}]},
  {dialyzer_dataflow,state__get_warnings,2,
                     [{file,"dialyzer_dataflow.erl"},{line,2934}]},
  {dialyzer_dataflow,get_warnings,5,
                     [{file,"dialyzer_dataflow.erl"},{line,142}]},
  {dialyzer_succ_typings,collect_warnings,2,
                         [{file,"dialyzer_succ_typings.erl"},{line,182}]}]}
Last messages in the log cache:
  Reading files and computing callgraph... done in 0.06 secs
  Removing edges... done in 0.01 secs
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1

I have attached the two culprit files. They have the following sizes:

jlouis <at> eldar:~/tmp/problem$ wc *.erl
 12  29 211 enacl.erl
 23  36 460 enacl_nif.erl
 35  65 671 total

and I think it may be possible to shrink further down, but I think it is already small enough to be workable. Do note: while one part is a NIF, you don't need the underlying C code to break the dialyzer.

The full repository is at:


and the commit ID 23e535fcc23c1 should have the error if you want to look at the full repository. It does require a properly installed libsodium, which is not in Debian/Ubuntu for instance, which is why I have tried to narrow down the problem before reporting it.

I hope this is enough to track down the error, perhaps by looking at the backtrace and error case alone. Otherwise, please come back to me.
 
--
J.
Attachment (enacl.erl): text/x-erlang, 287 bytes
Attachment (enacl_nif.erl): text/x-erlang, 624 bytes
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs
Mikael Pettersson | 15 Dec 13:16 2014
Picon

SEGV in process_main() line 3163 [r15B03]

[2nd attempt to send this, my apologies if you seee this twice]

We've had two segfaults now in r15's process_main(), line 3163, which is
the register flushing loop just before the current process is swapped out:

==snip==
     argp = c_p->arg_reg;
     for (i = c_p->arity - 1; i > 0; i--) {
=>       argp[i] = reg[i];
     }
     c_p->arg_reg[0] = r(0);
     SWAPOUT;
==snip==

The core file is unfortunately truncated: I can see the registers at the
point of the SEGV, but not inspect any memory.  The registers and
disassembly are:

==snip==
Program terminated with signal 11, Segmentation fault.
#0  process_main () at beam/beam_emu.c:3163
3163    beam/beam_emu.c: No such file or directory.
(gdb) info reg
rax            0x7e7d77fff3f8   139077349274616
rbx            0x7f243b82feb8   139793593990840
rcx            0x0      0
rdx            0x53ba78 5487224
rsi            0x7e7d75622030   139077305376816
rdi            0x0      0
rbp            0x1414400        0x1414400
rsp            0x7f2467432cf0   0x7f2467432cf0
r8             0x0      0
r9             0x0      0
r10            0x0      0
r11            0x246    582
r12            0x7f2471b407c8   139794503174088
r13            0x7e7f4309cae0   139085050661600
r14            0x7e7f42e57168   139085048279400
r15            0xc63f   50751
rip            0x5425e4 0x5425e4 <process_main+29892>
eflags         0x10202  [ IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
(gdb) disassemble 0x5425a6,0x542610
Dump of assembler code from 0x5425a6 to 0x542610:
   0x00000000005425a6 <process_main+29830>:     mov    0x90(%rbp),%rdx
   0x00000000005425ad <process_main+29837>:     mov    %rax,0x98(%rbp)
   0x00000000005425b4 <process_main+29844>:     mov    %edx,0xa0(%rbp)
   0x00000000005425ba <process_main+29850>:     mov    0xd0(%rbp),%rcx
   0x00000000005425c1 <process_main+29857>:     lea    -0x1(%rdx),%eax
   0x00000000005425c4 <process_main+29860>:     mov    0x98(%rbp),%rsi
   0x00000000005425cb <process_main+29867>:     test   %eax,%eax
   0x00000000005425cd <process_main+29869>:     mov    %rcx,0x48(%rsp)
   0x00000000005425d2 <process_main+29874>:     jle    0x5425fd <process_main+29917>
   0x00000000005425d4 <process_main+29876>:     cltq
   0x00000000005425d6 <process_main+29878>:     sub    $0x2,%edx
   0x00000000005425d9 <process_main+29881>:     shl    $0x3,%rax
   0x00000000005425dd <process_main+29885>:     add    %rax,%r12
   0x00000000005425e0 <process_main+29888>:     lea    (%rsi,%rax,1),%rax
=> 0x00000000005425e4 <process_main+29892>:     mov    (%r12),%rcx
   0x00000000005425e8 <process_main+29896>:     sub    $0x1,%edx
   0x00000000005425eb <process_main+29899>:     sub    $0x8,%r12
   0x00000000005425ef <process_main+29903>:     mov    %rcx,(%rax)
   0x00000000005425f2 <process_main+29906>:     lea    0x1(%rdx),%ecx
   0x00000000005425f5 <process_main+29909>:     sub    $0x8,%rax
   0x00000000005425f9 <process_main+29913>:     test   %ecx,%ecx
   0x00000000005425fb <process_main+29915>:     jg     0x5425e4 <process_main+29892>
   0x00000000005425fd <process_main+29917>:     mov    %r15,(%rsi)
   0x0000000000542600 <process_main+29920>:     mov    %r14,0x0(%rbp)
   0x0000000000542604 <process_main+29924>:     mov    $0x8,%esi
   0x0000000000542609 <process_main+29929>:     mov    %r13,0x8(%rbp)
   0x000000000054260d <process_main+29933>:     mov    %rbx,0xe0(%rbp)
End of assembler dump.
==snip==

I interpret this as follows:
1. c_p == %rbp == 0x1414400
2. &argp[i] == %rax == 0x7e7d77fff3f8
   from this I deduce that c_p->arg_reg != c_p->def_arg_reg, so it points
   to a dynamically allocated area separate from *c_p
3. i == c_p->arity - 1 == %rdx == 0x53ba78
   this is clearly bonkers, and what's causing references into unmapped
   memory
4. &reg[i] == %r12 == 0x7f2471b407c8
   this is consistent with indexing a frame-local array at 0x53ba78

Basically, my conclusion is that c_p->arity has been clobbered, causing
out-of-range accesses in this loop.

We've had this exact crash twice now, in August and last Thursday (Dec 11).

I realize the lack of a complete core dump makes this impossible to debug.
What I'm hoping for is that someone might recollect some post-R15 change
or fix that might have something to do with unexpected clobbers of process
structs.

/Mikael
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Vladislav Titov | 10 Dec 17:58 2014

Mnesia:add_table_copy causes crashes when no replicas available

Hi

This is on a fully in-RAM mnesia cluster.

When performing mnesia:add_table_copy(tab, node(), ram_copies) when no active replicas of tab are available, it replies back correctly with {aborted, {system_limit, tab, ...}}.

However, looking at the mnesia_gvar afterwards, the {schema, local_tables} key lists the table in it.

This (?) then causes mnesia to shut down when a node that is listed as having the table gets started and adopts it as an orphan. In R14 (our target release for now):

FATAL ** Sender failed: {error, {no_exists, tab}}

Or in R17:

FATAL ** Cannot load table foo from disc: {not_loaded, storage_unknown}

This then causes mnesia to shutdown.

The R14 case only happens if the node listed as actually holding the table starts, and then re-starts. In R17 it seems to happen straight away on first startup.

The active_replicas option for the table ends up listing the node() as well at some point.

I've attached a repo case.

Any idea how I can work around this? Obviously checking active_replicas before a copy would be a good idea, but it wouldn't protect against race conditions when nodes are yo-yoing. Would cleaning up the local_tables gvar be a good idea if system_limit happens?

thanks,
vlad 



Attachment (bug_add_table_copy.escript): application/octet-stream, 2524 bytes
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs
Slava Yurin | 10 Dec 08:03 2014
Picon

gen_tcp:send and file:sendfile

Hi all.
 
I have error behavior of gen_tcp:send/2 + file:sendfile/5.
 
If data for send falls into buffer in port and happen file:sendfile/5 call, then
buffer not flushed and data from file send. After that any call gen_tcp:send/2
only append data to buffer and not send anything. And if not set send_timeout
option gen_tcp:send will hang after exceed size of buffer. This is my guess.
 
I attach test file and log of it usage.
 
Have reproducible error only when [{delay_send, true}, {nodelay, false}], but in
real usage see same behavior without this options. Can't reproduce it on
localhost and 1 file.
Attachment (send_file_test.erl): application/octet-stream, 1657 bytes
v.yurin <at> hell:~$ uname -a
Linux hell 3.17.3-1-ARCH #1 SMP PREEMPT Fri Nov 14 23:13:48 CET 2014 x86_64 GNU/Linux
v.yurin <at> hell:~/test$ erl
Erlang/OTP 17 [erts-6.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.2  (abort with ^G)
1> L = send_file_test:start().
Listen on 59690
#Port<0.563>
2> send_file_test:one_client(L, [], 1).
ok
Send file 1
3> send_file_test:one_client(L, [{delay_send, true}, {nodelay, false}], 1). 
ok
Send file 1
4> send_file_test:one_client(L, [{delay_send, true}, {nodelay, false}, {send_timeout, 1000}],
200).                                                        
ok
Send file 200
Send file 199
Send file 198
Send file 197
Send file 196
Send file 195
Send file 194
Send file 193
Send file 192
Send file 191
Send file 190
Send file 189
Send file 188
Send file 187
Send file 186
Send file 185
Send file 184
Send file 183
Send file 182
Send file 181
Send file 180
Send file 179
Send file 178
Send file 177
Send file 176
Send file 175
Send file 174
Send file 173
Send file 172
Send file 171
Send file 170
Send file 169
Send file 168
Send file 167
Send file 166
Send file 165
Send file 164
Send file 163
Send file 162
Send file 161
Send file 160
Send file 159
Send file 158
Send file 157
Send file 156
Send file 155
Send file 154
Send file 153
Send file 152
Send file 151
Send file 150
Send file 149
Send file 148
Send file 147
Send file 146
Send file 145
Send file 144
Send file 143
Send file 142
Send file 141
Send file 140
Send file 139
Send file 138
Send file 137
Send file 136
Send file 135
Send file 134
Send file 133
Send file 132
Send file 131
Send file 130
Send file 129
Send file 128
Send file 127
Send file 126
Send file 125
Send file 124
Send file 123
Send file 122
Send file 121
Send file 120
Send file 119
Send file 118
Send file 117
Send file 116
Send file 115
Send file 114
Send file 113
Send file 112
Send file 111
Send file 110
Send file 109
Send file 108
Send file 107
Send file 106
Send file 105
Send file 104
Send file 103
Send file 102
Send file 101
Send file 100
Send file 99
Send file 98
Send file 97
Send file 96
Send file 95
Send file 94
Send file 93
Send file 92
Send file 91
Send file 90
Send file 89
Send file 88
Send file 87
Send file 86
Send file 85
Send file 84
Send file 83
5> 
=ERROR REPORT==== 10-Dec-2014::12:45:28 ===
Error in process <0.40.0> with exit value: {{badmatch,{error,timeout}},[{send_file_test,loop,3,[{file,"send_file_test.erl"},{line,37}]}]}

5> send_file_test:one_client(L, [{delay_send, true}, {nodelay, false}], 200).       ok             
Send file 200
Send file 199
Send file 198
Send file 197
Send file 196
Send file 195
Send file 194
Send file 193
Send file 192
Send file 191
Send file 190
Send file 189
Send file 188
Send file 187
Send file 186
Send file 185
Send file 184
Send file 183
Send file 182
Send file 181
Send file 180
Send file 179
Send file 178
Send file 177
Send file 176
Send file 175
Send file 174
Send file 173
Send file 172
Send file 171
Send file 170
Send file 169
Send file 168
Send file 167
Send file 166
Send file 165
Send file 164
Send file 163
Send file 162
Send file 161
Send file 160
Send file 159
Send file 158
Send file 157
Send file 156
Send file 155
Send file 154
Send file 153
Send file 152
Send file 151
Send file 150
Send file 149
Send file 148
Send file 147
Send file 146
Send file 145
Send file 144
Send file 143
Send file 142
Send file 141
Send file 140
Send file 139
Send file 138
Send file 137
Send file 136
Send file 135
Send file 134
Send file 133
Send file 132
Send file 131
Send file 130
Send file 129
Send file 128
Send file 127
Send file 126
Send file 125
Send file 124
Send file 123
Send file 122
Send file 121
Send file 120
Send file 119
Send file 118
Send file 117
Send file 116
Send file 115
Send file 114
Send file 113
Send file 112
Send file 111
Send file 110
Send file 109
Send file 108
Send file 107
Send file 106
Send file 105
Send file 104
Send file 103
Send file 102
Send file 101
Send file 100
Send file 99
Send file 98
Send file 97
Send file 96
Send file 95
Send file 94
Send file 93
Send file 92
Send file 91
Send file 90
Send file 89
Send file 88
Send file 87
Send file 86
Send file 85
Send file 84
Send file 83
6> now().
{1418,194038,215600}
7> now().
{1418,194077,282560}
8> "send hang ...".
v.yurin <at> hell:~$ telnet 127.0.0.1 59690
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
start
Some data before file
File 1:
%%  <at> author Slava Yurin <YurinVV <at> ya.ru>
%%  <at> doc Test Sendfile
-module(send_file_test).

-export([one_client/3]).
-export([start/0]).

start() ->
	{ok, Listen} = gen_tcp:listen(0, [{active, false}, {ip, {127, 0, 0, 1}}]),
	{ok, Port} = inet:port(Listen),
	io:format("Listen on ~p~n", [Port]),
	Listen.

one_client(Listen, Opt, FileCount) ->
	{ok, Client} = gen_tcp:accept(Listen),
	%Opt = [{delay_send, false}, {nodelay, true}],
	%Opt = [{delay_send, true}, {nodelay, false}],
	ok = inet:setopts(Client, [binary, {packet, line}, {active, false} | Opt]),
	Pid = spawn(fun() -> loop(Client, FileCount) end),
	ok = gen_tcp:controlling_process(Client, Pid),
	Pid ! start,
	ok.

loop(Client, FileCount) ->
	receive start -> ok end,
	{ok, <<"start\r\n">>} = gen_tcp:recv(Client, 0),
	{ok, FD} = file:open("send_file_test.erl", [raw, read, binary]),
	loop(Client, FD, FileCount).

loop(_, _, 0) ->
	ok;
loop(Client, FD, Pos) ->
	io:format("Send file ~p~n", [Pos]),
	ok = gen_tcp:send(Client,
		["Some data before file\r\nFile ", integer_to_list(Pos), ":\r\n"]),
	{ok, _} = file:sendfile(FD, Client, 0, 0, []),
	ok = gen_tcp:send(Client, ["File ", integer_to_list(Pos), " end\r\nSome data after file\r\n"]),
	loop(Client, FD, Pos - 1).
File 1 end
Some data after file
Connection closed by foreign host.
v.yurin <at> hell:~$ telnet 127.0.0.1 59690
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
start
%%  <at> author Slava Yurin <YurinVV <at> ya.ru>
%%  <at> doc Test Sendfile
-module(send_file_test).

-export([one_client/3]).
-export([start/0]).

start() ->
	{ok, Listen} = gen_tcp:listen(0, [{active, false}, {ip, {127, 0, 0, 1}}]),
	{ok, Port} = inet:port(Listen),
	io:format("Listen on ~p~n", [Port]),
	Listen.

one_client(Listen, Opt, FileCount) ->
	{ok, Client} = gen_tcp:accept(Listen),
	%Opt = [{delay_send, false}, {nodelay, true}],
	%Opt = [{delay_send, true}, {nodelay, false}],
	ok = inet:setopts(Client, [binary, {packet, line}, {active, false} | Opt]),
	Pid = spawn(fun() -> loop(Client, FileCount) end),
	ok = gen_tcp:controlling_process(Client, Pid),
	Pid ! start,
	ok.

loop(Client, FileCount) ->
	receive start -> ok end,
	{ok, <<"start\r\n">>} = gen_tcp:recv(Client, 0),
	{ok, FD} = file:open("send_file_test.erl", [raw, read, binary]),
	loop(Client, FD, FileCount).

loop(_, _, 0) ->
	ok;
loop(Client, FD, Pos) ->
	io:format("Send file ~p~n", [Pos]),
	ok = gen_tcp:send(Client,
		["Some data before file\r\nFile ", integer_to_list(Pos), ":\r\n"]),
	{ok, _} = file:sendfile(FD, Client, 0, 0, []),
	ok = gen_tcp:send(Client, ["File ", integer_to_list(Pos), " end\r\nSome data after file\r\n"]),
	loop(Client, FD, Pos - 1).
Connection closed by foreign host.
v.yurin <at> hell:~$ telnet 127.0.0.1 59690
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
start

[ ... skip ... ]

%%  <at> author Slava Yurin <YurinVV <at> ya.ru>
%%  <at> doc Test Sendfile
-module(send_file_test).

-export([one_client/3]).
-export([start/0]).

start() ->
	{ok, Listen} = gen_tcp:listen(0, [{active, false}, {ip, {127, 0, 0, 1}}]),
	{ok, Port} = inet:port(Listen),
	io:format("Listen on ~p~n", [Port]),
	Listen.

one_client(Listen, Opt, FileCount) ->
	{ok, Client} = gen_tcp:accept(Listen),
	%Opt = [{delay_send, false}, {nodelay, true}],
	%Opt = [{delay_send, true}, {nodelay, false}],
	ok = inet:setopts(Client, [binary, {packet, line}, {active, false} | Opt]),
	Pid = spawn(fun() -> loop(Client, FileCount) end),
	ok = gen_tcp:controlling_process(Client, Pid),
	Pid ! start,
	ok.

loop(Client, FileCount) ->
	receive start -> ok end,
	{ok, <<"start\r\n">>} = gen_tcp:recv(Client, 0),
	{ok, FD} = file:open("send_file_test.erl", [raw, read, binary]),
	loop(Client, FD, FileCount).

loop(_, _, 0) ->
	ok;
loop(Client, FD, Pos) ->
	io:format("Send file ~p~n", [Pos]),
	ok = gen_tcp:send(Client,
		["Some data before file\r\nFile ", integer_to_list(Pos), ":\r\n"]),
	{ok, _} = file:sendfile(FD, Client, 0, 0, []),
	ok = gen_tcp:send(Client, ["File ", integer_to_list(Pos), " end\r\nSome data after file\r\n"]),
	loop(Client, FD, Pos - 1).
Connection closed by foreign host.
v.yurin <at> hell:~$ telnet 127.0.0.1 59690
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
start

[ ... skip ... ]

%%  <at> author Slava Yurin <YurinVV <at> ya.ru>
%%  <at> doc Test Sendfile
-module(send_file_test).

-export([one_client/3]).
-export([start/0]).

start() ->
	{ok, Listen} = gen_tcp:listen(0, [{active, false}, {ip, {127, 0, 0, 1}}]),
	{ok, Port} = inet:port(Listen),
	io:format("Listen on ~p~n", [Port]),
	Listen.

one_client(Listen, Opt, FileCount) ->
	{ok, Client} = gen_tcp:accept(Listen),
	%Opt = [{delay_send, false}, {nodelay, true}],
	%Opt = [{delay_send, true}, {nodelay, false}],
	ok = inet:setopts(Client, [binary, {packet, line}, {active, false} | Opt]),
	Pid = spawn(fun() -> loop(Client, FileCount) end),
	ok = gen_tcp:controlling_process(Client, Pid),
	Pid ! start,
	ok.

loop(Client, FileCount) ->
	receive start -> ok end,
	{ok, <<"start\r\n">>} = gen_tcp:recv(Client, 0),
	{ok, FD} = file:open("send_file_test.erl", [raw, read, binary]),
	loop(Client, FD, FileCount).

loop(_, _, 0) ->
	ok;
loop(Client, FD, Pos) ->
	io:format("Send file ~p~n", [Pos]),
	ok = gen_tcp:send(Client,
		["Some data before file\r\nFile ", integer_to_list(Pos), ":\r\n"]),
	{ok, _} = file:sendfile(FD, Client, 0, 0, []),
	ok = gen_tcp:send(Client, ["File ", integer_to_list(Pos), " end\r\nSome data after file\r\n"]),
	loop(Client, FD, Pos - 1).
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs
Leo Liu | 7 Dec 03:18 2014
Face
Picon

wx-config on centos7

wx-config belongs to the legacy gtk2-based package wxGTK-devel 2.8.12
and usually not installed. wxGTK3-devel provides wx-config-3.0. Could
someone fix the wx application to build correctly on centos7. Thanks.

Leo
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Alex Wilson | 5 Dec 09:00 2014
Picon

High latency and CPU usage on *BSD (pull req #528)

Hi all,

I submitted a pull request a bit over a month ago (#528) to fix issues 
around high latency and CPU usage, especially on OpenBSD (but also a lot 
of the rest of the BSD family) due to os_mon forking and shelling out to 
run "uptime" and "ps".

Is it possible I could get some feedback on this? Is there a reason it's 
been sitting untouched? Without the patch, Riak is borderline unuseable 
on OpenBSD 5.6, as are a few other libraries and apps, so I was hoping 
it might get a little more attention.

Sorry to nag! I'd much rather have the issue fixed upstream than have to 
put local patches into packaging on 4 platforms separately with the next 
release...

-Alex
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Ryan Scheel | 1 Dec 23:19 2014
Picon

BREAK 'A' is not documented in BREAK prompt.

```
[havvy <at> nixos:~/wiki/project]$ erl
Erlang/OTP 17 [erts-6.2] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]
 
Eshell V6.2 (abort with ^G)
1>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
A
 
Crash dump was written to: erl_crash.dump
Crash dump requested by userAborted
```

The crash is intended as per the C file, but I could not find any documentation on
this behavior outside of code, and it should definitely be listed in the BREAK prompt.
It's confusing that a typo (I hit capslock before hitting 'a' by mistake) would cause
a crash, and if it wasn't for asking in IRC, I'd still think this was an implementation
bug instead of the documentation bug that it is.
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs
Mattias Waldau | 27 Nov 11:21 2014

Minor issue: dialyzer on ARM: Compiling some key modules to native code => Illegal instruction (core dumped)

Hi,

I found the --no_native flag, so dialyzer is working nicely. I just 
wanted to report this.

I made build from src. Downloaded zip from github today (2014-11-27). I 
have run the test suite, no complaints.

Thanks,

Mattias

Ps. I am playing with Erlang on a ARM Chromebook with crouton system 
(Samsung Chome 2,for $200). Very usable. About half speed of this Exynos 
5 Octa 1.9GHz compared to a Intel Core i5-2450, 2.4 Ghz.
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Anton Ryabkov | 25 Nov 05:08 2014
Picon

xmerl_xsd validation failed on attribute list's type

Hello,

on Erlang R16B03, R17.0 I've found that xmerl_xsd doesn't validate xml, that contains list's type element attribute. Validation failed with error:
{error,
    [{[],xmerl_xsd,
      {could_not_check_value_for_type,
          {list,[{simpleType,{item,[],[]}}]}}}]}

Steps to reproduce:
1. Untar archive in one directory.
2. compile xsd_list_attr_test.erl
3. xsd_list_attr_test:test().
4. look at erlang console. There will be printed:
Validation result: {error,
                       [{[],xmerl_xsd,
                         {could_not_check_value_for_type,
                             {list,[{simpleType,{item,[],[]}}]}}}]}

_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs
Nicolas Dudebout | 23 Nov 12:56 2014
Picon

Dialyzer does not check record update types

Dialyzer checks the type of record elements when creating them but not when updating them. Pasted below is a minimal working example.

Nicolas




-module(test).

-export([ baz/1, quux/2 ]).

-type bar()    :: atom().
-type notbar() :: string().

-record(foo, { bar :: bar() }).


% CORRECT: Dialyzer generates a warning
% test.erl:13: Invalid type specification for function test:baz/1. The success typing is (atom()) -> #foo{bar::atom()}
-spec baz(notbar()) -> #foo{}.

baz(NotBar) ->
  #foo{ bar = NotBar }.

% INCORECT: Dialyzer does not say anything
-spec quux(#foo{}, notbar()) -> #foo{}.

quux(Foo, NotBar) ->
  Foo#foo{ bar = NotBar }.
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs
Nicolas Dudebout | 23 Nov 12:53 2014
Picon

Dialyzer re-factoring in maint fixes a bug and should make it to maint-17

The "minor re-factoring" mentioned in https://github.com/erlang/otp/commit/197a8467f465930372f31c8f8b7340f8339aa23a actually fixes a bug.

cleanup_compile_options/1 is supposed to filter out elements from a list. However, the original implementation does not recurse properly and filters out at most one option. The re-factored implementation does not have this problem.

This bug is preventing me from creating a PLT file for some libraries compiled with r16b03 by using the dialyzer included with 17.3. Applying this patch solves the problem.

I think that this patch should be applied to maint-17.

Nicolas
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Gmane