Opened 6 years ago

Closed 6 years ago

#5800 closed bug (fixed)

hp2ps produces unescaped backslashes for nested functions

Reported by: jkff Owned by:
Priority: normal Milestone: 7.4.2
Component: Profiling Version: 7.4.1-rc1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect result at runtime Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


ghc 7.4, when compiling with -prof -auto-all, includes nested functions as cost centres, sometimes including backslashes - e.g. it called one of my functions "foo.go.\" in the profiling output.

hp2ps, in the file Key.c, function KeyEntry, does not escape backslashes in the 'name' parameter.

As a result, the ps file will contain an incorrect or unterminated string, causing it to be non-displayable or non-convertible to pdf.

Change History (4)

comment:1 Changed 6 years ago by igloo

difficulty: Unknown
Milestone: 7.4.2

Thanks for the report.

comment:2 Changed 6 years ago by p.capriotti@…

commit ee8bf699516dd8e603e26a7c862538e83da2c250

Author: Paolo Capriotti <>
Date:   Thu Mar 22 20:16:27 2012 +0000

    hp2ps: escape backslashes when generating output file (#5800).

 utils/hp2ps/Key.c |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

comment:3 Changed 6 years ago by pcapriotti

Status: newmerge

comment:4 Changed 6 years ago by pcapriotti

Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.