Skip to content

-Yprofile-trace doesn't correctly escape output #21858

Closed
@mrdziuban

Description

@mrdziuban

Compiler version

3.6.2-RC1-bin-20241028-a3786a5-NIGHTLY

Minimized code

Compiling this code with -Yprofile-enabled -Yprofile-trace test.trace

class /\

Output

Results in a test.trace file that contains invalid JSON since the backslash in class /\ is not escaped:

{"cat":"typecheck","name":"class /\","ph":"E","pid":"22181-00129","tid":"00129","ts":2132512955562}

Expectation

The backslash should be escaped with another backslash, i.e.

{"cat":"typecheck","name":"class /\\","ph":"E","pid":"22181-00129","tid":"00129","ts":2132512955562}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions