Message from discussion
Fix memory leak in RegExpStack. (issue 11275037)
Received: by 10.224.105.205 with SMTP id u13mr2566083qao.6.1351162867070;
Thu, 25 Oct 2012 04:01:07 -0700 (PDT)
X-BeenThere: v8-dev@googlegroups.com
Received: by 10.224.210.4 with SMTP id gi4ls3424890qab.2.gmail; Thu, 25 Oct
2012 04:01:06 -0700 (PDT)
Received: by 10.224.223.14 with SMTP id ii14mr9998639qab.3.1351162866210;
Thu, 25 Oct 2012 04:01:06 -0700 (PDT)
Received: by 10.224.223.14 with SMTP id ii14mr9998638qab.3.1351162866197;
Thu, 25 Oct 2012 04:01:06 -0700 (PDT)
Return-Path: <38huJUBUJANc5AKHFBNF5H67K7OB7P-AK9F3BE....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com>
Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197])
by gmr-mx.google.com with ESMTPS id f17si849145qck.1.2012.10.25.04.01.06
(version=TLSv1/SSLv3 cipher=OTHER);
Thu, 25 Oct 2012 04:01:06 -0700 (PDT)
Received-SPF: pass (google.com: domain of 38huJUBUJANc5AKHFBNF5H67K7OB7P-AK9F3BE....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com designates 209.85.216.197 as permitted sender) client-ip=209.85.216.197;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of 38huJUBUJANc5AKHFBNF5H67K7OB7P-AK9F3BE....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com designates 209.85.216.197 as permitted sender) smtp.mail=38huJUBUJANc5AKHFBNF5H67K7OB7P-AK9F3BE....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com
Received: by mail-qc0-f197.google.com with SMTP id x40so2098914qcs.8
for <v8-dev@googlegroups.com>; Thu, 25 Oct 2012 04:01:06 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.59.0.194 with SMTP id ba2mr7727180ved.19.1351162866102; Thu,
25 Oct 2012 04:01:06 -0700 (PDT)
Reply-To: u...@chromium.org, yang...@chromium.org, v8-dev@googlegroups.com
Message-ID: <047d7bf0d70aaaf19504cce01eb3@google.com>
Date: Thu, 25 Oct 2012 11:01:06 +0000
Subject: Fix memory leak in RegExpStack. (issue 11275037)
From: u...@chromium.org
To: yang...@chromium.org
Cc: v8-dev@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
Reviewers: Yang,
Message:
PTAL
Description:
Fix memory leak in RegExpStack.
R=yang...@chromium.org
Please review this at https://chromiumcodereview.appspot.com/11275037/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/regexp-stack.cc
Index: src/regexp-stack.cc
diff --git a/src/regexp-stack.cc b/src/regexp-stack.cc
index
ff9547f3a711ed0f44126aa624d421b734178bb8..fda7253edcee150a6cac9668e0f9db726bd135ce
100644
--- a/src/regexp-stack.cc
+++ b/src/regexp-stack.cc
@@ -72,7 +72,7 @@ char* RegExpStack::RestoreStack(char* from) {
void RegExpStack::Reset() {
- if (thread_local_.memory_size_ > kMinimumStackSize) {
+ if (thread_local_.memory_size_ >= kMinimumStackSize) {
DeleteArray(thread_local_.memory_);
thread_local_ = ThreadLocal();
}