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, |