forkProcess does not play well with heap or time profiling
|Reported by:||bennofs||Owned by:||simonmar|
|Type of failure:||Incorrect result at runtime||Test Case:|
|Related Tickets:||Differential Rev(s):|
This is similar to #4512. When doing heap or time profiling, the forked process and the parent process both write to the same .hp or .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.