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

Side by Side Diff: test/cctest/test-mark-compact.cc

Issue 15096011: Various minor cctest fixes to make ASAN a bit happier. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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
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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 global_handles->AddObjectGroup(NULL, 0, &info); 462 global_handles->AddObjectGroup(NULL, 0, &info);
463 ASSERT(info.has_been_disposed()); 463 ASSERT(info.has_been_disposed());
464 464
465 global_handles->AddImplicitReferences( 465 global_handles->AddImplicitReferences(
466 Handle<HeapObject>::cast(object).location(), NULL, 0); 466 Handle<HeapObject>::cast(object).location(), NULL, 0);
467 } 467 }
468 468
469 469
470 // Here is a memory use test that uses /proc, and is therefore Linux-only. We 470 // Here is a memory use test that uses /proc, and is therefore Linux-only. We
471 // do not care how much memory the simulator uses, since it is only there for 471 // do not care how much memory the simulator uses, since it is only there for
472 // debugging purposes. 472 // debugging purposes. Testing with ASAN doesn't make sense, either.
473 #if defined(__linux__) && !defined(USE_SIMULATOR) 473 #if defined(__linux__) && !defined(USE_SIMULATOR) && \
474 !(defined(__has_feature) && __has_feature(address_sanitizer))
Sven Panne 2013/05/15 08:59:02 I had to do this check slightly different, otherwi
474 475
475 476
476 static uintptr_t ReadLong(char* buffer, intptr_t* position, int base) { 477 static uintptr_t ReadLong(char* buffer, intptr_t* position, int base) {
477 char* end_address = buffer + *position; 478 char* end_address = buffer + *position;
478 uintptr_t result = strtoul(buffer + *position, &end_address, base); 479 uintptr_t result = strtoul(buffer + *position, &end_address, base);
479 CHECK(result != ULONG_MAX || errno != ERANGE); 480 CHECK(result != ULONG_MAX || errno != ERANGE);
480 CHECK(end_address > buffer + *position); 481 CHECK(end_address > buffer + *position);
481 *position = end_address - buffer; 482 *position = end_address - buffer;
482 return result; 483 return result;
483 } 484 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 if (v8::internal::Snapshot::IsEnabled()) { 564 if (v8::internal::Snapshot::IsEnabled()) {
564 CHECK_LE(delta, 2900 * 1024); 565 CHECK_LE(delta, 2900 * 1024);
565 } else { 566 } else {
566 CHECK_LE(delta, 3400 * 1024); 567 CHECK_LE(delta, 3400 * 1024);
567 } 568 }
568 } 569 }
569 } 570 }
570 } 571 }
571 572
572 #endif // __linux__ and !USE_SIMULATOR 573 #endif // __linux__ and !USE_SIMULATOR
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698