google / google/pprof

Strange mapping at 0 on Mach-O

Open
#409 14 comments 0 reactions 0 assignees View on GitHub
Priority: p3 type: bug
Dominant language
Go
Stars
9.3k
Forks
671
Avg merge
1d 11h
Merged PRs (30d)
10

Description

This is with `master` as of now on OSX. If you create a test as described [here](https://github.com/google/pprof/issues/130#issuecomment-357979679). The code will go to `symbolizer.go` `newMapping()`. It will first call `obj.Open("myexe", 0x100000000, ...)` which is correct because the `__TEXT` segment is mapped there. However it then also tries to call `obj.Open("myexe", 0, ...` which fails because the code assumes you are trying to symbolise things in the `__TEXT` segment. As far as I can see the only thing mapped to 0 is the `__PAGEZERO` segment.

I'm not really sure what is going on here, but something isn't right. It also doesn't seem to cause any obvious issues but maybe I am overlooking something.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.