No improvement, I'm afraid.

On Tue, May 18, 1999 at 01:16:01AM -0700, Sigbjorn Finne (Intl Vendor) wrote:
> The fflush in shutdownHaskell() should not be required any longer -
> the behaviour it purports to work around is a non-issue to us now.
> 
> Removing it and recompiling the RTS you're linking hsc with may
> just be a quicker plan of attack..

Easier said than done... it was a while before I realised that removing
the fflush and typing make just wasn't going to hack it. This is because
hsc is linked against the installed libHSrts (argh! scream!) rather than
the one just re-built. The build remakes the fresh rts lib and re-links
against the old one -- almost certainly not what is intended.

After installing the newer (no fflush) libHSrts.a and re-running make
(for a new hsc), I get a failure like so:

Haskell compiler:
        /home/myxie/devel/ghc/fptools-build/ghc/driver/../compiler/hsc ,-N ,-W 
,/tmp/ghc4507.cpp [snipped -fxyz] 
-himap=.%.hi:/home/myxie/devel/ghc/fptools-build/ghc/driver/../lib/exts%.hi:/home/myxie/devel/ghc/fptools-build/ghc/driver/../lib/exts%.hi:/home/myxie/devel/ghc/fptools-build/ghc/driver/../lib/std%.hi
   -v -hifile=/tmp/ghc4507.hi -C=/tmp/ghc4507.hc -F=/tmp/ghc4507_stb.c 
-FH=/tmp/ghc4507_stb.h +RTS -H10000000 -K1000000 -s/tmp/ghc4507.stat
Glasgow Haskell Compiler, version 4.02, for Haskell 98
*** Reader:
*** Renamer:
EVACUATED object entered!

Ho hum.

As a side issue. The use of /tmp/ghc<pid>.foo looks rather unsafe for
a multiuser machine. I know TMPDIR can be specified, but unless ghc is
taking some explicit precautions or TMPDIR is specified to be somewhere
safe, a malicious user on the same machine could arrange for plenty of
<ghc-user>'s files to be overwritten with junk. This should at least
be documented. See tmpnam(3) or tmpfile(3).

Giuliano.

Reply via email to