[MLton] cygwoes

Wesley W. Terpstra wesley@terpstra.ca
Wed, 5 Oct 2005 17:02:59 +0200


--Apple-Mail-2--106475893
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

On Oct 5, 2005, at 4:07 PM, Matthew Fluet wrote:
> Cygwin has an environment variable option that affects case- 
> sensitivity. When it is active, it does not allow you to "pun" and  
> access a file along a path that differs in case; though, it still  
> prevents you from creating a file with the same name, but different  
> case.

... so, ignore the standard for cygwin, or not?

> The last separator is '/' and not '\' because  mlton/main/main.fun: 
> 72 constructs the path via
>   concat [!Control.libDir, "/target-map"]
> and the path is never canonicalized before being opened.

That's a latent bug...
It should be OS.Path.joinDirFile {dir=!Control.libDir, file="target- 
map"}

>> From what (little) I understand of cygwin, I think this is due to  
>> the fork/exec code. However, do we know which code-path is being  
>> used? fork/exec or spawnp?
>
> It should be spawnp, since fork/exec is disabled when we use Virtual 
> {Alloc,Free} instead of {mmap,free}.

Can you confirm this behaviour?
It seems strange that gcc is crashing when 'spawnp'd.
Is it really the case that gcc is crashing, and not mlton?

>> What was the original reason for avoiding mmap? Does it still apply?

Is it still the case that less memory is available with mmap?

Erg. I will reinstall cygwin sometime this week.
Having mingw support would be great too.

--Apple-Mail-2--106475893
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=ISO-8859-1

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; "><DIV><DIV>On Oct 5, 2005, at =
4:07 PM, Matthew Fluet wrote:</DIV><BLOCKQUOTE type=3D"cite"><BLOCKQUOTE =
type=3D"cite"><BLOCKQUOTE type=3D"cite"></BLOCKQUOTE></BLOCKQUOTE><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">Cygwin has an environment variable option that =
affects case-sensitivity. When it is active, it does not allow you to =
"pun" and access a file along a path that differs in case; though, it =
still prevents you from creating a file with the same name, but =
different case.</DIV></BLOCKQUOTE><DIV><BR =
class=3D"khtml-block-placeholder"></DIV>... so, ignore the standard for =
cygwin, or not?</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><BLOCKQUOTE =
type=3D"cite"><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">The last separator is '/' and =
not '\' because<SPAN class=3D"Apple-converted-space">=A0 =
</SPAN>mlton/main/main.fun:72 constructs the path via</DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><SPAN class=3D"Apple-converted-space">=A0 =
</SPAN>concat [!Control.libDir, "/target-map"]</DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">and the path is never canonicalized before being =
opened.</DIV></BLOCKQUOTE><DIV><BR =
class=3D"khtml-block-placeholder"></DIV>That's a latent =
bug...</DIV><DIV>It should be OS.Path.joinDirFile {dir=3D!Control.libDir, =
file=3D"target-map"}</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><BLOCKQUOTE =
type=3D"cite"><BLOCKQUOTE type=3D"cite"><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">=46rom what =
(little) I understand of cygwin, I think this is due to the fork/exec =
code. However, do we know which code-path is being used? fork/exec or =
spawnp?</DIV></BLOCKQUOTE><DIV style=3D"margin-top: 0px; margin-right: =
0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; =
"><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">It should be spawnp, since =
fork/exec is disabled when we use Virtual{Alloc,Free} instead of =
{mmap,free}.</DIV></BLOCKQUOTE><DIV><BR =
class=3D"khtml-block-placeholder"></DIV>Can you confirm this =
behaviour?</DIV><DIV>It seems strange that gcc is crashing when =
'spawnp'd.</DIV><DIV>Is it really the case that gcc is crashing, and not =
mlton?</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><BLOCKQUOTE =
type=3D"cite"><BLOCKQUOTE type=3D"cite"><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">What was the =
original reason for avoiding mmap? Does it still =
apply?</DIV></BLOCKQUOTE></BLOCKQUOTE></DIV><FONT =
class=3D"Apple-style-span" color=3D"#000000"><BR =
class=3D"khtml-block-placeholder"></FONT><DIV><FONT =
class=3D"Apple-style-span" color=3D"#0000DD"><FONT =
class=3D"Apple-style-span" color=3D"#FFFFFF"><FONT =
class=3D"Apple-style-span" color=3D"#FDFDFD"><FONT =
class=3D"Apple-style-span" color=3D"#F1F1F1"><FONT =
class=3D"Apple-style-span" color=3D"#CACACA"><FONT =
class=3D"Apple-style-span" color=3D"#8E8E8E"><FONT =
class=3D"Apple-style-span" color=3D"#6F6F6F"><FONT =
class=3D"Apple-style-span" color=3D"#5B5B5B"><FONT =
class=3D"Apple-style-span" color=3D"#545454"><FONT =
class=3D"Apple-style-span" color=3D"#393939"><FONT =
class=3D"Apple-style-span" color=3D"#101010"><FONT =
class=3D"Apple-style-span" color=3D"#000000"><FONT =
class=3D"Apple-style-span" color=3D"#000000">Is it still the case that =
less memory is available with =
mmap?</FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT=
></FONT></FONT></FONT></DIV><DIV><FONT class=3D"Apple-style-span" =
color=3D"#0000DD"><FONT class=3D"Apple-style-span" color=3D"#FFFFFF"><FONT=
 class=3D"Apple-style-span" color=3D"#FDFDFD"><FONT =
class=3D"Apple-style-span" color=3D"#F1F1F1"><FONT =
class=3D"Apple-style-span" color=3D"#CACACA"><FONT =
class=3D"Apple-style-span" color=3D"#8E8E8E"><FONT =
class=3D"Apple-style-span" color=3D"#6F6F6F"><FONT =
class=3D"Apple-style-span" color=3D"#5B5B5B"><FONT =
class=3D"Apple-style-span" color=3D"#545454"><FONT =
class=3D"Apple-style-span" color=3D"#393939"><FONT =
class=3D"Apple-style-span" color=3D"#101010"><FONT =
class=3D"Apple-style-span" color=3D"#000000"><FONT =
class=3D"Apple-style-span" color=3D"#000000"><BR =
class=3D"khtml-block-placeholder"></FONT></FONT></FONT></FONT></FONT></FON=
T></FONT></FONT></FONT></FONT></FONT></FONT></FONT></DIV><DIV><FONT =
class=3D"Apple-style-span" color=3D"#0000DD"><FONT =
class=3D"Apple-style-span" color=3D"#FFFFFF"><FONT =
class=3D"Apple-style-span" color=3D"#FDFDFD"><FONT =
class=3D"Apple-style-span" color=3D"#F1F1F1"><FONT =
class=3D"Apple-style-span" color=3D"#CACACA"><FONT =
class=3D"Apple-style-span" color=3D"#8E8E8E"><FONT =
class=3D"Apple-style-span" color=3D"#6F6F6F"><FONT =
class=3D"Apple-style-span" color=3D"#5B5B5B"><FONT =
class=3D"Apple-style-span" color=3D"#545454"><FONT =
class=3D"Apple-style-span" color=3D"#393939"><FONT =
class=3D"Apple-style-span" color=3D"#101010"><FONT =
class=3D"Apple-style-span" color=3D"#000000"><FONT =
class=3D"Apple-style-span" color=3D"#000000">Erg. I will reinstall =
cygwin sometime this =
week.</FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT=
></FONT></FONT></FONT></DIV><DIV>Having mingw support would be great =
too.</DIV><DIV><FONT class=3D"Apple-style-span" =
color=3D"#0000DD"></FONT></DIV></BODY></HTML>=

--Apple-Mail-2--106475893--