<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/compiler/test, branch maint</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Fix an internal consistency check failure caused by beam_except</title>
<updated>2019-08-15T04:51:22+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-08-15T04:38:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=479eaa7cf2eb0701af7aeb4a94da5cd13ec7de67'/>
<id>479eaa7cf2eb0701af7aeb4a94da5cd13ec7de67</id>
<content type='text'>
https://bugs.erlang.org/browse/ERL-1026
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://bugs.erlang.org/browse/ERL-1026
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compiler crash when compiling some receive statements</title>
<updated>2019-08-14T05:10:17+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-08-13T04:38:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c5e36feada9d0362108890f42c40dd2398b1b531'/>
<id>c5e36feada9d0362108890f42c40dd2398b1b531</id>
<content type='text'>
The compiler would crash when compiling the following code:

    do(Acc) -&gt;
        receive
            {Pid, abc} -&gt;
                ok;
            {Pid, []} -&gt;
                ok;
            {Pid, _Res} -&gt;
                exit(_Res)
        end,
        do([Pid | Acc]).

The last clause that always raises an exception would confuse the
compiler so that it would think that the `receive` statement was at the
end of the function and it would generate incorrect code for the `do/1`
call following the `receive`.

https://bugs.erlang.org/browse/ERL-1022
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The compiler would crash when compiling the following code:

    do(Acc) -&gt;
        receive
            {Pid, abc} -&gt;
                ok;
            {Pid, []} -&gt;
                ok;
            {Pid, _Res} -&gt;
                exit(_Res)
        end,
        do([Pid | Acc]).

The last clause that always raises an exception would confuse the
compiler so that it would think that the `receive` statement was at the
end of the function and it would generate incorrect code for the `do/1`
call following the `receive`.

https://bugs.erlang.org/browse/ERL-1022
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'bjorn/compiler/fix-stack-init/ERL-1017/OTP-15968' into maint</title>
<updated>2019-08-05T11:09:02+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-08-05T11:09:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=29f9e7161f7245f5cd3b21cfb92b11769053d444'/>
<id>29f9e7161f7245f5cd3b21cfb92b11769053d444</id>
<content type='text'>
* bjorn/compiler/fix-stack-init/ERL-1017/OTP-15968:
  Ensure that the stack slots are initialized when matching maps
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* bjorn/compiler/fix-stack-init/ERL-1017/OTP-15968:
  Ensure that the stack slots are initialized when matching maps
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure that the stack slots are initialized when matching maps</title>
<updated>2019-08-05T11:00:46+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-08-01T16:42:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=e6c818956cadeb90f62f61ee5263ba4035be40c4'/>
<id>e6c818956cadeb90f62f61ee5263ba4035be40c4</id>
<content type='text'>
When matching a map, the compiler could fail to generate code that
would initialize all stack slots (Y registers) properly. Here is a
general outline of code that *could* cause this problem:

    foo(Key, Map) -&gt;
         Res = case Map of
                  #{Key := Val} -&gt;
                      %% Do something with Val here.
		        .
			.
			.
                  #{} -&gt;
		      []
              end,
	%% The stack slot for Val might not have been initialized
	%% here if the key was not present in the map.
	.
	.
	.
	%% Use Res.
	.
	.
	.

The code generator would wrongly assume that the map matching would
always initialize the stack slot, and if nothing else happened to
force that stack slot to be initialized, it would remain
uninitialized, which would likely crash the runtime system at the next
garbage collection.

`beam_validator` is supposed to find these kind of problems, but a bug
in `beam_validator` prevented it from detecting this problem.

https://bugs.erlang.org/browse/ERL-1017
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When matching a map, the compiler could fail to generate code that
would initialize all stack slots (Y registers) properly. Here is a
general outline of code that *could* cause this problem:

    foo(Key, Map) -&gt;
         Res = case Map of
                  #{Key := Val} -&gt;
                      %% Do something with Val here.
		        .
			.
			.
                  #{} -&gt;
		      []
              end,
	%% The stack slot for Val might not have been initialized
	%% here if the key was not present in the map.
	.
	.
	.
	%% Use Res.
	.
	.
	.

The code generator would wrongly assume that the map matching would
always initialize the stack slot, and if nothing else happened to
force that stack slot to be initialized, it would remain
uninitialized, which would likely crash the runtime system at the next
garbage collection.

`beam_validator` is supposed to find these kind of problems, but a bug
in `beam_validator` prevented it from detecting this problem.

https://bugs.erlang.org/browse/ERL-1017
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'john/compiler/fix-delayed-type-inference/OTP-15954/ERL-995' into maint</title>
<updated>2019-08-05T09:37:34+00:00</updated>
<author>
<name>John Högberg</name>
<email>john@erlang.org</email>
</author>
<published>2019-08-05T09:37:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=381ff386961aa28abaf2b43572303bd394121a7d'/>
<id>381ff386961aa28abaf2b43572303bd394121a7d</id>
<content type='text'>
* john/compiler/fix-delayed-type-inference/OTP-15954/ERL-995:
  beam_validator: Values referenced by other values must be merged
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* john/compiler/fix-delayed-type-inference/OTP-15954/ERL-995:
  beam_validator: Values referenced by other values must be merged
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'bjorn/compiler/length-misuse/ERL-1013' of https://github.com/bjorng/otp into maint</title>
<updated>2019-08-02T08:40:34+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-08-02T08:40:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=5360ede343cc21df7bfcf2291666a99cfc64b866'/>
<id>5360ede343cc21df7bfcf2291666a99cfc64b866</id>
<content type='text'>
OTP-15970

* 'bjorn/compiler/length-misuse/ERL-1013' of https://github.com/bjorng/otp:
  Eliminate a crash in the type optimizer pass
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OTP-15970

* 'bjorn/compiler/length-misuse/ERL-1013' of https://github.com/bjorng/otp:
  Eliminate a crash in the type optimizer pass
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'bjorn/compiler/fix-no_type_opt/ERL-997' of https://github.com/bjorng/otp into maint</title>
<updated>2019-08-02T08:39:55+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-08-02T08:39:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=e1a2c49be73a8bafdae0aabb32d83c3e9a64c652'/>
<id>e1a2c49be73a8bafdae0aabb32d83c3e9a64c652</id>
<content type='text'>
OTP-15969

* 'bjorn/compiler/fix-no_type_opt/ERL-997' of https://github.com/bjorng/otp:
  Fix compiler crash when compiling with +no_type_opt
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OTP-15969

* 'bjorn/compiler/fix-no_type_opt/ERL-997' of https://github.com/bjorng/otp:
  Fix compiler crash when compiling with +no_type_opt
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'bjorn/compiler/fix-unsafe-sharing/OTP-15963' into maint</title>
<updated>2019-08-01T08:24:23+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-08-01T08:24:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c7ac8d9bf26cbb04c2942e792f766a2ba6d8b07e'/>
<id>c7ac8d9bf26cbb04c2942e792f766a2ba6d8b07e</id>
<content type='text'>
* bjorn/compiler/fix-unsafe-sharing/OTP-15963:
  Fix unsafe code sharing
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* bjorn/compiler/fix-unsafe-sharing/OTP-15963:
  Fix unsafe code sharing
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compiler crash when compiling with +no_type_opt</title>
<updated>2019-07-30T08:26:27+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-07-30T06:34:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=773e3d0f4a2d978a7ec6be9ed639eb1941d92d6c'/>
<id>773e3d0f4a2d978a7ec6be9ed639eb1941d92d6c</id>
<content type='text'>
If the `no_type_opt` option was given, the compiler would crash when
attempting to compile containing with a `try`...`after` construct,
such as this code:

    foo() -&gt;
        try
            make_ref()
        after
            ok
        end.

To avoid having this bug re-appear, test the `no_type_opt` option
in the test suites.

https://bugs.erlang.org/browse/ERL-997
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the `no_type_opt` option was given, the compiler would crash when
attempting to compile containing with a `try`...`after` construct,
such as this code:

    foo() -&gt;
        try
            make_ref()
        after
            ok
        end.

To avoid having this bug re-appear, test the `no_type_opt` option
in the test suites.

https://bugs.erlang.org/browse/ERL-997
</pre>
</div>
</content>
</entry>
<entry>
<title>Eliminate a crash in the type optimizer pass</title>
<updated>2019-07-30T08:24:39+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-07-30T08:14:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=bce995b034452abe200edc2381bc313ff12a0f2f'/>
<id>bce995b034452abe200edc2381bc313ff12a0f2f</id>
<content type='text'>
https://bugs.erlang.org/browse/ERL-1013
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://bugs.erlang.org/browse/ERL-1013
</pre>
</div>
</content>
</entry>
</feed>
