Skip to content

Commit

Permalink
check that zero entry actually looks like block end (fix linux32)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Sep 2, 2021
1 parent 973a3f6 commit 21a73b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stdlib/Profile/src/Profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,10 @@ function fetch(;include_meta = false)
i = length(data)
while i > 0 && j > 0
data_stripped[j] = data[i]
if data[i] == 0
if i > 1 && data[i] == 0 && in(data[i - 1], [1,2])
# detect block end and skip over metadata fields
# linux 32 has been seen to have rogue ips equal to 0 so also check for the previous entry looking like an idle
# state metadata entry which can only be 1 or 2
i -= nmeta
end
i -= 1
Expand Down

0 comments on commit 21a73b4

Please sign in to comment.