forkProcess does not play well with heap or time profiling
This is similar to #4512 (closed). When doing heap or time profiling, the forked process and the parent process both write to the same
.prof file. I think this also applies to program coverage using hpc (didn't test this).
I was able to reproduce the bug with the attached source code, but some other people were not. Just run
space-profiling +RTS -h and try to convert the generated heap profile using
hp2ps, I get the following error message:
hp2ps: space-profiling.hp, line 186: integer must follow identifier
I attached the generated hp file.