summaryrefslogtreecommitdiffstats
path: root/base/test
diff options
context:
space:
mode:
authormfomitchev <mfomitchev@chromium.org>2015-04-02 08:17:10 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-02 15:17:40 +0000
commitc694b85959b12a1a81785e5fe7a88f3b998f89d0 (patch)
tree9d763083ca196c5b50ced825e85415d318af81f0 /base/test
parent0b2cdd646a2e72c3df158b27974dc9647926d340 (diff)
downloadchromium_src-c694b85959b12a1a81785e5fe7a88f3b998f89d0.zip
chromium_src-c694b85959b12a1a81785e5fe7a88f3b998f89d0.tar.gz
chromium_src-c694b85959b12a1a81785e5fe7a88f3b998f89d0.tar.bz2
Revert of Fix OutOfMemoryDeathTest.ViaSharedLibraries. (patchset #10 id:180001 of https://codereview.chromium.org/878473002/)
Reason for revert: Looks like this broke iOS_Device bot: === BUILD TARGET malloc_wrapper OF PROJECT base WITH CONFIGURATION Release === Check dependencies CodeSign error: code signing is required for product type 'Dynamic Library' in SDK 'iOS 8.1' https://build.chromium.org/p/chromium.mac/builders/iOS_Device/builds/1689/steps/compile/logs/stdio Original issue's description: > Fix OutOfMemoryDeathTest.ViaSharedLibraries. > > This test was invalid on modern glibc: > asprintf errors EOVERFLOW without attempting an allocation > when the size is at least INT_MAX - 32. INT_MAX - 33 is the > largest size that can attempt to trigger allocation failure, > and will not necessarily accomplish that on some systems. > > Create a library that is specified to wrap malloc trivially, > to accomplish the goal of the test without external dependencies > or inconsistently implemented behavior. > > BUG=428211 > > Committed: https://crrev.com/82cb6b003c8e20e4a8386bf8698980bb4981d434 > Cr-Commit-Position: refs/heads/master@{#323197} TBR=gunsch@chromium.org,shess@chromium.org,mark@chromium.org,danakj@chromium.org,icoolidge@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=428211 Review URL: https://codereview.chromium.org/1050423002 Cr-Commit-Position: refs/heads/master@{#323491}
Diffstat (limited to 'base/test')
-rw-r--r--base/test/BUILD.gn10
-rw-r--r--base/test/malloc_wrapper.cc11
-rw-r--r--base/test/malloc_wrapper.h21
3 files changed, 0 insertions, 42 deletions
diff --git a/base/test/BUILD.gn b/base/test/BUILD.gn
index b94a4c7..c4356cb 100644
--- a/base/test/BUILD.gn
+++ b/base/test/BUILD.gn
@@ -183,16 +183,6 @@ source_set("run_all_unittests") {
]
}
-shared_library("malloc_wrapper") {
- testonly = true
- sources = [
- "malloc_wrapper.cc",
- ]
- deps = [
- "//base",
- ]
-}
-
if (is_android) {
generate_jni("base_unittests_jni_headers") {
sources = [
diff --git a/base/test/malloc_wrapper.cc b/base/test/malloc_wrapper.cc
deleted file mode 100644
index eb280a3..0000000
--- a/base/test/malloc_wrapper.cc
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "malloc_wrapper.h"
-
-#include <stdlib.h>
-
-void* MallocWrapper(size_t size) {
- return malloc(size);
-}
diff --git a/base/test/malloc_wrapper.h b/base/test/malloc_wrapper.h
deleted file mode 100644
index 0fa7dbb..0000000
--- a/base/test/malloc_wrapper.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_TEST_MALLOC_WRAPPER_H_
-#define BASE_TEST_MALLOC_WRAPPER_H_
-
-#include "base/basictypes.h"
-
-// BASE_EXPORT depends on COMPONENT_BUILD.
-// This will always be a separate shared library, so don't use BASE_EXPORT here.
-#if defined(WIN32)
-#define MALLOC_WRAPPER_EXPORT __declspec(dllexport)
-#else
-#define MALLOC_WRAPPER_EXPORT __attribute__((visibility("default")))
-#endif // defined(WIN32)
-
-// Calls malloc directly.
-MALLOC_WRAPPER_EXPORT void* MallocWrapper(size_t size);
-
-#endif // BASE_TEST_MALLOC_WRAPPER_H_