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

Unified Diff: src/trusted/service_runtime/sel_main_chrome.c

Issue 11743028: Partly change IRT load-skipping to be explicit. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 years, 12 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
Index: src/trusted/service_runtime/sel_main_chrome.c
diff --git a/src/trusted/service_runtime/sel_main_chrome.c b/src/trusted/service_runtime/sel_main_chrome.c
index de792653e75d0dba4d22e5d9e71e20abe6affeea..9f8568408f6515a26bc34ffd93d120e5312bce90 100644
--- a/src/trusted/service_runtime/sel_main_chrome.c
+++ b/src/trusted/service_runtime/sel_main_chrome.c
@@ -308,17 +308,17 @@ void NaClChromeMainStart(struct NaClChromeMainArgs *args) {
* Load the integrated runtime (IRT) library.
* We check if there is a segment gap before trying to load the IRT. This
* is to support IRT-less / segment-gap-free PNaCl translator nexes.
- * TODO(mseaborn): Plumb through a flag from Chrome in such cases,
- * instead of looking for the absence of a segment gap, when the nexe does
- * not follow NaCl's stable ABI.
+ * TODO(mseaborn): Instead of looking for the absence of a segment gap,
Mark Seaborn 2013/01/03 23:36:40 You can change this to TODO(jvoung) if you're goin
jvoung (off chromium) 2013/01/04 00:05:31 Done.
+ * only allow irt_fd == -1, when the nexe does not follow NaCl's stable ABI.
*/
- if (NULL != nap->text_shm) {
+ if (NULL != nap->text_shm && args->irt_fd != -1) {
NaClLoadIrt(nap, args->irt_fd);
} else {
NaClLog(
LOG_WARNING,
- "Main executable has no segment gap; skipping loading IRT library. "
- "This is expected for PNaCl's translator nexes.\n");
+ "Main executable has no segment gap or irt_fd == -1; "
Mark Seaborn 2013/01/03 23:36:40 You should probably drop this log message, or chan
jvoung (off chromium) 2013/01/04 00:05:31 Done.
+ "skipping loading IRT library. This is expected for PNaCl's "
+ "translator nexes.\n");
}
NACL_FI_FATAL("BeforeEnvCleanserCtor");

Powered by Google App Engine
This is Rietveld 408576698