|
peekCString stack overflow: msg#00005lang.haskell.glasgow.bugs
The following program gives me a stack overflow for a file "big.tex" 150000 bytes long. -- Cut here -- module Main where import Foreign.C.String import Foreign.Ptr import qualified GHC.IO main = do (ptr,len) <- GHC.IO.slurpFile "big.tex" peekCStringLen (castPtr ptr,len) return () -- Cut here -- The message is "Stack space overflow: current size 1048576 bytes." Could peekCStringLen be changed so it does not expect stack space proportionate to the input string? I use this method quite a lot for slurping strings in and out, so as it is the situation is inconvenient.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-815511 ] Floating pt. arithmetic bugs / inexplicable inaccuracy, SourceForge.net |
|---|---|
| Next by Date: | RE: peekCString stack overflow, Simon Marlow |
| Previous by Thread: | [ ghc-Bugs-792761 ] rts_getBool: not a Bool, SourceForge.net |
| Next by Thread: | RE: peekCString stack overflow, Simon Marlow |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |