deprecation of ATOMIC_FLAG_INIT.
Another option would have been to use macros to only initialize
std::atomic_flag before C++20, but I decided to use one compilation
path instead.
The major difference between std::atomic_flag and std::atomic<bool> is
that the former is guaranteed to be lock-free, but we already assume
std::atomic<bool> is lock-free in many places.
https://en.cppreference.com/w/cpp/atomic/atomic_flag
PiperOrigin-RevId: 487397075
Change-Id: I3f1c539ec8b2ca58547282e69ed73e93243e8efe
Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL enables these warnings and fixes the remaining known issues.)
Bug: chromium:1292951
PiperOrigin-RevId: 480981210
Change-Id: I92d5023c6833e24d6aa29b10d433116329972f41
Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL focuses on .cc files in debugging/internal/.)
Bug: chromium:1292951
PiperOrigin-RevId: 470812243
Change-Id: I5578030bb42ba73cb83d4df84f89e431ceac8992
In the case that we are unwinding with context, if the retreived frame pointer
matches the signal context, assume that the value is valid and do not perform
confidence checks. In any other case, continue to perform some validation to
avoid returning an incorrect frame pointer.
Given that the VDSO path is currently untested, remove the code to simplify the
logic in the frame walking.
PiperOrigin-RevId: 465360612
Change-Id: Iac656012182a12814bafecf20225ba68b90b4db1
Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL focuses on .cc files in dirs a-h.)
Bug: chromium:1292951
PiperOrigin-RevId: 464541951
Change-Id: If23b63ccea8e9b730159ff1c7288e9300a40b6bd
The changes in d6f96eda14 enabled handling cases
where the stack may be non-contiguous or not fully symbolicated (e.g. in cases
of alternate signal stacks). However, it did not properly honour the requests
from the caller to perform a strict unwinding where such frames are terminated
upon the discontinuity. This repairs that condition.
Hoist the alignment check since that is safe to perform early.
PiperOrigin-RevId: 464160529
Change-Id: Ic65645928ec60c2a3b4844f3abd4fed1b991edab
Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL focuses on .h and win32 .inc files.)
Bug: chromium:1292951
PiperOrigin-RevId: 463835431
Change-Id: If8e5f7f651d5cd96035e23e4623bdb08a7fedabe
The frame pointer sanity check in NextStackFrame() was more restrictive than it is necessary. The frame pointer is used to load the saved link-register and the address for the next stack frame. So it only needs to be 8-byte aligned. The aarch64 ABI does not specify an alignment requirement for the frame point.
PiperOrigin-RevId: 463368519
Change-Id: I473e05181603288f14734fe29013900c7505e201
Add a hook to permit checking whether an address is in bounds for the stack.
PiperOrigin-RevId: 460997074
Change-Id: Ib3b4d0cf656e614aa083457abb079c40ef8db0ff
This seems to have caused some regressions by causing a flaky failure in some
cases. Revert the change to enable investigation.
PiperOrigin-RevId: 459331687
Change-Id: Iaa4e4bfcb3013a75a2cd72768d980ac5e450f70c
The alternate signal stack may be sufficiently beyond the esimated frame size
(100k). If we run into the case that the frame is not in the correct direction
assume that the frames may be non-contiguous due to an alternate signal stack
layout. In such a case, if we find that there is an alternate stack configured,
ignore the discontiuity (assuming that it is a removable point-wise
discontinuity) and continue the stack unwinding. This permits us to capture
stack traces in more cases.
PiperOrigin-RevId: 458327775
Change-Id: Ia8b461847401492f72a23ba26601c72e0109402c
When we would perform a stacktrace using the frame pointer walking, because we
did the adjustment for the return address separately, we were misaligning the
stack size and frame. Simplify the logic and correct the offset.
The recovered frame pointer provides us with the return address of the current
frame and the previous frame's frame pointer. Subsequently, we decide if we
want to record this frame or not. The value in `next_frame_pointer` already
points to the value from the previous stack frame (that is the next frame
pointer to iterate). As such, the value computed by `ComputeStackFrameSize` is
the value for the current frame. This was offset by one previously.
Take the opportunity to clean up some of the local comments, fixing typos and
splitting up the comments to reflect the lines that they are associated with.
PiperOrigin-RevId: 453744059
Change-Id: If14813e0ac36f327f4b7594472f2222d05c478aa
--
3d018c03a34bf273a4b24b3584ed77f0a6d21686 by Abseil Team <absl-team@google.com>:
Fix a spelling typo (s/boundries/boundaries).
PiperOrigin-RevId: 442041877
Change-Id: I608020697d37b85316bb9a0838e4b457659c926c
--
518b8119e51db24ce7fb0fd2fe537ec43825c3e6 by Dino Radakovic <dinor@google.com>:
absl/types/internal/variant: Make include guard uppercase
https://google.github.io/styleguide/cppguide.html#The__define_Guard
PiperOrigin-RevId: 441911692
Change-Id: I9837dd07f20204d8253f20627b0917a34dc21825
--
b91696c38310a7cae8c1ea9e2d479495f5dc3f69 by Greg Falcon <gfalcon@google.com>:
Add an internal-only API to wrap __builtin_prefetch() if available.
This private API is intended for future use by the Abseil implementation. Like any internal-namespaced function, it may be changed or removed at any time.
PiperOrigin-RevId: 441894616
Change-Id: Iaa48bd4680b373f4a0d5afab0cb35e2a1908595f
--
0f01e8b0551a662e02dff60840c54320f987315f by Derek Mauro <dmauro@google.com>:
C++20: Use the standard `constinit` keyword for `ABSL_CONST_INIT` when available
PiperOrigin-RevId: 441778874
Change-Id: I70c616469752ff23b326b1c615437599f42cc6aa
GitOrigin-RevId: 3d018c03a34bf273a4b24b3584ed77f0a6d21686
--
ef2bf829c333f378ecc12f3259e3187cdb75a3d5 by Abseil Team <absl-team@google.com>:
debugging: fix the VDSO symbol name used for unwinding on RISC-V Linux
The name listed in `man vdso` is incorrect. Instead, use the name from `linux-5.16/arch/riscv/kernel/vdso/rt_sigreturn.S`
PiperOrigin-RevId: 439654174
Change-Id: Ib39d066f416681720068e806e828a2c76a14a532
--
43dfad824afd36cfc3e5049b4fea71a2bccb066c by Benjamin Barenblat <bbaren@google.com>:
Check printf format strings in str_format_convert_test
Add ABSL_PRINTF_ATTRIBUTE to appropriate functions in
strings/internal/str_format/convert_test. Correct
TypedFormatConvertTest.Char, which was accidentally passing values of
types larger than int to StrPrint.
PiperOrigin-RevId: 439388148
Change-Id: I6cde4e8e0c6455064138192430f07f4c990be0bc
--
f84b4ab2c3b070c8af0c82742ac7a8a4bf443bca by Derek Mauro <dmauro@google.com>:
Use __builtin_memcmp in the absl::string_view implementation
starting with MSVC 16.9, where it first appeared
This enables more constexpr operations
PiperOrigin-RevId: 439317316
Change-Id: Iaf1ce76b60901d4b2d5b96be5900c56572f57b15
GitOrigin-RevId: ef2bf829c333f378ecc12f3259e3187cdb75a3d5
uclibc-ng doesn't provide getauxval which results in the following build
failure on arm or ppc with any user of abseil-cpp such as grpc:
/home/buildroot/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libabsl_random_internal_randen_hwaes.so.2111.0.0: undefined reference to `getauxval'
To fix this build failure, check that __UCLIBC__ is not defined before
using getauxval (as Babel is not able to check function availability)
Fixes:
- http://autobuild.buildroot.org/results/775f3ca3dedebff29e212b29dfa896b7613b7a02
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
--
399d051d30f7a78c367bb1dc08829ffacbb619a6 by Abseil Team <absl-team@google.com>:
Fix a glitch in symbolization which could result in the same address being
correctly symbolized and "(unknown)" in the same crash report.
PiperOrigin-RevId: 435371003
Change-Id: I9f6a5684144be6d3d366584601d79fda9eefdce6
--
5dad813de52773e0bb09c6b2351e1bbadb53deac by Abseil Team <absl-team@google.com>:
Fix ABSL_HAVE_MMAP check in direct_mmap.h
This change makes the check for ABSL_HAVE_MMAP match the other checks
in absl. This fixes builds where ABSL_HAVE_MMAP is not defined.
PiperOrigin-RevId: 435190242
Change-Id: I11638ef315849cafcf4ea1611eee1a98c80e7dcb
GitOrigin-RevId: 399d051d30f7a78c367bb1dc08829ffacbb619a6
--
4409b08e103d6e7041d18a4d431290cafe3650cf by Derek Mauro <dmauro@google.com>:
Workaround NVCC compile error in StringConstant
Based on a patch in TensorFlow:
da83132aba/third_party/absl/com_google_absl_fix_mac_and_nvcc_build.patch (L262-L282)Fixes#1105
PiperOrigin-RevId: 426156316
--
25db16567ffc5400dfaa30b567398ede84729687 by Abseil Team <absl-team@google.com>:
Only look for Elf64_Auxinfo on 64-bit FreeBSD.
PiperOrigin-RevId: 426132251
--
2e73c3d9df59b2b769d2b8dca97f0ca5c512c72a by Abseil Team <absl-team@google.com>:
Add a problem hint to the error message when dereferencing the end() iterator.
PiperOrigin-RevId: 426120394
--
6befbf89c47963656b9e8151166ab4c8446d4785 by Martijn Vels <mvels@google.com>:
Make Cord Btree the default and remove opt out machinery
This change makes btree the default Cord format and removes the machinery to opt out. Subsequent changes will remove the 'true' constant evaluation and effectively cleanup all old code and references to CONCAT.
PiperOrigin-RevId: 426119728
--
f6a0a664029d61811d90bd484f4eefa0400b5dd4 by Abseil Team <absl-team@google.com>:
Mark Notification::HasBeenNotified as ABSL_MUST_USE_RESULT
PiperOrigin-RevId: 425927033
GitOrigin-RevId: 4409b08e103d6e7041d18a4d431290cafe3650cf
Change-Id: I86f1052c63c13c6486baf4108de2554f162f9c40
--
389189dbb322df0d0468ab13edf7dc185dc63833 by Abseil Team <absl-team@google.com>:
absl str_format.h can compile with -Wconversion and -Wsign-compare
PiperOrigin-RevId: 420799960
--
762e5adc429fc143756c42fe92fe8073c87c075f by Abseil Team <absl-team@google.com>:
GetStackTraceWithContext: Fix min_dropped_frames when no frames are recorded
Previously, if there were still frames to skip, they would be included
in min_dropped_frames.
PiperOrigin-RevId: 420766341
--
7d4374b8eaa410f4f98ec03d6a8997dccadfb271 by Abseil Team <absl-team@google.com>:
absl::flags compiles with -Wconversion and -Wsign-compare
PiperOrigin-RevId: 420476807
--
5f00f7805419d725fa1ff57b388e4c0750d1d6b0 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 420282152
--
bd5471fc34956acf3888bf90287b2aee4415c96d by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 420282033
--
61c78020804e4290e9b2fe151aeaf99b198716ee by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 420281867
--
dbe3aad24b65ea11664401a307ea3d2f28e8a7b9 by Derek Mauro <dmauro@google.com>:
Remove the incorrect test for the availability of [[nodiscard]]
It should have been ABSL_HAVE_CPP_ATTRIBUTE(nodiscard) instead of
ABSL_HAVE_ATTRIBUTE(nodiscard). As a result, some code is not
compliant with [[nodiscard]], so we cannot simply correct the availability
test.
Recommend that C++17-only code use the standard [[nodiscard] directly.
PiperOrigin-RevId: 420150702
GitOrigin-RevId: 389189dbb322df0d0468ab13edf7dc185dc63833
Change-Id: Idf6ebae3c4edd945c9032c7db3d0ab32d16e8078
--
07240ca7822d007cdcc79f2c40bd58b2c2010348 by Abseil Team <absl-team@google.com>:
Correct the comment from "AlphaNum" to "Arg".
PiperOrigin-RevId: 416139192
--
adcba4a6b3763626e1db7b1e8c108b3114903557 by Martijn Vels <mvels@google.com>:
Fix NewExternalRep() to require data being non-empty, and remove nullptr return.
PiperOrigin-RevId: 416135865
--
c0d14cd918fb16f15d1d84de9284b5c5ecc1f8f2 by Abseil Team <absl-team@google.com>:
Fix doc comment for absl::ascii_isprint().
The comment was incorrectly saying that it includes all whitespace.
It doesn't; the only whitespace char it includes is ' '.
PiperOrigin-RevId: 416112524
--
d83327800159c07002b6865e21232a12463e02dd by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 416099978
--
baf11e9ca42ca9140cdbf8075f971db8d65b1195 by Ilya Tokar <tokarip@google.com>:
Prevent compiler from optimizing Group_Match* benchmarks away.
Currently we benchmark single store of precomputed value.
Not all affected benchmarks show performance changes:
BM_Group_Match 0.53ns ± 1% 0.53ns ± 0% -0.42% (p=0.038 n=10+10)
BM_Group_MatchEmpty 0.26ns ± 1% 0.26ns ± 1% ~ (p=1.000 n=10+10)
BM_Group_MatchEmptyOrDeleted 0.26ns ± 1% 0.26ns ± 1% ~ (p=0.121 n=10+10)
BM_Group_CountLeadingEmptyOrDeleted 0.26ns ± 1% 0.45ns ± 0% +70.05% (p=0.000 n=10+8)
BM_Group_MatchFirstEmptyOrDeleted 0.26ns ± 0% 0.44ns ± 1% +65.91% (p=0.000 n=8+9)
But inspecting the generated code shows the difference,
e. g. BM_Group_MatchFirstEmptyOrDeleted
Before:
add $0xffffffffffffffff,%rbx
jne 30
After:
pcmpeqd %xmm0,%xmm0
pcmpgtb -0x30(%rbp),%xmm0
pmovmskb %xmm0,%eax
add: 0x23$0xffffffffffffffff,%rbx
jne 40
PiperOrigin-RevId: 416083515
--
122fbff893dc4571b3e75e4b241eb4495b925610 by Abseil Team <absl-team@google.com>:
Put namespace guard in ABSL_DECLARE_FLAG to make declaring a flag in a namespace a compiler error instead of a linker error.
PiperOrigin-RevId: 416036072
--
020fd8a20f5fa319e948846e003391fcb9e03868 by Ilya Tokar <tokarip@google.com>:
Make Cord::InlineRep::set_data unconditionally zero out memory.
Currently there is a single case where we don't zero out memory
as an optimization. Unconditional zeroing doesn't show any changes
in benchmarks, except for the unrelated improvement:
BM_CordPartialCopyToCord/1M/1 12.6ns ± 4% 12.6ns ± 4% ~ (p=0.857 n=16+19)
BM_CordPartialCopyToCord/1M/128 44.9ns ± 7% 45.0ns ± 3% ~ (p=0.468 n=18+17)
BM_CordPartialCopyToCord/1M/1k 64.5ns ± 4% 61.4ns ± 4% -4.82% (p=0.000 n=19+17)
BM_CordPartialCopyToCord/1M/8k 139ns ± 3% 128ns ±15% -7.76% (p=0.009 n=17+20)
BM_CordPartialCopyToCord/1M/16k 193ns ± 6% 168ns ± 6% -13.17% (p=0.000 n=17+17)
BM_CordPartialCopyToCord/4M/16k 199ns ± 4% 177ns ± 4% -11.36% (p=0.000 n=17+18)
BM_CordPartialCopyToCord/4M/32k 275ns ± 3% 250ns ± 4% -9.00% (p=0.000 n=18+18)
BM_CordPartialCopyToCord/4M/64k 291ns ± 4% 266ns ± 5% -8.53% (p=0.000 n=18+16)
BM_CordPartialCopyToCord/4M/128k 322ns ± 5% 291ns ± 4% -9.43% (p=0.000 n=20+18)
BM_CordPartialCopyToCord/8M/32k 281ns ± 5% 251ns ± 4% -10.38% (p=0.000 n=20+16)
BM_CordPartialCopyToCord/8M/64k 293ns ± 6% 267ns ± 4% -8.87% (p=0.000 n=16+19)
BM_CordPartialCopyToCord/8M/128k 334ns ± 3% 305ns ± 2% -8.56% (p=0.000 n=17+16)
This is clearly an alignmnet effect since number of the executed instructions is the same:
M_CordPartialCopyToCord/1M/1 155 ± 0% 155 ± 0% ~ (all samples are equal)
BM_CordPartialCopyToCord/1M/128 446 ± 0% 446 ± 0% ~ (p=0.332 n=36+39)
BM_CordPartialCopyToCord/1M/1k 473 ± 0% 473 ± 0% ~ (p=0.969 n=40+40)
BM_CordPartialCopyToCord/1M/8k 808 ± 0% 808 ± 0% ~ (p=0.127 n=40+39)
BM_CordPartialCopyToCord/1M/16k 957 ± 0% 957 ± 0% ~ (p=0.532 n=40+40)
BM_CordPartialCopyToCord/4M/16k 952 ± 0% 952 ± 0% ~ (p=0.686 n=39+39)
BM_CordPartialCopyToCord/4M/32k 1.12k ± 0% 1.12k ± 0% ~ (p=0.690 n=40+40)
BM_CordPartialCopyToCord/4M/64k 1.23k ± 0% 1.23k ± 0% ~ (p=0.182 n=40+39)
BM_CordPartialCopyToCord/4M/128k 1.44k ± 0% 1.44k ± 0% ~ (p=0.711 n=40+40)
BM_CordPartialCopyToCord/8M/32k 1.12k ± 0% 1.12k ± 0% ~ (p=0.697 n=40+40)
BM_CordPartialCopyToCord/8M/64k 1.23k ± 0% 1.23k ± 0% +0.00% (p=0.049 n=40+40)
BM_CordPartialCopyToCord/8M/128k 1.44k ± 0% 1.44k ± 0% ~ (p=0.507 n=40+40)
This makes code simpler and doesn't regress performance.
PiperOrigin-RevId: 415560574
--
37305b2690b31682088749e4d62f40d7095bdc54 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 415558737
--
86aaed569b9e743c1eb813a5f48def978a793db3 by Martijn Vels <mvels@google.com>:
Internal change
PiperOrigin-RevId: 415515201
--
6cdb8786cdcb4fa0b8a4b72fc98940877d1fdeff by Abseil Team <absl-team@google.com>:
Update SubmitMutexProfileData to accept wait_cycles instead of wait_timestamp
PiperOrigin-RevId: 415360871
--
9f979d307aa16ad09f214e04876cbe84395c0901 by Abseil Team <absl-team@google.com>:
absl::flat_hash_set compiles with -Wconversion -Wsign-compare
PiperOrigin-RevId: 415357498
--
9eceb14174708f15e61259d449b214a8a4c7f9e7 by Abseil Team <absl-team@google.com>:
Fix AddressIsReadable for the corner case of (aligned) addr == NULL.
PiperOrigin-RevId: 415307792
--
1a39ffe55898375e2d7f88c17c99db5a1b95b313 by Martijn Vels <mvels@google.com>:
Internal change
PiperOrigin-RevId: 415162872
--
64378549b110d5f5762185a5906c520fba70f0e7 by Abseil Team <absl-team@google.com>:
Fix a typo in the comments
PiperOrigin-RevId: 415088461
--
41aae8322e913b82710153c22b97c611fdb6e1fb by Abseil Team <absl-team@google.com>:
Switch from `connect` to `rt_sigreturn` -- the latter is much less problematic
for system call sandboxes.
PiperOrigin-RevId: 415073965
--
870c5e3388b6a35611bff538626fe7a1c8c87171 by Abseil Team <absl-team@google.com>:
Add ABSL_HAVE_HWADDRESS_SANITIZER and ABSL_HAVE_LEAK_SANITIZER
PiperOrigin-RevId: 414871189
--
f213ed60a66b58da7ac40555adfb1d529ff0a4db by Derek Mauro <dmauro@google.com>:
Remove reference to __SANITIZE_MEMORY__, which does not exist
It appears to have been copied by pattern matching from the ASAN/TSAN
code blocks.
f47662204d/gcc/cppbuiltin.c (L79-L126)
PiperOrigin-RevId: 414806587
--
b152891e73ab515f397ceb53f66c8ee2f33863ea by Abseil Team <absl-team@google.com>:
Rollback previous commit: SYS_open is not defined in certain environments.
PiperOrigin-RevId: 414521820
--
5a1cbb282331023902e1374dd0d920c4effbe47f by Abseil Team <absl-team@google.com>:
Use syscall(SYS_open, ...) instead of open() to avoid possible symbol
interposition.
Also add some warning notes.
PiperOrigin-RevId: 414508186
--
1824d6593612710aafdc599a89b0adced7d787f6 by Abseil Team <absl-team@google.com>:
Correct aarch64 macro check
The macro is __aarch64__, not __arch64__.
PiperOrigin-RevId: 414446225
--
a1536a57b64dfd53945d33a01cfc08b18c99c97b by Abseil Team <absl-team@google.com>:
Fix backwards comment in the last commit.
PiperOrigin-RevId: 414281214
--
11ac021ba779513667a31cf2563ddafc57d6d913 by Abseil Team <absl-team@google.com>:
AddressIsReadable() didn't work correctly on ARM when the given pointer was
misaligned at the end of the page.
Fix that by aligning the pointer on an 8-byte boundary before checking it.
PiperOrigin-RevId: 414203863
GitOrigin-RevId: 07240ca7822d007cdcc79f2c40bd58b2c2010348
Change-Id: If5f129194d59f5c9e5d84efd8cd9e17a70e072ab
--
355b8f7b0070b005d53d94ee4180e95559ba2c88 by Derek Mauro <dmauro@google.com>:
Documentation: don't define absl::Status::ok() in terms of itself
Fixes#1058
PiperOrigin-RevId: 410035651
--
31c512c834b3a8979297adc5006c3727a3c6554b by Evan Brown <ezb@google.com>:
Cleanup: move set_params/set_slot_policy into btree_set.h and move map_params into btree_map.h.
Also change some `sizeof(value_type)`s to `sizeof(slot_type)`s and update some comments/variable names referring to values to refer to slots as appropriate in btree.h.
Motivation: preliminary cleanup towards node_btree_*.
PiperOrigin-RevId: 409991342
--
3129ca320d61a82f1c9ee8c02a23d25024eea4ab by Abseil Team <absl-team@google.com>:
Use simpler implementation for AddressIsReadable.
In particular, current solution doesn't work on systems configured with large
pid_t space.
PiperOrigin-RevId: 409397716
--
f71067f7494b19ce4a2e1df730b934dc931c51b2 by Martijn Vels <mvels@google.com>:
Add Span dependency
PiperOrigin-RevId: 409198889
GitOrigin-RevId: 355b8f7b0070b005d53d94ee4180e95559ba2c88
Change-Id: I7f4df3ec7739fdfde61d8ba983f07a08f6f1c7d7
--
317c7bd0caa12fa0a4dc65dc9c8e645211f85872 by Abseil Team <absl-team@google.com>:
Elide the Emscripten JS-based stack trace and symbolization functions when
building in Standalone Mode.
Users will need to set `-DSTANDALONE_WASM=1` in some toolchain(s).
PiperOrigin-RevId: 408961649
--
92ba3ab1ef3edee4b7fb9e151f2061661e7beb0a by Derek Mauro <dmauro@google.com>:
Suppress MSVC warning "C4127: conditional expression is constant"
Fixes#1004
PiperOrigin-RevId: 408920356
GitOrigin-RevId: 317c7bd0caa12fa0a4dc65dc9c8e645211f85872
Change-Id: Ieca0a9e263874ba5bd93110dc437c56bc59ad5a7
--
9f6ef337f282272bc098330c9ccacd9d39155db4 by Abseil Team <absl-team@google.com>:
Make DestroyElements an empty function if the value types are trivially deconstructible.
PiperOrigin-RevId: 407345743
--
a639bbf6f22446d6ba3da9e2c205e26cda4bebc5 by Derek Mauro <dmauro@google.com>:
Add ctest --output-on-failure to the CMake install test
PiperOrigin-RevId: 407333671
--
54d0577fa6ba1159c6a86410ae185c52f4afaff6 by Derek Mauro <dmauro@google.com>:
Fix Android build of elf_mem_image.cc
PiperOrigin-RevId: 407331032
GitOrigin-RevId: 9f6ef337f282272bc098330c9ccacd9d39155db4
Change-Id: I7e13f01cd804aec50f280ac25934c9ec48ef3c5f
--
b008f3aaab60f1f0eb5987b50336543cca7151be by Martijn Vels <mvels@google.com>:
Enable Cord Btree as the default Cord implementation.
The Cord Btree implementation has been extensively tested by google. This changes makes the Cord Btree implementation the default implementation. This change should have no impact on current use cases and does not effect any public API or behavior.
PiperOrigin-RevId: 403966449
--
3d82052b5819d1244942c59d5cb4e51d75ada287 by Derek Mauro <dmauro@google.com>:
Add missing CMake alias for gmock_main.
Remove unused variable ABSL_TEST_COMMON_LIBRARIES
Fixes#709Fixes#1043
PiperOrigin-RevId: 403950358
--
86695f6d06915b56d807303c37ee81487998cd58 by Abseil Team <absl-team@google.com>:
FunctionRef is cheaper to construct than a std::function, and the argument is only used during the call, so this is safe. This has the added advantage of allowing the caller to provide a non-movable callable, which can't be converted to a std::function.
PiperOrigin-RevId: 403457615
--
196c1109ba519d4ff00c856bbb4bff754468359f by Abseil Team <absl-team@google.com>:
Internal optimization.
PiperOrigin-RevId: 403413291
GitOrigin-RevId: b008f3aaab60f1f0eb5987b50336543cca7151be
Change-Id: I1665f0efd484f53e0ed22d8940ef2fa60b03cc5b
--
1801102e11205861bc063e067e9fd4754b625c5a by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 398562681
--
485008445725d4013f60f4b2876f84b6b47932ec by Jorg Brown <jorg@google.com>:
Replace calls to std::isinf with comparison against max().
PiperOrigin-RevId: 398534255
--
9b99d074d39ad677cf92f99549d22bb73f504f8f by Saleem Abdulrasool <abdulras@google.com>:
debugging: add support for non-glibc targets for debugging
This relaxes the ELF mem_image handling and subsequently enables the VDSO
support for non-glibc targets. The primary need for the restriction was the
use of the `__GLIBC_PREREQ` macro. If it is undefined, assume that the glibc
pre-requisite is unavailable. This allows building the debugging_internal
target on musl targets.
PiperOrigin-RevId: 398499050
--
3cc3630ef2226ae1981a944573f0f9c27a527ebf by Abseil Team <absl-team@google.com>:
Replace usages of `auto` with proper typedefs.
PiperOrigin-RevId: 398479551
GitOrigin-RevId: 1801102e11205861bc063e067e9fd4754b625c5a
Change-Id: Ib13e8612d1b263b9c1ae7f56a9f394b24c3add2e
--
d56207f5535c3aad1624e33d20777ea6e66f51a7 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 397830482
--
7f7ff3e88e0d3cd61d63da477b2a08e61a1aeea2 by Evan Brown <ezb@google.com>:
Update implementation details comment in raw_hash_set to include information about the heap allocation's layout.
PiperOrigin-RevId: 397786239
--
fde783b12a79ae8d587d1027bc8736dff6844897 by Abseil Team <absl-team@google.com>:
Add comments on #endif to make nesting clearer
PiperOrigin-RevId: 397684219
GitOrigin-RevId: d56207f5535c3aad1624e33d20777ea6e66f51a7
Change-Id: I43dc2b5c982f1ef2b21f82b6133c49c428baf223
--
04cb3b22497190170aa5b774e98080c5de2ba60b by Abseil Team <absl-team@google.com>:
Alternative bit mixer for LowLevelHash on ARM
LowLevelHash's bit-mixer is inefficient on ARM because it calculates a 128-bit product of two 64-bit numbers. On ARM, this requires a sequence of two instructions with a high combined latency and poor throughput. This change provides alternative bit-mixing code for ARM that uses only 64-bit arithmetic (multiplication, xor, and left-shifts) and speeds things up considerably.
The bit-mixing code for ARM was inspired by by Woothash[1] and xxh3[1]. Once I landed on a sequence of operations that provided good mixing, I used a test harness to search for the combination of shift / rotate factors that provided the best mixing, as indicated by SMHasher hash quality tests. The new mixing code passes 13 out of 15 of the hash quality test suites in SMHasher, with the two failures being in the noise range: e.g. 1 collision vs. zero expected in a keyset of ~8m keys.
[1]: https://github.com/tommyettinger/waterhash/blob/49f5cf0b63b9/woothash.h#L16-L20
[2]: https://github.com/Cyan4973/xxHash/blob/6853ddc36e46/xxhash.h#L3240-L3265
PiperOrigin-RevId: 391833008
--
17a4de1f9d623155c75b19285d414cd55a487cd6 by Saleem Abdulrasool <abdulras@google.com>:
debugging: add support for unwinding on RISCV Linux
This adds partial support for unwinding the RISCV call stack. It is largely
duplicated from the AArch64 support with alterations for the ELF RISCV psABI.
This covers RISCV64 and RISCV32, though not the ILP32E calling convention.
PiperOrigin-RevId: 391818522
--
32c93e449327b2cea32b32f6365e84b420fe1ed3 by Gennadiy Rozental <rogeeff@google.com>:
New storage for types smaller than 8 bytes.
Also adding new read interface for types smaller than or rqual to 8 bytes to avoid passing the pointer.
PiperOrigin-RevId: 391726822
--
e987ac08a7787801cbfc7d7c96649e97fa8cff1a by Abseil Team <absl-team@google.com>:
Extern template `find_first_non_full` to reduce linkage size for TU with single not inlined function.
PiperOrigin-RevId: 391718862
--
73af9bfcb5bf045089133e18bbd20eb5bb699172 by Gennadiy Rozental <rogeeff@google.com>:
Make most non-mutable most int128 methods and friend free functions constexpr.
Some functions are implemented offline (at least in some configurations) and can't be made constexpr. Mutable methods can't be made constexpr until we drop c++11 support.
Fixes#978
PiperOrigin-RevId: 391706535
GitOrigin-RevId: 04cb3b22497190170aa5b774e98080c5de2ba60b
Change-Id: If051fad5ff004e2e82fa53618fc04a6fe3d2d4be
--
3a9b4e8e5ecba532db5cc4ac12d12660307ce9fb by Derek Mauro <dmauro@google.com>:
Use the Bazel @platforms repository for platform constraints
Fixes#1000
PiperOrigin-RevId: 390644226
--
b34e4d2f8a86b54bd483ec4c9c3dd781ad2d8b68 by Abseil Team <absl-team@google.com>:
debugging: add some handling for RISC-V
The RISC-V architecture uses a downward growing stack and can host Linux using
ELF files. Adjust a few sites accordingly to indicate how to handle the RISC-V
architecture.
PiperOrigin-RevId: 390631894
--
5fa3a0961bf3dd0799c048956a0128f7b8113f1e by Samuel Benzaquen <sbenza@google.com>:
Rename the buffer hash function to LowLevelHash.
Although it started as wyhash, it will depart from it so it does not make sense
to keep the name.
PiperOrigin-RevId: 390483506
--
2e7867a2301d58ad4cd5abcaa5fd6f0db973ae7b by Abseil Team <absl-team@google.com>:
This is an internal change.
PiperOrigin-RevId: 390349746
GitOrigin-RevId: 3a9b4e8e5ecba532db5cc4ac12d12660307ce9fb
Change-Id: I322c3762552a2107e6c6b108c25c01e5efa8aecd
--
69b5d0b2a5adb49a53e51f9da6848eaa484242fe by Derek Mauro <dmauro@google.com>:
Changes the absl::Duration factory functions to disallow types that
are convertible to int or double, instead requiring that the argument
itself is indeed an integer or a floating-point number. This will
prevent callers from passing arguments, such as std::atomic<T>.
This change is an API break. Information and a tool to fix issues
can be found at
https://abseil.io/docs/cpp/tools/upgrades/duration-conversions
PiperOrigin-RevId: 387153494
--
786063e438ab6a55ac4baa88ad4d20a8293be52a by Evan Brown <ezb@google.com>:
Make ctrl_t be an enum class.
This adds type safety, and also when strict aliasing is enabled, the compiler will know that control bytes can't alias non-control bytes.
Also make H2() return h2_t.
PiperOrigin-RevId: 387120717
--
7e537aabec1c255d6e7c9d21232c597c1c2077bf by Evan Brown <ezb@google.com>:
Add some missing `const` keywords to ctrl_t* function parameters.
PiperOrigin-RevId: 386976062
--
da53ac6d91cabd951e81dd0a145e1e52b918955f by Martijn Vels <mvels@google.com>:
Change Seek and InitOffset to return nullptr instead of assert / fail.
This makes it consistent with the rest of the API (Next, Previous, Skip) and hardens it against invariants that are harder (or less likey) to be upheld correctly by the caller.
PiperOrigin-RevId: 386963283
--
a4d1faac020d5025edf53ce81808e5db68da7d89 by Abseil Team <absl-team@google.com>:
PC / Backtrace / Symbolization for Emscripten.
PiperOrigin-RevId: 386957724
--
97f2c47d83ba9d3ac89e1f55bd06897686ffd063 by Martijn Vels <mvels@google.com>:
Fix static casts ([-Wimplicit-int-conversion])
PiperOrigin-RevId: 386951646
--
9530c795248543817cbc4013953baa09c35f5e1a by Abseil Team <absl-team@google.com>:
Fix incorrect header guard in cord_rep_btree_navigator.h
PiperOrigin-RevId: 386907904
--
90ce5872406df2b7f4c428683741dc13a572267e by Abseil Team <absl-team@google.com>:
Small grammar fixes for some StatusCode descriptions.
PiperOrigin-RevId: 386906217
--
b30a2fd777f12a04a4d512f37a34614b0d05ce99 by Derek Mauro <dmauro@google.com>:
Skip length checking when constructing absl::string_view from std::string.
The length check causes unnecessary code bloat.
PiperOrigin-RevId: 386857974
--
fa171536c359bfa2a1b80297e844519bb9ee7791 by Martijn Vels <mvels@google.com>:
Introduce CordRepBtreeNavigator
CordRepBtreeNavigator implements bi-directional navigation over all data edges stored inside a Cord Btree.
PiperOrigin-RevId: 386519102
GitOrigin-RevId: 69b5d0b2a5adb49a53e51f9da6848eaa484242fe
Change-Id: I1b35188d66133f8cb73d346bc5564aac4e0b3e80
--
d74f30ef0da7139c30a24eb6c1776bc0c257e642 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 375779441
--
25e33cde30d78dbafcb81ee3ce77c3d70c74db5a by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 375520720
--
46857d17d4dbc6fbd13a27dd82e14ec814dd117a by Samuel Benzaquen <sbenza@google.com>:
Add an explicit template parameter barrier to absl::HashOf.
PiperOrigin-RevId: 375103300
--
cf2bf52b9a425b0360ed1f46778f0ef1326a3658 by Abseil Team <absl-team@google.com>:
Improve string_view API compliance with C++17 std::basic_string_view.
This adds missing overloads, default values, and constexpr specifiers.
PiperOrigin-RevId: 374885658
--
41e55166dc5bd3ed7bce567c400781585d55e1ce by Derek Mauro <dmauro@google.com>:
Update CI to GCC 11.1, Bazel 4.0.0, CMake 3.20.2, and
LLVM git:7bcc0a1e399d461af7ec013ff33bc330a2de6641
PiperOrigin-RevId: 374858288
GitOrigin-RevId: d74f30ef0da7139c30a24eb6c1776bc0c257e642
Change-Id: I657c815c83522b030495ff54ca327e7012ed151e
--
8e75347c10d85112296811be6ef35761744ad9bc by Derek Mauro <dmauro@google.com>:
Big update to LTS release process
* Add create_lts.py script to to the LTS modification
This is simpler than copybara since very few changes are needed
* Use the default installation paths instead of a versioned path.
If a versioned path is needed, this is easy to change on the commandline.
* Make the integration test use the LTS transformed version
* Test both static and dynamic linking (fixes pkg-config dynamic linking)
PiperOrigin-RevId: 363566934
--
e00e971a2de3138861f5e1900201c9cc7788f714 by Laramie Leavitt <lar@google.com>:
Add a non-compile test to absl::BitGenRef for temporaries.
PiperOrigin-RevId: 363437284
--
3685644ec115d99789de32aceb76c32a00756fea by Derek Mauro <dmauro@google.com>:
Make OSS code consistent with internal code by using the forward
declaration of absl::Status that contains ABSL_MUST_USE_RESULT.
PiperOrigin-RevId: 363426906
--
b85fec142c3aa3f632fa985f9f8f73a253819723 by Evan Brown <ezb@google.com>:
Move raw_hash_set::infoz_ into raw_hash_set::settings_. This reduces the size of raw_hash_sets by alignof(size_t) bytes when hashtablez is disabled.
PiperOrigin-RevId: 363034264
--
c6fde3b17e5845191eb8b2bfc1760c8bfb9573ff by Mark Barolak <mbar@google.com>:
Internal change
PiperOrigin-RevId: 362990378
--
81713cf964905b43d1cbe32ce5fed97539029625 by Abseil Team <absl-team@google.com>:
Fix typo in comment (execeptions -> exceptions).
PiperOrigin-RevId: 362946191
--
3ee92ca470feca44da417b03ee45a915c6eb5155 by Abseil Team <absl-team@google.com>:
Add absl::FindAndReportLeaks and routes it to the corresponding
__lsan_do_recoverable_leak_check.
PiperOrigin-RevId: 362622199
--
b95b7194b20e02c20d72289fbc79a0d35b82e256 by Abseil Team <absl-team@google.com>:
Add `kWithEverything` to StatusToStringMode
PiperOrigin-RevId: 362595218
--
0a960d96a0014eab7e1c55b479269450ed8e98d7 by Abseil Team <absl-team@google.com>:
Accept e.g. ".__uniq" as a valid clone name. Further, bring the implementation
on par with libiberty's demangler grammar.
Clang introduced option -funique-internal-linkage-names that adds the suffix
".__uniq.[0-9]+" to internal linkage functions to give them a globally unique
identifier. The suffix was designed to work with existing demanglers which do
recognize a "_" along with the alphanumeric string. This change enhances the
demangler to allow "_" with the alphanumeric string.
Please refer to libiberty's cp-demangle.c where function d_clone_suffix
implements the demangling of clone suffixes :
1. '_' is accepted as a valid character with the alphanumeric sequence.
2. The alphanumberic sequence is optional.
3. The digit sequence is optional.
PiperOrigin-RevId: 362557420
--
2ac5ea212c150afd2f58025a5cab8c45d16949c6 by Abseil Team <absl-team@google.com>:
Change variable name 'slots' to 'slot_count' to avoid name-clash with Qt builds.
PiperOrigin-RevId: 362556289
--
934f0f409c9c548716a46363d6e243406fad4028 by Mark Barolak <mbar@google.com>:
Clarify the comment on ABSL_CACHELINE_SIZE to indicate that the macro definition itself shouldn't change, but rather that call sites should change when possible.
This addresses the request for improved documentation in https://github.com/abseil/abseil-cpp/pull/842.
PiperOrigin-RevId: 362354288
GitOrigin-RevId: 8e75347c10d85112296811be6ef35761744ad9bc
Change-Id: I33ec8561d8d645c3353e9d2dd447501d0e1825a7
--
f27dbf50d5db12279ab018f11c93ad1704043006 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 358298501
--
864c141a59e20e96234c06700d7519d43bc73d71 by Derek Mauro <dmauro@google.com>:
Annotates the duration-to-int64 and duration-to-double conversion
functions as "pure" to potentially optimize out repeated calls with
the same argument
This adds an ABSL_ATTRIBUTE_PURE_FUNCTION macro for this purpose.
PiperOrigin-RevId: 358247225
GitOrigin-RevId: f27dbf50d5db12279ab018f11c93ad1704043006
Change-Id: I5c2238911711b15d9d3ae53da44db788f20b402b
--
0bfa836596a9c787a2f0bdc283011dd1f6810c6e by Benjamin Barenblat <bbaren@google.com>:
Ignore missing CPU frequency on more architectures
Linux on MIPS, PA-RISC, RISC-V, and SystemZ doesn’t expose the nominal
CPU frequency via /sys, so don’t worry if `NominalCPUFrequency` returns
1.0 on those platforms.
Some POWER machines expose the CPU frequency; others do not. Since we
can’t predict which type of machine the tests will run on, simply
disable testing for `NominalCPUFrequency` on POWER.
PiperOrigin-RevId: 347079873
--
492b6834ed4a07cbc3abccd846f7e37d8c556ee5 by Benjamin Barenblat <bbaren@google.com>:
Use ABSL_HAVE_THREAD_LOCAL macro instead of copying code
Reduce code duplication by checking the ABSL_HAVE_THREAD_LOCAL macro
instead of copying code from base/config.h.
PiperOrigin-RevId: 347079561
--
8d656efce4da9cb032094377e58493d98427a536 by Abseil Team <absl-team@google.com>:
Rollback
PiperOrigin-RevId: 347078779
--
221bc69ec6dd7e2777ffcff6942584f979ef6382 by Abseil Team <absl-team@google.com>:
Add flag for 'shallow subcord' feature for experimental ring buffer rollout
There is a potential trade-off of CPU cost vs over-sharing cord data for subcord of large cords. This flag allows making subcords shallow for ringbuffers (with a potential larger waste of referenced source cords), which allows us to make subcord fast for this apps that do no persist (unmodified / plain copied) sub cords.
This change also introduces constants for the default settings, intended to keep the internal cord settings concistent with external flags.
PiperOrigin-RevId: 347053271
--
00a56c24293566734009f6bf2169a83fb37a35ba by Abseil Team <absl-team@google.com>:
Revert the usage of variant<> in Cord iterator and reader.
The introduction of the variant may lead to some missed compiler optimizations.
PiperOrigin-RevId: 347053041
--
c7b7b5ed7e3ab46b1e75b80f1a7de0bda26c8f70 by Chris Kennelly <ckennelly@google.com>:
Release library for integer power-of-2 functions and bit counting.
PiperOrigin-RevId: 347035065
--
5a035c0d9840b251967f9e7039fc6a4e01dd52f3 by Abseil Team <absl-team@google.com>:
Restructure Cord::ChunkIterator for future ring buffer support.
PiperOrigin-RevId: 346890054
GitOrigin-RevId: 0bfa836596a9c787a2f0bdc283011dd1f6810c6e
Change-Id: I3a58e2a44cb4c6f2116c43e2a4ccbc319d3ccecf
--
5bd06440e700fefd6eadd577d7d69c51f15c63e0 by Abseil Team <absl-team@google.com>:
Add if-guard to futex.h so that it doesn't fail to parse for unsupported platforms
PiperOrigin-RevId: 336880375
--
8b3d3bb4ad123fc9f648f0e397b2eddd88dc0c02 by Derek Mauro <dmauro@google.com>:
Fix race in AddressIsReadable file descriptors using stronger memory ordering
PiperOrigin-RevId: 336874423
--
1d8bf23747009cca29129b80c2793bc91443dd55 by Derek Mauro <dmauro@google.com>:
Avoid -Wundef warnings on ABSL_HAVE_THREAD_LOCAL
PiperOrigin-RevId: 336792406
--
562a480f029c600c1d3b1428da6a9b09e8952a74 by Derek Mauro <dmauro@google.com>:
Fix preprocessor condition for symbols __tsan_mutex_read_lock and
__tsan_mutex_try_lock
PiperOrigin-RevId: 336732571
GitOrigin-RevId: 5bd06440e700fefd6eadd577d7d69c51f15c63e0
Change-Id: Id9bb331baec74b9d80c7b228959a7739bc30e694