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

Side by Side Diff: src/platform-posix.cc

Issue 212723003: MSan does not understand inline asm. This change preinitializes cpuid (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/atomicops_internals_x86_gcc.cc ('k') | src/v8utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 207 }
208 208
209 209
210 void* OS::GetRandomMmapAddr() { 210 void* OS::GetRandomMmapAddr() {
211 #if V8_OS_NACL 211 #if V8_OS_NACL
212 // TODO(bradchen): restore randomization once Native Client gets 212 // TODO(bradchen): restore randomization once Native Client gets
213 // smarter about using mmap address hints. 213 // smarter about using mmap address hints.
214 // See http://code.google.com/p/nativeclient/issues/3341 214 // See http://code.google.com/p/nativeclient/issues/3341
215 return NULL; 215 return NULL;
216 #endif 216 #endif
217 #if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \
218 defined(THREAD_SANITIZER)
219 // Dynamic tools do not support custom mmap addresses.
220 return NULL;
221 #endif
217 Isolate* isolate = Isolate::UncheckedCurrent(); 222 Isolate* isolate = Isolate::UncheckedCurrent();
218 // Note that the current isolate isn't set up in a call path via 223 // Note that the current isolate isn't set up in a call path via
219 // CpuFeatures::Probe. We don't care about randomization in this case because 224 // CpuFeatures::Probe. We don't care about randomization in this case because
220 // the code page is immediately freed. 225 // the code page is immediately freed.
221 if (isolate != NULL) { 226 if (isolate != NULL) {
222 uintptr_t raw_addr; 227 uintptr_t raw_addr;
223 isolate->random_number_generator()->NextBytes(&raw_addr, sizeof(raw_addr)); 228 isolate->random_number_generator()->NextBytes(&raw_addr, sizeof(raw_addr));
224 #if V8_TARGET_ARCH_X64 229 #if V8_TARGET_ARCH_X64
225 // Currently available CPUs have 48 bits of virtual addressing. Truncate 230 // Currently available CPUs have 48 bits of virtual addressing. Truncate
226 // the hint address to 46 bits to give the kernel a fighting chance of 231 // the hint address to 46 bits to give the kernel a fighting chance of
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 806
802 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 807 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
803 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); 808 pthread_key_t pthread_key = LocalKeyToPthreadKey(key);
804 int result = pthread_setspecific(pthread_key, value); 809 int result = pthread_setspecific(pthread_key, value);
805 ASSERT_EQ(0, result); 810 ASSERT_EQ(0, result);
806 USE(result); 811 USE(result);
807 } 812 }
808 813
809 814
810 } } // namespace v8::internal 815 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/atomicops_internals_x86_gcc.cc ('k') | src/v8utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698