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">
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
19 <body class="article">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
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>
37 <span class="monospaced">MLton.Finalizable.touch</span> doesn’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.
41 <div class="paragraph"><p>Thanks to Florian Weimer for reporting this bug.</p></div>
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&r2=1.37">patch</a>
50 to the compiler. You must rebuild the compiler in order for the
53 <div class="paragraph"><p>Thanks to <a href="VesaKarvonen">VesaKarvonen</a> for reporting this bug.</p></div>
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.
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">=></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">=></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>
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>
74 <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/basis-library/posix/primitive.sml.diff?r1=1.34&r2=1.35">patch</a>
75 to the Basis Library implementation.
77 <div class="paragraph"><p>Thanks to Adam Chlipala for reporting this bug.</p></div>
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&r2=1.107">patch</a>
85 to the compiler. You must rebuild the compiler in order for the
88 <div class="paragraph"><p>Thanks to John Reppy for reporting this bug.</p></div>
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&r2=1.33">patch</a>
97 to the compiler. You must rebuild the compiler in order for the
100 <div class="paragraph"><p>Thanks to Paul Govereau for reporting this bug.</p></div>
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&r2=1.33">patch</a>
109 to the compiler. You must rebuild the compiler in order for the
110 patch to take effect.
112 <div class="paragraph"><p>Thanks to Scott Cruzen for reporting this bug.</p></div>
117 <span class="monospaced">Socket.Ctl.getLINGER</span> and <span class="monospaced">Socket.Ctl.setLINGER</span>
118 mistakenly raise <span class="monospaced">Subscript</span>.
120 <a href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/basis-library/net/socket.sml.diff?r1=1.14&r2=1.15">patch</a>
121 to the Basis Library implementation.
123 <div class="paragraph"><p>Thanks to Ray Racine for reporting the bug.</p></div>
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&r2=1.4">patch</a>
130 to the CML implementation.
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&r2=1.11">patch</a>
139 to the Basis Library implementation.
141 <div class="paragraph"><p>Thanks to Andreas Rossberg for reporting the bug.</p></div>
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.
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>
161 The front end incorrectly disallows expansive <span class="monospaced">val</span>
162 declarations that bind a type variable that doesn’t occur in the
163 type of the value being bound. For example, the following is
164 incorrectly rejected.
166 <div class="listingblock">
167 <div class="content"><div class="highlight"><pre><span class="k">val</span><span class="w"> </span><span class="n">'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">'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>
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.
179 <div class="paragraph"><p>Thanks to Scott Cruzen for reporting this bug.</p></div>
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&r2=1.13">patch</a> to the Basis Library implementation.
189 <div class="paragraph"><p>Thanks to Scott Cruzen for reporting this bug.</p></div>
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&tr1=1.29&r2=text&tr2=1.30&diff_format=h">patch</a>.
197 to the Basis Library implementation.
199 <div class="paragraph"><p>Thanks to Scott Cruzen for reporting this bug.</p></div>
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
212 <div class="paragraph"><p>Thanks to <a href="WesleyTerpstra">WesleyTerpstra</a> for reporting this bug.</p></div>
217 <span class="monospaced">Posix.ProcEnv.setpgid</span> doesn’t work. If you compile a program
218 that uses it, you will get a link time error
220 <div class="listingblock">
221 <div class="content monospaced">
222 <pre>undefined reference to `Posix_ProcEnv_setpgid'</pre>
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>
238 <div id="footnotes"><hr></div>
240 <div id="footer-text">
242 <div id="footer-badges">