<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib, branch OTP-21.0.1</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Prepare release</title>
<updated>2018-06-25T11:19:45+00:00</updated>
<author>
<name>Erlang/OTP</name>
<email>otp@erlang.org</email>
</author>
<published>2018-06-25T11:19:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=aeb4b903064ac690372fe4d2e668397d349c00d9'/>
<id>aeb4b903064ac690372fe4d2e668397d349c00d9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix unsafe optimization when running beam_block the second time</title>
<updated>2018-06-25T11:03:15+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2018-06-25T04:18:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=3dd17613fc7af70bc7f1222d7381533df0bd4eab'/>
<id>3dd17613fc7af70bc7f1222d7381533df0bd4eab</id>
<content type='text'>
The compiler would crash when compiling code such as:

    serialize(#{tag := value, id := Id, domain := Domain}) -&gt;
        [case Id of
             nil -&gt;
                 error(id({required, id}));
             _ -&gt;
                 &lt;&lt;10, 1:16/signed, Id:16/signed&gt;&gt;
         end,
         case Domain of
             nil -&gt;
                 error(id({required, domain}));
             _ -&gt;
                 &lt;&lt;8, 2:16/signed, Domain:32/signed&gt;&gt;
         end].

The crash would look like this:

    Function: serialize/1
    t.erl: internal error in block2;
    crash reason: {badmatch,false}

      in function  beam_utils:live_opt/4 (beam_utils.erl, line 861)
      in call from beam_utils:live_opt/1 (beam_utils.erl, line 285)
      in call from beam_block:function/2 (beam_block.erl, line 47)
      in call from beam_block:'-module/2-lc$^0/1-0-'/2 (beam_block.erl, line 33)
      in call from beam_block:'-module/2-lc$^0/1-0-'/2 (beam_block.erl, line 33)
      in call from beam_block:module/2 (beam_block.erl, line 33)
      in call from compile:block2/2 (compile.erl, line 1358)
      in call from compile:'-internal_comp/5-anonymous-1-'/3 (compile.erl, line 349)

The reason for the crash is an assertion failure caused by a previous
unsafe optimization. Here is the code before the unsafe optimization:

       .
       .
       .
    {bs_init2,{f,0},7,0,0,{field_flags,[]},{x,1}}.
    {bs_put_string,3,{string,[8,0,2]}}.
    {bs_put_integer,{f,0},{integer,32},1,{field_flags,[signed,big]},{y,1}}.

    {move,{x,1},{x,0}}.
    {test_heap,4,1}.
       .
       .
       .

beam_block:move_allocate/1 moved up the test_heap/2 instruction past the
move/2 instruction, adjusting the number of live registers at the same
time:

       .
       .
       .
    {bs_init2,{f,0},7,0,0,{field_flags,[]},{x,1}}.
    %% Only x1 is live now.
    {bs_put_string,3,{string,[8,0,2]}}.
    {bs_put_integer,{f,0},{integer,32},1,{field_flags,[signed,big]},{y,1}}.

    {test_heap,4,2}.     %Unsafe. x0 is dead.
    {move,{x,1},{x,0}}.
       .
       .
       .

This optimization is unsafe because the bs_init2 instruction killed
x0.

The bug is in beam_utils:anno_defs/1, which adds annotations indicating
the registers that are defined at the beginning of each block. The
annotation before the move/2 instruction incorrectly indicated that
x0 was live.

https://bugs.erlang.org/browse/ERL-650
https://github.com/elixir-lang/elixir/issues/7782
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The compiler would crash when compiling code such as:

    serialize(#{tag := value, id := Id, domain := Domain}) -&gt;
        [case Id of
             nil -&gt;
                 error(id({required, id}));
             _ -&gt;
                 &lt;&lt;10, 1:16/signed, Id:16/signed&gt;&gt;
         end,
         case Domain of
             nil -&gt;
                 error(id({required, domain}));
             _ -&gt;
                 &lt;&lt;8, 2:16/signed, Domain:32/signed&gt;&gt;
         end].

The crash would look like this:

    Function: serialize/1
    t.erl: internal error in block2;
    crash reason: {badmatch,false}

      in function  beam_utils:live_opt/4 (beam_utils.erl, line 861)
      in call from beam_utils:live_opt/1 (beam_utils.erl, line 285)
      in call from beam_block:function/2 (beam_block.erl, line 47)
      in call from beam_block:'-module/2-lc$^0/1-0-'/2 (beam_block.erl, line 33)
      in call from beam_block:'-module/2-lc$^0/1-0-'/2 (beam_block.erl, line 33)
      in call from beam_block:module/2 (beam_block.erl, line 33)
      in call from compile:block2/2 (compile.erl, line 1358)
      in call from compile:'-internal_comp/5-anonymous-1-'/3 (compile.erl, line 349)

The reason for the crash is an assertion failure caused by a previous
unsafe optimization. Here is the code before the unsafe optimization:

       .
       .
       .
    {bs_init2,{f,0},7,0,0,{field_flags,[]},{x,1}}.
    {bs_put_string,3,{string,[8,0,2]}}.
    {bs_put_integer,{f,0},{integer,32},1,{field_flags,[signed,big]},{y,1}}.

    {move,{x,1},{x,0}}.
    {test_heap,4,1}.
       .
       .
       .

beam_block:move_allocate/1 moved up the test_heap/2 instruction past the
move/2 instruction, adjusting the number of live registers at the same
time:

       .
       .
       .
    {bs_init2,{f,0},7,0,0,{field_flags,[]},{x,1}}.
    %% Only x1 is live now.
    {bs_put_string,3,{string,[8,0,2]}}.
    {bs_put_integer,{f,0},{integer,32},1,{field_flags,[signed,big]},{y,1}}.

    {test_heap,4,2}.     %Unsafe. x0 is dead.
    {move,{x,1},{x,0}}.
       .
       .
       .

This optimization is unsafe because the bs_init2 instruction killed
x0.

The bug is in beam_utils:anno_defs/1, which adds annotations indicating
the registers that are defined at the beginning of each block. The
annotation before the move/2 instruction incorrectly indicated that
x0 was live.

https://bugs.erlang.org/browse/ERL-650
https://github.com/elixir-lang/elixir/issues/7782
</pre>
</div>
</content>
</entry>
<entry>
<title>Prepare release</title>
<updated>2018-06-19T06:24:54+00:00</updated>
<author>
<name>Erlang/OTP</name>
<email>otp@erlang.org</email>
</author>
<published>2018-06-19T06:24:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=bb19e24a485e9ef43bcca3fbe9757da83f70c3a0'/>
<id>bb19e24a485e9ef43bcca3fbe9757da83f70c3a0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/henrik/Update-copyright'</title>
<updated>2018-06-18T12:57:03+00:00</updated>
<author>
<name>Henrik Nord</name>
<email>henrik@erlang.org</email>
</author>
<published>2018-06-18T12:57:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=9d5af99762b3795c763fb62c1516247bd3f8e12f'/>
<id>9d5af99762b3795c763fb62c1516247bd3f8e12f</id>
<content type='text'>
* origin/henrik/Update-copyright:
  Update copyright year
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* origin/henrik/Update-copyright:
  Update copyright year
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year</title>
<updated>2018-06-18T12:51:18+00:00</updated>
<author>
<name>Henrik Nord</name>
<email>henrik@erlang.org</email>
</author>
<published>2018-06-18T12:51:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=5ca92e2eac1e84fd22f60e7abc3aa2b0ff1cb42b'/>
<id>5ca92e2eac1e84fd22f60e7abc3aa2b0ff1cb42b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'ingela/ssl/doc-fix-21'</title>
<updated>2018-06-18T12:14:40+00:00</updated>
<author>
<name>Ingela Anderton Andin</name>
<email>ingela@erlang.org</email>
</author>
<published>2018-06-18T12:14:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=2e0559f21d2d77c44dbc579f0d6fef7a4d6564c4'/>
<id>2e0559f21d2d77c44dbc579f0d6fef7a4d6564c4</id>
<content type='text'>
* ingela/ssl/doc-fix-21:
  ssl: Document enhancements
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ingela/ssl/doc-fix-21:
  ssl: Document enhancements
</pre>
</div>
</content>
</entry>
<entry>
<title>ssl: Document enhancements</title>
<updated>2018-06-18T12:10:33+00:00</updated>
<author>
<name>Ingela Anderton Andin</name>
<email>ingela@erlang.org</email>
</author>
<published>2018-06-18T12:04:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=e014ca4131c8504963ff6f91b68053abd4e9f8a5'/>
<id>e014ca4131c8504963ff6f91b68053abd4e9f8a5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'lukas/otp_mibs/deprecate/OTP-15141'</title>
<updated>2018-06-15T12:23:29+00:00</updated>
<author>
<name>Lukas Larsson</name>
<email>lukas@erlang.org</email>
</author>
<published>2018-06-15T12:23:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=d6cd7d17e3b0dbcb9aac7bddb4bda31ffe4b598e'/>
<id>d6cd7d17e3b0dbcb9aac7bddb4bda31ffe4b598e</id>
<content type='text'>
* lukas/otp_mibs/deprecate/OTP-15141:
  Update primary bootstrap
  Deprecate otp_mibs
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lukas/otp_mibs/deprecate/OTP-15141:
  Update primary bootstrap
  Deprecate otp_mibs
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'siri/logger-fix'</title>
<updated>2018-06-15T09:16:00+00:00</updated>
<author>
<name>Siri Hansen</name>
<email>siri@erlang.org</email>
</author>
<published>2018-06-15T09:16:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=1bf30863a847aec45799361d39ccd440346b2d6a'/>
<id>1bf30863a847aec45799361d39ccd440346b2d6a</id>
<content type='text'>
* siri/logger-fix:
  [logger] Update documentation
  [logger] Adjust priority settings in test
  [logger] Unregister handler names before terminating
  [logger] Stress overload_kill tests in disk_log handler
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* siri/logger-fix:
  [logger] Update documentation
  [logger] Adjust priority settings in test
  [logger] Unregister handler names before terminating
  [logger] Stress overload_kill tests in disk_log handler
</pre>
</div>
</content>
</entry>
<entry>
<title>[logger] Update documentation</title>
<updated>2018-06-15T09:15:19+00:00</updated>
<author>
<name>Siri Hansen</name>
<email>siri@erlang.org</email>
</author>
<published>2018-06-13T09:48:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=5e23103186cb71c64f7f2fa28cbfd8c62d7ee21b'/>
<id>5e23103186cb71c64f7f2fa28cbfd8c62d7ee21b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
