Skip to content

GHCs json profiling output is not escaped correctly.

Summary

Quoting from stack overflow

JSON is pretty liberal: The only characters you must escape are \, ", and control codes (anything less than U+0020).

But GHC produces strings like:

"arguments": ["E:\ghc_inferTags\_prof\stage1\bin\ghc.exe", "-O", "-fforce-recomp", "Distribution/Compat/Lens.hs"],

Steps to reproduce

Use +RTS -pj on a profiling enabled program.

Expected behavior

The json should be properly escaped.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information