Index: src/platform-openbsd.cc |
diff --git a/src/platform-openbsd.cc b/src/platform-openbsd.cc |
index 380c15f21a3abd56ffde7d81c31a7e3c6b9532bc..0a7cc80f3db1538a1b65be5b4ff21a549c3d16ad 100644 |
--- a/src/platform-openbsd.cc |
+++ b/src/platform-openbsd.cc |
@@ -344,6 +344,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(NULL, size, PROT_READ | PROT_EXEC, MAP_PRIVATE, |
fileno(f), 0); |
ASSERT(addr != MAP_FAILED); |