Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / localhost / Bugs20041109
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>Bugs20041109</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
9
10
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
13 /*<![CDATA[*/
14 asciidoc.install();
15 /*]]>*/
16 </script>
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
18 </head>
19 <body class="article">
20 <div id="banner">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
23 </div>
24 </div>
25 <div id="header">
26 <h1>Bugs20041109</h1>
27 </div>
28 <div id="content">
29 <div id="preamble">
30 <div class="sectionbody">
31 <div class="paragraph"><p>Here are the known bugs in <a href="Release20041109">MLton 20041109</a>, listed
32 in reverse chronological order of date reported.</p></div>
33 <div class="ulist"><ul>
34 <li>
35 <p>
36 <a id="bug17"></a>
37 <span class="monospaced">MLton.Finalizable.touch</span> doesn&#8217;t necessarily keep values alive
38 long enough. Our SVN has a patch to the compiler. You must rebuild
39 the compiler in order for the patch to take effect.
40 </p>
41 <div class="paragraph"><p>Thanks to Florian Weimer for reporting this bug.</p></div>
42 </li>
43 <li>
44 <p>
45 <a id="bug16"></a>
46 A bug in an optimization pass may incorrectly transform a program
47 to flatten ref cells into their containing data structure, yielding a
48 type-error in the transformed program. Our CVS has a
49 <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/mlton/ssa/ref-flatten.fun.diff?r1=1.35&amp;r2=1.37">patch</a>
50 to the compiler. You must rebuild the compiler in order for the
51 patch to take effect.
52 </p>
53 <div class="paragraph"><p>Thanks to <a href="VesaKarvonen">VesaKarvonen</a> for reporting this bug.</p></div>
54 </li>
55 <li>
56 <p>
57 <a id="bug15"></a>
58 A bug in the front end mistakenly allows unary constructors to be
59 used without an argument in patterns. For example, the following
60 program is accepted, and triggers a large internal error.
61 </p>
62 <div class="listingblock">
63 <div class="content"><div class="highlight"><pre><span class="k">fun</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="k">of</span><span class="w"> </span><span class="n">SOME</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="n">true</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="p">_</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="n">false</span><span class="w"></span>
64 </pre></div></div></div>
65 <div class="paragraph"><p>We have fixed the problem in our CVS.</p></div>
66 <div class="paragraph"><p>Thanks to William Lovas for reporting this bug.</p></div>
67 </li>
68 <li>
69 <p>
70 <a id="bug14"></a>
71 A bug in <span class="monospaced">Posix.IO.{getlk,setlk,setlkw}</span> causes a link-time error:
72 <span class="monospaced">undefined reference to Posix_IO_FLock_typ</span>
73 Our CVS has a
74 <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/basis-library/posix/primitive.sml.diff?r1=1.34&amp;r2=1.35">patch</a>
75 to the Basis Library implementation.
76 </p>
77 <div class="paragraph"><p>Thanks to Adam Chlipala for reporting this bug.</p></div>
78 </li>
79 <li>
80 <p>
81 <a id="bug13"></a>
82 A bug can cause programs compiled with <span class="monospaced">-profile alloc</span> to
83 segfault. Our CVS has a
84 <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/mlton/backend/ssa-to-rssa.fun.diff?r1=1.106&amp;r2=1.107">patch</a>
85 to the compiler. You must rebuild the compiler in order for the
86 patch to take effect.
87 </p>
88 <div class="paragraph"><p>Thanks to John Reppy for reporting this bug.</p></div>
89 </li>
90 <li>
91 <p>
92 <a id="bug12"></a>
93 A bug in an optimization pass may incorrectly flatten ref cells
94 into their containing data structure, breaking the sharing between
95 the cells. Our CVS has a
96 <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/mlton/ssa/ref-flatten.fun.diff?r1=1.32&amp;r2=1.33">patch</a>
97 to the compiler. You must rebuild the compiler in order for the
98 patch to take effect.
99 </p>
100 <div class="paragraph"><p>Thanks to Paul Govereau for reporting this bug.</p></div>
101 </li>
102 <li>
103 <p>
104 <a id="bug11"></a>
105 Some arrays or vectors, such as <span class="monospaced">(char * char) vector</span>, are
106 incorrectly implemented, and will conflate the first and second
107 components of each element. Our CVS has a
108 <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/mlton/backend/packed-representation.fun.diff?r1=1.32&amp;r2=1.33">patch</a>
109 to the compiler. You must rebuild the compiler in order for the
110 patch to take effect.
111 </p>
112 <div class="paragraph"><p>Thanks to Scott Cruzen for reporting this bug.</p></div>
113 </li>
114 <li>
115 <p>
116 <a id="bug10"></a>
117 <span class="monospaced">Socket.Ctl.getLINGER</span> and <span class="monospaced">Socket.Ctl.setLINGER</span>
118 mistakenly raise <span class="monospaced">Subscript</span>.
119 Our CVS has a
120 <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/basis-library/net/socket.sml.diff?r1=1.14&amp;r2=1.15">patch</a>
121 to the Basis Library implementation.
122 </p>
123 <div class="paragraph"><p>Thanks to Ray Racine for reporting the bug.</p></div>
124 </li>
125 <li>
126 <p>
127 <a id="bug09"></a>
128 <a href="ConcurrentML"> CML</a> <span class="monospaced">Mailbox.send</span> makes a call in the wrong atomic context.
129 Our CVS has a <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/lib/cml/core-cml/mailbox.sml.diff?r1=1.3&amp;r2=1.4">patch</a>
130 to the CML implementation.
131 </p>
132 </li>
133 <li>
134 <p>
135 <a id="bug08"></a>
136 <span class="monospaced">OS.Path.joinDirFile</span> and <span class="monospaced">OS.Path.toString</span> did not
137 raise <span class="monospaced">InvalidArc</span> when they were supposed to. They now do.
138 Our CVS has a <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/basis-library/system/path.sml.diff?r1=1.8&amp;r2=1.11">patch</a>
139 to the Basis Library implementation.
140 </p>
141 <div class="paragraph"><p>Thanks to Andreas Rossberg for reporting the bug.</p></div>
142 </li>
143 <li>
144 <p>
145 <a id="bug07"></a>
146 The front end incorrectly disallows sequences of expressions
147 (separated by semicolons) after a topdec has already been processed.
148 For example, the following is incorrectly rejected.
149 </p>
150 <div class="listingblock">
151 <div class="content"><div class="highlight"><pre><span class="k">val</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span>
152 <span class="n">ignore</span><span class="w"> </span><span class="n">x</span><span class="p">;</span><span class="w"></span>
153 <span class="n">ignore</span><span class="w"> </span><span class="n">x</span><span class="p">;</span><span class="w"></span>
154 </pre></div></div></div>
155 <div class="paragraph"><p>We have fixed the problem in our CVS.</p></div>
156 <div class="paragraph"><p>Thanks to Andreas Rossberg for reporting the bug.</p></div>
157 </li>
158 <li>
159 <p>
160 <a id="bug06"></a>
161 The front end incorrectly disallows expansive <span class="monospaced">val</span>
162 declarations that bind a type variable that doesn&#8217;t occur in the
163 type of the value being bound. For example, the following is
164 incorrectly rejected.
165 </p>
166 <div class="listingblock">
167 <div class="content"><div class="highlight"><pre><span class="k">val</span><span class="w"> </span><span class="n">&#39;a</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="k">let</span><span class="w"> </span><span class="k">exception</span><span class="w"> </span><span class="n">E</span><span class="w"> </span><span class="k">of</span><span class="w"> </span><span class="n">&#39;a</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="k">end</span><span class="w"></span>
168 </pre></div></div></div>
169 <div class="paragraph"><p>We have fixed the problem in our CVS.</p></div>
170 <div class="paragraph"><p>Thanks to Andreas Rossberg for reporting this bug.</p></div>
171 </li>
172 <li>
173 <p>
174 <a id="bug05"></a>
175 The x86 codegen fails to account for the possibility that a 64-bit
176 move could interfere with itself (as simulated by 32-bit moves). We
177 have fixed the problem in our CVS.
178 </p>
179 <div class="paragraph"><p>Thanks to Scott Cruzen for reporting this bug.</p></div>
180 </li>
181 <li>
182 <p>
183 <a id="bug04"></a>
184 <span class="monospaced">NetHostDB.scan</span> and <span class="monospaced">NetHostDB.fromString</span> incorrectly
185 raise an exception on internet addresses whose last component is a
186 zero, e.g <span class="monospaced">0.0.0.0</span>. Our CVS has a
187 <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/basis-library/net/net-host-db.sml.diff?r1=1.12&amp;r2=1.13">patch</a> to the Basis Library implementation.
188 </p>
189 <div class="paragraph"><p>Thanks to Scott Cruzen for reporting this bug.</p></div>
190 </li>
191 <li>
192 <p>
193 <a id="bug03"></a>
194 <span class="monospaced">StreamIO.inputLine</span> has an off-by-one error causing it to drop
195 the first character after a newline in some situations. Our CVS has a
196 <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/basis-library/io/stream-io.fun.diff?r1=text&amp;tr1=1.29&amp;r2=text&amp;tr2=1.30&amp;diff_format=h">patch</a>.
197 to the Basis Library implementation.
198 </p>
199 <div class="paragraph"><p>Thanks to Scott Cruzen for reporting this bug.</p></div>
200 </li>
201 <li>
202 <p>
203 <a id="bug02"></a>
204 <span class="monospaced">BinIO.getInstream</span> and <span class="monospaced">TextIO.getInstream</span> are
205 implemented incorrectly. This also impacts the behavior of
206 <span class="monospaced">BinIO.scanStream</span> and <span class="monospaced">TextIO.scanStream</span>. If you (directly
207 or indirectly) realize a <span class="monospaced">TextIO.StreamIO.instream</span> and do not
208 (directly or indirectly) call <span class="monospaced">TextIO.setInstream</span> with a derived
209 stream, you may lose input data. We have fixed the problem in our
210 CVS.
211 </p>
212 <div class="paragraph"><p>Thanks to <a href="WesleyTerpstra">WesleyTerpstra</a> for reporting this bug.</p></div>
213 </li>
214 <li>
215 <p>
216 <a id="bug01"></a>
217 <span class="monospaced">Posix.ProcEnv.setpgid</span> doesn&#8217;t work. If you compile a program
218 that uses it, you will get a link time error
219 </p>
220 <div class="listingblock">
221 <div class="content monospaced">
222 <pre>undefined reference to `Posix_ProcEnv_setpgid'</pre>
223 </div></div>
224 <div class="paragraph"><p>The bug is due to <span class="monospaced">Posix_ProcEnv_setpgid</span> being omitted from the
225 MLton runtime. We fixed the problem in our CVS by adding the
226 following definition to <span class="monospaced">runtime/Posix/ProcEnv/ProcEnv.c</span></p></div>
227 <div class="listingblock">
228 <div class="content"><div class="highlight"><pre><span class="n">Int</span> <span class="nf">Posix_ProcEnv_setpgid</span> <span class="p">(</span><span class="n">Pid</span> <span class="n">p</span><span class="p">,</span> <span class="n">Gid</span> <span class="n">g</span><span class="p">)</span> <span class="p">{</span>
229 <span class="k">return</span> <span class="n">setpgid</span> <span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">g</span><span class="p">);</span>
230 <span class="p">}</span>
231 </pre></div></div></div>
232 <div class="paragraph"><p>Thanks to Tom Murphy for reporting this bug.</p></div>
233 </li>
234 </ul></div>
235 </div>
236 </div>
237 </div>
238 <div id="footnotes"><hr></div>
239 <div id="footer">
240 <div id="footer-text">
241 </div>
242 <div id="footer-badges">
243 </div>
244 </div>
245 </body>
246 </html>