Skip to content

Segmentation fault on "DynFlags" "rawSettings" field #16

@bitc

Description

@bitc

When I run anythingToString on DynFlags (from GHC api) I get a crash.

Specifically, the problem is with the "rawSettings" field. This is interesting because the type of "rawSettings" is [(String, String)]

Doing a regular print works fine, but anythingToString causes a segfault. I tried running through GDB but did not get any useful backtrace or extra helpful information.

All the other fields of DynFlags work great with anythingToString

test :: DynFlags -> IO ()
test df = do
  print (rawSettings df)                          -- This successfully prints the value
  putStrLn (anythingToString (rawSettings df))    -- This  crashes

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions