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

Unified Diff: test/unittests/wasm/encoder-unittest.cc

Issue 2355803002: [wasm] Fix EnsureSpace in the ZoneBuffer of the wasm encoder. (Closed)
Patch Set: Created 4 years, 3 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 | « src/wasm/encoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/wasm/encoder-unittest.cc
diff --git a/test/unittests/wasm/encoder-unittest.cc b/test/unittests/wasm/encoder-unittest.cc
index 47885e697d243c3e15772c12cbaf9df979214cfe..4e51aa65f13080eac3287a397f878d13811854cd 100644
--- a/test/unittests/wasm/encoder-unittest.cc
+++ b/test/unittests/wasm/encoder-unittest.cc
@@ -23,6 +23,14 @@ class EncoderTest : public TestWithZone {
}
};
+TEST_F(EncoderTest, Regression_647329) {
+ // Test crashed with asan.
+ ZoneBuffer buffer(zone());
+ const size_t kSize = ZoneBuffer::kInitialSize * 3 + 4096 + 100;
+ byte data[kSize];
+ buffer.write(data, kSize);
+}
+
} // namespace wasm
} // namespace internal
} // namespace v8
« no previous file with comments | « src/wasm/encoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698