Opened 10 years ago

Last modified 9 years ago

#2097 closed merge

bug in regEnumKeys (System.Win32.Registry) — at Version 2

Reported by: MagnusTherning Owned by:
Priority: normal Milestone: 6.8.3
Component: libraries (other) Version: 6.8.2
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by igloo)

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"]

Change History (2)

comment:1 Changed 10 years ago by MagnusTherning

Hmm, I didn't really intend the code to look like that. I've stuck it in hpaste:

Hopefully it'll survive there long enough.

comment:2 Changed 10 years ago by igloo

Description: modified (diff)
difficulty: Unknown
Note: See TracTickets for help on using tickets.