From cd3674101046f7f032fe60f55e7c9027bd93b79e Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 29 May 2014 17:04:23 -0700 Subject: [PATCH] Bug 1017911 - DMD: don't use alloca(), because it's a pain to get working on multiple platforms. r=mccr8. DONTBUILD because DMD is NPOTB. --HG-- extra : rebase_source : 0b400b76583032f30a9a4b8c935b03c015fc9772 --- memory/replace/dmd/DMD.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/memory/replace/dmd/DMD.cpp b/memory/replace/dmd/DMD.cpp index 7310f528a725..bdbec07a0484 100644 --- a/memory/replace/dmd/DMD.cpp +++ b/memory/replace/dmd/DMD.cpp @@ -6,7 +6,6 @@ #include "DMD.h" -#include #include #include #include @@ -179,9 +178,10 @@ StatusMsg(const char* aFmt, ...) __android_log_vprint(ANDROID_LOG_INFO, "DMD", aFmt, ap); #else // The +64 is easily enough for the "DMD[] " prefix and the NUL. - char* fmt = (char*) alloca(strlen(aFmt) + 64); + char* fmt = (char*) InfallibleAllocPolicy::malloc_(strlen(aFmt) + 64); sprintf(fmt, "DMD[%d] %s", getpid(), aFmt); vfprintf(stderr, fmt, ap); + InfallibleAllocPolicy::free_(fmt); #endif va_end(ap); }