GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T19:19:11Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/197allow "\ " escapes in GHCi commands2019-07-07T19:19:11Zhamrichardsallow "\ " escapes in GHCi commands```
It would be nice if, in file names, "\ " were handled as " ". This
would make the GHCi interface consistent with those of
Terminal and Hugs.
``````
It would be nice if, in file names, "\ " were handled as " ". This
would make the GHCi interface consistent with those of
Terminal and Hugs.
```rjmccallrjmccallhttps://gitlab.haskell.org/ghc/ghc/-/issues/196RTS Exhausted max heap size2019-07-07T19:19:11ZrscottmcintireRTS Exhausted max heap size```
I've lost the exact error message. But basically, the
message said to report the error to this project. The
message said that the RTS system went over the
maximum heap size of roughly 268000000 bytes.
The machine I'm running on ...```
I've lost the exact error message. But basically, the
message said to report the error to this project. The
message said that the RTS system went over the
maximum heap size of roughly 268000000 bytes.
The machine I'm running on is running windows 2000 and
has 1GB of memory. The version of GHC is 6.0.1. The
code was run with the following compiler switches:
ghc -O -fvia-c prob.hs -o prob.
I've attached the file prob.hs.
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"RTS Exhausted max heap size","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"6.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nI've lost the exact error message. But basically, the \nmessage said to report the error to this project. The \nmessage said that the RTS system went over the \nmaximum heap size of roughly 268000000 bytes. \n\nThe machine I'm running on is running windows 2000 and \nhas 1GB of memory. The version of GHC is 6.0.1. The \ncode was run with the following compiler switches: \nghc -O -fvia-c prob.hs -o prob.\n\nI've attached the file prob.hs.\n\n\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/195Missing # from #-} elicits utterly opaque error2023-05-08T16:21:38ZnobodyMissing # from #-} elicits utterly opaque error```
Consider this in Foo.hs
module Foo where
{-# LINE 1 "Baz.hs" -}
Notice the missing #
GHC 6.3 (HEAD, 30 Oct 2003) gives the message:
Baz.hs:0: lexical error
This is extremely opaque; after all, the error is in Foo.
And...```
Consider this in Foo.hs
module Foo where
{-# LINE 1 "Baz.hs" -}
Notice the missing #
GHC 6.3 (HEAD, 30 Oct 2003) gives the message:
Baz.hs:0: lexical error
This is extremely opaque; after all, the error is in Foo.
And it would help to know the offending token.
Simon PJ
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | None |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedWon'tFix |
| Component | None |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Missing # from #-} elicits utterly opaque error","status":"New","operating_system":"","component":"None","related":[],"milestone":"","resolution":"ResolvedWon'tFix","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"None","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nConsider this in Foo.hs\n\n\tmodule Foo where\n\t{-# LINE 1 \"Baz.hs\" -}\n\nNotice the missing #\n\nGHC 6.3 (HEAD, 30 Oct 2003) gives the message:\n\n Baz.hs:0: lexical error\n\nThis is extremely opaque; after all, the error is in Foo. \nAnd it would help to know the offending token.\n\n\nSimon PJ \n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/194closure type 0 occurence2019-07-07T19:19:11Zdonsclosure type 0 occurence```
The 6.3 head, unregisterised, on mips64-sgi-irix has
repeatedly given me the following for the okeefe_neural
test. I'm sending this out as a possible data point
(with newlines for emphasis):
====> Running ./programs/okeefe_neural...```
The 6.3 head, unregisterised, on mips64-sgi-irix has
repeatedly given me the following for the okeefe_neural
test. I'm sending this out as a possible data point
(with newlines for emphasis):
====> Running ./programs/okeefe_neural/test.T
=====> okeefe_neural(normal)
cd ./programs/okeefe_neural &&
'/import/pill0/1/dons/ghc/fptools/ghc/compiler/ghc-inplace'
-no-recomp -dcore-lint -Dmips_sgi_irix --make -o
okeefe_neural Main -package lang +RTS -M64m -RTS
>okeefe_neural.comp.stderr 2>&1 Compile failed
(status 65024) errors were:
Chasing modules from: Main
Compiling Main ( Main.hs, Main.o )
ghc-6.3: internal error:
scavenge_mark_stack:
unimplemented/strange closure type 0 @ 4ea9060
Please report this as a bug to
glasgow-haskell-bugs@haskell.org,
or http://www.sourceforge.net/projects/ghc/
Closure type 0 == INVALID_OBJECT. Unfortunately, gdb
doesn't seem to work properly in 64 bit mode on this
platform.
-- Don
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | ResolvedFixed |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"closure type 0 occurence","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"simonmar"},"version":"6.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nThe 6.3 head, unregisterised, on mips64-sgi-irix has\nrepeatedly given me the following for the okeefe_neural\ntest. I'm sending this out as a possible data point\n(with newlines for emphasis):\n\n ====> Running ./programs/okeefe_neural/test.T\n =====> okeefe_neural(normal)\n cd ./programs/okeefe_neural &&\n \n'/import/pill0/1/dons/ghc/fptools/ghc/compiler/ghc-inplace'\n -no-recomp -dcore-lint -Dmips_sgi_irix --make -o \n okeefe_neural Main -package lang +RTS -M64m -RTS \n >okeefe_neural.comp.stderr 2>&1 Compile failed\n (status 65024) errors were:\n Chasing modules from: Main\n Compiling Main ( Main.hs, Main.o )\n ghc-6.3: internal error:\n \n scavenge_mark_stack: \n unimplemented/strange closure type 0 @ 4ea9060\n \n Please report this as a bug to \n glasgow-haskell-bugs@haskell.org, \n or http://www.sourceforge.net/projects/ghc/\n\nClosure type 0 == INVALID_OBJECT. Unfortunately, gdb \ndoesn't seem to work properly in 64 bit mode on this\nplatform.\n\n-- Don\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/193When compiled with -O2, we get extra warnings2019-07-07T19:19:11ZnobodyWhen compiled with -O2, we get extra warnings```
This is happending on a WinXP installation:
-----------------------------------------------
[arf]~/tst>cat Main.hs
module Main where
import CString
foreign import ccall "readline" gnuRL :: CString -> IO
CString
main = main
[arf]...```
This is happending on a WinXP installation:
-----------------------------------------------
[arf]~/tst>cat Main.hs
module Main where
import CString
foreign import ccall "readline" gnuRL :: CString -> IO
CString
main = main
[arf]~/tst>ghc --version
The Glorious Glasgow Haskell Compilation System,
version 6.0.1
[arf]~/tst>ghc -c -ffi Main.hs
[arf]~/tst>rm Main.o Main.hi
[arf]~/tst>ghc -O2 -c -ffi Main.hs
c:/DOCUME~1/lerkok/LOCALS~1/Temp/ghc2484.hc: In
function `s1cV_entry':
c:/DOCUME~1/lerkok/LOCALS~1/Temp/ghc2484.hc:52:
warning: implicit declaration of function `readline'
c:/DOCUME~1/lerkok/LOCALS~1/Temp/ghc2484.hc:52:
warning: assignment makes pointer from integer without
a cast
--------------------------------------------------
For some reason, compiling with -O2 produces these
warnings that don't show up otherwise.
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | 6.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedWon'tFix |
| Component | Compiler (FFI) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"When compiled with -O2, we get extra warnings","status":"New","operating_system":"","component":"Compiler (FFI)","related":[],"milestone":"","resolution":"ResolvedWon'tFix","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"6.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nThis is happending on a WinXP installation:\n-----------------------------------------------\n[arf]~/tst>cat Main.hs\nmodule Main where\n\nimport CString\n\nforeign import ccall \"readline\" gnuRL :: CString -> IO \nCString\n\nmain = main\n[arf]~/tst>ghc --version\nThe Glorious Glasgow Haskell Compilation System, \nversion 6.0.1\n[arf]~/tst>ghc -c -ffi Main.hs\n[arf]~/tst>rm Main.o Main.hi\n[arf]~/tst>ghc -O2 -c -ffi Main.hs\nc:/DOCUME~1/lerkok/LOCALS~1/Temp/ghc2484.hc: In \nfunction `s1cV_entry':\nc:/DOCUME~1/lerkok/LOCALS~1/Temp/ghc2484.hc:52: \nwarning: implicit declaration of function `readline'\nc:/DOCUME~1/lerkok/LOCALS~1/Temp/ghc2484.hc:52: \nwarning: assignment makes pointer from integer without \na cast\n--------------------------------------------------\n\nFor some reason, compiling with -O2 produces these \nwarnings that don't show up otherwise.\n\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/192misleading stability2019-07-07T19:19:12Zas49misleading stability```
In the haddock generated doumentation the tag
"stability" is "experimental" for most modules and
"provisional" for the Haskell 98 Prelude modules
(except e.g. Bool which is experimental, probably
because it is in a different module f...```
In the haddock generated doumentation the tag
"stability" is "experimental" for most modules and
"provisional" for the Haskell 98 Prelude modules
(except e.g. Bool which is experimental, probably
because it is in a different module from what the
Haskell Report sais it would be). Having such overly
conservative classification renders the whole tag
useless. All Prelude modules should be "stable" as well
as the FFI, FiniteMap and many others.
Cheers,
Axel.
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | 6.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Documentation |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"misleading stability","status":"New","operating_system":"","component":"Documentation","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"6.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nIn the haddock generated doumentation the tag\n\"stability\" is \"experimental\" for most modules and\n\"provisional\" for the Haskell 98 Prelude modules\n(except e.g. Bool which is experimental, probably\nbecause it is in a different module from what the\nHaskell Report sais it would be). Having such overly\nconservative classification renders the whole tag\nuseless. All Prelude modules should be \"stable\" as well\nas the FFI, FiniteMap and many others.\n\nCheers,\nAxel.\n\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/191Heap profile w/ debugging RTS dumps core2020-06-03T22:08:43ZvolkersfHeap profile w/ debugging RTS dumps core```
stolz@menelaos [14:41:59]> ~/a.out +RTS -h
Segmentation fault (core dumped)
stolz@menelaos [14:42:00]> ~/a.out +RTS -hL
Segmentation fault (core dumped)
stolz@menelaos [14:42:55]> ~/a.out +RTS -hT
Segmentation fault (core dumped)
Re...```
stolz@menelaos [14:41:59]> ~/a.out +RTS -h
Segmentation fault (core dumped)
stolz@menelaos [14:42:00]> ~/a.out +RTS -hL
Segmentation fault (core dumped)
stolz@menelaos [14:42:55]> ~/a.out +RTS -hT
Segmentation fault (core dumped)
Relevant section from RtsFlags.c:
case 'h': /* serial heap profile */
#if !defined(PROFILING) && defined(DEBUG)
switch (rts_argv[arg][2]) {
case '\0':
case 'L':
RtsFlags.ProfFlags.doHeapProfile = HEAP_BY_INFOPTR;
break;
case 'T':
RtsFlags.ProfFlags.doHeapProfile =
HEAP_BY_CLOSURE_TYPE;
break;
[I don't need profiling, I just thought I'd get a list of all available
RTS-flags on -h]
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | 6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedNoReason |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Heap profile w/ debugging RTS dumps core","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"ResolvedNoReason","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nstolz@menelaos [14:41:59]> ~/a.out +RTS -h\nSegmentation fault (core dumped)\nstolz@menelaos [14:42:00]> ~/a.out +RTS -hL\nSegmentation fault (core dumped)\nstolz@menelaos [14:42:55]> ~/a.out +RTS -hT\nSegmentation fault (core dumped)\n\nRelevant section from RtsFlags.c:\n case 'h': /* serial heap profile */\n#if !defined(PROFILING) && defined(DEBUG)\n switch (rts_argv[arg][2]) {\n case '\\0':\n case 'L':\n RtsFlags.ProfFlags.doHeapProfile = HEAP_BY_INFOPTR;\n break;\n case 'T':\n RtsFlags.ProfFlags.doHeapProfile = \nHEAP_BY_CLOSURE_TYPE;\n break;\n\n [I don't need profiling, I just thought I'd get a list of all available \nRTS-flags on -h]\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/190ghci --help produces help for ghc2019-07-07T19:19:12Znobodyghci --help produces help for ghc```
The summary says it all. Submitted by Norman Ramsey
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | None |
| T...```
The summary says it all. Submitted by Norman Ramsey
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | None |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"ghci --help produces help for ghc","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"simonmar"},"version":"None","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nThe summary says it all. Submitted by Norman Ramsey\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/189Malformed Predicate w/ Template Haskell2019-07-07T19:19:13ZjcastMalformed Predicate w/ Template Haskell```
The following two modules:
--- Cut ---
module ScratchTemplates where
import Language.Haskell.THSyntax
newtype Interaction a = Interaction a deriving Show
ret = Interaction
instance Monad Interaction where
return = Interactio...```
The following two modules:
--- Cut ---
module ScratchTemplates where
import Language.Haskell.THSyntax
newtype Interaction a = Interaction a deriving Show
ret = Interaction
instance Monad Interaction where
return = Interaction
Interaction x >>= f = f x
instance Functor Interaction where
fmap f x = x >>= return . f
interactionT t = tcon (TconName "Interaction") `tapp` t
class Flatten a b | a -> b where
flatten :: a -> b
flattenT :: TypQ -> TypQ -> TypQ
flattenT t t' = tvar "Flatten" `tapp` t `tapp` t
baseType t = sequence [
inst (return []) (flattenT t t)
[val (pvar "flatten") (normal (var "id")) []],
inst (return []) (flattenT (interactionT t)
(interactionT t))
[val (pvar "flatten") (normal (var "id")) []]]
instance Flatten a b =>
Flatten (Interaction (Interaction a))
(Interaction b) where
flatten a = a >>= id >>= return . flatten
module Main where
import Monad
import ScratchTemplates
import Language.Haskell.THSyntax
$(baseType (tcon (Tuple 0)))
instance Flatten String String where
flatten a = a
instance Flatten (Interaction String) (Interaction
String) where
flatten a = a
instance Flatten b c => Combine String b (String, c) where
combine a b = liftM2 (,) a (fmap flatten b)
instance Flatten Int Int where
flatten a = a
class Combine a b c | a b -> c where
combine :: Interaction a -> Interaction b ->
Interaction c
instance Combine () b b where
combine a b = b
instance Flatten b c => Combine Int b (Int, c) where
combine a b = do
x <- a
y <- fmap flatten b
return (x, y)
instance (Flatten b c, Combine a c d) =>
Flatten (Interaction a, Interaction b)
(Interaction d) where
flatten (a, b) = combine a (fmap flatten b)
main = main
--- Cut here ---
loaded into ghci -fglasgow-exts produce the following
error message:
Compiling ScratchTemplates ( ScratchTemplates.hs,
interpreted )
Compiling Main ( scratch.hs, interpreted )
ghc-6.0.1: panic! (the `impossible' happened, GHC
version 6.0.1):
Malformed predicate
Please report it as a compiler bug to
glasgow-haskell-bugs@haskell.org,
or http://sourceforge.net/projects/ghc/.
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 6.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Malformed Predicate w/ Template Haskell","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"6.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nThe following two modules:\n\n --- Cut ---\n\nmodule ScratchTemplates where\n\nimport Language.Haskell.THSyntax\n\nnewtype Interaction a = Interaction a deriving Show\n\nret = Interaction\n\ninstance Monad Interaction where\n return = Interaction\n Interaction x >>= f = f x\n\ninstance Functor Interaction where\n fmap f x = x >>= return . f\n\ninteractionT t = tcon (TconName \"Interaction\") `tapp` t\n\nclass Flatten a b | a -> b where\n flatten :: a -> b\n\nflattenT :: TypQ -> TypQ -> TypQ\nflattenT t t' = tvar \"Flatten\" `tapp` t `tapp` t\n\nbaseType t = sequence [\n inst (return []) (flattenT t t)\n [val (pvar \"flatten\") (normal (var \"id\")) []],\n inst (return []) (flattenT (interactionT t)\n(interactionT t))\n [val (pvar \"flatten\") (normal (var \"id\")) []]]\n\ninstance Flatten a b =>\n Flatten (Interaction (Interaction a))\n(Interaction b) where\n flatten a = a >>= id >>= return . flatten\n\nmodule Main where\n\nimport Monad\nimport ScratchTemplates\nimport Language.Haskell.THSyntax\n\n$(baseType (tcon (Tuple 0)))\n\ninstance Flatten String String where\n flatten a = a\n\ninstance Flatten (Interaction String) (Interaction\nString) where\n flatten a = a\n\ninstance Flatten b c => Combine String b (String, c) where\n combine a b = liftM2 (,) a (fmap flatten b)\n\ninstance Flatten Int Int where\n flatten a = a\n\nclass Combine a b c | a b -> c where\n combine :: Interaction a -> Interaction b ->\nInteraction c\n\ninstance Combine () b b where\n combine a b = b\n\ninstance Flatten b c => Combine Int b (Int, c) where\n combine a b = do\n x <- a\n y <- fmap flatten b\n return (x, y)\n\ninstance (Flatten b c, Combine a c d) =>\n Flatten (Interaction a, Interaction b)\n(Interaction d) where\n flatten (a, b) = combine a (fmap flatten b)\n\nmain = main\n\n --- Cut here ---\n\nloaded into ghci -fglasgow-exts produce the following\nerror message:\n\nCompiling ScratchTemplates ( ScratchTemplates.hs,\ninterpreted )\nCompiling Main ( scratch.hs, interpreted )\nghc-6.0.1: panic! (the `impossible' happened, GHC\nversion 6.0.1):\n\tMalformed predicate\n\nPlease report it as a compiler bug to\nglasgow-haskell-bugs@haskell.org,\nor http://sourceforge.net/projects/ghc/.\n\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/188seg faults with STArray2023-08-14T14:44:56Znobodyseg faults with STArray```
While trying to eliminate a space leak in a program
with lots of array updates, I switched the update
function to a (thaw to STArray, do the update, freeze).
This gave an order of magnitude improvement over
standard Haskell arrays (b...```
While trying to eliminate a space leak in a program
with lots of array updates, I switched the update
function to a (thaw to STArray, do the update, freeze).
This gave an order of magnitude improvement over
standard Haskell arrays (but not enough yet). However,
with big arrays I get segmentation faults with
unsafeThaw. This happens with ghc 5.04.1 and 6.0.1.
Attached is a small example program to illustrate the
problem.
For small problem sizes the result is OK, then at some
point ghc 5.04.1 issues the ominous
fatal error: scavenge: unimplemented/strange closure
type 63 @ 0x50088000
and for even bigger sizes it just seg faults (see
comments in code for actual sizes).
ghc 6.0.1's output is OK until 5218, from 5219-5221
there's a seg fault immediately following the result,
and from 5222 it just seg faults (this is on RedHat 7.1
w/ 512 MB memory). We even tried the ghc 6.2 CVS
version from 10/07/03, but it's the same problem as 6.0.1.
I would like to use both unsafe versions as I'm trying
to avoid copying in order to reduce the process'
footprint. My array usage would be single threaded so
strict arrays with in-place update would be nice to have.
Cheers,
Nils Ellmenreich
(nils at fmi dot uni dash passau dot de)
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"seg faults with STArray ","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"simonmar"},"version":"6.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\n\nWhile trying to eliminate a space leak in a program\nwith lots of array updates, I switched the update\nfunction to a (thaw to STArray, do the update, freeze).\nThis gave an order of magnitude improvement over\nstandard Haskell arrays (but not enough yet). However,\nwith big arrays I get segmentation faults with\nunsafeThaw. This happens with ghc 5.04.1 and 6.0.1.\nAttached is a small example program to illustrate the\nproblem.\n\nFor small problem sizes the result is OK, then at some\npoint ghc 5.04.1 issues the ominous \nfatal error: scavenge: unimplemented/strange closure\ntype 63 @ 0x50088000\n\nand for even bigger sizes it just seg faults (see\ncomments in code for actual sizes).\n\nghc 6.0.1's output is OK until 5218, from 5219-5221\nthere's a seg fault immediately following the result,\nand from 5222 it just seg faults (this is on RedHat 7.1\nw/ 512 MB memory). We even tried the ghc 6.2 CVS\nversion from 10/07/03, but it's the same problem as 6.0.1.\n\nI would like to use both unsafe versions as I'm trying\nto avoid copying in order to reduce the process'\nfootprint. My array usage would be single threaded so\nstrict arrays with in-place update would be nice to have.\n\nCheers,\nNils Ellmenreich \n(nils at fmi dot uni dash passau dot de)\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/187Reading multiple files fails2019-07-07T19:19:13ZhjvtReading multiple files fails```
The atttached zip file contains the file ReadALot.lhs,
which reads a series of files (these files are listed
in dir.dat). The program reads the first and the last
(non-empty) line of each file and writes them, together
with the f...```
The atttached zip file contains the file ReadALot.lhs,
which reads a series of files (these files are listed
in dir.dat). The program reads the first and the last
(non-empty) line of each file and writes them, together
with the filename in the output file result.dat.
The problem with the compiled program is, that the last
lines are not really the last lines of the files; they
are also not complete.
More info.:
This program is compiled under Windows 98, using the
enclosed compile.bat. The stdout messages from the
compiler can be found in compile.log; the stderr
messages can not be redirected under Windows 98.
All files needed for running the program are in the
attached file.
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | 6.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedWon'tFix |
| Component | None |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Reading multiple files fails","status":"New","operating_system":"","component":"None","related":[],"milestone":"","resolution":"ResolvedWon'tFix","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"6.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nThe atttached zip file contains the file ReadALot.lhs, \nwhich reads a series of files (these files are listed \nin dir.dat). The program reads the first and the last \n(non-empty) line of each file and writes them, together \nwith the filename in the output file result.dat.\n\nThe problem with the compiled program is, that the last \nlines are not really the last lines of the files; they \nare also not complete.\n\nMore info.:\nThis program is compiled under Windows 98, using the \nenclosed compile.bat. The stdout messages from the \ncompiler can be found in compile.log; the stderr \nmessages can not be redirected under Windows 98.\nAll files needed for running the program are in the \nattached file.\n\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/186Bad sparc Int64 code via NCG with -O2019-07-07T19:19:13ZnobodyBad sparc Int64 code via NCG with -O```
On sparc machines ( sparc-sun-solaris2.6,
sparc-unknown-openbsd ) testsuite tests exercising
Int64 code are broken when compiled the optasm way.
This includes the arith011 test and the enum02 test,
possibly others. Trivial Int64 code...```
On sparc machines ( sparc-sun-solaris2.6,
sparc-unknown-openbsd ) testsuite tests exercising
Int64 code are broken when compiled the optasm way.
This includes the arith011 test and the enum02 test,
possibly others. Trivial Int64 code will produce
erroneous results. Turning off optimisation, or
compiling via C, will generate correct code.
Some examples..
This one comes from enum02:
import Int
main = do print $ pred (1 :: Int64)
$ ./a.out
4294967295
which is UINT_MAX...
And from arith011, this generates incorrect results:
import Int
main = do print $ take 10 [ (0::Int64), toEnum 2 .. ]
on x86:
[0,2,4]
on sparc:
[0,8589934592,17179869184]
which is 2 * (UNIT_MAX + 1), and then twice that.
This erroneously generates an infinte sequence, filling
up /usr on my system before I realised what happened:
import Int
main = do print [ (0::Int64) .. toEnum 2 ]
-- Don Stewart
```benlbenlhttps://gitlab.haskell.org/ghc/ghc/-/issues/185Floating pt. arithmetic bugs / inexplicable inaccuracy2019-07-07T19:19:13ZyjoFloating pt. arithmetic bugs / inexplicable inaccuracy```
in ghci 6.0.1, eg:
Prelude> 1.1 + 2.2
3.3000000000000003
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | None ...```
in ghci 6.0.1, eg:
Prelude> 1.1 + 2.2
3.3000000000000003
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | None |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedNoReason |
| Component | None |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Floating pt. arithmetic bugs / inexplicable inaccuracy","status":"New","operating_system":"","component":"None","related":[],"milestone":"","resolution":"ResolvedNoReason","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"None","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nin ghci 6.0.1, eg:\n\nPrelude> 1.1 + 2.2\n3.3000000000000003\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/184bug ghc --make2019-07-07T19:19:14Znobodybug ghc --make```
Using ghc-6.0 with
ghc --make mimico.hs
gives:
ghc: panic! (the 'impossible' happened, GHC 6.0):
coreSyn/coreUtils.lhs: 1188: Non-exaustive patterns
in function isCrossDllArg
I've done some work to help you finding t...```
Using ghc-6.0 with
ghc --make mimico.hs
gives:
ghc: panic! (the 'impossible' happened, GHC 6.0):
coreSyn/coreUtils.lhs: 1188: Non-exaustive patterns
in function isCrossDllArg
I've done some work to help you finding the cause of
the bug, by leaving only 4 (stripped down) files (see
attachment). A single line --- the definition of function
getInput, in ParsecPrim.hs --- is indicated that, if
modified (by writing, say, "getInput=undefined")
causes "ghc --make mimco.hs" not to 'panic'.
(The bug turned out to appear in Parsec files; seems
Daan Leijen didn't use "ghc --make" :-).
Hope that helps...
Tchau,
Carlos
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | 6.0 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"bug ghc --make","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"6.0","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nUsing ghc-6.0 with\n\n ghc --make mimico.hs \n\ngives:\n\n ghc: panic! (the 'impossible' happened, GHC 6.0):\n coreSyn/coreUtils.lhs: 1188: Non-exaustive patterns\n in function isCrossDllArg\n\nI've done some work to help you finding the cause of \nthe bug, by leaving only 4 (stripped down) files (see \nattachment). A single line --- the definition of function \ngetInput, in ParsecPrim.hs --- is indicated that, if \nmodified (by writing, say, \"getInput=undefined\") \ncauses \"ghc --make mimco.hs\" not to 'panic'.\n(The bug turned out to appear in Parsec files; seems \nDaan Leijen didn't use \"ghc --make\" :-). \n\nHope that helps...\n\nTchau,\n\nCarlos\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/183Installation procedure asks too much space2019-07-07T19:19:14ZnobodyInstallation procedure asks too much space```
The installation procedure does not want to continue
unless at least 270 megabyte is available. The installed
package uses less than 190 MB. (Deleting the
downloaded package frees up 35 MB afterwards.)
This concerns ghc-6-0-1.msi ...```
The installation procedure does not want to continue
unless at least 270 megabyte is available. The installed
package uses less than 190 MB. (Deleting the
downloaded package frees up 35 MB afterwards.)
This concerns ghc-6-0-1.msi on Windows 98.
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | None |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedWon'tFix |
| Component | None |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Installation procedure asks too much space","status":"New","operating_system":"","component":"None","related":[],"milestone":"","resolution":"ResolvedWon'tFix","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"None","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nThe installation procedure does not want to continue \nunless at least 270 megabyte is available. The installed \npackage uses less than 190 MB. (Deleting the \ndownloaded package frees up 35 MB afterwards.)\nThis concerns ghc-6-0-1.msi on Windows 98.\n\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/182Old setup procedure for Windows2023-10-19T15:38:18ZnobodyOld setup procedure for Windows```
The document user_guide.pdf in the GHC 6.01 for
Windows package describes the install procedure for
version 5.02, setup.exe instead of ghc-6-0-1.msi.
```
<details><summary>Trac metadata</summary>
| Trac field | Valu...```
The document user_guide.pdf in the GHC 6.01 for
Windows package describes the install procedure for
version 5.02, setup.exe instead of ghc-6-0-1.msi.
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | 6.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Documentation |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Old setup procedure for Windows","status":"New","operating_system":"","component":"Documentation","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"6.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nThe document user_guide.pdf in the GHC 6.01 for \nWindows package describes the install procedure for \nversion 5.02, setup.exe instead of ghc-6-0-1.msi. \n\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/181compiled program segfaults2019-07-07T19:19:15Zwfericompiled program segfaults```
The enclosed program segfaults on the enclosed input, like
$ ./dissect <res.txt
[Sensible output]
Segmentation fault
This is with default compilation: ghc dissect.hs -o dissect
With optimalization enabled (ghc -O dissect.hs -o diss...```
The enclosed program segfaults on the enclosed input, like
$ ./dissect <res.txt
[Sensible output]
Segmentation fault
This is with default compilation: ghc dissect.hs -o dissect
With optimalization enabled (ghc -O dissect.hs -o dissect) the same
error does not happen.
This happens on Debian Woody, ghc apt-got from
deb http://www.syntaxpolice.org/haskell-experimental/ stable/
Linux kernel 2.4.20, libc 2.2.5-11.5
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 6.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedDuplicate |
| Component | None |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"compiled program segfaults","status":"New","operating_system":"","component":"None","related":[],"milestone":"","resolution":"ResolvedDuplicate","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"6.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nThe enclosed program segfaults on the enclosed input, like\n\n$ ./dissect <res.txt\n[Sensible output]\nSegmentation fault\n\nThis is with default compilation: ghc dissect.hs -o dissect\nWith optimalization enabled (ghc -O dissect.hs -o dissect) the same \nerror does not happen.\n\nThis happens on Debian Woody, ghc apt-got from\ndeb http://www.syntaxpolice.org/haskell-experimental/ stable/\nLinux kernel 2.4.20, libc 2.2.5-11.5\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/180ghci messes up xterm's tty settings2019-07-07T19:19:16Znobodyghci messes up xterm's tty settings```
$ uname -a
SunOS syrma.ccs.neu.edu 5.9 Generic_112233-07 sun4u
sparc SUNW,Sun-Blade-100
$ echo $TERM
xterm
$ stty -a
speed 9600 baud;
rows = 76; columns = 80; ypixels = 992; xpixels = 499;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ...```
$ uname -a
SunOS syrma.ccs.neu.edu 5.9 Generic_112233-07 sun4u
sparc SUNW,Sun-Blade-100
$ echo $TERM
xterm
$ stty -a
speed 9600 baud;
rows = 76; columns = 80; ypixels = 992; xpixels = 499;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk
-crtscts -crtsxoff -parext
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
-igncr icrnl -iuclc
ixon -ixany -ixoff -imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho
-pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel
$ ghci
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version
6.0.1, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done.
Prelude> :quit
Leaving GHCi.
$ stty -a
speed 9600 baud;
rows = 76; columns = 80; ypixels = 992; xpixels = 499;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
min = 1; time = 0;
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^a; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk
-crtscts -crtsxoff -parext
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
-igncr icrnl -iuclc
ixon -ixany -ixoff -imaxbel
isig -icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho
-pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel
$
Note how using ghci changes the tty's value for eof and
icanon... Changing eof in particular is annoying since
suddenly the time-honored ^d keyboard shortcut stops
working for any subsequent program I try to use in
that xterm unless I manually reset the tty's eof setting.
Philippe (meunier@ccs.neu.edu)
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | None |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedDuplicate |
| Component | None |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"ghci messes up xterm's tty settings","status":"New","operating_system":"","component":"None","related":[],"milestone":"","resolution":"ResolvedDuplicate","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"None","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\n$ uname -a\nSunOS syrma.ccs.neu.edu 5.9 Generic_112233-07 sun4u\nsparc SUNW,Sun-Blade-100\n$ echo $TERM\nxterm\n$ stty -a\nspeed 9600 baud; \nrows = 76; columns = 80; ypixels = 992; xpixels = 499;\ncsdata ?\neucw 1:0:0:0, scrw 1:0:0:0\nintr = ^c; quit = ^\\; erase = ^?; kill = ^u;\neof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;\nstart = ^q; stop = ^s; susp = ^z; dsusp = ^y;\nrprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;\nparenb -parodd cs8 -cstopb hupcl cread -clocal -loblk\n-crtscts -crtsxoff -parext \n-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr\n-igncr icrnl -iuclc \nixon -ixany -ixoff -imaxbel \nisig icanon -xcase echo echoe echok -echonl -noflsh \n-tostop echoctl -echoprt echoke -defecho -flusho\n-pendin iexten \nopost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel \n$ ghci \n ___ ___ _\n / _ \\ /\\ /\\/ __(_)\n / /_\\// /_/ / / | | GHC Interactive, version\n6.0.1, for Haskell 98.\n/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/\n\\____/\\/ /_/\\____/|_| Type :? for help.\n\nLoading package base ... linking ... done.\nPrelude> :quit\nLeaving GHCi.\n$ stty -a\nspeed 9600 baud; \nrows = 76; columns = 80; ypixels = 992; xpixels = 499;\ncsdata ?\neucw 1:0:0:0, scrw 1:0:0:0\nmin = 1; time = 0;\nintr = ^c; quit = ^\\; erase = ^?; kill = ^u;\neof = ^a; eol = <undef>; eol2 = <undef>; swtch = <undef>;\nstart = ^q; stop = ^s; susp = ^z; dsusp = ^y;\nrprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;\nparenb -parodd cs8 -cstopb hupcl cread -clocal -loblk\n-crtscts -crtsxoff -parext \n-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr\n-igncr icrnl -iuclc \nixon -ixany -ixoff -imaxbel \nisig -icanon -xcase echo echoe echok -echonl -noflsh \n-tostop echoctl -echoprt echoke -defecho -flusho\n-pendin iexten \nopost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel \n$ \n\nNote how using ghci changes the tty's value for eof and\nicanon... Changing eof in particular is annoying since\nsuddenly the time-honored ^d keyboard shortcut stops\nworking for any subsequent program I try to use in\nthat xterm unless I manually reset the tty's eof setting.\n\nPhilippe (meunier@ccs.neu.edu)\n\n\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/178SunOS5.8: getEffectiveUserNamem, crash illegal instruction2023-07-20T19:36:33ZsternhausSunOS5.8: getEffectiveUserNamem, crash illegal instruction```
hello.
on SunOS 5.8, with a fresh compiled ghc (configure
-prefix=/home/xxx/local && make)
and the some for the precompiled version.
the simple programm crash (see test.hs).
gdb says > gdb ./test
This GDB was config...```
hello.
on SunOS 5.8, with a fresh compiled ghc (configure
-prefix=/home/xxx/local && make)
and the some for the precompiled version.
the simple programm crash (see test.hs).
gdb says > gdb ./test
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) run
Starting program: /home/xxx/test
Program received signal SIGILL, Illegal instruction.
0x1f16dc in getgrnam_r ()
(gdb)
-- test.hs
import Posix
main :: IO ()
main = do
user <- Posix.getEffectiveUserName
print user
----
thx in advance
klaus
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | libraries/unix |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"SunOS5.8: getEffectiveUserNamem, crash illegal instruction","status":"New","operating_system":"","component":"libraries/unix","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"6.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nhello. \n \non SunOS 5.8, with a fresh compiled ghc (configure \n -prefix=/home/xxx/local && make) \n and the some for the precompiled version. \n \nthe simple programm crash (see test.hs). \ngdb says > gdb ./test \nThis GDB was configured as \"sparc-sun-solaris2.8\"... \n(gdb) run \nStarting program: /home/xxx/test \nProgram received signal SIGILL, Illegal instruction. \n0x1f16dc in getgrnam_r () \n(gdb) \n \n-- test.hs \nimport Posix \n \nmain :: IO () \nmain = do \n\tuser <- Posix.getEffectiveUserName \n\tprint user \n---- \nthx in advance \nklaus \n}}}","type_of_failure":"OtherFailure","blocking":[]} -->nobodynobodyhttps://gitlab.haskell.org/ghc/ghc/-/issues/177doesDirectoryExist "/" ==> False2019-07-07T19:19:17ZnobodydoesDirectoryExist "/" ==> False```
doesDirectoryExist gives False when called with root dir, "/".
I think that the following patch corrects this (I have not tried yet):
$ diff -u Directory.hs,orig Directory.hs
--- Directory.hs,orig 2003-04-11 12:11:24.0000000...```
doesDirectoryExist gives False when called with root dir, "/".
I think that the following patch corrects this (I have not tried yet):
$ diff -u Directory.hs,orig Directory.hs
--- Directory.hs,orig 2003-04-11 12:11:24.000000000 +0200
+++ Directory.hs 2003-09-15 18:22:56.000000000 +0200
@@ -597,7 +597,7 @@
fileNameEndClean :: String -> String
fileNameEndClean name =
- if i >= 0 && (ec == '\\' || ec == '/') then
+ if i > 0 && (ec == '\\' || ec == '/') then
fileNameEndClean (take i name)
else
name
vbzoli@vbzo.li
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | None |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | None |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"doesDirectoryExist \"/\" ==> False","status":"New","operating_system":"","component":"None","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"simonmar"},"version":"None","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\ndoesDirectoryExist gives False when called with root dir, \"/\". \n \nI think that the following patch corrects this (I have not tried yet): \n \n$ diff -u Directory.hs,orig Directory.hs \n--- Directory.hs,orig 2003-04-11 12:11:24.000000000 +0200 \n+++ Directory.hs 2003-09-15 18:22:56.000000000 +0200 \n@@ -597,7 +597,7 @@ \n \n fileNameEndClean :: String -> String \n fileNameEndClean name = \n- if i >= 0 && (ec == '\\\\' || ec == '/') then \n+ if i > 0 && (ec == '\\\\' || ec == '/') then \n fileNameEndClean (take i name) \n else \n name \n \n \nvbzoli@vbzo.li \n \n}}}","type_of_failure":"OtherFailure","blocking":[]} -->Simon MarlowSimon Marlow