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

Unified Diff: test/cctest/wasm/wasm-run-utils.h

Issue 2732743002: AIX: Work around for malloc(0) behavior (Closed)
Patch Set: Created 3 years, 10 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/d8.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/wasm-run-utils.h
diff --git a/test/cctest/wasm/wasm-run-utils.h b/test/cctest/wasm/wasm-run-utils.h
index fe9bbe9a2f55fa03c0b489b16304e91941ce1fb8..4a7e2972daca4c9800d754b95abcb580b40cd75a 100644
--- a/test/cctest/wasm/wasm-run-utils.h
+++ b/test/cctest/wasm/wasm-run-utils.h
@@ -109,7 +109,13 @@ class TestingModule : public ModuleEnv {
CHECK_NULL(instance->mem_start);
CHECK_EQ(0, instance->mem_size);
module_.has_memory = true;
+// Work around for GCC bug on AIX
+// See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79839
+#if V8_OS_AIX && _LINUX_SOURCE_COMPAT
titzer 2017/03/04 23:29:56 What about changing the CHECK() below to be CHECK(
JaideepBajwa 2017/03/05 05:11:03 should the CHECK() be: CHECK(size == 0 || instance
JaideepBajwa 2017/03/06 22:35:26 Done.
+ instance->mem_start = reinterpret_cast<byte*>(__linux_malloc(size));
+#else
instance->mem_start = reinterpret_cast<byte*>(malloc(size));
+#endif
CHECK(instance->mem_start);
memset(instance->mem_start, 0, size);
instance->mem_size = size;
« no previous file with comments | « src/d8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698