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

Unified Diff: src/platform-linux.cc

Issue 16107002: Prevent segfault if file cannot be opened when --ll_prof is used. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 | « no previous file | src/platform-openbsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-linux.cc
diff --git a/src/platform-linux.cc b/src/platform-linux.cc
index a4d03b0aca49ae2d670ea1963e3ccd11b567cddf..22f2245f487bd9787bc1e97012f0e2fbf393914d 100644
--- a/src/platform-linux.cc
+++ b/src/platform-linux.cc
@@ -591,6 +591,10 @@ void OS::SignalCodeMovingGC() {
// kernel log.
int size = sysconf(_SC_PAGESIZE);
FILE* f = fopen(FLAG_gc_fake_mmap, "w+");
+ if (f == NULL) {
+ OS::PrintError("Failed to open %s\n", FLAG_gc_fake_mmap);
+ OS::Abort();
+ }
void* addr = mmap(OS::GetRandomMmapAddr(),
size,
PROT_READ | PROT_EXEC,
« no previous file with comments | « no previous file | src/platform-openbsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698