Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU profile can produce invalid JSON with Regex function names #178

Closed
robross0606 opened this issue Sep 9, 2024 · 1 comment
Closed

Comments

@robross0606
Copy link

robross0606 commented Sep 9, 2024

When producing a CPU Profile where something like this is declared in the code:

image

The CPU profile is created, but not viewable in N|Solid console. It just hangs on this page forever:
image

Downloading and examining the profile as JSON, we can see the results are corrupted/invalid JSON because it does not properly escape Regex function names:
image
That should be this:
image

Neither N|Solid, nor Chrome Dev Tools nor VSCode, nor any other profile analysis tool can parse the file as generated by N|Solid.

@santigimeno
Copy link
Member

@robross0606 thanks for the report. I think we have a fix but couldn't reproduce the actual issue even by using your Regex. Could you provide a full reproducer? Thanks

santigimeno added a commit that referenced this issue Nov 21, 2024
PR-URL: #179
Fixes: #178
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
santigimeno added a commit that referenced this issue Nov 21, 2024
PR-URL: #179
Fixes: #178
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
santigimeno added a commit that referenced this issue Nov 21, 2024
PR-URL: #179
Fixes: #178
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: #224
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
santigimeno added a commit that referenced this issue Nov 22, 2024
PR-URL: #179
Fixes: #178
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: #225
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants