GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T19:20:30Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/496Allocating more than BLOCK_SIZE bytes of memory fails2019-07-07T19:20:30ZSimon MarlowAllocating more than BLOCK_SIZE bytes of memory fails```
The compiler cannot generate code that allocates more than BLOCK_SIZE bytes in one go. At the moment, the compiler will panic in the code generator if it finds itself trying to generate code with an oversized heap request in it.
Th...```
The compiler cannot generate code that allocates more than BLOCK_SIZE bytes in one go. At the moment, the compiler will panic in the code generator if it finds itself trying to generate code with an oversized heap request in it.
There's no easy fix for this one: splitting up the allocation in the compiler is hard if not impossible (splitting up a recursive allocation can't be done). Even if we allowed the thread to allocate into a large block, the garbage collector can't cope with large blocks containing small objects, and objects that don't start at the beginning of the large block.
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | None |
| 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":"Allocating more than BLOCK_SIZE bytes of memory fails","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"simonmar"},"version":"None","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nThe compiler cannot generate code that allocates more than BLOCK_SIZE bytes in one go. At the moment, the compiler will panic in the code generator if it finds itself trying to generate code with an oversized heap request in it.\n\nThere's no easy fix for this one: splitting up the allocation in the compiler is hard if not impossible (splitting up a recursive allocation can't be done). Even if we allowed the thread to allocate into a large block, the garbage collector can't cope with large blocks containing small objects, and objects that don't start at the beginning of the large block.\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/495INLINE non-existant symbol gets a panic2019-07-11T21:46:20ZlewieINLINE non-existant symbol gets a panic```
The directive
{- INLINE blarg -}
when no such blarg is defined yields a panic:
panic! (the `impossible' happened):
lookupBndrRn MyModule blarg
P.S. is there a way of indicating that a bug report has low priority?
```
<details><sum...```
The directive
{- INLINE blarg -}
when no such blarg is defined yields a panic:
panic! (the `impossible' happened):
lookupBndrRn MyModule blarg
P.S. is there a way of indicating that a bug report has low priority?
```
<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":"INLINE non-existant symbol gets a panic","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"nobody"},"version":"None","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nThe directive\n{- INLINE blarg -}\nwhen no such blarg is defined yields a panic:\npanic! (the `impossible' happened):\n\tlookupBndrRn MyModule blarg\n\nP.S. is there a way of indicating that a bug report has low priority?\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/494deriving show with unboxed types gives nonsense2019-07-07T19:20:32Zsewardjderiving show with unboxed types gives nonsense```
deriving show with unboxed types gives nonsense --
specifically, a wierd kind error, which doesn't make it
clear what the problem is
```
<details><summary>Trac metadata</summary>
| Trac field | Value |...```
deriving show with unboxed types gives nonsense --
specifically, a wierd kind error, which doesn't make it
clear what the problem is
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | None |
| 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":"deriving show with unboxed types gives nonsense","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"simonmar"},"version":"None","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nderiving show with unboxed types gives nonsense --\nspecifically, a wierd kind error, which doesn't make it\nclear what the problem is\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/493foreign export doesn't deal with newtypes correctly2019-07-07T19:20:32ZSimon Marlowforeign export doesn't deal with newtypes correctly```
GHC does not accept foreign export dynamic where the result is not
Addr but a newtype for Addr. I think it should:
module M1 where
import Foreign
newtype FunPtr a = FunPtr Addr
foreign export dynamic f :: (Int -> Int) -> IO (FunPtr ...```
GHC does not accept foreign export dynamic where the result is not
Addr but a newtype for Addr. I think it should:
module M1 where
import Foreign
newtype FunPtr a = FunPtr Addr
foreign export dynamic f :: (Int -> Int) -> IO (FunPtr (Int -> Int))
Moreover, foreign export dynamic does not work with the NCG.
--
__("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
\__/ GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-
^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | None |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Compiler (FFI) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"foreign export doesn't deal with newtypes correctly","status":"New","operating_system":"","component":"Compiler (FFI)","related":[],"milestone":"","resolution":"ResolvedFixed","owner":{"tag":"OwnedBy","contents":"simonmar"},"version":"None","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\nGHC does not accept foreign export dynamic where the result is not\nAddr but a newtype for Addr. I think it should:\n\nmodule M1 where\nimport Foreign\nnewtype FunPtr a = FunPtr Addr\nforeign export dynamic f :: (Int -> Int) -> IO (FunPtr (Int -> Int))\n\nMoreover, foreign export dynamic does not work with the NCG.\n\n-- \n __(\"< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/\n \\__/ GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-\n ^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t\nQRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-\n\n\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->Simon MarlowSimon Marlow