Subzero: Fix a memory leak. The problem was that Translator and subclasses need to have virtual destructors since they are used as unique_ptr<>. As a result, only the Translator base class destructor was being invoked. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4290 TEST= make -f Makefile.standalone ASAN=1 check-lit R=ascull@google.com Review URL: https://codereview.chromium.org/1281003003.
diff --git a/src/PNaClTranslator.h b/src/PNaClTranslator.h index b6286e8..24a627b 100644 --- a/src/PNaClTranslator.h +++ b/src/PNaClTranslator.h
@@ -34,6 +34,7 @@ public: explicit PNaClTranslator(GlobalContext *Ctx) : Translator(Ctx) {} + ~PNaClTranslator() override = default; /// Reads the PNaCl bitcode file and translates to ICE, which is then /// converted to machine code. Sets ErrorStatus to 1 if any errors