Patch: Fix stage2 stack protection crash on OpenBSD
Donald Bruce Stewart
dons at cse.unsw.edu.au
Fri Apr 28 04:38:14 EDT 2006
Attached.
-- Don
-------------- next part --------------
New patches:
[Fix stage2 segfault on openbsd.
dons at cse.unsw.edu.au**20060428074811
Somewhere along the 6.5 branch, gcc started compiling the rts such that
it triggers the stack smash handler, causing stage2 to by kill'd
immediately. This turns off the stack protector, which will do for now.
] {
hunk ./rts/Makefile 330
+
+# Otherwise the stack-smash handler gets triggered.
+ifeq "$(TargetOS_CPP)" "openbsd"
+SRC_HC_OPTS += -optc-fno-stack-protector
+endif
}
Context:
[Fix bug shown in the mod77 test.
Lemmih <lemmih at gmail.com>**20060427113313]
[Don't init root pointers if they aren't gonna be used.
Lemmih <lemmih at gmail.com>**20060426111143]
[Fix recompilation checking.
Simon Marlow <simonmar at microsoft.com>**20060425140932
One-shot compilation was throwing away the old iface read by
checkOldIface, with the result that version numbers were never being
incremented. Fixes the recomp001 test too.
]
[Solaris needs -lrt for the threaded RTS
Simon Marlow <simonmar at microsoft.com>**20060425082823]
[fix problem with binary-dist docs
Simon Marlow <simonmar at microsoft.com>**20060424090159]
[Enable breakpoint support.
Lemmih <lemmih at gmail.com>**20060421113112]
[Fixing some lexer errors with extcore
Josef Svenningsson <josef.svenningsson at gmail.com>**20060420222625]
[Extcore can now handle data types without constructors
Josef Svenningsson <josef.svenningsson at gmail.com>**20060420213622]
[Comments only
Josef Svenningsson <josef.svenningsson at gmail.com>**20060420213555]
[Resurrect ProjectName
sven.panne at aedion.de**20060421085125]
[Remove the section on platform support, link to the wiki page
Simon Marlow <simonmar at microsoft.com>**20060420125555
The section in the building guide was becoming out of date, a wiki
page is much more likely to be kept fresh.
]
[Fix workaround for a GHC 6.4 bug
rl at cse.unsw.edu.au**20060420044223]
[hslibs is dead, Jim...
sven.panne at aedion.de**20060419144609]
[Synched .spec file with reality
sven.panne at aedion.de**20060419143138]
[Add .spec file to source distribution
sven.panne at aedion.de**20060419103725]
[remove paragraph about mutable objects that doesn't apply now
Simon Marlow <simonmar at microsoft.com>**20060419082038]
[HsBool should be HsInt, not StgBool
Simon Marlow <simonmar at microsoft.com>**20060418144214
StgBool is mapped to C's int type. GHC doesn't currently know the
size of a C int on the target arch, it's easier to use StgInt instead.
I guess nobody ever uses Bool arguments to foreign imports/exports.
]
[handle Bool arg to foreign import "wrapper"
Simon Marlow <simonmar at microsoft.com>**20060418143936
Fixes #746
]
[update commentry for foreign import "wrapper" handling
Simon Marlow <simonmar at microsoft.com>**20060418143714]
[remove vestiges of ByteArray and MutableByteArray, which are no more
Simon Marlow <simonmar at microsoft.com>**20060418143641]
[Comment only
simonpj at microsoft.com**20060418125624]
[Fix rank-validity testing
simonpj at microsoft.com**20060418125350
GHC does not now do "hoisting" as it used to. Instead, it allows
foralls to the right of fuction arrows, as well as to the left.
But the type-validity tester hadn't caught up. This commit fixes
it. The test is tc203.
Incidentally, GHC still doesn't let you write
forall a. Eq a => forall b. b -> b
because we get a zillion reduce/reduce errors if we allow that. I'm
sure it's fixable. But meanwhile you have to use an auxiliary type
synonym, which is a bit stupid.
]
[Make the initial rdr and type scope available in the ghc-api.
Lemmih <lemmih at gmail.com>**20060418023606]
[Fix minor bug in Linker.withExtendedLinkEnv
Lemmih <lemmih at gmail.com>**20060418023518]
[Export 'insertSymbol' and 'insertStableSymbol'.
Lemmih <lemmih at gmail.com>**20060418021806
'insertStableSymbol' is used for exporting closures that are affected by the GC.
]
[Allow $x, as well as $(x), at top level in TH
simonpj at microsoft.com**20060414121907
Bulat pointed out that in Template Haskell
$x
is allowed instead of
$(x)
in expressions, but not at the top level of modules.
This commit fixes the omission. Now you can say
f x = x
$h
data T = T
and the $h will run Template Haskell just as you'd expect.
]
[Fix TH erorr recovery (test is TH_recover)
simonpj at microsoft.com**20060414120411]
[Comments only
simonpj at microsoft.com**20060414120359]
[Recover gracefully from a Template Haskell programmers error
simonpj at microsoft.com**20060414115831
If a TH programmer uses a type constructor as a data constructor,
GHC simply crashed. This commit makes it report the error in a
graceful way.
]
[Document newtype-unwrapping for IO in FFI
simonpj at microsoft.com**20060414105212]
[Cosmetics in SpecConstr
simonpj at microsoft.com**20060412152721
SpecConstr currently uses substExpr for tiresome reasons to do with
GADTs. Unfortunately the substExpr generates some WARNINGS (when DEBUG)
is on, because we aren't adding all the in-scope Ids to the in-scope
set of the substitution.
When we move to FC these substExprs will go away, so I'm not going to
worry about this now.
]
[Improve pruning of case alternatives to account for GADTs
simonpj at microsoft.com**20060412152327
Consider
data T a where
T1 :: T Int
T2 :: T Bool
T3 :: T Char
f :: T Bool -> Int
f x = case x of
DEFAULT -> ...
T2 -> 3
Here the DEFAULT case covers multiple constructors (T1,T3), but none
of them can match a scrutinee of type (T Bool). So we can prune away
the default case altogether.
In implementing this, I re-factored this bit of the simplifier, elminiating
prepareAlts from SimplUtils, and putting all the work into simplAlts in
Simplify
The proximate cause was a program written by Manuel using PArrays
]
[Fix a bug in optimising division to shift right
Simon Marlow <simonmar at microsoft.com>**20060412144247
Division by an integral log2 can't be directly optimised to a shift
right, because shift right behaves like a division that rounds to
negative infinity, whereas we want one that rounds to zero. Fix this
by adding (divisor-1) to the dividend when it is negative before
shifting. We do this without jumps, generating very slightly worse
code than gcc, which uses conditional moves on CPUs that support it.
]
[Omit lndir on Windows, as it used to be
simonpj at microsoft.com**20060411135334]
[remove a trace
Simon Marlow <simonmar at microsoft.com>**20060411131531]
[Allow IO to be wrapped in a newtype in foreign import/export
simonpj at microsoft.com**20060411120441
Up to now, the silent unwrapping of newtypes in foreign import/export
has been limited to data values. But it's useful for the IO monad
itself:
newtype MyIO a = MIO (IO a)
foreign import foo :: Int -> MyIO Int
This patch allows the IO monad to be
wrapped too. This applies to foreign import "dynamic" and "wrapper",
thus
foreign import "wrapper" foo :: MyIO () -> HisIO (FunPtr (MyIO ()))
Warning: I did on the plane, and I'm no longer sure if its 100%
complete, so needs more testing. In particular the wrapper/dynamic bit.
]
[Improve newtype deriving
simonpj at microsoft.com**20060402215911
Ross Paterson pointed out a useful generalisation of GHC's
newtype-deriving mechanism. This implements it. The idea
is to allow
newtype Wrap m a = Wrap (m a) deriving (Monad, Eq)
where the representation type doesn't start with a type
constructor.
Actually GHC already *did* implement this, but the eta-ok
check in TcDeriv missed a case, so there was a lurking bug.
This patches fixes the documentation too. drvrun019 tests.
]
[add take to the list of functions deforestable
Simon Marlow <simonmar at microsoft.com>**20060411090131]
[avoid versionitis in Numeric.showHex (should fix tcrun007)
Simon Marlow <simonmar at microsoft.com>**20060411085009]
[add a note about full-laziness
Simon Marlow <simonmar at microsoft.com>**20060410093824]
[robustify the test for the top of the tree a little
Simon Marlow <simonmar at microsoft.com>**20060410082224]
[Make darcs-all work without a ghc toplevel directory
Josef Svenningsson <josef.svenningsson at gmail.com>**20060407161738]
[Fix typo in darcsall warning
Josef Svenningsson <josef.svenningsson at gmail.com>**20060407161335]
[fix source dists
Simon Marlow <simonmar at microsoft.com>**20060407150045]
[add a README for binary dists
Simon Marlow <simonmar at microsoft.com>**20060407143832]
[fix binary dists
Simon Marlow <simonmar at microsoft.com>**20060407143822]
[remove the last bits of the ghc/ subdir
Simon Marlow <simonmar at microsoft.com>**20060407085219]
[TAG 07.04.06
Lemmih <lemmih at gmail.com>**20060407130411]
Patch bundle hash:
4764a5bb7f1fecc6f98cbaf8a17175681e580f4b
More information about the Cvs-ghc
mailing list