diff --git a/hphp/runtime/vm/runtime-compiler.cpp b/hphp/runtime/vm/runtime-compiler.cpp index 39e570f238b6c0..a9d3d5b9df3a43 100644 --- a/hphp/runtime/vm/runtime-compiler.cpp +++ b/hphp/runtime/vm/runtime-compiler.cpp @@ -44,6 +44,7 @@ #include "hphp/zend/zend-string.h" #include "unit-emitter.h" +#include #include #include @@ -259,6 +260,10 @@ Unit* get_systemlib(const std::string& path, const Extension* extension) { auto buffer = get_embedded_section(path+".ue"); + if (buffer.empty()) { + throw std::invalid_argument("Missing systemlib unit emitter for path: " + path); + } + UnitEmitterSerdeWrapper uew; BlobDecoder decoder(buffer.data(), buffer.size()); uew.serde(decoder, extension);