aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test
AgeCommit message (Collapse)Author
2012-09-26Fix a crash in race condition detectionStavros Aronis
Analysis is not always able to find the variable labels and names for any kind of arguments passed to the ets module functions.
2012-09-26Fix handling of tuple set remote types appearing in tuple setsStavros Aronis
Originally reported by Joseph Wayne Norton, simplified testcase provided by Hans Bolinder.
2012-06-08Merge branch 'lukas/otp/install_with_whitespace/OTP-10107' into maintLukas Larsson
* lukas/otp/install_with_whitespace/OTP-10107: Update to work with space in include path Update to work with whitespace in exec path
2012-06-05Update to work with whitespace in exec pathLukas Larsson
OTP-10106 OTP-10107
2012-06-01Bug fixes and improvements of dialyzer_typesigHans Bolinder
1. Sometimes the solver forgot that a list had entered the error state. The bug has been fixed by storing the atom 'error' in MapDict. An example where the bug occurred is io_lib_pretty:printable_bin(). The returned spec was weaker than it should have been, but the fix-point loop hid the bug (in this case). 2. lists:partition() has been substituted for lists:splitwith() in enumerate_constraints(). This fix together with 3. solves a problem with long execution times for deeply nested fun:s. An example which is now much faster is lib/compiler/test/lc_SUITE:deeply_nested/1 (included as dialyzer/test/small_SUITE_data/src/deep_lc.erl). 3. The calculation of components in enumerate_constraints() has been simplified and optimized. The important thing here is that _all_ of the simple constraints have been saturated before entering the complex part. 4. The pretty printing of constraints has been improved.
2012-05-08Merge branch 'sa/dialyzer-contract-variables' into maintHenrik Nord
* sa/dialyzer-contract-variables: Correct handling of type names in contracts Don't rewrite unchanged PLT Fix crash related to contract checking OTP-10083
2012-04-24Correct handling of type names in contractsStavros Aronis
Variables in contracts can either be true type variables or simply names for types thet are defined in the 'when' clauses. Consider the following example: -spec foo(X, Options) -> {ok, X} | error when Options :: [{atom(), boolean()}]. Here X is a true variable whereas Options is a name for a type that is defined in the when clause. 'when' clauses may further use names on the right side. These were not treated properly by Dialyzer and could be generalized to the term() type. This patch fixes this issue. A further issue is the treatment of true type variables, but this is left for another patch.
2012-04-24Fix crash related to contract checkingStavros Aronis
When "collapsing" heads of list elements from a list's tail into the list's head the new head can be different.
2012-04-17Correct documentation, erl_bif_types and dialyzer testsPatrik Nyblom
2012-04-17Extend erlang:port_info/1,2 to show the OS pid of a spawned processMatthias Lang
When spawning OS (unix) processes with erlang:open_port, store the resulting unix pid so that it can be queried later on using erlang:port_info/1,2.
2012-03-26Fix bug related with infinitely looping functionsStavros Aronis
Depending of the ordering of the functions during dataflow, a function with an infinite loop might be identified as one that always crashes. This is fixed now, by allowing restoration of the infinitely-looping status.
2012-03-14Ensure that -on_load functions are not reported as unusedStavros Aronis
2012-03-01Fix bug in remote type solvingStavros Aronis
2012-02-22Zero-arity unused functions Dialyzer patchStavros Aronis
Dialyzer was not reporting unused functions with 0 arity. This was not a real issue, until we found out that there could be cases where this could lead to false warnings. This was the case in "no_local_return.erl".
2012-02-22Allow t_opaque_structure to handle multiple opaque typesStavros Aronis
2012-02-22Support alternative spelling of behaviourStavros Aronis
2012-02-22Small fixes for Dialyzer's testsuites generationStavros Aronis
2011-12-22Handle nowarn_unused_function like the compiler doesHans Bolinder
2011-12-01Refine warning about callback specs with extra rangesStavros Aronis
2011-12-01Fix bug in Dialyzer's behaviours analysisStavros Aronis
2011-12-01Fix crash in DialyzerStavros Aronis
Variable substitution was not generalizing any unknown variables.
2011-11-30Update inets test resultsStavros Aronis
2011-11-30No warnings for underspecs with remote typesStavros Aronis
2011-11-30Fix dialyzer warning about gen_event callback init/1 in log_mf_hSiri Hansen
The warning is about log_mf_h having a different spec for gen_event callback init/1 than defined in gen_event.erl. log_mf_h allows return value {error,Reason}, while gen_even only specifies successful return values. This commit add {error,Reason} as a valid return value to the gen_event callback, since this is handled by the code.
2011-11-18Wrap up behaviours patch for DialyzerStavros Aronis
Enable warnings by default, add two options for suppressing them, fix warning formatting and update testsuites.
2011-11-18Detection of callback-spec discrepanciesStavros Aronis
2011-11-18Allow none() as return value in callbacksStavros Aronis
2011-11-18Behaviour callback discrepancy detection for DialyzerStavros Aronis
2011-11-18Update inets resultsStavros Aronis
2011-10-14Fix false warning about closure applicationStavros Aronis
Whenever a variable that could hold one of two or more possible closures was used in a particular application, the application was assumed to fail if ONE of the closures would fail in this application. This has been corrected to infer failing application if ALL possible closures would fail in the particular application.
2011-10-14Change category of 'might also return' warningsStavros Aronis
Dialyzer emits warnings like the following "The specification for _ states that the function might also return _ but the inferred return is _", which are actually underspecifications and not wrong type specifications. This patch makes sure that they are filed under the appropriate category.
2011-09-21Merge branch 'ta/typer-quote-atoms' into devHenrik Nord
* ta/typer-quote-atoms: Update Dialyzer's reference results Quote atoms if necessary in types OTP-9560
2011-09-19Update Dialyzer's reference resultsStavros Aronis
2011-09-15dialyzer: fix a small typo in list_to_bitstring testTuncer Ayaz
2011-09-08Merge branch 'sa/dialyzer-dev' into devHenrik Nord
* sa/dialyzer-dev: Add origin information to #fun_var closures Suppress some warnings about generation of non-returning funs Enhance Dialyzer's inference on comparisons Fix infinite loop in dataflow Minor fix in dead code Update r9c/{inets,mnesia} results in dialyzer's test suite OTP-9529
2011-08-29Merge branch 'rz/add_proplist_type' into devHenrik Nord
* rz/add_proplist_type: Add a proplist() type OTP-9499
2011-08-29Suppress some warnings about generation of non-returning funsStavros Aronis
No warnings are emitted for funs that are non-returning when the function that generates them has a contract that specifies that it will return such a non-returning fun. The actual bug, reported by Tuncer Ayaz and simplified by Maria Christakis is included in Dialyzer's tests.
2011-08-29Enhance Dialyzer's inference on comparisonsStavros Aronis
This patch makes Dialyzer aware of Erlang's total ordering of terms, enabling discrepancy detection in cases where e.g. integer() < tuple() is treated as a comparison that might also return false (when it is certain to always return true).
2011-08-29Fix infinite loop in dataflowStavros Aronis
2011-08-29Update r9c/{inets,mnesia} results in dialyzer's test suiteStavros Aronis
2011-08-24Merge branch 'hw/update-chmod-without-f' into devHenrik Nord
* hw/update-chmod-without-f: Again: Call chmod without the "-f" flag OTP-9491
2011-08-24Merge branch 'sa/dialyzer-server-loop-fix' into devHenrik Nord
* sa/dialyzer-server-loop-fix: Fix server loop detection OTP-9489
2011-08-17Fix dialyzer warning on default clause for binary comprehensionIvan Dubrov
Fixed dialyzer warning occuring on binary comprehension of form "<< <<>> || {A, B} <- [{a, b}] >>" caused by default clause inserted by compiler. Since this clause is different from the case of list comprehension, dialyzer fails to suppress that warning.
2011-08-01Update results of race_SUITE/extract_translationsStavros Aronis
2011-08-01Update results of small_SUITE/flattenStavros Aronis
2011-08-01Add codec_can and list_to_bitstring testsStavros Aronis
2011-08-01Fix bug when reporting unused functionsStavros Aronis
2011-08-01Update Dialyzer's r9c_suite resultsStavros Aronis
2011-06-05Again: Call chmod without the "-f" flagHolger Weiß
Commit 7ed11a886fc8fcaf3c2b8324294e2f24e02b0f28 removed the "-f" flag from chmod calls in Makefiles: | "-f" is a non-standard chmod option which at least SGI IRIX and HP UX | do not support. As the only effect of the "-f" flag is to suppress | warning messages, it can be safely omitted. Meanwhile, new "chmod -f" calls have been added. This commit removes the "-f" flag from those new calls.
2011-05-24Add a proplist() typerzezeski
Recently I was adding specs to an API and found that there is no canonical proplist() type defined.