Age | Commit message (Collapse) | Author |
|
See also https://bugs.erlang.org/browse/ERL-565.
To avoid loops, erl_types:t_is_subtype checks for equality using
unopaqued types, but in (at least) one case something is lost:
This fix makes sure that when forwarding arguments in dataflow, types
with different parameters but equal when unopaqued are considered
different.
For example, dict:dict(0, {}) and dict:dict(0, []) are equal when
unopaqued (due to how dict(_, _) is declared in module dict), but
should be considered different when forwarding args.
|
|
|
|
If the number of warnings is huge the '--'/2 operator is slow.
|
|
The Maps implementation handles ?unit in more cases.
Exactly when t_is_none_or_unit() is to be called is not clear to me.
The added cases are about a map type being ?unit, but the key or the
value of an association can also be ?unit, but that is not always
checked.
|
|
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.
|
|
~tw and new string functions are new since OTP-20 (stdlib-3.4)
|
|
The implementation of OTP-14218 (commit 6d3b38a) has a weakness: only
a very limited part of the type form is checked. This is now fixed:
types not used by specs are checked equally well as types used by
specs.
The new function erl_types:t_from_form_check_remote() checks usage of
remote types. It does not expand used local types, and has (almost) no
limits on depth and size.
|
|
This commit removes the call to ets:safe_fixtable/2 introduced in
commit 9458495. ETS memory can now be reclaimed while merging PLTs.
|
|
|
|
A missing call to ets:safe_fixtable/2 meant that information
was sometimes lost when merging PLT:s.
|
|
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).
|
|
|
|
Avoid some ETS-lookups. Marginal speed-ups.
|
|
|
|
The arguments of calls to a debug function are no longer evaluated.
|
|
|
|
In typesig: do not look up the module's types unless it is necessary.
|
|
|
|
|
|
* 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
|
|
Due to a bug in Dialyzer, unknown types have been introduced.
|
|
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.
|
|
* bjorn/dialyzer/add-typer/OTP-14336:
Add smoke test for TypER
Add back TypEr to the main OTP repository
|
|
It turned out that the dependencies between Dialyzer
and TypEr makes it impractical to have TypEr in a
separate repository.
Add it back to the OTP repository, but put the Erlang
module 'typer' in the dialyzer application.
|
|
The same checks are also performed by the Dialyzer.
|
|
|
|
* maint:
dialyzer: Improve a warning
dialyzer: Fix a weird warning
dialyzer: Fix an opaque bug
dialyzer: Minor fix
Conflicts:
lib/dialyzer/src/dialyzer_dataflow.erl
|
|
* hasse/dialyzer/fix_warnings/OTP-14177:
dialyzer: Improve a warning
dialyzer: Fix a weird warning
dialyzer: Fix an opaque bug
dialyzer: Minor fix
|
|
* maint:
tools: Use portable lookup of home directory
dialyzer, observer: Use portable lookup of home directory
|
|
Use init:get_argument(home) to find the location of the home
directory. That will work on all platforms (including Windows).
Note that the run-time system will fail to start if HOME
(or the equivalent on Windows) is not set. Therefore, it can
be assumed that init:get_argument(home) will not fail.
ERL-161
|
|
* maint:
typer: Update runtime dependencies
dialyzer: Update runtime dependencies
Correct documentation of get_modules message
|
|
|
|
An opaque bug that would crash Dialyzer has been fixed.
The bug was reported by Nick Marino.
|
|
|
|
|
|
* hasse/dialyzer/memory_opt/OTP-14127:
dialyzer: Attempt to reduce memory consumption
dialyzer: Do not spawn all workers at once
dialyzer: Write PLT in subprocess
dialyzer: Remove code for non-started workers
dialyzer: Sort graphs topologically
dialyzer: Compress some PLT tables
dialyzer: Check return value of digrahp:add_edge()
dialyzer: Use less memory for the PLT when analyzing
typer: Fix a bug regarding the -T option
dialyzer: Do not keep the code server's type info on the heap
|
|
* maint:
dialyzer: Fix a Dialyzer warning
|
|
|
|
The 'deps' field is reset when no longer used, which could possibly
save some memory.
|
|
Spawning all worker processes at once has the potential to increase
peak memory consumption. Therefore the implementation is now slightly
modified: `20 * dialyzer_utils:parallelism()' processes are running in
parallel. 20 i quite a big factor, but seems necessary to keep all
schedulers busy according to the Observer application's Load Charts,
with a 100 ms update interval.
|
|
At common case, which will otherwise leave a big heap.
|
|
Since SCCs and modules are now topologically sorted (relative the
active graph), we can safely assume that workers have been started.
|
|
Although some variable names indicate that lists of SCCs and modules
are sorted, that was not always the case. The effect on the execution
time of sorting them doesn't seem to be significant.
dialyzer_coordinator:sccs_to_pids() should now always return an empty
second list (not yet started workers).
Since the condensation of graphs often needs a lot of heap memory, it
is run in a separate process.
|
|
Compressing the signatures or the contract records would cost time.
The contract records are still held in two places (code server and
PLT) in many cases.
|
|
|
|
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 -T option has not been working for a long time.
|
|
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.
|