Age | Commit message (Collapse) | Author |
|
As of commit 12b379 many of the reasons displayed after
"Analysis failed with error:"
erroneously include a call stack. The bug is now corrected.
The bug was pointed out in
http://erlang.org/pipermail/erlang-questions/2017-October/093838.html.
|
|
Memory consumption is marginally reduced.
|
|
Instead of two records, #plt{} with dict:s and #mini_plt{} with ETS
tables, one record is used for representing PLT:s in RAM.
The #mini_plt{} is the one now used throughout analyses, but it is
called #plt{}.
When writing the PLT to file, another record is used, #file_plt{} (as
before). When creating #file_plt{}, the #plt{} is deleted (it cannot
be used for further analyses).
|
|
|
|
* maint:
Updated OTP version
Prepare release
inets: Add missing release note
dialyzer: Fix a bug regarding unknown types
erl_mseg.c: don't use invalid indices in - > cache_powered_node[]
Fix release note for OTP-14290
Conflicts:
OTP_VERSION
erts/emulator/sys/common/erl_mseg.c
erts/vsn.mk
lib/dialyzer/src/dialyzer_analysis_callgraph.erl
|
|
Since commit 12b3790 Dialyzer has not reported unknown types.
|
|
The new Dbgi chunk returns data in the following format:
{debug_info_v1, Backend, Data}
This allows compilers to store the debug info in different
formats. In order to retrieve a particular format, for
instance, Erlang Abstract Format, one may invoke:
Backend:debug_info(erlang_v1, Module, Data, Opts)
Besides introducing the chunk above, this commit also:
* Changes beam_lib:chunk(Beam, [:abstract_code]) to
read from the new Dbgi chunk while keeping backwards
compatibility with old .beams
* Adds the {debug_info, {Backend, Data}} option to
compile:file/2 and friends that are stored in the
Dbgi chunk. This allows the debug info encryption
mechanism to work across compilers
* Improves dialyzer to work directly on Core Erlang,
allowing languages that do not have the Erlang
Abstract Format to be dialyzer as long as they emit
the new chunk and their backend implementation is
available
Backwards compatibility is kept across the board except
for those calling beam_lib:chunk(Beam, ["Abst"]), as the
old chunk is no longer available. Note however the "Abst"
chunk has always been optional.
Future OTP versions may remove parsing the "Abst" chunk
altogether from beam_lib once Erlang 19 and earlier is no
longer supported.
The current Dialyzer implementation still supports earlier
.beam files and such may also be removed in future versions.
|
|
|
|
The two tables for (record) types and exported types are no longer
kept in memory (by the PLT) when analyzing, which reduces memory
consumption.
A first step towards removing (or replacing) the #plt{} record.
|
|
The table used during translation of forms to types used to be a
dictionary of the type info (-type(), -opaque(), and -record()) for
all modules. Now it is reduced to the modules that are needed to
handle references to types in other modules.
The PLT:s type info is still kept on the heap.
|
|
* maint:
dialyzer: Compact 'file' annotations in Core code
dialyzer: Try to reduce memory usage
dialyzer: Use less memory when translating contracts
dialyzer: Use maps instaed of dict
dialyzer: Use maps instead of dict for module contracts map
dialyzer: Compress a few more ETS tables
dialyzer: Optimize memory consumption
dialyzer: Reduce memory consumption during 'remote' phase
dialyzer: Update code for finding parallelism
compiler: Do not spawn process when dialyzing
dialyzer: Reduce ETS usage during the typesig phase
dialyzer: Optimize graph condensation
dialyzer: Do not send full PLTs as messages
|
|
File annotations {file, File} in Core Erlang code is replaced by
{file, FakeFile}, where FakeFile is "0", "1", ..., in order to save
memory. When a warning message is created, FakeFile is translated to
the original File (a bit awkward but easy to do).
The Core code stored in ETS tables needs less space, but more
important is that a less heap memory is used in the dataflow,
warnings, and typesig phases, allowing more parallelism.
|
|
The translation from forms to types is done in a separate process
in an attempt to reduce peak memory usage.
Expect further optimizations as it is probably not feasible
in the long run to keep all type information on the heap.
|
|
Some SCC info is no longer cached. It reduces the peak memory
consumption of workers during the typesig phase, and seems to cost
very little time.
|
|
The mini PLT is extended to hold all data of the full PLT, and the
full PLT is restored when needed (for storing the PLT on file).
|
|
|
|
If a dialyzer module attribute references an undefined (local)
function an error tuple is thrown but no caught. This leads to a
'nocatch' error and not the intended "clean" error.
|
|
Conflicts:
lib/dialyzer/src/dialyzer_analysis_callgraph.erl
|
|
* Comment in dialyzer_analysis_callgraph what the call to
dialyzer_coordinator does;
* Delegate activation request to each dialyzer_worker;
* There is no reason for the dialyzer_coordinator to request
activation on behalf of the workers: let each worker request its
own activation as it leads to more consistent dialyzer_worker
module (activation is request as soon as status running is hit -
reguardless of mode) and it reduces lines of code.
* Clarify types in coordinator and worker e.g. make opaque and make
type more strict.
|
|
Superfluous usage of insert_temp_exported_types had been in since
6452b57. (Change in commit 8a3ea1f module dialyzer_analysis_callgraph
is a correct simplification and is not relevant.)
|
|
|
|
|
|
Dialyzer used to report unknown behaviours in the same way as unknown
functions and types. This functionality has been removed in d101155, but
some code remained.
|
|
|
|
|
|
|
|
|
|
The -dialyzer() attribute can be used for suppressing warnings in a
module by specifying functions or warning options. It can also be used
for requesting warnings in a module.
|
|
Fetch the compile options from beam files, and use them when creating
core from the abstract code. Previously the options were ignored.
Test by Henrik Nordh
|
|
On SMPs, the time reports that Dialyzer produced when crashing were
inaccurate. Fix this by using wall_clock rather than runtime.
|
|
* hb/dialyzer/fix_on_load/OTP-11743:
FIx handling of 'on_load' attribute
|
|
[pull request from Kostis Sagonas]
The handling of functions appearing in an 'on_load' attribute was wrong.
Instead of considering the functions specified in these attributes as
escaping from the module and performing a full analysis starting from
them, the code just bypassed this analysis and only suppressed unused
warning messages for these functions. This worked for most of the cases
but resulted in functions (directly or indirectly) called by 'on_load'
functions being reported as not called by the module.
Such a case existed in the code of the 'crypto' application.
To solve these issues the initialization code for functions escaping
from the module was changed and the test for the on_load functionality
was appropriately extended.
|
|
The types array(), dict(), digraph(), gb_set(), gb_tree(), queue(),
set(), and tid() have been deprecated. They will be removed in OTP 18.0.
Instead the types array:array(), dict:dict(), digraph:graph(),
gb_set:set(), gb_tree:tree(), queue:queue(), sets:set(), and ets:tid()
can be used. (Note: it has always been necessary to use ets:tid().)
It is allowed in OTP 17.0 to locally re-define the types array(), dict(),
and so on.
New types array:array/1, dict:dict/2, gb_sets:set/1, gb_trees:tree/2,
queue:queue/1, and sets:set/1 have been added.
|
|
|
|
* sa/dialyzer-bitstring-fixes/OTP-11027:
Minor refactorings
Fix minor error in natively compiled module list
Fix notification for duplicate modules
Fix an error in the type inference of bitstring data
|
|
Dialyzer fails when asked to analyze multiple modules with the same name, but
the error message was erroneous. With this patch Dialyzer generates a correct
error message.
Bug reported and patch submitted by Maxim Treskin.
|
|
To reproduce, create an empty file "foo.erl" and run dialyzer on it.
Results without this patch:
$ dialyzer --src /tmp/foo.erl
Checking whether the PLT /Users/magnus/.dialyzer_r16_plt is up-to-date... yes
Proceeding with analysis...
dialyzer: Analysis failed with error:
Could not scan the following file(s): [{"/tmp/foo.erl",
["/tmp/foo.erl:1: no module definition\n"]}]
Last messages in the log cache:
Reading files and computing callgraph...
Results with this patch:
$ dialyzer --src /tmp/foo.erl
Checking whether the PLT /Users/magnus/.dialyzer_r16_plt is up-to-date... yes
Proceeding with analysis...
dialyzer: Analysis failed with error:
Could not scan the following file(s):
/tmp/foo.erl:1: no module definition
Last messages in the log cache:
Reading files and computing callgraph...
|
|
This extension allowed minimal detection of race conditions that were passing
through behaviour API calls, but had no tests in any suite and also caused a
crash in R15B02.
|
|
Dialyzer forgot to stop a server process before finishing its analysis.
This is a concurrency error detected by Concuerror.
|
|
|
|
The original implementation of the type signature solver is called 'v1'
and the newly introduced alternative implementation is called 'v2'.
It is possible to run just the one of the solvers (in case there is a
bug in for instance the v2 implementation) or both solvers
("--solver v1 --solver v2"). In the latter case an error is thrown if
the outcome differ.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|