#2097: bug in regEnumKeys (System.Win32.Registry)
-------------------------------+--------------------------------------------
Reporter: MagnusTherning | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries (other) | Version: 6.8.2
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Windows |
-------------------------------+--------------------------------------------
Changes (by igloo):
* difficulty: => Unknown
Old description:
> The following code throws a segmentation fault:
>
> module Main where
>
> import System.Win32.Registry
>
> listRegistry p = do
> putStrLn $ "HKLM\\" ++ p
> hkey <- regOpenKey hKEY_LOCAL_MACHINE p
> sub_paths <- regEnumKeys hkey
> let full_subs = map ((p ++ "\\") ++) sub_paths
> mapM_ listRegistry full_subs
>
> main = do
> mapM_ listRegistry ["SOFTWARE\\JavaSoft"]
New description:
The following code throws a segmentation fault:
{{{
module Main where
import System.Win32.Registry
listRegistry p = do
putStrLn $ "HKLM\\" ++ p
hkey <- regOpenKey hKEY_LOCAL_MACHINE p
sub_paths <- regEnumKeys hkey
let full_subs = map ((p ++ "\\") ++) sub_paths
mapM_ listRegistry full_subs
main = do
mapM_ listRegistry ["SOFTWARE\\JavaSoft"]
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2097#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs