[GHC] #9512: T9329 fails test on unregisterised i386

#9512: T9329 fails test on unregisterised i386 ----------------------------+------------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Operating System: Unknown/Multiple Architecture: x86 | Type of failure: None/Unknown Difficulty: Unknown | Test Case: T9329 Blocked By: | Blocking: Related Tickets: | Differential Revisions: ----------------------------+------------------------------------------- ghc-HEAD '''./configure --enable-unregistersied''' on i386-linux fails as: {{{ =====> T9329(normal) 118 of 4091 [0, 0, 0] cd ./codeGen/should_compile && '/root/ghc/inplace/bin/ghc-stage2' -fforce- recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -optc-fno-builtin -fno-ghci-history -c T9329.cmm -no-hs-main
T9329.comp.stderr 2>&1 Compile failed (status 256) errors were: /tmp/ghc23160_0/ghc23160_2.hc: In function ‘foo’:
/tmp/ghc23160_0/ghc23160_2.hc:10:12: error: ‘c0_info’ undeclared (first use in this function) *Sp = (W_)&c0_info; ^ /tmp/ghc23160_0/ghc23160_2.hc:10:12: note: each undeclared identifier is reported only once for each function it appears in }}} The generated C code is: {{{ /* GHC_PACKAGES */ #include "Stg.h" FN_(foo) { FB_ _c0: if ((W_)(((W_)Sp-4) < (W_)SpLim)) goto _c2; else goto _c3; _c2: *Sp = (W_)&c0_info; JMP_((W_)&stg_gc_noregs); _c3: R1.w = 0x0; JMP_(*((P_)(*Sp))); FE_ } }}} while on UNREG x86_64 test does not fail and generates the following C: {{{ /* GHC_PACKAGES */ #include "Stg.h" FN_(foo) { FB_ _c0: goto _c3; _c3: R1.w = 0x0; JMP_(*((P_)(*Sp))); FE_ } }}} Looks like there is no stack check at all. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9512 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9512: T9329 fails test on unregisterised i386 -------------------------------------------+--------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Difficulty: Unknown Test Case: T9329 | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------------+--------------------------- Comment (by slyfox): To crash it on unreg amd64 it's enough to increase the value: {{{ foo () { - STK_CHK_GEN_N (8); /* panics */ + STK_CHK_GEN_N (16); /* panics */ return (0); } }}} {{{ /tmp/ghc28946_0/ghc28946_2.hc:10:12: error: ‘c0_info’ undeclared (first use in this function) *Sp = (W_)&c0_info; ^ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9512#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9512: T9329 fails test on unregisterised i386
-------------------------------------------+---------------------------
Reporter: slyfox | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: x86
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: T9329 | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------------+---------------------------
Comment (by Sergei Trofimovich

#9512: T9329 fails test on unregisterised i386, amd64 -------------------------------------------+--------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Difficulty: Unknown Test Case: T9329 | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------------+--------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9512#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC