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

Unified Diff: src/d8.cc

Issue 2732743002: AIX: Work around for malloc(0) behavior (Closed)
Patch Set: fixed as suggested Created 3 years, 9 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 | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 31dc8958efeae7277d89182eac43b44fcc5e4d8e..64349f2761fae47f5e35af8addfcbd46679fd911 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -100,7 +100,13 @@ class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
#if USE_VM
if (RoundToPageSize(&length)) return VirtualMemoryAllocate(length);
#endif
+// 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
+ return __linux_malloc(length);
+#else
return malloc(length);
+#endif
}
virtual void Free(void* data, size_t length) {
#if USE_VM
« no previous file with comments | « no previous file | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698