Initial commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
diff --git a/absl/debugging/symbolize_elf.inc b/absl/debugging/symbolize_elf.inc
|
||||
index 0317bbc..e4a5060 100644
|
||||
--- a/absl/debugging/symbolize_elf.inc
|
||||
+++ b/absl/debugging/symbolize_elf.inc
|
||||
@@ -1086,17 +1086,24 @@ static ABSL_ATTRIBUTE_NOINLINE bool ReadAddrMap(
|
||||
void *arg, void *tmp_buf, size_t tmp_buf_size) {
|
||||
// Use /proc/self/task/<pid>/maps instead of /proc/self/maps. The latter
|
||||
// requires kernel to stop all threads, and is significantly slower when there
|
||||
- // are 1000s of threads.
|
||||
+ // are 1000s of threads. Some container procfs implementations do not expose
|
||||
+ // per-thread maps files, so fall back to /proc/self/maps when needed.
|
||||
char maps_path[80];
|
||||
snprintf(maps_path, sizeof(maps_path), "/proc/self/task/%d/maps", getpid());
|
||||
|
||||
int maps_fd;
|
||||
NO_INTR(maps_fd = OpenReadOnlyWithHighFD(maps_path));
|
||||
- FileDescriptor wrapped_maps_fd(maps_fd);
|
||||
- if (wrapped_maps_fd.get() < 0) {
|
||||
- ABSL_RAW_LOG(WARNING, "%s: errno=%d", maps_path, errno);
|
||||
- return false;
|
||||
+ if (maps_fd < 0) {
|
||||
+ const int task_maps_errno = errno;
|
||||
+ NO_INTR(maps_fd = OpenReadOnlyWithHighFD("/proc/self/maps"));
|
||||
+ if (maps_fd < 0) {
|
||||
+ const int self_maps_errno = errno;
|
||||
+ ABSL_RAW_LOG(WARNING, "%s: errno=%d; /proc/self/maps: errno=%d",
|
||||
+ maps_path, task_maps_errno, self_maps_errno);
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
+ FileDescriptor wrapped_maps_fd(maps_fd);
|
||||
|
||||
// Iterate over maps and look for the map containing the pc. Then
|
||||
// look into the symbol tables inside.
|
||||
@@ -0,0 +1,48 @@
|
||||
[build]
|
||||
type = "cmake"
|
||||
|
||||
[build.flags]
|
||||
build_dir = "build"
|
||||
configure = [
|
||||
"-DCMAKE_CXX_STANDARD=17",
|
||||
"-DBUILD_SHARED_LIBS=ON",
|
||||
"-DABSL_BUILD_TEST_HELPERS=ON",
|
||||
"-DABSL_USE_EXTERNAL_GOOGLETEST=ON",
|
||||
"-DABSL_FIND_GOOGLETEST=ON",
|
||||
"-DABSL_BUILD_TESTING=ON",
|
||||
"-G", "Ninja",
|
||||
"-DCMAKE_CXX_FLAGS=${CXXFLAGS} -DNDEBUG",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
build = [
|
||||
"cmake",
|
||||
"ninja",
|
||||
]
|
||||
runtime = [
|
||||
"glibc",
|
||||
"gtest",
|
||||
"libunwind",
|
||||
"libcxx",
|
||||
]
|
||||
|
||||
[package]
|
||||
description = "Collection of C++ library code designed to augment the C++ standard library"
|
||||
homepage = "https://abseil.io/"
|
||||
license = "Apache-2.0"
|
||||
name = "abseil-cpp"
|
||||
version = "20260107.1"
|
||||
|
||||
[[source]]
|
||||
extract_dir = "$name-$version"
|
||||
sha256 = "4314e2a7cbac89cac25a2f2322870f343d81579756ceff7f431803c2c9090195"
|
||||
url = "https://github.com/abseil/abseil-cpp/releases/download/$version/abseil-cpp-$version.tar.gz"
|
||||
patches = [ "scoped-mock-log.patch", "abseil-cpp-20260107.1-symbolize-proc-maps-fallback.patch" ]
|
||||
|
||||
[[manual_sources]]
|
||||
file = "scoped-mock-log.patch"
|
||||
sha256 = "b2:c467c7aaebea4a9fc9baaeb0419f27f01e92ad5d2a3b0e7b6a9bd9fde0b0081394537fff987ab754ff463ab7e033ddd21ad99e65786858c6b79137f529debd9f"
|
||||
|
||||
[[manual_sources]]
|
||||
file = "abseil-cpp-20260107.1-symbolize-proc-maps-fallback.patch"
|
||||
sha256 = "b2:14fbb86b59af25e180de422d357841caf9cd4a671c3163b31c47651396ece19c811f64ab959019fed0310ca76ff1cdb46eb11a888adc612566a1b5dca8e87ac3"
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/absl/log/CMakeLists.txt b/absl/log/CMakeLists.txt
|
||||
index 78adbf1d..b64822dd 100644
|
||||
--- a/absl/log/CMakeLists.txt
|
||||
+++ b/absl/log/CMakeLists.txt
|
||||
@@ -637,7 +637,6 @@ absl_cc_library(
|
||||
GTest::gmock
|
||||
GTest::gtest
|
||||
PUBLIC
|
||||
- TESTONLY
|
||||
)
|
||||
|
||||
absl_cc_library(
|
||||
Reference in New Issue
Block a user