Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: src/deoptimizer.cc

Issue 7334005: Fix heap corruption and memory leakage in inspection of optimized frames. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index e0651c7cc19ce4a6bf8d5de04bfee581c0ebdf18..175ee6e1fbe1b88a8e1c494b6baefba93a2e487e 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -1445,7 +1445,7 @@ DeoptimizedFrameInfo::DeoptimizedFrameInfo(
SetFunction(output_frame->GetFunction());
expression_count_ = output_frame->GetExpressionCount(deoptimizer);
parameters_count_ = output_frame->ComputeParametersCount();
- parameters_ = new Object*[expression_count_];
+ parameters_ = new Object*[parameters_count_];
for (int i = 0; i < parameters_count_; i++) {
SetParameter(i, output_frame->GetParameter(deoptimizer, i));
}
@@ -1457,7 +1457,8 @@ DeoptimizedFrameInfo::DeoptimizedFrameInfo(
DeoptimizedFrameInfo::~DeoptimizedFrameInfo() {
- delete expression_stack_;
+ delete[] expression_stack_;
+ delete[] parameters_;
}
void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698