Skip to content

Commit

Permalink
fix heap snapshot is valid char check
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Apr 7, 2024
1 parent 821c608 commit cdf61db
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion stdlib/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
version = "1.11.0"

[[deps.Profile]]
deps = ["Unicode"]
uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
version = "1.11.0"

Expand Down
6 changes: 0 additions & 6 deletions stdlib/Profile/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ name = "Profile"
uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
version = "1.11.0"

[deps]
Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[compat]
Unicode = "1.11.0"

[extras]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Expand Down
4 changes: 1 addition & 3 deletions stdlib/Profile/src/heapsnapshot_reassemble.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

module HeapSnapshot

using Unicode

"""
assemble_snapshot(filepath::AbstractString, out_file::AbstractString)
Expand Down Expand Up @@ -236,7 +234,7 @@ function print_str_escape_json(stream::IO, s::AbstractString)
print(stream, "\\t")
elseif '\x00' <= c <= '\x1f'
print(stream, "\\u", lpad(string(UInt16(c), base=16), 4, '0'))
elseif !Unicode.isassigned(c)
elseif !isvalid(c)
# we have to do this because vscode's viewer doesn't like the replace character
print(stream, "[invalid unicode character]")
else
Expand Down

0 comments on commit cdf61db

Please sign in to comment.