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

Unified Diff: vm/globals.h

Issue 8555024: - Avoid allocating variable length arrays on the stack. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 1 month 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 | « bin/process_macos.cc ('k') | vm/port.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/globals.h
===================================================================
--- vm/globals.h (revision 1537)
+++ vm/globals.h (working copy)
@@ -315,7 +315,9 @@
inline D bit_copy(const S& source) {
D destination;
// This use of memcpy is safe: source and destination cannot overlap.
- memcpy(&destination, &source, sizeof(destination));
+ memcpy(&destination,
+ reinterpret_cast<const void*>(&source),
+ sizeof(destination));
return destination;
}
« no previous file with comments | « bin/process_macos.cc ('k') | vm/port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698