Skip to content

runtime/pprof: addr2line does not translate address on mac intel 64bits #6197

@gopherbot

Description

@gopherbot

by arnaud.ysmal:

The current version of addr2line complains about a wrong cpu subtype:
addr2line: crackhdr: bad MACH cpu subtype - not amd64

What steps will reproduce the problem?

1. Run a program with profiling activated
2. Run pprof
3. Request information like top10

Before the pprof prompt, addr2line displays the error message above.
The function names are replaced by their address in the top10


Which operating system are you using?

Mac OS 10.8.4 - amd64

Which version are you using?  (run 'go version')

go version devel +4fa24b4ac2f9 Tue Aug 20 08:21:58 2013 -0700 darwin/amd64

The CPU_SUBTYPE_LIB64 which can be found in /usr/include/mach/machine.h is not used for
checking the cpu subtype.

Proposed correction:
- add MACH_CPU_SUBTYPE_X86_64 in the file libmach/macho.h
- use it in the check in libmach/executable.c line 1079.

Attachments:

  1. fix_addr2line_mach64.patch (816 bytes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeSuggestedIssues that may be good for new contributors looking for work to do.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions