#7510: Immediate seg-fault on 32-bit windows build
---------------------------------+------------------------------------------
Reporter: simonpj | Owner: simonmar
Type: bug | Status: new
Priority: highest | Milestone: 7.8.1
Component: Compiler | Version: 7.6.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by igloo):
I just tried a build with
{{{
--- a/compiler/nativeGen/X86/Instr.hs
+++ b/compiler/nativeGen/X86/Instr.hs
@@ -741,22 +741,22 @@ x86_mkJumpInstr id
x86_mkStackAllocInstr
:: Platform
- -> Int
+ -> Int -- number of stack slots needed
-> Instr
x86_mkStackAllocInstr platform amount
= case platformArch platform of
- ArchX86 -> SUB II32 (OpImm (ImmInt amount)) (OpReg esp)
- ArchX86_64 -> SUB II64 (OpImm (ImmInt amount)) (OpReg rsp)
+ ArchX86 -> SUB II32 (OpImm (ImmInt (4 * amount))) (OpReg esp)
+ ArchX86_64 -> SUB II64 (OpImm (ImmInt (8 * amount))) (OpReg rsp)
_ -> panic "x86_mkStackAllocInstr"
x86_mkStackDeallocInstr
:: Platform
- -> Int
+ -> Int -- number of stack slots needed
-> Instr
x86_mkStackDeallocInstr platform amount
= case platformArch platform of
- ArchX86 -> ADD II32 (OpImm (ImmInt amount)) (OpReg esp)
- ArchX86_64 -> ADD II64 (OpImm (ImmInt amount)) (OpReg rsp)
+ ArchX86 -> ADD II32 (OpImm (ImmInt (4 * amount))) (OpReg esp)
+ ArchX86_64 -> ADD II64 (OpImm (ImmInt (8 * amount))) (OpReg rsp)
_ -> panic "x86_mkStackDeallocInstr"
}}}
but that still segfaults when configuring the timeout program.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7510#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs