<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/compiler/test/beam_validator_SUITE_data, branch KennethL-patch-1</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>beam_validator: Don't allow x(1023) to be used</title>
<updated>2015-08-21T13:56:15+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-08-21T05:07:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=93c5e457faeccfd8ccbb1e6c587ad6df1f200408'/>
<id>93c5e457faeccfd8ccbb1e6c587ad6df1f200408</id>
<content type='text'>
In 45f469ca0890, the BEAM loader started to use x(1023) as scratch
register for some instructions. Therefore we should not allow
x(1023) to be used in code emitted by the compiler.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 45f469ca0890, the BEAM loader started to use x(1023) as scratch
register for some instructions. Therefore we should not allow
x(1023) to be used in code emitted by the compiler.
</pre>
</div>
</content>
</entry>
<entry>
<title>beam_validator: Stop validating the 'aligned' flag for binaries</title>
<updated>2015-04-29T10:23:41+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-04-23T05:29:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8c32dda686d2b964b08cc4614ba9c445039b3dd9'/>
<id>8c32dda686d2b964b08cc4614ba9c445039b3dd9</id>
<content type='text'>
The run-time system stopped paying attention the 'aligned' flag in bit
syntax construction and matching when bitstrings were introduced in
language.

The beam_asm compiler pass will crash if the 'aligned' flag is given
in bit syntax instructions.

beam_validator still validates the 'aligned' flag. Before
912fea0b712a (which removed the possibility to validate existing
BEAM files), the 'aligned' flag could actually be encountered
when validating a BEAM file.

Since the validation of 'aligned' no longer serves any useful
purpose, remove the validation code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The run-time system stopped paying attention the 'aligned' flag in bit
syntax construction and matching when bitstrings were introduced in
language.

The beam_asm compiler pass will crash if the 'aligned' flag is given
in bit syntax instructions.

beam_validator still validates the 'aligned' flag. Before
912fea0b712a (which removed the possibility to validate existing
BEAM files), the 'aligned' flag could actually be encountered
when validating a BEAM file.

Since the validation of 'aligned' no longer serves any useful
purpose, remove the validation code.
</pre>
</div>
</content>
</entry>
<entry>
<title>beam_validator: Clean up updating of types for y register</title>
<updated>2015-04-29T10:23:26+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-04-21T07:43:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=edef41b07fea925d13f0b4eb6d122793ca9c075d'/>
<id>edef41b07fea925d13f0b4eb6d122793ca9c075d</id>
<content type='text'>
set_type_y/3 is far too complicated. Note that we don't need to check
the #st.numy field, because we will detect the error anyway because
the information for the y register will be missing in the #st.y
gb_tree.

There is also a clause that would never match because of a spelling
error (the first "n" was missing in "uninitialized"). That clause
is not needed because the default clause will do fine.

Furthermore, we can break out the special case for handling catch_end
and similar instructions into a new function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
set_type_y/3 is far too complicated. Note that we don't need to check
the #st.numy field, because we will detect the error anyway because
the information for the y register will be missing in the #st.y
gb_tree.

There is also a clause that would never match because of a spelling
error (the first "n" was missing in "uninitialized"). That clause
is not needed because the default clause will do fine.

Furthermore, we can break out the special case for handling catch_end
and similar instructions into a new function.
</pre>
</div>
</content>
</entry>
<entry>
<title>beam_validator: Remove support for removed BIF fault/1,2</title>
<updated>2015-04-23T11:44:03+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-04-21T07:27:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=16d97a57e5cd0f820884e4223b92f50e3ce39b01'/>
<id>16d97a57e5cd0f820884e4223b92f50e3ce39b01</id>
<content type='text'>
The fault/1,2 BIF was removed a long time ago.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fault/1,2 BIF was removed a long time ago.
</pre>
</div>
</content>
</entry>
<entry>
<title>beam_validator: No longer require strict literal term order</title>
<updated>2015-04-13T10:37:54+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-03-24T08:29:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=1414073af81016d54fc9157f2005301b7fcf4fe6'/>
<id>1414073af81016d54fc9157f2005301b7fcf4fe6</id>
<content type='text'>
The BEAM loader will now sort keys for maps during loading, so
beam_validator should not require the keys to be ordered any order.

However, we must still ensure that literals keys are unique (which
was implicitly guaranteed by the strict ordering requirement).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The BEAM loader will now sort keys for maps during loading, so
beam_validator should not require the keys to be ordered any order.

However, we must still ensure that literals keys are unique (which
was implicitly guaranteed by the strict ordering requirement).
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'bjorn/compiler/beam_validator'</title>
<updated>2015-02-20T09:17:32+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-02-20T09:17:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=5c0d4346409161838dabeae2366cb7f4ee95fbc0'/>
<id>5c0d4346409161838dabeae2366cb7f4ee95fbc0</id>
<content type='text'>
* bjorn/compiler/beam_validator:
  beam_validator: Exit immediately on crashes
  beam_validator: Remove the file/1 and files/1 functions
  beam_validator: Remove support for all other unsupported instructions
  beam_validator: Remove support for unsupported bit syntax instructions
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* bjorn/compiler/beam_validator:
  beam_validator: Exit immediately on crashes
  beam_validator: Remove the file/1 and files/1 functions
  beam_validator: Remove support for all other unsupported instructions
  beam_validator: Remove support for unsupported bit syntax instructions
</pre>
</div>
</content>
</entry>
<entry>
<title>beam_validator: Remove the file/1 and files/1 functions</title>
<updated>2015-02-18T12:10:29+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-02-17T15:57:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=912fea0b712a9d16a3361cd1ff83161013eb0e9e'/>
<id>912fea0b712a9d16a3361cd1ff83161013eb0e9e</id>
<content type='text'>
Before the beam_validator was added as compiler pass, it was a
standalone module that could analyse existing .beam files and .S
files.

Even though beam_validator has been part of the compiler for many
releases, it still supports the analysis of .beam and .S files.

To reduce the code bloat and to improve coverage of beam_validator,
remove the file/1 and files/1 functions and all associated help
functions. We'll need to update the test suite, since some of the
checked in .S files have errors that beam_validator ignores, but
that will not be accepted when running them throught the compiler
using the 'from_asm' option. In particular, we will need to export
all functions that should be validated (since the beam_clean pass
will remove any function that is not possible to call).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before the beam_validator was added as compiler pass, it was a
standalone module that could analyse existing .beam files and .S
files.

Even though beam_validator has been part of the compiler for many
releases, it still supports the analysis of .beam and .S files.

To reduce the code bloat and to improve coverage of beam_validator,
remove the file/1 and files/1 functions and all associated help
functions. We'll need to update the test suite, since some of the
checked in .S files have errors that beam_validator ignores, but
that will not be accepted when running them throught the compiler
using the 'from_asm' option. In particular, we will need to export
all functions that should be validated (since the beam_clean pass
will remove any function that is not possible to call).
</pre>
</div>
</content>
</entry>
<entry>
<title>beam_validator: Remove support for all other unsupported instructions</title>
<updated>2015-02-18T12:07:52+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-02-17T13:27:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c8aed3b1521edbe7c13860c9a7557129481e60b3'/>
<id>c8aed3b1521edbe7c13860c9a7557129481e60b3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>beam_validator: Remove support for unsupported bit syntax instructions</title>
<updated>2015-02-18T12:07:52+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-02-17T13:28:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=7d722f548a110674781dc21312c0e538fc7720c7'/>
<id>7d722f548a110674781dc21312c0e538fc7720c7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>beam_validator: Tighten and simplify map validation code</title>
<updated>2015-02-18T12:04:21+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-02-17T10:16:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=d52142f95858fc2ea461e9b2b52c5835e39886d8'/>
<id>d52142f95858fc2ea461e9b2b52c5835e39886d8</id>
<content type='text'>
The assert_strict_literal_termorder/1 function is used to validate the
get_map_elements and has_map_fields instructions. In neither case is
it useful to allow an empty lists of fields, so we should no longer
allow an empty list.

The mmap/2 function is cute, but it is used in only one place, so it
is much simpler to write a special-purpose function to extract the
keys from the list of map pairs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The assert_strict_literal_termorder/1 function is used to validate the
get_map_elements and has_map_fields instructions. In neither case is
it useful to allow an empty lists of fields, so we should no longer
allow an empty list.

The mmap/2 function is cute, but it is used in only one place, so it
is much simpler to write a special-purpose function to extract the
keys from the list of map pairs.
</pre>
</div>
</content>
</entry>
</feed>
