Skip to content

Commit

Permalink
Revert "Roll abseil_revision 6f43f5bb39..ac1398a629"
Browse files Browse the repository at this point in the history
This reverts commit bc68aae.

Reason for revert:
Findit (https://goo.gl/kROfz5) identified this CL at revision bc68aae as
the culprit for failures in the continuous build including:

Sample Failed Build: https://ci.chromium.org/b/8816977941746529473
Sample Failed Step: compile

If it is a false positive, please report it at https://bugs.chromium.org/p/chromium/issues/entry?status=Available&comment=Datastore+key+for+the+culprit+entity%3A+chromium.googlesource.com%2Fchromium%2Fsrc%2Frefs%2Fheads%2Fmain%2Fbc68aae6ef97ee96e259624e9da08695bd0f6418&labels=Test-Findit-Wrong&components=Tools%3ETest%3EFindIt&summary=Wrongly+blame+bc68aae6ef97ee96e259624e9da08695bd0f6418

Original change's description:
> Roll abseil_revision 6f43f5bb39..ac1398a629
> 
> Change Log:
> https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+log/6f43f5bb39..ac1398a629
> Full diff:
> https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+/6f43f5bb39..ac1398a629
> 
> Bug: None
> Change-Id: I395e05b2cf3d03582b76d94f14ab9a194a457e9a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3582132
> Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
> Commit-Queue: Danil Chapovalov <danilchap@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#992066}


Change-Id: Id2730d0a553f198518af16767fcf3c7621203698
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3586282
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Owners-Override: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#992356}
  • Loading branch information
Findit authored and Chromium LUCI CQ committed Apr 14, 2022
1 parent 683caaa commit 74fa7b0
Show file tree
Hide file tree
Showing 29 changed files with 272 additions and 232 deletions.
3 changes: 2 additions & 1 deletion third_party/abseil-cpp/CMake/AbseilDll.cmake
Expand Up @@ -90,6 +90,7 @@ set(ABSL_INTERNAL_DLL_FILES
"debugging/failure_signal_handler.cc"
"debugging/failure_signal_handler.h"
"debugging/leak_check.h"
"debugging/leak_check_disable.cc"
"debugging/stacktrace.cc"
"debugging/stacktrace.h"
"debugging/symbolize.cc"
Expand Down Expand Up @@ -344,7 +345,6 @@ set(ABSL_INTERNAL_DLL_FILES
"types/internal/span.h"
"types/variant.h"
"utility/utility.h"
"debugging/leak_check.cc"
)

set(ABSL_INTERNAL_DLL_TARGETS
Expand All @@ -355,6 +355,7 @@ set(ABSL_INTERNAL_DLL_TARGETS
"debugging_internal"
"demangle_internal"
"leak_check"
"leak_check_disable"
"stack_consumption"
"debugging"
"hash"
Expand Down
2 changes: 1 addition & 1 deletion third_party/abseil-cpp/README.chromium
Expand Up @@ -4,7 +4,7 @@ URL: https://github.com/abseil/abseil-cpp
License: Apache 2.0
License File: LICENSE
Version: 0
Revision: ac1398a6296de03413d7b88df4b4aa16e9e450cc
Revision: 6f43f5bb398b6685575b36874e36cf1695734df1
Security Critical: yes

Description:
Expand Down
17 changes: 0 additions & 17 deletions third_party/abseil-cpp/absl/base/config.h
Expand Up @@ -797,27 +797,10 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
// ABSL_HAVE_LEAK_SANITIZER
//
// LeakSanitizer (or lsan) is a detector of memory leaks.
// https://clang.llvm.org/docs/LeakSanitizer.html
// https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer
//
// The macro ABSL_HAVE_LEAK_SANITIZER can be used to detect at compile-time
// whether the LeakSanitizer is potentially available. However, just because the
// LeakSanitizer is available does not mean it is active. Use the
// always-available run-time interface in //absl/debugging/leak_check.h for
// interacting with LeakSanitizer.
#ifdef ABSL_HAVE_LEAK_SANITIZER
#error "ABSL_HAVE_LEAK_SANITIZER cannot be directly set."
#elif defined(LEAK_SANITIZER)
// GCC provides no method for detecting the presense of the standalone
// LeakSanitizer (-fsanitize=leak), so GCC users of -fsanitize=leak should also
// use -DLEAK_SANITIZER.
#define ABSL_HAVE_LEAK_SANITIZER 1
// Clang standalone LeakSanitizer (-fsanitize=leak)
#elif ABSL_HAVE_FEATURE(leak_sanitizer)
#define ABSL_HAVE_LEAK_SANITIZER 1
#elif defined(ABSL_HAVE_ADDRESS_SANITIZER)
// GCC or Clang using the LeakSanitizer integrated into AddressSanitizer.
#define ABSL_HAVE_LEAK_SANITIZER 1
#endif

// ABSL_HAVE_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
Expand Down
23 changes: 0 additions & 23 deletions third_party/abseil-cpp/absl/base/internal/invoke.h
Expand Up @@ -14,8 +14,6 @@
//
// absl::base_internal::invoke(f, args...) is an implementation of
// INVOKE(f, args...) from section [func.require] of the C++ standard.
// When compiled as C++17 and later versions, it is implemented as an alias of
// std::invoke.
//
// [func.require]
// Define INVOKE (f, t1, t2, ..., tN) as follows:
Expand All @@ -37,25 +35,6 @@
#ifndef ABSL_BASE_INTERNAL_INVOKE_H_
#define ABSL_BASE_INTERNAL_INVOKE_H_

#include "absl/base/config.h"

#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)

#include <functional>

namespace absl {
ABSL_NAMESPACE_BEGIN
namespace base_internal {

using std::invoke;
using std::invoke_result_t;

} // namespace base_internal
ABSL_NAMESPACE_END
} // namespace absl

#else // __cplusplus >= 201703L

#include <algorithm>
#include <type_traits>
#include <utility>
Expand Down Expand Up @@ -205,6 +184,4 @@ invoke_result_t<F, Args...> invoke(F&& f, Args&&... args) {
ABSL_NAMESPACE_END
} // namespace absl

#endif // __cplusplus >= 201703L

#endif // ABSL_BASE_INTERNAL_INVOKE_H_
1 change: 1 addition & 0 deletions third_party/abseil-cpp/absl/base/internal/sysinfo.cc
Expand Up @@ -124,6 +124,7 @@ int Win32NumCPUs() {

} // namespace


static int GetNumCPUs() {
#if defined(__myriad2__)
return 1;
Expand Down
10 changes: 10 additions & 0 deletions third_party/abseil-cpp/absl/copts/AbseilConfigureCopts.cmake
@@ -1,6 +1,8 @@
# See absl/copts/copts.py and absl/copts/generate_copts.py
include(GENERATED_AbseilCopts)

set(ABSL_LSAN_LINKOPTS "")
set(ABSL_HAVE_LSAN OFF)
set(ABSL_DEFAULT_LINKOPTS "")

if (BUILD_SHARED_LIBS AND MSVC)
Expand Down Expand Up @@ -83,6 +85,14 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") # MATCHES so we get both Clang an
else()
set(ABSL_DEFAULT_COPTS "${ABSL_LLVM_FLAGS}")
set(ABSL_TEST_COPTS "${ABSL_LLVM_FLAGS};${ABSL_LLVM_TEST_FLAGS}")
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# AppleClang doesn't have lsan
# https://developer.apple.com/documentation/code_diagnostics
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
set(ABSL_LSAN_LINKOPTS "-fsanitize=leak")
set(ABSL_HAVE_LSAN ON)
endif()
endif()
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(ABSL_DEFAULT_COPTS "${ABSL_MSVC_FLAGS}")
Expand Down
113 changes: 81 additions & 32 deletions third_party/abseil-cpp/absl/debugging/BUILD.bazel
Expand Up @@ -225,41 +225,105 @@ cc_library(
name = "leak_check",
srcs = ["leak_check.cc"],
hdrs = ["leak_check.h"],
copts = ABSL_DEFAULT_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/base:config",
"//absl/base:core_headers",
],
)

# Adding a dependency to leak_check_disable will disable
# sanitizer leak checking (asan/lsan) in a test without
# the need to mess around with build features.
cc_library(
name = "leak_check_disable",
srcs = ["leak_check_disable.cc"],
linkopts = ABSL_DEFAULT_LINKOPTS,
linkstatic = 1,
deps = ["//absl/base:config"],
alwayslink = 1,
)

# These targets exists for use in tests only, explicitly configuring the
# LEAK_SANITIZER macro. It must be linked with -fsanitize=leak for lsan.
ABSL_LSAN_LINKOPTS = select({
"//absl:clang_compiler": ["-fsanitize=leak"],
"//conditions:default": [],
})

cc_library(
name = "leak_check_api_enabled_for_testing",
testonly = 1,
srcs = ["leak_check.cc"],
hdrs = ["leak_check.h"],
copts = select({
"//absl:clang_compiler": ["-DLEAK_SANITIZER"],
"//conditions:default": [],
}),
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
deps = [
"//absl/base:config",
"//absl/base:core_headers",
],
)

cc_library(
name = "leak_check_api_disabled_for_testing",
testonly = 1,
srcs = ["leak_check.cc"],
hdrs = ["leak_check.h"],
copts = ["-ULEAK_SANITIZER"],
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
deps = [
"//absl/base:config",
"//absl/base:core_headers",
],
)

cc_test(
name = "leak_check_test",
srcs = ["leak_check_test.cc"],
copts = ABSL_TEST_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
copts = select({
"//absl:clang_compiler": ["-DABSL_EXPECT_LEAK_SANITIZER"],
"//conditions:default": [],
}),
linkopts = ABSL_LSAN_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
tags = ["notsan"],
deps = [
":leak_check",
"//absl/base:config",
"//absl/base:raw_logging_internal",
":leak_check_api_enabled_for_testing",
"//absl/base",
"@com_google_googletest//:gtest_main",
],
)

# Binary that leaks memory and expects to fail on exit. This isn't a
# test that expected to pass on its own; it exists to be called by a
# script that checks exit status and output.
# TODO(absl-team): Write a test to run this with a script that
# verifies that it correctly fails.
cc_binary(
name = "leak_check_fail_test_binary",
srcs = ["leak_check_fail_test.cc"],
copts = ABSL_TEST_COPTS,
cc_test(
name = "leak_check_no_lsan_test",
srcs = ["leak_check_test.cc"],
copts = ["-UABSL_EXPECT_LEAK_SANITIZER"],
linkopts = ABSL_DEFAULT_LINKOPTS,
tags = ["noasan"],
deps = [
":leak_check",
"//absl/base:raw_logging_internal",
":leak_check_api_disabled_for_testing",
"//absl/base", # for raw_logging
"@com_google_googletest//:gtest_main",
],
)

# Test that leak checking is skipped when lsan is enabled but
# ":leak_check_disable" is linked in.
#
# This test should fail in the absence of a dependency on ":leak_check_disable"
cc_test(
name = "disabled_leak_check_test",
srcs = ["leak_check_fail_test.cc"],
linkopts = ABSL_LSAN_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
tags = ["notsan"],
deps = [
":leak_check_api_enabled_for_testing",
":leak_check_disable",
"//absl/base",
"@com_google_googletest//:gtest_main",
],
)
Expand Down Expand Up @@ -292,18 +356,3 @@ cc_test(
"@com_google_googletest//:gtest_main",
],
)

cc_binary(
name = "stacktrace_benchmark",
testonly = 1,
srcs = ["stacktrace_benchmark.cc"],
copts = ABSL_TEST_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
tags = ["benchmark"],
deps = [
":stacktrace",
"//absl/base:config",
"//absl/base:core_headers",
"@com_github_google_benchmark//:benchmark_main",
],
)
29 changes: 29 additions & 0 deletions third_party/abseil-cpp/absl/debugging/BUILD.gn
Expand Up @@ -131,6 +131,35 @@ absl_source_set("leak_check") {
]
}

absl_source_set("leak_check_disable") {
sources = [ "leak_check_disable.cc" ]
deps = [ "//third_party/abseil-cpp/absl/base:config" ]
}

if (is_lsan) {
absl_source_set("leak_check_api_enabled_for_testing") {
testonly = true
sources = [ "leak_check.cc" ]
public = [ "leak_check.h" ]
visibility = [ ":*" ]
deps = [
"//third_party/abseil-cpp/absl/base:config",
"//third_party/abseil-cpp/absl/base:core_headers",
]
}
} else {
absl_source_set("leak_check_api_disabled_for_testing") {
testonly = true
sources = [ "leak_check.cc" ]
public = [ "leak_check.h" ]
visibility = [ ":*" ]
deps = [
"//third_party/abseil-cpp/absl/base:config",
"//third_party/abseil-cpp/absl/base:core_headers",
]
}
}

absl_source_set("stack_consumption") {
testonly = true
sources = [ "internal/stack_consumption.cc" ]
Expand Down

0 comments on commit 74fa7b0

Please sign in to comment.