From a5891c64cbb7d3baed93aee72486443212fed401 Mon Sep 17 00:00:00 2001
From: Hans Bolinder <hasse@erlang.org>
Date: Wed, 26 Apr 2017 12:34:15 +0200
Subject: dialyzer: Fix a bug regarding unknown types

Since commit 12b3790 Dialyzer has not reported unknown types.
---
 lib/dialyzer/src/dialyzer_analysis_callgraph.erl       | 18 +++++++++---------
 lib/dialyzer/test/options2_SUITE_data/dialyzer_options |  2 +-
 .../test/options2_SUITE_data/results/unknown_type      |  2 ++
 .../test/options2_SUITE_data/src/unknown_type.erl      |  7 +++++++
 4 files changed, 19 insertions(+), 10 deletions(-)
 create mode 100644 lib/dialyzer/test/options2_SUITE_data/results/unknown_type
 create mode 100644 lib/dialyzer/test/options2_SUITE_data/src/unknown_type.erl

(limited to 'lib')

diff --git a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
index 784e427154..7f8e68908e 100644
--- a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
@@ -160,7 +160,7 @@ analysis_start(Parent, Analysis, LegalWarnings) ->
         dialyzer_codeserver:finalize_exported_types(MergedExpTypes, TmpCServer1),
       erlang:garbage_collect(),
       ?timing(State#analysis_state.timing_server, "remote",
-              contracts_and_records(TmpCServer2))
+              contracts_and_records(TmpCServer2, Parent))
     catch
       throw:{error, _ErrorMsg} = Error -> exit(Error)
     end,
@@ -185,15 +185,14 @@ analysis_start(Parent, Analysis, LegalWarnings) ->
   State2 = analyze_callgraph(NewCallgraph, State1),
   #analysis_state{plt = MiniPlt2, doc_plt = DocPlt} = State2,
   dialyzer_callgraph:dispose_race_server(NewCallgraph),
-  rcv_and_send_ext_types(Parent),
   %% Since the PLT is never used, a dummy is sent:
   DummyPlt = dialyzer_plt:new(),
   send_codeserver_plt(Parent, CServer, DummyPlt),
   MiniPlt3 = dialyzer_plt:delete_list(MiniPlt2, NonExportsList),
   send_analysis_done(Parent, MiniPlt3, DocPlt).
 
-contracts_and_records(CodeServer) ->
-  Fun = contrs_and_recs(CodeServer),
+contracts_and_records(CodeServer, Parent) ->
+  Fun = contrs_and_recs(CodeServer, Parent),
   {Pid, Ref} = erlang:spawn_monitor(Fun),
   dialyzer_codeserver:give_away(CodeServer, Pid),
   Pid ! {self(), go},
@@ -201,18 +200,19 @@ contracts_and_records(CodeServer) ->
       Return
   end.
 
--spec contrs_and_recs(dialyzer_codeserver:codeserver()) ->
+-spec contrs_and_recs(dialyzer_codeserver:codeserver(), pid()) ->
                          fun(() -> no_return()).
 
-contrs_and_recs(TmpCServer2) ->
+contrs_and_recs(TmpCServer2, Parent) ->
   fun() ->
-      Parent = receive {Pid, go} -> Pid end,
+      Caller = receive {Pid, go} -> Pid end,
       {TmpCServer3, RecordDict} =
         dialyzer_utils:process_record_remote_types(TmpCServer2),
       TmpServer4 =
         dialyzer_contracts:process_contract_remote_types(TmpCServer3,
                                                          RecordDict),
       dialyzer_codeserver:give_away(TmpServer4, Parent),
+      rcv_and_send_ext_types(Caller, Parent),
       exit(TmpServer4)
   end.
 
@@ -554,13 +554,13 @@ default_includes(Dir) ->
 %% Handle Messages
 %%-------------------------------------------------------------------
 
-rcv_and_send_ext_types(Parent) ->
+rcv_and_send_ext_types(SendTo, Parent) ->
   Self = self(),
   Self ! {Self, done},
   case rcv_ext_types(Self, []) of
     [] -> ok;
     ExtTypes ->
-      Parent ! {Self, ext_types, ExtTypes},
+      Parent ! {SendTo, ext_types, ExtTypes},
       ok
   end.
 
diff --git a/lib/dialyzer/test/options2_SUITE_data/dialyzer_options b/lib/dialyzer/test/options2_SUITE_data/dialyzer_options
index 5db2e50d23..be57e2de72 100644
--- a/lib/dialyzer/test/options2_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/options2_SUITE_data/dialyzer_options
@@ -1 +1 @@
-{dialyzer_options, [{defines, [{'vsn', 4}]}, {warnings, [no_return]}]}.
+{dialyzer_options, [{defines, [{'vsn', 4}]}, {warnings, [unknown, no_return]}]}.
diff --git a/lib/dialyzer/test/options2_SUITE_data/results/unknown_type b/lib/dialyzer/test/options2_SUITE_data/results/unknown_type
new file mode 100644
index 0000000000..d308c5a810
--- /dev/null
+++ b/lib/dialyzer/test/options2_SUITE_data/results/unknown_type
@@ -0,0 +1,2 @@
+
+:0: Unknown type unknown:type/0
\ No newline at end of file
diff --git a/lib/dialyzer/test/options2_SUITE_data/src/unknown_type.erl b/lib/dialyzer/test/options2_SUITE_data/src/unknown_type.erl
new file mode 100644
index 0000000000..7a891c0831
--- /dev/null
+++ b/lib/dialyzer/test/options2_SUITE_data/src/unknown_type.erl
@@ -0,0 +1,7 @@
+-module(unknown_type).
+
+-export([t/0]).
+
+-spec t() -> unknown:type().
+t() ->
+    a.
-- 
cgit v1.2.3


From 7bfb9e50d8408cc307560aa1cd58254a1eafe2e1 Mon Sep 17 00:00:00 2001
From: Ingela Anderton Andin <ingela@erlang.org>
Date: Thu, 27 Apr 2017 15:04:38 +0200
Subject: inets: Add missing release note

---
 lib/inets/doc/src/notes.xml | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'lib')

diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml
index ea600581ff..11a07edfca 100644
--- a/lib/inets/doc/src/notes.xml
+++ b/lib/inets/doc/src/notes.xml
@@ -44,6 +44,13 @@
           <p>
 	    Own Id: OTP-14242</p>
         </item>
+
+        <item>
+          <p>Make default port, 80 and 443, implicit in automatic redirection.
+	  </p>
+          <p> Own Id: OTP-14301
+	  </p>
+        </item>        
       </list>
     </section>
 
-- 
cgit v1.2.3


From 304fef65a147b53234d8d8ad8889ffa79d7ef45b Mon Sep 17 00:00:00 2001
From: Erlang/OTP <otp@erlang.org>
Date: Fri, 28 Apr 2017 15:11:53 +0200
Subject: Prepare release

---
 lib/dialyzer/doc/src/notes.xml | 16 ++++++++++++++++
 lib/dialyzer/vsn.mk            |  2 +-
 lib/inets/doc/src/notes.xml    | 17 ++++++++++++++++-
 lib/inets/vsn.mk               |  2 +-
 4 files changed, 34 insertions(+), 3 deletions(-)

(limited to 'lib')

diff --git a/lib/dialyzer/doc/src/notes.xml b/lib/dialyzer/doc/src/notes.xml
index cd4ec4c068..0dbee1ce34 100644
--- a/lib/dialyzer/doc/src/notes.xml
+++ b/lib/dialyzer/doc/src/notes.xml
@@ -32,6 +32,22 @@
   <p>This document describes the changes made to the Dialyzer
     application.</p>
 
+<section><title>Dialyzer 3.1.1</title>
+
+    <section><title>Fixed Bugs and Malfunctions</title>
+      <list>
+        <item>
+	    <p> Report unknown types properly. A bug was introduced
+	    in Erlang/OTP 19.3, where warnings about unknown types
+	    were simply discarded. </p>
+          <p>
+	    Own Id: OTP-14368</p>
+        </item>
+      </list>
+    </section>
+
+</section>
+
 <section><title>Dialyzer 3.1</title>
 
     <section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/dialyzer/vsn.mk b/lib/dialyzer/vsn.mk
index 0919fba834..7d239fe9cd 100644
--- a/lib/dialyzer/vsn.mk
+++ b/lib/dialyzer/vsn.mk
@@ -1 +1 @@
-DIALYZER_VSN = 3.1
+DIALYZER_VSN = 3.1.1
diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml
index 11a07edfca..6b6aca6ce8 100644
--- a/lib/inets/doc/src/notes.xml
+++ b/lib/inets/doc/src/notes.xml
@@ -33,7 +33,22 @@
     <file>notes.xml</file>
   </header>
   
-  <section><title>Inets 6.3.7</title>
+  <section><title>Inets 6.3.8</title>
+
+    <section><title>Improvements and New Features</title>
+      <list>
+        <item>
+          <p>
+	    Added missing release note for inets-6.3.7</p>
+          <p>
+	    Own Id: OTP-14383</p>
+        </item>
+      </list>
+    </section>
+
+</section>
+
+<section><title>Inets 6.3.7</title>
 
     <section><title>Fixed Bugs and Malfunctions</title>
       <list>
diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk
index b0b39b54c5..b3dec0cb59 100644
--- a/lib/inets/vsn.mk
+++ b/lib/inets/vsn.mk
@@ -19,6 +19,6 @@
 # %CopyrightEnd%
 
 APPLICATION = inets
-INETS_VSN   = 6.3.7
+INETS_VSN   = 6.3.8
 PRE_VSN     =
 APP_VSN     = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)"
-- 
cgit v1.2.3