Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3209)

Unified Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 7714018: Give plug-in processes an executable heap and disable PIE/ASLR for Native (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/memory_details_mac.cc ('k') | chrome/browser/service/service_process_control.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/nacl_host/nacl_process_host.cc
===================================================================
--- chrome/browser/nacl_host/nacl_process_host.cc (revision 97969)
+++ chrome/browser/nacl_host/nacl_process_host.cc (working copy)
@@ -145,7 +145,22 @@
#endif // defined(OS_POSIX)
// Build command line for nacl.
- FilePath exe_path = GetChildPath(nacl_loader_prefix.empty());
+
+#if defined(OS_MACOSX)
+ // The Native Client process needs to be able to allocate a 1GB contiguous
+ // region to use as the client environment's virtual address space. ASLR
+ // (PIE) interferes with this by making it possible that no gap large enough
+ // to accomodate this request will exist in the child process' address
+ // space. Disable PIE for NaCl processes. See http://crbug.com/90221 and
+ // http://code.google.com/p/nativeclient/issues/detail?id=2043.
+ int flags = CHILD_NO_PIE;
+#elif defined(OS_LINUX)
+ int flags = nacl_loader_prefix.empty() ? CHILD_ALLOW_SELF : CHILD_NORMAL;
+#else
+ int flags = CHILD_NORMAL;
+#endif
+
+ FilePath exe_path = GetChildPath(flags);
if (exe_path.empty())
return false;
« no previous file with comments | « chrome/browser/memory_details_mac.cc ('k') | chrome/browser/service/service_process_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698