<div><div dir="auto">Yeah, seems like you are right, thanks </div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">ср, 1 апр. 2020 г. в 17:04, Mikael Pettersson <<a href="mailto:mikpelinux@gmail.com">mikpelinux@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Apr 1, 2020 at 2:02 PM Alexander Petrovsky <<a href="mailto:askjuise@gmail.com" target="_blank">askjuise@gmail.com</a>> wrote:<br>
><br>
> Hello!<br>
><br>
> On my erlang (22.2) i've catch the strange behavior:<br>
><br>
> $ erl<br>
> Erlang/OTP 22 [erts-10.6] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]<br>
><br>
> Eshell V10.6 (abort with ^G)<br>
> 1> cnt = ets:new(cnt, [named_table, public, ordered_set, {keypos,1}, {write_concurrency,true}]).<br>
> cnt<br>
> 2> ets:update_counter(cnt, sent, {1, 3}, {sent, 0}).<br>
> beam/erl_term.h:1429:tag_val_def() Assertion failed: tag_val_def error<br>
<br>
With OTP-22.3 I get:<br>
<br>
1> cnt = ets:new(cnt, [named_table, public, ordered_set, {keypos,1},<br>
{write_concurrency,true}]).<br>
cnt<br>
2> ets:update_counter(cnt, sent, {1, 3}, {sent, 0}).<br>
** exception error: bad argument<br>
in function ets:update_counter/4<br>
called as ets:update_counter(cnt,sent,{1,3},{sent,0})<br>
3><br>
<br>
I think your example runs into<br>
<a href="https://bugs.erlang.org/browse/ERL-1125" rel="noreferrer" target="_blank">https://bugs.erlang.org/browse/ERL-1125</a>, which is fixed in newer<br>
versions.<br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Alexander Petrovsky</div></div></div></div></div>