GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T19:15:15Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/1101Parallel/smp Runtime2019-07-07T19:15:15ZhumasectParallel/smp Runtimeghc-6.6: --interactive can't be used with -prof, -ticky, -unreg or -smp.
+RTS -N2 is working fine. But this needs -threaded
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ----------------------...ghc-6.6: --interactive can't be used with -prof, -ticky, -unreg or -smp.
+RTS -N2 is working fine. But this needs -threaded
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.6 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | MacOS X |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":"Parallel/smp Runtime","status":"New","operating_system":"MacOS X","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":["parallel","runtime","smp","threaded"],"differentials":[],"test_case":"","architecture":"Unknown","cc":[""],"type":"FeatureRequest","description":"ghc-6.6: --interactive can't be used with -prof, -ticky, -unreg or -smp.\r\n\r\n+RTS -N2 is working fine. But this needs -threaded","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/1075ghci unhandled exception on startup (memory access violation)2019-07-07T19:15:23Zedbriggs@optonline.netghci unhandled exception on startup (memory access violation)```
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package ...```
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done.
(JIT debugger invoked) Unhandled exception at 0x0233f988 in ghc.exe: 0xC0000005: Access violation.
```
This has never worked. Attempted following installation of the msi.
OS Version Windows Server 2003 SP1, 32 bit
```
Disassembly
0233F97C add eax,200h
0233F981 add byte ptr [eax],al
0233F983 add byte ptr [edi],cl
0233F985 add byte ptr [eax],al
0233F987 db 00h
0233F988 mov esi,dword ptr [ebp] << here
0233F98B add ebp,4
0233F98E jmp dword ptr [ebp]
EAX = 0141E010 EBX = 00D963C8 ECX = 00000001 EDX = 014B49D4 ESI = 0242947C EDI = 014B49D0 EIP = 0233F988 ESP = 0022DED0 EBP = 01A3AF6C EFL = 00010246
```6.6.1https://gitlab.haskell.org/ghc/ghc/-/issues/1018ghci dynamic loading of X11 - unknown symbol `_printf$LDBLStub'2019-07-07T19:15:50Zykardiaghci dynamic loading of X11 - unknown symbol `_printf$LDBLStub'Hello.
I have a problem with using ghci to dynamically load the X11 library on Mac OS X.
I create the following file:
-- test.hs --
module Main where
import Graphics.X11.Xlib
main = do print "Hello, world!"
-------------
When I compil...Hello.
I have a problem with using ghci to dynamically load the X11 library on Mac OS X.
I create the following file:
-- test.hs --
module Main where
import Graphics.X11.Xlib
main = do print "Hello, world!"
-------------
When I compile this with ghc --make test.hs, I get an executable that
is properly linked and works.
With dynamic loading, there are two issues:
1) A minor issue (easy workaround):
When I try to load this with ghci, i.e.
----------------
$ ghci test.hs
\[... ascii graphics ...\]
Loading package base ... linking ... done.
Ok, modules loaded: Main.
Prelude Main\> main
Loading package X11-1.1 ... can't load .so/.DLL for: X11 (dlopen(libX11.dylib, 10): image not found)
----------------
I can fix this by running ghci setting DYLD_LIBRARY_PATH=/usr/X11R6/lib, which is where the Apple X11 lives.
2) Maybe a more serious issue?
----------------
$ DYLD_LIBRARY_PATH=/usr/X11R6/lib ghci test.hs
\[... ascii graphics ...\]
Loading package base ... linking ... done.
Ok, modules loaded: Main.
Prelude Main\> main
Loading package X11-1.1 ... linking ... \<interactive\>:
/opt/local/lib/ghc-6.6/HSX11_cbits.o: unknown symbol `_printf$LDBLStub'
ghc-6.6: unable to load package `X11-1.1'
----------------
Issue (1) is probably trivial, I am only pointing it out in case it is related to issue (2).
When I pointed this out on darcs-users, there were some suggestion that this might be due to SystemStubs not being linked in, or some problem with the compiler - apparently X11 is meant to be compiled with gcc 3.3, and it should work if compiled with gcc 4 as long as SystemStubs is linked in (?).
I have replicated this with the following combinations of software and hardware:
Mac OS X 10.4.8, dual G5, Xcode 2.4.1 (gcc 4.0.1), Apple X11 1.1.3,
macports ghc 6.6_1
Mac OS X 10.4.8, dual G5, Xcode 2.3 (gcc 4.0.1), Apple X11 1.1.2,
macports ghc 6.6_1
Mac OS X 10.4.8, dual G5, Xcode 2.3 (gcc 4.0.1), Apple X11 1.1.2,
binary distribution of ghc 6.6 for Mac OS X.
Mac OS X 10.4.8, G4 (Powerbook), Xcode 2.3 (gcc 4.0.1), Apple X11 1.1.2,
macports ghc 6.6_1
What's wrong?
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":"ghci dynamic loading of X11 - unknown symbol `_printf$LDBLStub'","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":["X11,","dynamic","loading"],"differentials":[],"test_case":"","architecture":"Unknown","cc":[""],"type":"Bug","description":"Hello.\r\n\r\nI have a problem with using ghci to dynamically load the X11 library on Mac OS X.\r\n\r\nI create the following file:\r\n-- test.hs --\r\nmodule Main where\r\nimport Graphics.X11.Xlib\r\nmain = do print \"Hello, world!\"\r\n-------------\r\n\r\nWhen I compile this with ghc --make test.hs, I get an executable that\r\nis properly linked and works.\r\n\r\nWith dynamic loading, there are two issues:\r\n\r\n1) A minor issue (easy workaround):\r\nWhen I try to load this with ghci, i.e.\r\n----------------\r\n$ ghci test.hs\r\n[... ascii graphics ...]\r\nLoading package base ... linking ... done.\r\nOk, modules loaded: Main.\r\nPrelude Main> main\r\nLoading package X11-1.1 ... can't load .so/.DLL for: X11 (dlopen(libX11.dylib, 10): image not found)\r\n----------------\r\nI can fix this by running ghci setting DYLD_LIBRARY_PATH=/usr/X11R6/lib, which is where the Apple X11 lives.\r\n\r\n2) Maybe a more serious issue?\r\n----------------\r\n$ DYLD_LIBRARY_PATH=/usr/X11R6/lib ghci test.hs\r\n[... ascii graphics ...]\r\nLoading package base ... linking ... done.\r\nOk, modules loaded: Main.\r\nPrelude Main> main\r\nLoading package X11-1.1 ... linking ... <interactive>: \r\n/opt/local/lib/ghc-6.6/HSX11_cbits.o: unknown symbol `_printf$LDBLStub'\r\nghc-6.6: unable to load package `X11-1.1'\r\n----------------\r\n\r\nIssue (1) is probably trivial, I am only pointing it out in case it is related to issue (2).\r\n\r\nWhen I pointed this out on darcs-users, there were some suggestion that this might be due to SystemStubs not being linked in, or some problem with the compiler - apparently X11 is meant to be compiled with gcc 3.3, and it should work if compiled with gcc 4 as long as SystemStubs is linked in (?).\r\n\r\nI have replicated this with the following combinations of software and hardware:\r\nMac OS X 10.4.8, dual G5, Xcode 2.4.1 (gcc 4.0.1), Apple X11 1.1.3,\r\nmacports ghc 6.6_1\r\n\r\nMac OS X 10.4.8, dual G5, Xcode 2.3 (gcc 4.0.1), Apple X11 1.1.2,\r\nmacports ghc 6.6_1\r\n\r\nMac OS X 10.4.8, dual G5, Xcode 2.3 (gcc 4.0.1), Apple X11 1.1.2,\r\nbinary distribution of ghc 6.6 for Mac OS X.\r\n\r\nMac OS X 10.4.8, G4 (Powerbook), Xcode 2.3 (gcc 4.0.1), Apple X11 1.1.2,\r\nmacports ghc 6.6_1\r\n\r\nWhat's wrong?","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1https://gitlab.haskell.org/ghc/ghc/-/issues/1013interpretBCO: unknown or unimplemented opcode 643562019-07-07T19:15:52ZdonsinterpretBCO: unknown or unimplemented opcode 64356Code recently posted to the mailing list elicits a runtime error in the GHCi bytecode interpreter.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version ...Code recently posted to the mailing list elicits a runtime error in the GHCi bytecode interpreter.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":"interpretBCO: unknown or unimplemented opcode 64356","status":"New","operating_system":"Unknown","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":[],"differentials":[],"test_case":"","architecture":"Unknown","cc":[""],"type":"Bug","description":"Code recently posted to the mailing list elicits a runtime error in the GHCi bytecode interpreter.","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/1011Ctrl-break hangs with "ghc -e"2019-07-07T19:15:53Zjcab@JCABs-Rumblings.comCtrl-break hangs with "ghc -e"On Windows XP, if I run this program:
```
main = do putStrLn "Hi!"
main
```
with "ghc -e Main.main Test.hs", and then press Ctrl-C or Ctrl-Break, it will hang instead of terminating. The only recourse at that point is to ...On Windows XP, if I run this program:
```
main = do putStrLn "Hi!"
main
```
with "ghc -e Main.main Test.hs", and then press Ctrl-C or Ctrl-Break, it will hang instead of terminating. The only recourse at that point is to explicitly kill "ghc" from the Task Manager.
This doesn't happen if I compile the program "ghc --make Test.hs".
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Ctrl-break hangs with \"ghc -e\"","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"6.6.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":["Ctrl-break,","ghci","hang,"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"On Windows XP, if I run this program:\r\n\r\n{{{\r\nmain = do putStrLn \"Hi!\"\r\n main\r\n}}}\r\n\r\nwith \"ghc -e Main.main Test.hs\", and then press Ctrl-C or Ctrl-Break, it will hang instead of terminating. The only recourse at that point is to explicitly kill \"ghc\" from the Task Manager.\r\n\r\nThis doesn't happen if I compile the program \"ghc --make Test.hs\".","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1https://gitlab.haskell.org/ghc/ghc/-/issues/1004ghci-6.6 crash2019-07-07T19:15:55Zgwright@antiope.comghci-6.6 crashDuring a long (10 to 15 minute) run of a communication system simulation, I noticed had occasional crashes of ghci with the output
```
<interactive>: internal error: interpretBCO: unknown or unimplemented opcode 1028
(GHC version 6....During a long (10 to 15 minute) run of a communication system simulation, I noticed had occasional crashes of ghci with the output
```
<interactive>: internal error: interpretBCO: unknown or unimplemented opcode 1028
(GHC version 6.6 for powerpc_apple_darwin)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Abort trap
gregory-wrights-powerbook-g4-17>
```
or
```
<interactive>: internal error: interpretBCO: unknown or unimplemented opcode 1033
(GHC version 6.6 for powerpc_apple_darwin)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Abort trap
a83-245-238-133>
```
or
```
<interactive>: internal error: interpretBCO: unknown or unimplemented opcode 1040
(GHC version 6.6 for powerpc_apple_darwin)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Abort trap
a83-245-238-133>
```
The same code when compiled would run to completion.
I could not post the original code because it contained proprietary customer information. However, I have been able to isolate a much smaller case which also fails.
The module below, which computes a 16 bit checksum function, fails when run under
ghci with
```
[9,120,46,192,248,87,242,122,183,2,96,217,164,46]
85:
[203,223,98,240,74,91,106]
86:
[78,239,201,3,74,238,146,170,71]
87:
[46,128,19,27,218,48,10,148test aborted: <<loop>>
*Main>
```
The same code runs to completion when compiled:
```
[15,76,203,225,63,86,10,21,39,140,91,244,38,101,10,197,212,24,242,50,105,139,139,210,108,79,185,171,127,232,57,37,77,234,164,47,175,91,78,198,237,253,153,83,159,7,11,30,138,150,19,68,10,234,46,101,39,146,46,164,52,54,109,163,46,174,22,46,61,43,234,125,148,182,188,19,4,48,84,227,57,156,152,55,235,211,204,10,104,170,40,209,174,238,200,16,82,204,203,133,196,42,146,8,66,171,67,142,208,67,67,37,237,48,249,99,212,152,79,52,136,104,187,218,6,73,174,244,146,118,202,141,26,79,34,91,10,167,41,244,151,47,28,35,181,199,244,233,221,118,64,53,59,245,245,166,255,86,124,37,192,175,203,184,52,155,141,66,247,227,51,40,154,150,9,121,215,237,21,23,60,83,31,27,23,128,18,83,17,119,136,73,46,60,242,79,190,189,56,154,229,47,92,242,81,157,251,51,27,4,93,213,103,176,144,43,12,187,5,85,109,42,194,214,30,110,129,129,197,97,239,210,133,201,180,207,123,120,62,106,47,30,1,207,30,213,219,210,158,67,101,164,149,85,6,138,52,55,64,160,85,119,132,247,226,255,29,3,122,235,217,228,83,197,157,41,208,138,23,152,48,93,53,223,40,168,17,129,29,48,250,31,136,4,213,136,178,70,10,207,43,48,69,157,71,31,119,137,137]
997:
[48,92,91,80,79,62,248,169,156,171,156,102,154,114]
998:
[15,114,1,127,222,71,195,235,182,211,65,168,67,179,4,19,254,43,233,199,198,183,24,14,172,222,226,46,159,82,3,193,193,217,220,132,152,241,159,127,177,210,117,82,209,63,204,101,150,202,45,180,42,156,185,8,110,231,86,232,25,112,80,170,185,19,251,161,111,129,248,165,179,223,161,147,71,248,192,21,223,148,130,11,241,98,20,49,23,3,29,29,253,173,66,3,145,39,80,94,51,30,221,168,120,184,34,26,11,156,197,135,223,150,105,131,44,83,240,223,100,135,234,90,9,126,151,231,251,155,206,248,82,106,246,57,69,79,126,33,48,238,30,3,126,98,83,187,176]
999:
[75,152,189,37,228,208,62,124,131,3,10,115,211,204,85,147,90,85,99,165,239,44,78,114,117,68,255,230,78,248,36,211,116,120,69,30,126,96,46,95,207,157,63,232,198,5,197]
test ok: 1000
~/src/haskell/simulator $
```
The module is
```
{-# OPTIONS_GHC -fglasgow-exts #-}
--
-- Checksum.hs, support for checksumming data.
--
--module Checksum (
-- checksum
--) where
module Main where
import Utils
import Control.Exception
import Data.Array
import Data.Bits
import Data.List
import Data.Word
import Test.QuickCheck
import Test.QuickCheck.Batch
crcTable :: Array Word8 Word16
crcTable = listArray (0, 255)
[ 0x0000, 0x5935, 0xB26A, 0xEB5F, 0x3DE1, 0x64D4, 0x8F8B, 0xD6BE,
0x7BC2, 0x22F7, 0xC9A8, 0x909D, 0x4623, 0x1F16, 0xF449, 0xAD7C,
0xF784, 0xAEB1, 0x45EE, 0x1CDB, 0xCA65, 0x9350, 0x780F, 0x213A,
0x8C46, 0xD573, 0x3E2C, 0x6719, 0xB1A7, 0xE892, 0x03CD, 0x5AF8,
0xB63D, 0xEF08, 0x0457, 0x5D62, 0x8BDC, 0xD2E9, 0x39B6, 0x6083,
0xCDFF, 0x94CA, 0x7F95, 0x26A0, 0xF01E, 0xA92B, 0x4274, 0x1B41,
0x41B9, 0x188C, 0xF3D3, 0xAAE6, 0x7C58, 0x256D, 0xCE32, 0x9707,
0x3A7B, 0x634E, 0x8811, 0xD124, 0x079A, 0x5EAF, 0xB5F0, 0xECC5,
0x354F, 0x6C7A, 0x8725, 0xDE10, 0x08AE, 0x519B, 0xBAC4, 0xE3F1,
0x4E8D, 0x17B8, 0xFCE7, 0xA5D2, 0x736C, 0x2A59, 0xC106, 0x9833,
0xC2CB, 0x9BFE, 0x70A1, 0x2994, 0xFF2A, 0xA61F, 0x4D40, 0x1475,
0xB909, 0xE03C, 0x0B63, 0x5256, 0x84E8, 0xDDDD, 0x3682, 0x6FB7,
0x8372, 0xDA47, 0x3118, 0x682D, 0xBE93, 0xE7A6, 0x0CF9, 0x55CC,
0xF8B0, 0xA185, 0x4ADA, 0x13EF, 0xC551, 0x9C64, 0x773B, 0x2E0E,
0x74F6, 0x2DC3, 0xC69C, 0x9FA9, 0x4917, 0x1022, 0xFB7D, 0xA248,
0x0F34, 0x5601, 0xBD5E, 0xE46B, 0x32D5, 0x6BE0, 0x80BF, 0xD98A,
0x6A9E, 0x33AB, 0xD8F4, 0x81C1, 0x577F, 0x0E4A, 0xE515, 0xBC20,
0x115C, 0x4869, 0xA336, 0xFA03, 0x2CBD, 0x7588, 0x9ED7, 0xC7E2,
0x9D1A, 0xC42F, 0x2F70, 0x7645, 0xA0FB, 0xF9CE, 0x1291, 0x4BA4,
0xE6D8, 0xBFED, 0x54B2, 0x0D87, 0xDB39, 0x820C, 0x6953, 0x3066,
0xDCA3, 0x8596, 0x6EC9, 0x37FC, 0xE142, 0xB877, 0x5328, 0x0A1D,
0xA761, 0xFE54, 0x150B, 0x4C3E, 0x9A80, 0xC3B5, 0x28EA, 0x71DF,
0x2B27, 0x7212, 0x994D, 0xC078, 0x16C6, 0x4FF3, 0xA4AC, 0xFD99,
0x50E5, 0x09D0, 0xE28F, 0xBBBA, 0x6D04, 0x3431, 0xDF6E, 0x865B,
0x5FD1, 0x06E4, 0xEDBB, 0xB48E, 0x6230, 0x3B05, 0xD05A, 0x896F,
0x2413, 0x7D26, 0x9679, 0xCF4C, 0x19F2, 0x40C7, 0xAB98, 0xF2AD,
0xA855, 0xF160, 0x1A3F, 0x430A, 0x95B4, 0xCC81, 0x27DE, 0x7EEB,
0xD397, 0x8AA2, 0x61FD, 0x38C8, 0xEE76, 0xB743, 0x5C1C, 0x0529,
0xE9EC, 0xB0D9, 0x5B86, 0x02B3, 0xD40D, 0x8D38, 0x6667, 0x3F52,
0x922E, 0xCB1B, 0x2044, 0x7971, 0xAFCF, 0xF6FA, 0x1DA5, 0x4490,
0x1E68, 0x475D, 0xAC02, 0xF537, 0x2389, 0x7ABC, 0x91E3, 0xC8D6,
0x65AA, 0x3C9F, 0xD7C0, 0x8EF5, 0x584B, 0x017E, 0xEA21, 0xB314 ]
-- | Compute our standard checksum
--
checksum :: [Word8] -> Word16
checksum msg =
let
update :: Word16 -> Word8 -> Word16
update reg byte = (reg `shiftL` 8) `xor`
crcTable ! ((fromIntegral (reg `shiftR` 8)) `xor` byte)
in
foldl' update 0 msg
-- | Tests
--
instance Arbitrary Word8 where
arbitrary =
do n <- choose ((fromIntegral (minBound :: Word8)) :: Int,
(fromIntegral (maxBound :: Word8)) :: Int)
return (fromIntegral n)
coarbitrary v = variant 0 . coarbitrary v
prop_checksum xs = checksum (xs ++ splitWord (checksum xs)) == 0
where types = xs :: [Word8]
testOpts = TestOptions {no_of_tests = 1000,
length_of_tests = 3600,
debug_tests = True}
batch = do
result <- run prop_checksum testOpts
case result of
TestOk _ i _ -> putStrLn ("test ok: " ++ show i)
TestExausted _ i _ -> putStrLn ("test exhausted: " ++ show i)
TestFailed strs i -> putStrLn ("test failed: " ++ concat strs)
TestAborted ex -> putStrLn ("test aborted: " ++ show ex)
main = batch
```
When invoked under ghci, the main function in the module above does not always fail at the same point. For example, my most recent run of the above gave:
```
57:
[61,48,20]
58:
[80,90,202,253,203,52,183]
59:
[]
60:
[170,171,181,63,181,52,179,117]
61:
[56test aborted: <<loop>>
*Main>
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | MacOS X |
| Architecture | powerpc |
</details>
<!-- {"blocked_by":[],"summary":"ghci-6.6 crash on PPC","status":"New","operating_system":"MacOS X","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":[],"differentials":[],"test_case":"","architecture":"powerpc","cc":[""],"type":"Bug","description":"During a long (10 to 15 minute) run of a communication system simulation, I noticed had occasional crashes of ghci with the output\r\n\r\n{{{\r\n<interactive>: internal error: interpretBCO: unknown or unimplemented opcode 1028\r\n (GHC version 6.6 for powerpc_apple_darwin)\r\n Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\nAbort trap\r\ngregory-wrights-powerbook-g4-17> \r\n}}}\r\n\r\nor\r\n{{{\r\n<interactive>: internal error: interpretBCO: unknown or unimplemented opcode 1033\r\n (GHC version 6.6 for powerpc_apple_darwin)\r\n Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\nAbort trap\r\na83-245-238-133> \r\n}}}\r\n\r\nor\r\n{{{\r\n<interactive>: internal error: interpretBCO: unknown or unimplemented opcode 1040\r\n (GHC version 6.6 for powerpc_apple_darwin)\r\n Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\nAbort trap\r\na83-245-238-133> \r\n}}}\r\n\r\nThe same code when compiled would run to completion.\r\n\r\nI could not post the original code because it contained proprietary customer information. However, I have been able to isolate a much smaller case which also fails.\r\n\r\nThe module below, which computes a 16 bit checksum function, fails when run under\r\nghci with\r\n\r\n{{{\r\n[9,120,46,192,248,87,242,122,183,2,96,217,164,46]\r\n85:\r\n[203,223,98,240,74,91,106]\r\n86:\r\n[78,239,201,3,74,238,146,170,71]\r\n87:\r\n[46,128,19,27,218,48,10,148test aborted: <<loop>>\r\n*Main> \r\n}}}\r\n\r\nThe same code runs to completion when compiled:\r\n\r\n{{{\r\n[15,76,203,225,63,86,10,21,39,140,91,244,38,101,10,197,212,24,242,50,105,139,139,210,108,79,185,171,127,232,57,37,77,234,164,47,175,91,78,198,237,253,153,83,159,7,11,30,138,150,19,68,10,234,46,101,39,146,46,164,52,54,109,163,46,174,22,46,61,43,234,125,148,182,188,19,4,48,84,227,57,156,152,55,235,211,204,10,104,170,40,209,174,238,200,16,82,204,203,133,196,42,146,8,66,171,67,142,208,67,67,37,237,48,249,99,212,152,79,52,136,104,187,218,6,73,174,244,146,118,202,141,26,79,34,91,10,167,41,244,151,47,28,35,181,199,244,233,221,118,64,53,59,245,245,166,255,86,124,37,192,175,203,184,52,155,141,66,247,227,51,40,154,150,9,121,215,237,21,23,60,83,31,27,23,128,18,83,17,119,136,73,46,60,242,79,190,189,56,154,229,47,92,242,81,157,251,51,27,4,93,213,103,176,144,43,12,187,5,85,109,42,194,214,30,110,129,129,197,97,239,210,133,201,180,207,123,120,62,106,47,30,1,207,30,213,219,210,158,67,101,164,149,85,6,138,52,55,64,160,85,119,132,247,226,255,29,3,122,235,217,228,83,197,157,41,208,138,23,152,48,93,53,223,40,168,17,129,29,48,250,31,136,4,213,136,178,70,10,207,43,48,69,157,71,31,119,137,137]\r\n997:\r\n[48,92,91,80,79,62,248,169,156,171,156,102,154,114]\r\n998:\r\n[15,114,1,127,222,71,195,235,182,211,65,168,67,179,4,19,254,43,233,199,198,183,24,14,172,222,226,46,159,82,3,193,193,217,220,132,152,241,159,127,177,210,117,82,209,63,204,101,150,202,45,180,42,156,185,8,110,231,86,232,25,112,80,170,185,19,251,161,111,129,248,165,179,223,161,147,71,248,192,21,223,148,130,11,241,98,20,49,23,3,29,29,253,173,66,3,145,39,80,94,51,30,221,168,120,184,34,26,11,156,197,135,223,150,105,131,44,83,240,223,100,135,234,90,9,126,151,231,251,155,206,248,82,106,246,57,69,79,126,33,48,238,30,3,126,98,83,187,176]\r\n999:\r\n[75,152,189,37,228,208,62,124,131,3,10,115,211,204,85,147,90,85,99,165,239,44,78,114,117,68,255,230,78,248,36,211,116,120,69,30,126,96,46,95,207,157,63,232,198,5,197]\r\ntest ok: 1000\r\n~/src/haskell/simulator $ \r\n}}}\r\n\r\nThe module is \r\n\r\n{{{\r\n{-# OPTIONS_GHC -fglasgow-exts #-}\r\n--\r\n-- Checksum.hs, support for checksumming data.\r\n--\r\n\r\n\r\n--module Checksum (\r\n-- checksum\r\n--) where\r\nmodule Main where\r\n\r\nimport Utils\r\n\r\nimport Control.Exception\r\nimport Data.Array\r\nimport Data.Bits\r\nimport Data.List\r\nimport Data.Word\r\nimport Test.QuickCheck\r\nimport Test.QuickCheck.Batch\r\n\r\n\r\ncrcTable :: Array Word8 Word16\r\ncrcTable = listArray (0, 255)\r\n [ 0x0000, 0x5935, 0xB26A, 0xEB5F, 0x3DE1, 0x64D4, 0x8F8B, 0xD6BE,\r\n 0x7BC2, 0x22F7, 0xC9A8, 0x909D, 0x4623, 0x1F16, 0xF449, 0xAD7C,\r\n 0xF784, 0xAEB1, 0x45EE, 0x1CDB, 0xCA65, 0x9350, 0x780F, 0x213A,\r\n 0x8C46, 0xD573, 0x3E2C, 0x6719, 0xB1A7, 0xE892, 0x03CD, 0x5AF8,\r\n 0xB63D, 0xEF08, 0x0457, 0x5D62, 0x8BDC, 0xD2E9, 0x39B6, 0x6083,\r\n 0xCDFF, 0x94CA, 0x7F95, 0x26A0, 0xF01E, 0xA92B, 0x4274, 0x1B41,\r\n 0x41B9, 0x188C, 0xF3D3, 0xAAE6, 0x7C58, 0x256D, 0xCE32, 0x9707,\r\n 0x3A7B, 0x634E, 0x8811, 0xD124, 0x079A, 0x5EAF, 0xB5F0, 0xECC5,\r\n 0x354F, 0x6C7A, 0x8725, 0xDE10, 0x08AE, 0x519B, 0xBAC4, 0xE3F1,\r\n 0x4E8D, 0x17B8, 0xFCE7, 0xA5D2, 0x736C, 0x2A59, 0xC106, 0x9833,\r\n 0xC2CB, 0x9BFE, 0x70A1, 0x2994, 0xFF2A, 0xA61F, 0x4D40, 0x1475,\r\n 0xB909, 0xE03C, 0x0B63, 0x5256, 0x84E8, 0xDDDD, 0x3682, 0x6FB7,\r\n 0x8372, 0xDA47, 0x3118, 0x682D, 0xBE93, 0xE7A6, 0x0CF9, 0x55CC,\r\n 0xF8B0, 0xA185, 0x4ADA, 0x13EF, 0xC551, 0x9C64, 0x773B, 0x2E0E,\r\n 0x74F6, 0x2DC3, 0xC69C, 0x9FA9, 0x4917, 0x1022, 0xFB7D, 0xA248,\r\n 0x0F34, 0x5601, 0xBD5E, 0xE46B, 0x32D5, 0x6BE0, 0x80BF, 0xD98A,\r\n 0x6A9E, 0x33AB, 0xD8F4, 0x81C1, 0x577F, 0x0E4A, 0xE515, 0xBC20,\r\n 0x115C, 0x4869, 0xA336, 0xFA03, 0x2CBD, 0x7588, 0x9ED7, 0xC7E2,\r\n 0x9D1A, 0xC42F, 0x2F70, 0x7645, 0xA0FB, 0xF9CE, 0x1291, 0x4BA4,\r\n 0xE6D8, 0xBFED, 0x54B2, 0x0D87, 0xDB39, 0x820C, 0x6953, 0x3066,\r\n 0xDCA3, 0x8596, 0x6EC9, 0x37FC, 0xE142, 0xB877, 0x5328, 0x0A1D,\r\n 0xA761, 0xFE54, 0x150B, 0x4C3E, 0x9A80, 0xC3B5, 0x28EA, 0x71DF,\r\n 0x2B27, 0x7212, 0x994D, 0xC078, 0x16C6, 0x4FF3, 0xA4AC, 0xFD99,\r\n 0x50E5, 0x09D0, 0xE28F, 0xBBBA, 0x6D04, 0x3431, 0xDF6E, 0x865B,\r\n 0x5FD1, 0x06E4, 0xEDBB, 0xB48E, 0x6230, 0x3B05, 0xD05A, 0x896F,\r\n 0x2413, 0x7D26, 0x9679, 0xCF4C, 0x19F2, 0x40C7, 0xAB98, 0xF2AD,\r\n 0xA855, 0xF160, 0x1A3F, 0x430A, 0x95B4, 0xCC81, 0x27DE, 0x7EEB,\r\n 0xD397, 0x8AA2, 0x61FD, 0x38C8, 0xEE76, 0xB743, 0x5C1C, 0x0529,\r\n 0xE9EC, 0xB0D9, 0x5B86, 0x02B3, 0xD40D, 0x8D38, 0x6667, 0x3F52,\r\n 0x922E, 0xCB1B, 0x2044, 0x7971, 0xAFCF, 0xF6FA, 0x1DA5, 0x4490,\r\n 0x1E68, 0x475D, 0xAC02, 0xF537, 0x2389, 0x7ABC, 0x91E3, 0xC8D6,\r\n 0x65AA, 0x3C9F, 0xD7C0, 0x8EF5, 0x584B, 0x017E, 0xEA21, 0xB314 ]\r\n\r\n\r\n-- | Compute our standard checksum\r\n--\r\nchecksum :: [Word8] -> Word16\r\nchecksum msg =\r\n let\r\n update :: Word16 -> Word8 -> Word16\r\n update reg byte = (reg `shiftL` 8) `xor`\r\n crcTable ! ((fromIntegral (reg `shiftR` 8)) `xor` byte)\r\n in\r\n foldl' update 0 msg\r\n\r\n\r\n\r\n-- | Tests\r\n--\r\ninstance Arbitrary Word8 where\r\n arbitrary = \r\n do n <- choose ((fromIntegral (minBound :: Word8)) :: Int, \r\n (fromIntegral (maxBound :: Word8)) :: Int)\r\n return (fromIntegral n)\r\n coarbitrary v = variant 0 . coarbitrary v\r\n\r\n\r\nprop_checksum xs = checksum (xs ++ splitWord (checksum xs)) == 0\r\n where types = xs :: [Word8]\r\n\r\ntestOpts = TestOptions {no_of_tests = 1000,\r\n length_of_tests = 3600,\r\n debug_tests = True}\r\n\r\nbatch = do\r\n result <- run prop_checksum testOpts\r\n case result of\r\n TestOk _ i _ -> putStrLn (\"test ok: \" ++ show i)\r\n TestExausted _ i _ -> putStrLn (\"test exhausted: \" ++ show i)\r\n TestFailed strs i -> putStrLn (\"test failed: \" ++ concat strs)\r\n TestAborted ex -> putStrLn (\"test aborted: \" ++ show ex)\r\n\r\nmain = batch\r\n}}}\r\n\r\nWhen invoked under ghci, the main function in the module above does not always fail at the same point. For example, my most recent run of the above gave:\r\n\r\n{{{\r\n57:\r\n[61,48,20]\r\n58:\r\n[80,90,202,253,203,52,183]\r\n59:\r\n[]\r\n60:\r\n[170,171,181,63,181,52,179,117]\r\n61:\r\n[56test aborted: <<loop>>\r\n*Main>\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1thorkilnaurthorkilnaurhttps://gitlab.haskell.org/ghc/ghc/-/issues/976GHCi crashes on Windows 982019-07-07T19:16:03Zcwxdev@gmail.comGHCi crashes on Windows 98GHCi fails to load on Windows 98 for me.
Right after the message 'Loading package base ... linking ... done.' I get a windows error box containing roughly this error :
"GHC has caused an error in module GHC.exe at 0167:00c82e26"
This err...GHCi fails to load on Windows 98 for me.
Right after the message 'Loading package base ... linking ... done.' I get a windows error box containing roughly this error :
"GHC has caused an error in module GHC.exe at 0167:00c82e26"
This error occurs with GHCi version 6.6 on a rather (very) old P1 233 box. The compiler itself works flawlessly, only the interactive prompt fails.
Please note similarities between this error and bug report [\#970](http://hackage.haskell.org/trac/ghc/ticket/970).
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHCi crashes on Windows 98","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":["98","ghci","windows"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"GHCi fails to load on Windows 98 for me.\r\nRight after the message 'Loading package base ... linking ... done.' I get a windows error box containing roughly this error : \r\n\"GHC has caused an error in module GHC.exe at 0167:00c82e26\"\r\nThis error occurs with GHCi version 6.6 on a rather (very) old P1 233 box. The compiler itself works flawlessly, only the interactive prompt fails.\r\n\r\nPlease note similarities between this error and bug report [http://hackage.haskell.org/trac/ghc/ticket/970 #970].","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1https://gitlab.haskell.org/ghc/ghc/-/issues/970GHCi crashes under Windows Millenium2019-07-07T19:16:04ZguestGHCi crashes under Windows MilleniumGHCi fails to launch for me under Windows Millenium.
The command:
```
ghc -v --interactive
```
produces the following:
```
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell...GHCi fails to launch for me under Windows Millenium.
The command:
```
ghc -v --interactive
```
produces the following:
```
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Using package config file: C:\GHC\GHC-6.6\package.conf
wired-in package base mapped to base-2.0
wired-in package rts mapped to rts-1.0
wired-in package haskell98 mapped to haskell98-1.0
wired-in package template-haskell mapped to template-haskell-2.0
Hsc static flags: -static
Loading package base ... linking ... done.
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
```
at which point GHCi fails with the generic error message (roughly translated from French):
```
Ghc provoked an error in GHC.EXE. The program Ghc will now be stopped.
If you continue to encounter problems, try to restart your computer.
```
Restarting the computer, obviously, didn't help.
I am using GHC 6.6 under Windows Millenium, which was set up using the standalone Windows installer. I can use the compiler from the command line without any problems, but whenever I try to launch GHCi from the Start menu or using "ghc --interactive", I get the above error message. Please note that GHCi v6.4.2 works flawlessly on the same machine (a rather old Pentium III 650 MHz with a modest 128 Mo of RAM, if such things matter).
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHCi crashes under Windows Millenium","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":["GHCi","Windows"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"GHCi fails to launch for me under Windows Millenium.\r\nThe command:\r\n{{{\r\nghc -v --interactive\r\n}}}\r\nproduces the following:\r\n{{{\r\n ___ ___ _\r\n / _ \\ /\\ /\\/ __(_)\r\n / /_\\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98.\r\n/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/\r\n\\____/\\/ /_/\\____/|_| Type :? for help.\r\n\r\nUsing package config file: C:\\GHC\\GHC-6.6\\package.conf\r\nwired-in package base mapped to base-2.0\r\nwired-in package rts mapped to rts-1.0\r\nwired-in package haskell98 mapped to haskell98-1.0\r\nwired-in package template-haskell mapped to template-haskell-2.0\r\nHsc static flags: -static\r\nLoading package base ... linking ... done.\r\n*** Parser:\r\n*** Desugar:\r\n*** Simplify:\r\n*** CorePrep:\r\n*** ByteCodeGen:\r\n*** Parser:\r\n*** Desugar:\r\n*** Simplify:\r\n*** CorePrep:\r\n*** ByteCodeGen:\r\n}}}\r\nat which point GHCi fails with the generic error message (roughly translated from French):\r\n{{{\r\nGhc provoked an error in GHC.EXE. The program Ghc will now be stopped.\r\nIf you continue to encounter problems, try to restart your computer.\r\n}}}\r\nRestarting the computer, obviously, didn't help.\r\n\r\nI am using GHC 6.6 under Windows Millenium, which was set up using the standalone Windows installer. I can use the compiler from the command line without any problems, but whenever I try to launch GHCi from the Start menu or using \"ghc --interactive\", I get the above error message. Please note that GHCi v6.4.2 works flawlessly on the same machine (a rather old Pentium III 650 MHz with a modest 128 Mo of RAM, if such things matter).","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1https://gitlab.haskell.org/ghc/ghc/-/issues/953panic in ghci for lseek ffi import statement2019-07-07T19:16:09Zrwxr-xr-x@gmx.depanic in ghci for lseek ffi import statement```
{-# OPTIONS_GHC -fglasgow-exts #-}
import System.Posix.Types
import Foreign.C
foreign import ccall safe "unistd.h lseek" foo :: CInt -> COff -> CInt -> IO COff
{-
save as bug.hs, then run ghci bug.hs
my results:
___ ...```
{-# OPTIONS_GHC -fglasgow-exts #-}
import System.Posix.Types
import Foreign.C
foreign import ccall safe "unistd.h lseek" foo :: CInt -> COff -> CInt -> IO COff
{-
save as bug.hs, then run ghci bug.hs
my results:
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.4.2, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base-1.0 ... linking ... done.
Compiling Main ( bug.hs, interpreted )
ghc-6.4.2: panic! (the `impossible' happened, GHC version 6.4.2):
ByteCodeFFI.mkMarshalCode_wrk(x86) L_
bonus information:
- uname:
Linux nora 2.6.15-gentoo-r1 #9 PREEMPT Sun Feb 5 02:47:05 CET 2006 i686 AMD Athlon(tm) 64 Processor 3200+ GNU/Linux
- gcc:
Reading specs from /usr/lib/gcc/i386-pc-linux-gnu/3.4.6/specs
Configured with: /var/tmp/portage/gcc-3.4.6-r1/work/gcc-3.4.6/configure --prefix=/usr --bindir=/usr/i386-pc-linux-gnu/gcc-bin/3.4.6 --includedir=/usr/lib/gcc/i386-pc-linux-gnu/3.4.6/include --datadir=/usr/share/gcc-data/i386-pc-linux-gnu/3.4.6 --mandir=/usr/share/gcc-data/i386-pc-linux-gnu/3.4.6/man --infodir=/usr/share/gcc-data/i386-pc-linux-gnu/3.4.6/info --with-gxx-include-dir=/usr/lib/gcc/i386-pc-linux-gnu/3.4.6/include/g++-v3 --host=i386-pc-linux-gnu --build=i386-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
-}
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.4.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"panic in ghci for lseek ffi import statement","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.4.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\r\n{-# OPTIONS_GHC -fglasgow-exts #-}\r\n\r\nimport System.Posix.Types\r\nimport Foreign.C\r\n\r\nforeign import ccall safe \"unistd.h lseek\" foo :: CInt -> COff -> CInt -> IO COff\r\n\r\n{-\r\n save as bug.hs, then run ghci bug.hs\r\n my results:\r\n ___ ___ _\r\n / _ \\ /\\ /\\/ __(_)\r\n / /_\\// /_/ / / | | GHC Interactive, version 6.4.2, for Haskell 98.\r\n/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/\r\n\\____/\\/ /_/\\____/|_| Type :? for help.\r\n\r\nLoading package base-1.0 ... linking ... done.\r\nCompiling Main ( bug.hs, interpreted )\r\nghc-6.4.2: panic! (the `impossible' happened, GHC version 6.4.2):\r\n ByteCodeFFI.mkMarshalCode_wrk(x86) L_\r\n\r\nbonus information:\r\n- uname:\r\nLinux nora 2.6.15-gentoo-r1 #9 PREEMPT Sun Feb 5 02:47:05 CET 2006 i686 AMD Athlon(tm) 64 Processor 3200+ GNU/Linux\r\n\r\n- gcc:\r\nReading specs from /usr/lib/gcc/i386-pc-linux-gnu/3.4.6/specs\r\nConfigured with: /var/tmp/portage/gcc-3.4.6-r1/work/gcc-3.4.6/configure --prefix=/usr --bindir=/usr/i386-pc-linux-gnu/gcc-bin/3.4.6 --includedir=/usr/lib/gcc/i386-pc-linux-gnu/3.4.6/include --datadir=/usr/share/gcc-data/i386-pc-linux-gnu/3.4.6 --mandir=/usr/share/gcc-data/i386-pc-linux-gnu/3.4.6/man --infodir=/usr/share/gcc-data/i386-pc-linux-gnu/3.4.6/info --with-gxx-include-dir=/usr/lib/gcc/i386-pc-linux-gnu/3.4.6/include/g++-v3 --host=i386-pc-linux-gnu --build=i386-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu\r\nThread model: posix\r\ngcc version 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)\r\n\r\n-}\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/941readFile problem in ghci2019-07-07T19:16:12ZguestreadFile problem in ghcireadFile has a problem in ghci on cygwins (windows XP):
```
Prelude> writeFile "test" "this is a test"
Prelude> readFile "test"
<interactive>:1:0: lexical error at character '['
```readFile has a problem in ghci on cygwins (windows XP):
```
Prelude> writeFile "test" "this is a test"
Prelude> readFile "test"
<interactive>:1:0: lexical error at character '['
```6.6.1https://gitlab.haskell.org/ghc/ghc/-/issues/936strange ghci behavior and error with recursive modules2019-07-07T19:16:13Zavatar@hot.eestrange ghci behavior and error with recursive modulesHere is a ghci session with the attached program:
```
> ghci B
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.4.2, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
...Here is a ghci session with the attached program:
```
> ghci B
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.4.2, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base-1.0 ... linking ... done.
Compiling C[boot] ( ./C.hs-boot, ./C.o-boot )
Compiling A ( ./A.hs, interpreted )
Compiling B ( B.hs, interpreted )
Compiling C ( ./C.hs, interpreted )
Ok, modules loaded: C, B, A, C.
*C> :r
Ok, modules loaded: A, C, B.
*A> :m + B
*A B> A
During interactive linking, GHCi couldn't find the following symbol:
B_zdfClass1B_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session. Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
glasgow-haskell-bugs@haskell.org
*A B> B
B
*A B> A
A
```
3 strange things happen:
1. I ask to load B, it loads C
1. I ask to reload, it loads A :)
1. missing symbol error which goes away after evaluating some other expression
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | 6.4.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | avatar@hot.ee |
| Operating system | |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":"strange ghci behavior and error with recursive modules","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.4.2","keywords":[],"differentials":[],"test_case":"","architecture":"Unknown","cc":["avatar@hot.ee"],"type":"Bug","description":"Here is a ghci session with the attached program:\r\n\r\n{{{\r\n> ghci B\r\n ___ ___ _\r\n / _ \\ /\\ /\\/ __(_)\r\n / /_\\// /_/ / / | | GHC Interactive, version 6.4.2, for Haskell 98.\r\n/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/\r\n\\____/\\/ /_/\\____/|_| Type :? for help.\r\n\r\nLoading package base-1.0 ... linking ... done.\r\nCompiling C[boot] ( ./C.hs-boot, ./C.o-boot )\r\nCompiling A ( ./A.hs, interpreted )\r\nCompiling B ( B.hs, interpreted )\r\nCompiling C ( ./C.hs, interpreted )\r\nOk, modules loaded: C, B, A, C.\r\n*C> :r\r\nOk, modules loaded: A, C, B.\r\n*A> :m + B\r\n*A B> A\r\n\r\nDuring interactive linking, GHCi couldn't find the following symbol:\r\n B_zdfClass1B_closure\r\nThis may be due to you not asking GHCi to load extra object files,\r\narchives or DLLs needed by your current session. Restart GHCi, specifying\r\nthe missing library using the -L/path/to/object/dir and -lmissinglibname\r\nflags, or simply by naming the relevant files on the GHCi command line.\r\nAlternatively, this link failure might indicate a bug in GHCi.\r\nIf you suspect the latter, please send a bug report to:\r\n glasgow-haskell-bugs@haskell.org\r\n\r\n*A B> B\r\nB\r\n*A B> A\r\nA\r\n}}}\r\n\r\n3 strange things happen: \r\n1. I ask to load B, it loads C\r\n2. I ask to reload, it loads A :)\r\n3. missing symbol error which goes away after evaluating some other expression","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/929Strange buffering behaviour in GHCi2019-07-07T19:16:15ZSimon MarlowStrange buffering behaviour in GHCiReported by Clifford Beshers on haskell\@haskell.org:
> ghci starts with !NoBuffering behavior, even though the mode appears to be
> !LineBuffering. Setting it once fixes the problem.
> I've included a ghci session that demonstrates th...Reported by Clifford Beshers on haskell\@haskell.org:
> ghci starts with !NoBuffering behavior, even though the mode appears to be
> !LineBuffering. Setting it once fixes the problem.
> I've included a ghci session that demonstrates the bug by showing the change in
> behavior when pressing Control-D in response to each call to getLine. The results
> are identical for 6.4.1 and 6.6 rc1.
```
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.4.1, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base-1.0 ... linking ... done.
Prelude> :m +System.IO
Prelude System.IO> hGetBuffering stdin >>= print
LineBuffering
Prelude System.IO> getLine >>= print
^D
"\EOT"
Prelude System.IO> hSetBuffering stdin NoBuffering >> hGetBuffering stdin >>= print
NoBuffering
Prelude System.IO> getLine >>= print
^D
"\EOT"
Prelude System.IO> hSetBuffering stdin LineBuffering >> hGetBuffering stdin >>= print
LineBuffering
Prelude System.IO> getLine >>= print
*** Exception: <stdin>: hGetLine: end of file
Prelude System.IO>
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.5.20060831, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done.
Prelude> :m +System.IO
Prelude System.IO> hGetBuffering stdin >>= print
LineBuffering
Prelude System.IO> getLine >>= print
^D
"\EOT"
Prelude System.IO> hSetBuffering stdin NoBuffering >> hGetBuffering stdin >>= print
NoBuffering
Prelude System.IO> getLine >>= print
^D
"\EOT"
Prelude System.IO> hSetBuffering stdin LineBuffering >> hGetBuffering stdin >>= print
LineBuffering
Prelude System.IO> getLine >>= print
*** Exception: <stdin>: hGetLine: end of file
Prelude System.IO>
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------------- |
| Version | 6.5 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | clifford.beshers@linspire.com |
| Operating system | Unknown |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":"Strange buffering behaviour in GHCi","status":"New","operating_system":"Unknown","component":"GHCi","related":[],"milestone":"6.6.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.5","keywords":[],"differentials":[],"test_case":"","architecture":"Unknown","cc":["clifford.beshers@linspire.com"],"type":"Bug","description":"Reported by Clifford Beshers on haskell@haskell.org:\r\n\r\n ghci starts with !NoBuffering behavior, even though the mode appears to be \r\n !LineBuffering. Setting it once fixes the problem.\r\n\r\n I've included a ghci session that demonstrates the bug by showing the change in\r\n behavior when pressing Control-D in response to each call to getLine. The results\r\n are identical for 6.4.1 and 6.6 rc1.\r\n\r\n\r\n{{{\r\n ___ ___ _\r\n / _ \\ /\\ /\\/ __(_)\r\n/ /_\\// /_/ / / | | GHC Interactive, version 6.4.1, for Haskell 98.\r\n/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/\r\n\\____/\\/ /_/\\____/|_| Type :? for help.\r\n\r\nLoading package base-1.0 ... linking ... done.\r\nPrelude> :m +System.IO\r\nPrelude System.IO> hGetBuffering stdin >>= print\r\nLineBuffering\r\nPrelude System.IO> getLine >>= print\r\n^D\r\n\"\\EOT\"\r\nPrelude System.IO> hSetBuffering stdin NoBuffering >> hGetBuffering stdin >>= print\r\nNoBuffering\r\nPrelude System.IO> getLine >>= print\r\n^D\r\n\"\\EOT\"\r\nPrelude System.IO> hSetBuffering stdin LineBuffering >> hGetBuffering stdin >>= print\r\nLineBuffering\r\nPrelude System.IO> getLine >>= print\r\n*** Exception: <stdin>: hGetLine: end of file\r\nPrelude System.IO>\r\n\r\n\r\n\r\n ___ ___ _\r\n / _ \\ /\\ /\\/ __(_)\r\n/ /_\\// /_/ / / | | GHC Interactive, version 6.5.20060831, for Haskell 98.\r\n/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/\r\n\\____/\\/ /_/\\____/|_| Type :? for help.\r\n\r\nLoading package base ... linking ... done.\r\nPrelude> :m +System.IO\r\nPrelude System.IO> hGetBuffering stdin >>= print\r\nLineBuffering\r\nPrelude System.IO> getLine >>= print\r\n^D\r\n\"\\EOT\"\r\nPrelude System.IO> hSetBuffering stdin NoBuffering >> hGetBuffering stdin >>= print\r\nNoBuffering\r\nPrelude System.IO> getLine >>= print\r\n^D\r\n\"\\EOT\"\r\nPrelude System.IO> hSetBuffering stdin LineBuffering >> hGetBuffering stdin >>= print\r\nLineBuffering\r\nPrelude System.IO> getLine >>= print\r\n*** Exception: <stdin>: hGetLine: end of file\r\nPrelude System.IO> \r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>