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

Unified Diff: src/platform-posix.cc

Issue 6765027: Fix strict-aliasing violation in compilation of r7437. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | « src/ia32/codegen-ia32.cc ('k') | src/platform-win32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index 8365352d64aff63329d5cd94b828ee452b957129..9cf8b57e178304096b42fa70f3d1fddd19db9569 100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -217,8 +217,9 @@ void OS::MemCopy(void* dest, const void* src, size_t size) {
ScopedLock lock(memcopy_function_mutex);
Isolate::EnsureDefaultIsolate();
if (memcopy_function == NULL) {
- Release_Store(reinterpret_cast<AtomicWord*>(&memcopy_function),
- reinterpret_cast<AtomicWord>(CreateMemCopyFunction()));
+ OS::MemCopyFunction temp = CreateMemCopyFunction();
+ MemoryBarrier();
+ memcopy_function = temp;
}
}
(*memcopy_function)(dest, src, size);
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698