From: simonmar Date: Tue, 29 Jan 2002 14:41:52 +0000 (+0000) Subject: [project @ 2002-01-29 14:41:52 by simonmar] X-Git-Tag: Approximately_9120_patches~238 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=5bed878be18b1c833e91d5bb335e58b5805bc762;p=ghc-hetmet.git [project @ 2002-01-29 14:41:52 by simonmar] Fix highly obscure bug. The heap check in cmpIntegerzh_fast was erroneously passing cmpIntegerIntzh_fast as the resumption point instead of cmpIntegerzh_fast, with the result that if a heap-check happened to strike in cmpIntegerzh_fast then we would end up resuming in cmpIntegerIntzh and returning an incorrect comparison result. One symptom is that very occasionally floating point numbers would print incorrectly (ending in an 'a'). --- diff --git a/ghc/rts/PrimOps.hc b/ghc/rts/PrimOps.hc index 8e4f5e8..76159ff 100644 --- a/ghc/rts/PrimOps.hc +++ b/ghc/rts/PrimOps.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: PrimOps.hc,v 1.89 2002/01/26 18:04:48 rje Exp $ + * $Id: PrimOps.hc,v 1.90 2002/01/29 14:41:52 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -814,7 +814,7 @@ FN_(cmpIntegerzh_fast) MP_INT arg1, arg2; I_ r; FB_ - MAYBE_GC(R2_PTR | R4_PTR, cmpIntegerIntzh_fast); + MAYBE_GC(R2_PTR | R4_PTR, cmpIntegerzh_fast); arg1._mp_size = R1.i; arg1._mp_alloc= ((StgArrWords *)R2.p)->words; arg1._mp_d = (mp_limb_t *) (BYTE_ARR_CTS(R2.p));