diff --git a/src/python/embedded.cc b/src/python/embedded.cc index 27bf770a4a..4b129dd138 100644 --- a/src/python/embedded.cc +++ b/src/python/embedded.cc @@ -45,10 +45,10 @@ #include +#include +#include #include -#include "base/logging.hh" - namespace py = pybind11; namespace gem5 @@ -78,8 +78,10 @@ EmbeddedPython::getCode() const Bytef marshalled[len]; uLongf unzlen = len; int ret = uncompress(marshalled, &unzlen, (const Bytef *)code, zlen); - if (ret != Z_OK) - panic("Could not uncompress code: %s\n", zError(ret)); + if (ret != Z_OK) { + std::cerr << "Could not uncompress code: " << zError(ret) << std::endl; + std::abort(); + } assert(unzlen == (uLongf)len); auto marshal = py::module_::import("marshal");