[Linux] Patch LogSharedLibraryAddresses to work correctly on Android.
On 'usual' Linux systems in '/proc/self/maps' we encounter two entries per library: one has 'rw-p' attrs and the other has 'r-xp'. While on Android, I see 'rwxp' and 'r-xp' (both entries are marked executable.) So I've added an explicit check for non-writability to leave only a single record in the log file. Review URL: http://codereview.chromium.org/661467 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
af3fc27613
commit
6df83af604
@ -331,8 +331,8 @@ void OS::LogSharedLibraryAddresses() {
|
||||
if (fscanf(fp, " %c%c%c%c", &attr_r, &attr_w, &attr_x, &attr_p) != 4) break;
|
||||
|
||||
int c;
|
||||
if (attr_r == 'r' && attr_x == 'x') {
|
||||
// Found a readable and executable entry. Skip characters until we reach
|
||||
if (attr_r == 'r' && attr_w != 'w' && attr_x == 'x') {
|
||||
// Found a read-only executable entry. Skip characters until we reach
|
||||
// the beginning of the filename or the end of the line.
|
||||
do {
|
||||
c = getc(fp);
|
||||
|
Loading…
Reference in New Issue
Block a user