Found non-frame during stack squeezing...

2002-05-02 Thread Matt Chapman

When I build CVS HEAD with RTS debugging I sometimes get, at exit time:

ghc-5.03: fatal error: Found non-frame during stack squeezing at 0x504797a0 (prev 
frame was 0x504797a0)

and sometimes segmentation faults:

#0  0x87da233 in threadSqueezeStack (tso=0x500ba000) at GC.c:3820
3820switch (get_itbl(frame)-type) {
(gdb) bt
#0  0x87da233 in threadSqueezeStack (tso=0x500ba000) at GC.c:3820
#1  0x87da4ff in threadPaused (tso=0x500ba000) at GC.c:4054
#2  0x87e2777 in suspendThread (reg=0x8896770, concCall=rtsFalse) at Schedule.c:1520
#3  0x87a5661 in s5rx_fast1 ()
#4  0x87e6f60 in stg_catch_frame_info ()
#5  0x4c58308 in ?? ()
Cannot access memory at address 0x887fe0be.
(gdb) print frame
$1 = (StgUpdateFrame *) 0x1

and generally behaviour which suggests there isn't an update frame where
it is expecting one - and indeed tso-su doesn't look like it's pointing
at an update frame.

Here s5rx_fast1 is a bit of TopHandler that calls shutdownHaskellAndExit.

Anyone know what's up with it?

Matt

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: User defined Ix instances potentially unsafe

2001-05-02 Thread Matt Harden

Matt Harden wrote:

 blah, blah, blah, bug in the Library Report, blah, blah...

OK, so I failed to read the Library Report.  It clearly states:

 An implementation is entitled to assume the following laws about these operations: 
 
 range (l,u) !! index (l,u) i == i   -- when i is in range
 inRange (l,u) i == i `elem` range (l,u)

So my bug is only in my mind.  Sorry for bothering everyone.

Regards,
Matt

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



User defined Ix instances potentially unsafe

2001-05-01 Thread Matt Harden

Sorry if this has been reported before.

I shouldn't be able to crash ghc or hugs without using any unsafe
features, right?  Well, here 'tis:

 module CrashArray where
 
 import Array
 import Ix
 
 newtype CrashIx = CrashIx Int deriving (Ord, Eq, Show)
 
 instance Enum CrashIx where
toEnum   x = (CrashIx x)
fromEnum (CrashIx x) = x
 
 instance Ix CrashIx where
inRange (_,_) _ = True
index (_,_) (CrashIx x) = x
range (x,y) = [x..y]
 
 myArray = listArray (CrashIx 0, CrashIx 0) [0]
 crash = myArray ! (CrashIx maxBound)


In ghci-5.00, I get a segfault and hugs-feb-2000 says:
   INTERNAL ERROR: Error in graph

Now, admittedly my Ix instance is broken, but I don't think I should be
able to segfault the interpreter.

Unfortunately, I think the only way to fix this without changing the
Library Report would be to add another layer of range checking to the
array implementation.  Bleh.  Note also that the (inefficient)
implementation in the report wouldn't crash, but would get the wrong
error: Undefined array element instead of Index out of range.

I think we might describe this as a bug in the Library Report, rather
than in any particular Haskell implementation.

Enjoy!

Matt Harden

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-27 Thread Matt Harden

I agree that this feature is dangerous.  I would prefer it be turned off
by default and an option given to enable it.  Better yet, why not turn
it off altogether and add a builtin command that sources another file. 
That way, users could add:

   :source ./.ghci

to their $HOME/.ghci file to get the current behavior, and users could
also take steps to protect themselves before sourceing the other file. I
would also suggest checking that $HOME/.ghci is owned by the current
user and not group- or world- writeable before sourcing it.

Michael Weber wrote:
 
 Please, preserve the Cc: when replying.
 
 
 ghci will load .ghci from current directory and it can contain :! shell
 commands, so if I run ghci in a directory writable by others bad things can
 happen eg. to my files.
 On the other hand it's useful.
 Maybe it could be less dangerous if the immediately damaging stuff (:!) was
 disabled and some warning printed if the file was writable (or owned) by someone 
else?

Thanks,
Matt Harden

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-27 Thread Matt Harden

Matt Harden wrote:

...why not ... add a builtin command that sources another file.

How embarrassing...

   :def source readFile

:-)

Now I definitely want the automatic sourcing of ./.ghci turned off; I
can already create a safer alternative myself.

Thanks,
Matt Harden

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

2001-04-27 Thread Matt Harden

I mean:

:def source IO.readFile

Matt Harden wrote:
 
 Matt Harden wrote:
 
 ...why not ... add a builtin command that sources another file.
 
 How embarrassing...
 
:def source readFile
 
 :-)
 
 Now I definitely want the automatic sourcing of ./.ghci turned off; I
 can already create a safer alternative myself.
 
 Thanks,
 Matt Harden
 
 ___
 Glasgow-haskell-bugs mailing list
 [EMAIL PROTECTED]
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



GHC-4.01 build errors - PrelBase.lhs

1998-12-11 Thread matt

I'm trying to build version 4.01 on a Linux pentium, using freshly
installed binary of 4.01, and I get this error message when running
a "gmake all"


==fptools== gmake all --no-print-directory -r;
 in /home/kultarr/year4/mattl/ghc-4.01/ghc/lib/std

rm -f PrelBase.o ; if [ ! -d PrelBase ]; then mkdir PrelBase; else find
PrelBase -name '*.o' -print | xargs rm -f __rm_food ; fi ;
../../../ghc/driver/ghc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing
-O -split-objs -odir PrelBase  -H10m -i.  -c PrelBase.lhs -o PrelBase.o
-osuf o
 
PrelBase.lhs:18: Could not find valid interface file `PrelErr'
 
PrelBase.lhs:18: Module `PrelErr' does not export `error'
 
PrelBase.lhs:19: Could not find valid interface file `PrelGHC'


It's complaining about not finding an interface file, but
I've got both PrelErr.hi-boot and I even compiled PrelErr.lhs to 
get the PrelErr.hi file. 

mattl@deckchair
mattl@deckchairpwd
/home/kidna/year4/mattl/source_tree/ghc/lib/std
mattl@deckchairls *hi*
Main.hi-boot   PrelException.hi-boot  PrelGHC.p_hi
PrelErr.hi PrelGHC.hi PrelPack.hi-boot
PrelErr.hi-bootPrelGHC.hi-boot
mattl@deckchair
mattl@deckchair


Does this mean that the interface files are *invalid* ?

I was able to compile 4.00 with a little bit of fiddling around,
but this one has got me stumped

-- 
--
`Where do I want to go today? Poland, Czechoslovakia, France. 
 Can Microsoft Office do that for me?" - Adolf Hitler

Matthew Love
ADI Limited, Systems Group
Phone +61 8 9333 8936 (wk)
   +61 8 94495 702(hm)
mailto:[EMAIL PROTECTED]



build errors in ghc-current-src (ghc-4.00)

1998-10-12 Thread matt

Hiya Simon,

 I've just download the ghc-current-src.tar.gz file and tried
 to build a new ghc. The configure went alright, but when it 
 came time to do a gmake boot I get the attached error 
 messages. Is this a problem in the distribution, or something 
 that I have missed out about? I had a look on your webpages for
 a patch but didn't see anything.

 I'm compiling using a prebuilt ghc-2.10, on a Pentium/Linux machine
 with 32M ram and ~100M swap. I've even copied PrelArr.lhs into the
 

thanks 
-- 
Matthew Love
Command  Control Information Systems
ADI Limited, Systems Group
Phone +61 8 9333 8936 (wk)
  +61 8 9272 5227 (hm)
Fax   +61 8 9333 8889
mailto:[EMAIL PROTECTED]

ghc -M -optdep-f -optdep.depend  -optdep-o -optdepo-cpp -fglasgow-exts 
-Rghc-timing -I. -IcodeGen -InativeGen -Iparser 
-iutils:basicTypes:types:hsSyn:prelude:rename:typecheck:deSugar:coreSyn:specialise:simplCore:stranal:stgSyn:simplStg:codeGen:absCSyn:main:reader:profiling:parser:nativeGen
 -recomp  parser/U_binding.hs  parser/U_constr.hs  parser/U_either.hs  
parser/U_entidt.hs  parser/U_list.hs  parser/U_literal.hs  parser/U_maybe.hs  
parser/U_pbinding.hs  parser/U_qid.hs  parser/U_tree.hs  parser/U_ttype.hs 
utils/Argv.lhs utils/Bag.lhs utils/BitSet.lhs utils/Digraph.lhs utils/DirUtils.lhs 
utils/FastString.lhs utils/FiniteMap.lhs utils/ListSetOps.lhs utils/Maybes.lhs 
utils/OrdList.lhs utils/Outputable.l
 hs utils/Pretty.lhs utils/PrimPacked.lhs utils/SST.lhs utils/StringBuffer.lhs 
utils/UniqFM.lhs utils/UniqSet.lhs utils/Util.lhs basicTypes/BasicTypes.lhs 
basicTypes/Const.lhs basicTypes/DataCon.lhs basicTypes/Demand.lhs 
basicTypes/FieldLabel.lhs basicTypes/Id.lhs bas!
 icTypes/IdInfo.lhs basicTypes/MkId.lhs basicTypes/Name.lhs basicTypes/NameSet.lhs 
basicTypes/PprEnv.lhs basicTypes/SrcLoc.lhs basicTypes/UniqSupply.lhs 
basicTypes/Unique.lhs basicTypes/Var.lhs basicTypes/VarEnv.lhs basicTypes/VarSet.lhs 
types/Class.lhs types/PprType.lhs types/TyCon.lhs types/Type.lhs types/Unify.lhs 
hsSyn/HsBasic.lhs hsSyn/HsBinds.lhs hsSyn/HsCore.lhs hsSyn/HsDecls.lhs 
hsSyn/HsExpr.lhs hsSyn/HsImpExp.lhs hsSyn/HsMatches.lhs hsSyn/HsPat.lhs 
hsSyn/HsPragmas.lhs hsSyn/HsSyn.lhs hsSyn/HsTypes.lhs prelude/PrelInfo.lhs 
prelude/PrelMods.lhs prelude/PrelVals.lhs prelude/PrimOp.lhs prelude/PrimRep.lhs 
prelude/TysPrim.lhs prelude/TysWiredIn.lhs rename/Rename.lhs rename/RnBinds.lhs 
rename/RnEnv.lhs rename/RnExpr.lhs rename/RnHsSyn.lhs rena
me/RnIfaces.lhs rename/RnMonad.lhs rename/RnNames.lhs rename/RnSource.lhs 
typecheck/Inst.lhs typecheck/TcBinds.lhs typecheck/TcClassDcl.lhs 
typecheck/TcDefaults.lhs typecheck/TcD
.lhs simplCore/SAT.lhs simplCore/SATMonad.lhs simplCore/SetLevels.lhs 
simplCore/SimplCore.lhs simplCore/SimplMonad.lhs simplCore/SimplUtils.lhs 
simplCore/Simplify.lhs stranal/SaAbsInt.lhs stranal/SaLib.lhs stranal/StrictAnal.lhs 
stranal/WorkWrap.lhs stranal/WwLib.lhs stgSyn/CoreToStg.lhs stgSyn/StgLint.lhs 
stgSyn/StgSyn.lhs simplStg/LambdaLift.lhs simplStg/SRT.lhs simplStg/SimplStg.lhs 
simplStg/StgStats.lhs simplStg/StgVarInfo.lhs simplStg/UpdAnal.lhs 
codeGen/CgBindery.lhs codeGen/CgCase.lhs codeGen/CgClosure.lhs codeGen/CgCon.lhs 
codeGen/CgConTbls.lhs codeGen/CgExpr.lhs codeGen/CgHeapery.lhs 
codeGen/CgLetNoEscape.lhs codeGen/CgMonad.lhs codeGen/CgRetConv.lhs 
codeGen/CgStackery.lhs codeGen/CgTailCall.lhs codeGen/CgUpdate.lhs 
codeGen/CgUsages.lhs codeGen/ClosureInfo.lhs codeGen/CodeGen.lhs codeGen/SM!
 Rep.lhs absCSyn/AbsCSyn.lhs absCSyn/AbsCUtils.lhs absCSyn/CLabel.lhs 
absCSyn/CStrings.lhs absCSyn/CallConv.lhs absCSyn/Costs.lhs absCSyn/PprAbsC.lhs 
main/CmdLineOpts.lhs main/Constants.lhs main/ErrUtils.lhs main/M
ain.lhs main/MkIface.lhs reader/Lex.lhs reader/PrefixSyn.lhs reader/PrefixToHs.lhs 
reader/RdrHsSyn.lhs reader/ReadPrefix.lhs profiling/CostCentre.lhs 
profiling/SCCfinal.lhs parser/UgenAll.lhs parser/UgenUtil.lhs 
nativeGen/AbsCStixGen.lhs nativeGen/AsmCodeGen.lhs nativeGen/AsmRegAlloc.lhs 
nativeGen/MachCode.lhs nativeGen/MachMisc.lhs nativeGen/MachRegs.lhs 
nativeGen/PprMach.lhs nativeGen/RegAllocInfo.lhs nativeGen/Stix.lhs 
nativeGen/StixInfo.lhs nativeGen/StixInteger.lhs nativeGen/StixMacro.lhs 
nativeGen/StixPrim.lhs rename/ParseIface.hs
This is GHC 2.10 - [CONTROL VERSION]
No file `PrelArr.hi', `PrelArr.lhs', `PrelArr.hs' (reqd from file 
`utils/Outputable.lhs')
among import directories:

utils:basicTypes:types:hsSyn:prelude:rename:typecheck:deSugar:coreSyn:specialise:simplCore:stranal:stgSyn:simplStg:codeGen:absCSyn:main:reader:profiling:parser:nativeGen:.
cpp: output pipe has been closed
gmake[2]: *** [depend] Error 1
gmake[1]: *** [boot] Error 1
gmake: *** [boot] Error 1

[1]  + exit 2 gmake boot
mattl 8