krime / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

GetProcedureBoundaries will (almost) never use ``nm --demangle'' #698

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This issue exists in gperftools 2.4 but is probably release-agnostic.

In GetProcedureBoundaries, several external calls are made to nm. I believe the 
first of these (line 5249 in gperftools 2.4) contains a typo. The third 
argument to ShellEscape is the string "image," implying that nm is called on a 
file in the cwd named "image." 

This is in opposition to all other calls to nm in the same subroutine, which 
call nm with the value contained in "$image." 

Unless you happen to have the appropriate file named "image" in your cwd, the 
result is that the "--demangle" flag will never be set and pprof will never use 
nm with the "--demangle" argument.

Original issue reported on code.google.com by HiK...@gmail.com on 14 Jul 2015 at 5:18