Skip to content

Commit

Permalink
Allow permission line in /proc/self/map to be "rwx", not just "r-x". At
Browse files Browse the repository at this point in the history
least in Ubuntu14, a binary file that's writable by the process owner
has permission "rwx", not "r-x".
  • Loading branch information
Yaz Saito on W541 committed Apr 11, 2016
1 parent 54581ff commit efa6ecc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/symbolize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,8 @@ OpenObjectFileContainingPcAndGetStartAddress(uint64_t pc,
return -1; // Malformed line.
}

// Check flags. We are only interested in "r-x" maps.
if (memcmp(flags_start, "r-x", 3) != 0) { // Not a "r-x" map.
// Check flags. We are only interested in "r*x" maps.
if (flags_start[0] != 'r' || flags_start[2] != 'x') {
continue; // We skip this map.
}
++cursor; // Skip ' '.
Expand Down

0 comments on commit efa6ecc

Please sign in to comment.