<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="robots" content="index,nofollow">



<title>Bugs20041109 - MLton Standard ML Compiler (SML Compiler)</title>
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="all" href="common.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="screen" href="screen.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="print" href="print.css">


<link rel="Start" href="Home">


</head>

<body lang="en" dir="ltr">

<table bgcolor = lightblue cellspacing = 0 style = "border: 0px;" width = 100%>
  <tr>
    <td style = "
		border: 0px;
		color: darkblue; 
		font-size: 150%;
		text-align: left;">
      <a class = mltona href="Home">MLton 20051202</a>
    <td style = "
		border: 0px;
		font-size: 150%;
		text-align: center;
		width: 50%;">
      Bugs20041109
    <td style = "
		border: 0px;
		text-align: right;">
      <table cellspacing = 0 style = "border: 0px">
        <tr style = "vertical-align: middle;">
      </table>
  <tr style = "background-color: white;">
    <td colspan = 3
	style = "
		border: 0px;
		font-size:70%;
		text-align: right;">
      <a href = "Home">Home</a>
      &nbsp;<a href = "Index">Index</a>
      &nbsp;
</table>
<div id="content" lang="en" dir="ltr">
Here are the known bugs in MLton 20041109, listed in reverse chronological order of date reported. <p>
<a id="17"></a> 
</p>

    <ul>

    <li>
<p>
 <tt>MLton.Finalizable.touch</tt> doesn't necessarily keep values alive  long enough.  Our SVN has a patch to the compiler.  You must rebuild  the compiler in order for the patch to take effect. 
</p>
<p>
 Thanks to Florian Weimer for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="16"></a> 
</p>

    <ul>

    <li>
<p>
 A bug in an optimization pass may incorrectly transform a program  to flatten ref cells into their containing data structure, yielding a  type-error in the transformed program.  Our CVS has a  <a class="external" href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/mlton/ssa/ref-flatten.fun.diff?r1=1.35&amp;r2=1.37"><img src="moin-www.png" alt="[WWW]" height="11" width="11">patch</a>   to the compiler.  You must rebuild the compiler in order for the  patch to take effect. 
</p>
<p>
 Thanks to <a href="VesaKarvonen">VesaKarvonen</a> for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="15"></a> 
</p>

    <ul>

    <li>
<p>
 A bug in the front end mistakenly allows unary constructors to be  used without an argument in patterns.  For example, the following  program is accepted, and triggers a large internal error. 
<pre> fun f x = case x of SOME =&gt; true | _ =&gt; false</pre> We have fixed the problem in our CVS. 
</p>
<p>
 Thanks to William Lovas for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="14"></a> 
</p>

    <ul>

    <li>
<p>
 A bug in Posix.IO.{getlk,setlk,setlkw} causes a link-time error:  <tt>undefined&nbsp;reference&nbsp;to&nbsp;Posix_IO_FLock_typ</tt>  Our CVS has a  <a class="external" href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/basis-library/posix/primitive.sml.diff?r1=1.34&amp;r2=1.35"><img src="moin-www.png" alt="[WWW]" height="11" width="11">patch</a>  to the Basis Library implementation. 
</p>
<p>
 Thanks to Adam Chlipala for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="13"></a> 
</p>

    <ul>

    <li>
<p>
 A bug can cause programs compiled with <tt>-profile&nbsp;alloc</tt> to  segfault.  Our CVS has a   <a class="external" href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/mlton/backend/ssa-to-rssa.fun.diff?r1=1.106&amp;r2=1.107"><img src="moin-www.png" alt="[WWW]" height="11" width="11">patch</a>  to the compiler.  You must rebuild the compiler in order for the  patch to take effect. 
</p>
<p>
 Thanks to John Reppy for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="12"></a> 
</p>

    <ul>

    <li>
<p>
 A bug in an optimization pass may incorrectly flatten ref cells  into their containing data structure, breaking the sharing between  the cells.  Our CVS has a  <a class="external" href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/mlton/ssa/ref-flatten.fun.diff?r1=1.32&amp;r2=1.33"><img src="moin-www.png" alt="[WWW]" height="11" width="11">patch</a>   to the compiler.  You must rebuild the compiler in order for the  patch to take effect. 
</p>
<p>
 Thanks to Paul Govereau for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="11"></a> 
</p>

    <ul>

    <li>
<p>
 Some arrays or vectors, such as <tt>(char&nbsp;*&nbsp;char)&nbsp;vector</tt>, are  incorrectly implemented, and will conflate the first and second  components of each element.  Our CVS has a   <a class="external" href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/mlton/backend/packed-representation.fun.diff?r1=1.32&amp;r2=1.33"><img src="moin-www.png" alt="[WWW]" height="11" width="11">patch</a>  to the compiler.  You must rebuild the compiler in order for the  patch to take effect. 
</p>
<p>
 Thanks to Scott Cruzen for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="10"></a> 
</p>

    <ul>

    <li>
<p>
 <tt>Socket.Ctl.getLINGER</tt> and <tt>Socket.Ctl.setLINGER</tt>  mistakenly raise <tt>Subscript</tt>.    Our CVS has a   <a class="external" href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/basis-library/net/socket.sml.diff?r1=1.14&amp;r2=1.15"><img src="moin-www.png" alt="[WWW]" height="11" width="11">patch</a>  to the Basis Library implementation. 
</p>
<p>
 Thanks to Ray Racine for reporting the bug. 
</p>
</li>

    </ul>


<p>
<a id="9"></a> 
</p>

    <ul>

    <li>
<p>
 <a href="ConcurrentML"> CML</a> <tt>Mailbox.send</tt> makes a call in the wrong atomic context.  Our CVS has a <a class="external" href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/lib/cml/core-cml/mailbox.sml.diff?r1=1.3&amp;r2=1.4"><img src="moin-www.png" alt="[WWW]" height="11" width="11">patch</a>  to the CML implementation. 
</p>
</li>

    </ul>


<p>
<a id="8"></a> 
</p>

    <ul>

    <li>
<p>
 <tt>OS.Path.joinDirFile</tt> and <tt>OS.Path.toString</tt> did not  raise <tt>InvalidArc</tt> when they were supposed to.  They now do.  Our CVS has a <a class="external" href="http://mlton.org/cgi-bin/viewcvs.cgi/mlton/mlton/basis-library/system/path.sml.diff?r1=1.8&amp;r2=1.11"><img src="moin-www.png" alt="[WWW]" height="11" width="11">patch</a>  to the Basis Library implementation. 
</p>
<p>
 Thanks to Andreas Rossberg for reporting the bug. 
</p>
</li>

    </ul>


<p>
<a id="7"></a> 
</p>

    <ul>

    <li>
<p>
 The front end incorrectly disallows sequences of expressions  (separated by semicolons) after a topdec has already been processed.  For example, the following is incorrectly rejected.  
<pre> val x = 0;
 ignore x;
 ignore x;</pre> We have fixed the problem in our CVS. 
</p>
<p>
 Thanks to Andreas Rossberg for reporting the bug. 
</p>
</li>

    </ul>


<p>
<a id="6"></a> 
</p>

    <ul>

    <li>
<p>
 The front end incorrectly disallows expansive <tt>val</tt>  declarations that bind a type variable that doesn't occur in the  type of the value being bound.   For example, the following is  incorrectly rejected.  
<pre> val 'a x = let exception E of 'a in () end</pre> We have fixed the problem in our CVS. 
</p>
<p>
 Thanks to Andreas Rossberg for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="5"></a> 
</p>

    <ul>

    <li>
<p>
 The x86 codegen fails to account for the possibility that a 64-bit  move could interfere with itself (as simulated by 32-bit moves).  We  have fixed the problem in our CVS.   
</p>
<p>
 Thanks to Scott Cruzen for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="4"></a> 
</p>

    <ul>

    <li>
<p>
 <tt>NetHostDB.scan</tt> and <tt>NetHostDB.fromString</tt> incorrectly  raise an exception on internet addresses whose last component is a  zero, e.g <tt>0.0.0.0</tt>.  Our CVS has a   <a class="external" 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"><img src="moin-www.png" alt="[WWW]" height="11" width="11">patch</a> to the Basis Library implementation. 
</p>
<p>
 Thanks to Scott Cruzen for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="3"></a> 
</p>

    <ul>

    <li>
<p>
 <tt>StreamIO.inputLine</tt> has an off-by-one error causing it to drop  the first character after a newline in some situations.  Our CVS has a   <a class="external" 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"><img src="moin-www.png" alt="[WWW]" height="11" width="11">patch</a>.  to the Basis Library implementation. 
</p>
<p>
 Thanks to Scott Cruzen for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="2"></a> 
</p>

    <ul>

    <li>
<p>
 <tt>BinIO.getInstream</tt> and <tt>TextIO.getInstream</tt> are  implemented incorrectly.  This also impacts the behavior of  <tt>BinIO.scanStream</tt> and <tt>TextIO.scanStream</tt>.  If you (directly  or indirectly) realize a <tt>TextIO.StreamIO.instream</tt> and do not  (directly or indirectly) call <tt>TextIO.setInstream</tt> with a derived  stream, you may lose input data.  We have fixed the problem in our  CVS.  
</p>
<p>
 Thanks to <a href="WesleyTerpstra">WesleyTerpstra</a> for reporting this bug. 
</p>
</li>

    </ul>


<p>
<a id="1"></a> 
</p>

    <ul>

    <li>
<p>
 <tt>Posix.ProcEnv.setpgid</tt> doesn't work.  If you compile a program  that uses it, you will get a link time error 
<pre>undefined reference to `Posix_ProcEnv_setpgid'</pre> The bug is due to <tt>Posix_ProcEnv_setpgid</tt> being omitted from the  MLton runtime.  We fixed the problem in our CVS by adding the  following definition to <tt>runtime/Posix/ProcEnv/ProcEnv.c</tt> 
<pre> Int Posix_ProcEnv_setpgid (Pid p, Gid g) {
        return setpgid (p, g);
}
</pre>
</p>
<p>
 Thanks to Tom Murphy for reporting this bug. 
</p>
</li>
</ul>

</div>



<p>
<hr>
Last edited on 2005-12-01 05:16:27 by <span title="ppp-71-139-183-221.dsl.snfc21.pacbell.net"><a href="StephenWeeks">StephenWeeks</a></span>.
</body></html>
