From 39df1a8b20210cb12478cfbd9b897324ee088ef3 Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Fri, 19 Apr 2013 11:55:31 -0700 Subject: [PATCH] Free the VarEnv the correct way detach, rather than destroy. --- hphp/runtime/ext/ext_continuation.cpp | 2 +- hphp/runtime/vm/hhbc.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hphp/runtime/ext/ext_continuation.cpp b/hphp/runtime/ext/ext_continuation.cpp index 510661522..c00d55d5e 100644 --- a/hphp/runtime/ext/ext_continuation.cpp +++ b/hphp/runtime/ext/ext_continuation.cpp @@ -63,7 +63,7 @@ c_Continuation::~c_Continuation() { contLocal->m_type = KindOfNull; if (ar->hasVarEnv()) { - VM::VarEnv::destroy(ar->getVarEnv()); + ar->getVarEnv()->detach(ar); } else { frame_free_locals_inl(ar, m_vmFunc->numLocals()); } diff --git a/hphp/runtime/vm/hhbc.cpp b/hphp/runtime/vm/hhbc.cpp index 3101bd3e1..ea3d7f49b 100644 --- a/hphp/runtime/vm/hhbc.cpp +++ b/hphp/runtime/vm/hhbc.cpp @@ -696,7 +696,7 @@ std::string instrToString(const Opcode* it, const Unit* u /* = NULL */) { #define READOFF() do { \ Offset _value = *(Offset*)it; \ out << " " << _value; \ - if (u != nullptr) { \ + if (u != nullptr && _value >= 0) { \ out << " (" << u->offsetOf(iStart + _value) << ")"; \ } \ it += sizeof(Offset); \