aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix missing includes/dependenciesDerek Mauro2023-02-029-0/+12
| | | | | PiperOrigin-RevId: 506622658 Change-Id: I17ae2d97a6cadb7bdd8ebd0ec0dd3976568cb7e1
* Get rid of tail padding within `absl::Duration`. This reduces memory usage ↵Abseil Team2023-02-023-101/+21
| | | | | | | needs when storing duration in containers (e.g. `vector<absl::Duration>` uses 25% less memory), and allows classes with `absl::Duration` fields to fit other stuff in memory previously used by tail padding (e.g. `std::optional<absl::Duration>` is now 16 bytes instead of 24). PiperOrigin-RevId: 506568782 Change-Id: Ic9e077f02a80da013fb2d312aff77761b970c07a
* Get rid of tail padding within `absl::Duration`. This reduces memory usage ↵Abseil Team2023-02-023-21/+101
| | | | | | | needs when storing duration in containers (e.g. `vector<absl::Duration>` uses 25% less memory), and allows classes with `absl::Duration` fields to fit other stuff in memory previously used by tail padding (e.g. `std::optional<absl::Duration>` is now 16 bytes instead of 24). PiperOrigin-RevId: 506543503 Change-Id: Ifeb2397c953a5d3da317a70ab49a3ebb85042344
* Delete unused Futex methodsDerek Mauro2023-02-011-25/+0
| | | | | PiperOrigin-RevId: 506323250 Change-Id: I0f7d4532c19088b011740ceff87ecec55cc34edb
* Rollforward: in sanitizer mode, detect when references become invalidated by ↵Evan Brown2023-02-015-9/+72
| | | | | | | | | randomly rehashing on insertions when there is no reserved growth. Rollforward of ed59f62f8bbc5f05bcba2f89ee16f107e03813f2 PiperOrigin-RevId: 506314970 Change-Id: I7a654aef36bb169da9ea5c618789ee771f05fe28
* Add const qualifier to c_binary_search Sequence.Abseil Team2023-01-311-2/+3
| | | | | PiperOrigin-RevId: 506151912 Change-Id: I388884b0bd80ef0f8a0b3d3c7d0e1b404ddfb742
* Rollback in sanitizer mode, detect when references become invalidated by ↵Abseil Team2023-01-315-72/+9
| | | | | | | | | randomly rehashing on insertions when there is no reserved growth. Rollback of ed59f62f8bbc5f05bcba2f89ee16f107e03813f2 PiperOrigin-RevId: 506003574 Change-Id: I1766321f279a3226e2821e0390387d5639d28964
* In sanitizer mode, detect when references become invalidated by randomly ↵Evan Brown2023-01-305-9/+72
| | | | | | | rehashing on insertions when there is no reserved growth. PiperOrigin-RevId: 505807487 Change-Id: I9051a04f6a75e579d16e9ae8defd404bcc377fba
* The type of MINSIGSTKSZ is not guaranteed; avoid potential implicit sign ↵Abseil Team2023-01-281-1/+1
| | | | | | | | | conversion. On some glibcs, this is defined as a call to sysconf(), which returns a long. PiperOrigin-RevId: 505380003 Change-Id: I53207846d733d3a529630a6aff9bca425cf90a21
* Replace absl::base_internal::Prefetch* calls with absl::Prefetch* callsMartijn Vels2023-01-279-46/+58
| | | | | PiperOrigin-RevId: 505184961 Change-Id: I64482558a76abda6896bec4b2d323833b6cd7edf
* Adds `AbslStringify` support to `absl::Hex` and `absl::Dec`Phoebe Liang2023-01-272-52/+55
| | | | | | | | | | | | | `absl::Hex` and `absl::Dec` are now stringifiable through `AbslStringify`. This means that they can be passed to logging, `absl::StrFormat`, `absl::StrCat` and `absl::Substitute`. Note that this change will break unsupported usages of `absl::AlphaNum`. `absl::AlphaNum` is not intended to be instantiated as a stack variable due to lifetime issues. Unsupported usages include: * constructing an `absl::AlphaNum` as a local variable. * For example, `absl::AlphaNum a = absl::Hex(...);` * declaring an `absl::AlphaNum` as a member variable Usage of `absl::AlphaNum` as a function parameter will continue to be supported. PiperOrigin-RevId: 505158534 Change-Id: Idecdf0b3d137482e86b393c7480229343d68eb36
* Merge pull request #1371 from fahhem:mingw_supportCopybara-Service2023-01-262-0/+12
|\ | | | | | | | | PiperOrigin-RevId: 504981951 Change-Id: I7357e8e6730ceda458b40aa605cd450e80271dc6
| * Pass correct flags for mingw to use bcryptFahrzin Hemmati2023-01-251-0/+4
| |
| * Add mingw as a config_settingFahrzin Hemmati2023-01-251-0/+8
| |
* | Introduce Abseil Prefetch APIMartijn Vels2023-01-265-9/+272
| | | | | | | | | | PiperOrigin-RevId: 504941246 Change-Id: I94c1e85afd254e84948477b511d41eeb8285fdae
* | Add lifetime annotations to AlphaNum.Abseil Team2023-01-261-8/+14
| | | | | | | | | | PiperOrigin-RevId: 504866618 Change-Id: I9519299946c693ae1bedd769a25a9cb5137f2f54
* | Cord does not need its str_format dependencyDerek Mauro2023-01-262-2/+0
| | | | | | | | | | | | | | Fixes #1360 PiperOrigin-RevId: 504850733 Change-Id: Ifa1e83d0c703ed69c969a12076db474caec9d496
* | Make `SanitizerSafeCopy()` constexpr, and check for constant evaluationMartijn Vels2023-01-251-8/+12
|/ | | | | PiperOrigin-RevId: 504728034 Change-Id: Ifb338247b7484426e25a58580783a1d70d27e6fd
* Separate DLL export/import for test helpers dll, and fix typo.Mike Kruskal2023-01-253-9/+26
| | | | | | | The DLL export issue isn't a problem currently, since we don't explicitly export any symbols from the test dll. This will be an issue in the future though. Additionally, there was a typo in absl_internal_test_dll_contains that caused abseil_test_dll to be empty (and therefore not create a lib file). PiperOrigin-RevId: 504555797 Change-Id: Ic7b50bcbe704f7c8fd44028071abcf5d6babb2cf
* Add memory sanitizer to absl::CordMartijn Vels2023-01-254-30/+229
| | | | | PiperOrigin-RevId: 504555535 Change-Id: Id40484e9f52c87e9d67def2735ee60481ca50526
* Fix typo in previous AbseilDLL changes, and enable testing.Mike Kruskal2023-01-241-1/+1
| | | | | | | This broke builds of abseil_test_dll, since CMake can't find the file we incorrectly specified. PiperOrigin-RevId: 504372451 Change-Id: I6cd5a44f12bb2f473fae2ac920e047e782ae9524
* Work around GCC -Wuninitialized when initializing a span from an ↵Andy Getzendanner2023-01-241-1/+2
| | | | | | | | | uninitialized array in logging. It's uninitialized on purpose; we'll write into it through the span. PiperOrigin-RevId: 504318917 Change-Id: I79835f0190253b8b470b3ca404f3979715f2a718
* Include Abseil logging in windows dll, and add a test helper dll.Mike Kruskal2023-01-245-21/+168
| | | | | | | This was tested with https://github.com/protocolbuffers/protobuf/pull/11623 in Protobuf's windows shared library build. PiperOrigin-RevId: 504294227 Change-Id: I9657197e649a334585bffa2c7bc6340cd2354e84
* Sort CMakeList deps for raw_hash_set and raw_hash_set_test.Evan Brown2023-01-231-5/+5
| | | | | PiperOrigin-RevId: 504045295 Change-Id: I110d4573087358e17a719def29e8037adfac6d15
* Use const references in Standard Library algorithms range adapters where ↵Abseil Team2023-01-231-52/+51
| | | | | | | | | possible. Const references enforce stronger constraints and are consistent with the standard library signature. There should be no performance loss. PiperOrigin-RevId: 504043141 Change-Id: I6c4b017665a462fc04e16f425d330fce2c3da227
* absl: harden stack bounds checkAbseil Team2023-01-231-6/+14
| | | | | | | | Ensure that we know both real low and high stack bounds when relying on the stack bounds check. PiperOrigin-RevId: 504003431 Change-Id: I8f6e6b75f5edff233d3cf80285f81b53f9080a0f
* Fix pkgconfig generation broken by 14abd930c61ef3ad2842f5c6b7ea60693b0d4ff9Derek Mauro2023-01-221-1/+3
| | | | | | | In the non-dll case, don't set the LNK_LIB variable in the deps loop. PiperOrigin-RevId: 503854597 Change-Id: Ic57711c1ed95b998e6ca4f27a0a7982ee99595e2
* Update absl::allocator_traits and absl::pointer_traits to alwaysDerek Mauro2023-01-202-683/+20
| | | | | | | | | | | | | | | | | | | use std::allocator_traits and std::pointer traits. Note that the reason given in the comments for these implementations was incorrect. Both of these exist in C++11, but not all compilers had working implementations, so Abseil backfiled them. All supported compilers now have working implementations. https://en.cppreference.com/w/cpp/memory/allocator_traits https://en.cppreference.com/w/cpp/memory/pointer_traits Documentation has been updated to recommend the std:: spellings. Fixes #1366 PiperOrigin-RevId: 503532746 Change-Id: Ia437f65a4c752581195dc582a41831b479d096c6
* Add CodegenAbslRawHashSetStringFindNeEnd function, which is useful because ↵Evan Brown2023-01-201-0/+8
| | | | | | | the find isn't inlined but the iterator comparison is. PiperOrigin-RevId: 503473637 Change-Id: I02b8d95b7a1b738314c4f07a863c7606f822f079
* Add absl::is_constant_evaluated for pre-c++20 supportMartijn Vels2023-01-205-0/+86
| | | | | PiperOrigin-RevId: 503437019 Change-Id: I3630fec690f1472130fef21b16dfcd3c5208aa69
* absl: add a stack unwinding testAbseil Team2023-01-204-2/+88
| | | | | | | | | | | | | | | END_PUBLIC absl: relax frame size check in x86 stack unwinding Currently the unwinder stops whenever it sees a frame >100000 bytes. There may be such legitimate frames, the default stack size is O(megabytes). Only do this check if we are not within the thread stack bounds. The thread stack is assumed to be readable, so the worst thing that can happen if the large stack frame is actually bogus is that we will add one/few wrong frames and stop. PiperOrigin-RevId: 503374764 Change-Id: Icabb55d6468b12a42bf026c37c98dbe84977e659
* Update the Abseil minumum GCC version to GCC 7, which isDerek Mauro2023-01-192-4/+4
| | | | | | | | the earliest supported GCC version according to https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md PiperOrigin-RevId: 503337021 Change-Id: Ibc7b2453b7aa30779b76e2a4ad918e39d0efcabe
* Turn off the new GCC 13 warning for -Wself-move in tests sinceDerek Mauro2023-01-193-0/+3
| | | | | | | we intentionally test this behavior PiperOrigin-RevId: 503234578 Change-Id: Ic42c2e55e03843af7a36f99debb5ebcf7baec0fe
* Add missing include and remove unused includesDerek Mauro2023-01-191-2/+1
| | | | | PiperOrigin-RevId: 503229681 Change-Id: I72817b43c547bd142144d0887866c4e26ec09fb2
* Doc fix: state that Base64Escape does in fact produce padding. While at it, ↵Abseil Team2023-01-191-5/+4
| | | | | | | harmonize Base64Unescape and WebSafeBase64Unescape's documentation of padding. PiperOrigin-RevId: 503178146 Change-Id: Id216044a9f6520653e2fa3a4505ff05eddf55659
* Only enable cordz on Linux with thread_local supportDerek Mauro2023-01-191-12/+4
| | | | | | | Fixes #1365 PiperOrigin-RevId: 503160321 Change-Id: I210f194373c3e08a75d68298a8482be5f1f2227c
* Minor formatting: Fix misplaced space.Abseil Team2023-01-191-1/+1
| | | | | PiperOrigin-RevId: 503110285 Change-Id: I59c48b1486386e2db8fb62cf8bfa1a691865f704
* Use absl::string_view by value rather than by const reference while ↵Abseil Team2023-01-192-5/+5
| | | | | | | iterating over collections. PiperOrigin-RevId: 503088193 Change-Id: Ic1f239f3b0427e0fea1643ec0ce7baff45ad647d
* Clarify contract of AlphaNum as only a function parameter typeTom Manshreck2023-01-181-2/+4
| | | | | PiperOrigin-RevId: 502901875 Change-Id: I1c8c097e5c81a9e413692109ebfe0d0b24f50f2e
* extern-ify NullGuard's "(null)" strings to save linker input bytes.Andy Getzendanner2023-01-174-7/+47
| | | | | PiperOrigin-RevId: 502689876 Change-Id: If75b00e2e257283b60c41411ef7a60dbd7cd8c6d
* Optimize RemoveCrc32cSuffix.Abseil Team2023-01-171-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation can be optimized to not having to perform an ExtendByZero operation. `RemoveCrc32cSuffix` can simply be implemented as uint32_t result = static_cast<uint32_t>(full_string_crc) ^ static_cast<uint32_t>(suffix_crc); CrcEngine()->UnextendByZeroes(&result, suffix_len); return crc32c_t{result}; Math proof that this change is correct: `ComputeCrc32c` actually computes the following: ConditionedCRC(data) = UnconditionedCRC(data) + StartValue(data) + ~0 with: StartValue(data) = ~0 * x**BitLength(data) mod P (with `+` being a carry-less add, ie an xor). ``UnconditionedCRC` in the context of this description means: no initial or final xor with ~0 and a starting value of zero - ie the result that `CrcEngine()->Extend` would give you with a starting value of 0. Given `full_string_crc` and `suffix_crc` (both conditioned CRCs), xoring them together results in: (1): full_string_crc + suffix_crc = UnconditionedCRC(full_string) + StartValue(full_string) + ~0 + UnconditionedCRC(suffix) + StartValue(suffix) + ~0 Since `+` is carry-less addition (ie an XOR), the two ~0 cancel each other out. (2) full_string_crc + suffix_crc = UnconditionedCRC(full_string) + StartValue(full_string) + UnconditionedCRC(suffix) + StartValue(suffix) We can make use of the fact that: (3) UnconditionedCRC(full_string) + UnConditionedCRC(suffix) = UnconditionedCRC(full_string_with_suffix_replaced_by_zeros). Ie, UnconditionedCRC("AABBB") + UnconditionedCRC("BBB") = UnconditionedCRC("AA\0\0\0") Putting (3) into (2) yields: (4) full_string_crc + suffix_crc = UnconditionedCRC(full_string_with_suffix_replaced_by_zeros) + StartValue(full_string) + StartValue(suffix) Using: (5) UnconditionedCRC(full_string_with_suffix_replaced_by_zeros) = UnconditionedCRC(full_string_without_suffix) * x**Bitlength(suffix) mod P and putting (5) into (4) (6) full_string_crc + suffix_crc = UnconditionedCRC(full_string_without_suffix) * x**Bitlength(suffix) mod P + StartValue(full_string) + StartValue(suffix) Using (7) StartValue(full_string) = ~0 * x ** Bitlength(full_string) mod P and (8) StartValue(suffix) = ~0 * x**BitLength(suffix) mod P Putting (7) and (8) in (6): (9): full_string_crc + suffix_crc = UnconditionedCRC(full_string_without_suffix) * x**(Bitlength(suffix)) mod P + ~0 * x ** Bitlength(full_string) mod P + ~0 * x ** BitLength(suffix) mod P Using: (10) Bitlength(full_string) = Bitlength(full_string_without_suffix) + Bitlength(suffix) And putting (10) in (9): (11) full_string_crc + suffix_crc = UnconditionedCRC(full_string_without_suffix) * x**(Bitlength(suffix)) mod P + ~0 * x ** (Bitlength(full_string_without_suffix) + Bitlength(suffix)) mod P + ~0 * x ** BitLength(suffix) mod P using x**(A+B) = x**A * x**B results in: (12) full_string_crc + suffix_crc = UnconditionedCRC(full_string_without_suffix) * x**(Bitlength(suffix)) mod P + [ ~0 * x ** Bitlength(full_string_without_suffix) * x**Bitlength(suffix)] mod P + ~0 * x ** BitLength(suffix) mod P using A mod P + B mod P + C mod P = (A + B + C) mod P: (this works in carry-less arithmetic) (13) full_string_crc + suffix_crc = [ UnconditionedCRC(full_string_without_suffix) * x**(Bitlength(suffix)) + [ ~0 * x ** Bitlength(full_string_without_suffix) * x**Bitlength(suffix)] + ~0 * x ** BitLength(suffix) ] mod P Factor out x**Bitlength(suffix): (14) full_string_crc + suffix_crc = [ x**(Bitlength(suffix)) * [ UnconditionedCRC(full_string_without_suffix) + ~0 * x ** Bitlength(full_string_without_suffix) + ~0 ] mod P Using: (15) ConditionedCRC(full_string_without_suffix) = [ UnconditionedCRC(full_string_without_suffix) + ~0 * x ** Bitlength(full_string_without_suffix) ] mod P + ~0 = [ UnconditionedCRC(full_string_without_suffix) + ~0 * x ** Bitlength(full_string_without_suffix) + ~0] mod P (~0 is less than x**32, so ~0 mod P = ~0) Putting (15) in (14) results in: full_string_crc + suffix_crc = [ x**(Bitlength(suffix)) * ConditionedCRC(full_string_without_suffix)] mod P Or: (16) ConditionedCRC(full_string_without_suffix) = (full_string_crc + suffix_crc) * x**(-Bitlength(suffix)) mod P A multiplication by x**(-8*bytelength) mod P is implemented by `CrcEngine()->UnextendByZeros`. PiperOrigin-RevId: 502659140 Change-Id: I66b0700d258f948be0885f691370b73d7fad56e3
* In sanitizer mode, detect when references become invalidated after reserved ↵Evan Brown2023-01-172-10/+43
| | | | | | | growth runs out. PiperOrigin-RevId: 502625638 Change-Id: I1c06b2162dbdaaa6a36cea503ac6d07cd157b2e2
* Tweak the compilation condition for IsHashableTest.PoisonHashDerek Mauro2023-01-171-2/+2
| | | | | | | #1359 PiperOrigin-RevId: 502597369 Change-Id: I5d65ed7e2dbe4b51ebce47f282ead89d91d919cd
* Use NullGuard for signed and unsigned char pointer types, and extend ↵Andy Getzendanner2023-01-132-9/+43
| | | | | | | volatile pointer type testcase to char pointers. PiperOrigin-RevId: 501781539 Change-Id: I99012cecd960745de8a921b96671cde42e28a3af
* Replace the tag "no_test_msvc_x64" with "no_test_lexan" in absl.Abseil Team2023-01-124-16/+4
| | | | | PiperOrigin-RevId: 501644407 Change-Id: Ie98d22e4983cfbd9cad2176925774d624d4702cf
* Don't use Arm vector intrinsics when compiling with CUDA in device mode.Abseil Team2023-01-111-1/+1
| | | | | PiperOrigin-RevId: 501464530 Change-Id: I5a0929a2b88c1c158b1696634a65ffda9c4b8590
* Improve BitGen stability documentationAbseil Team2023-01-111-6/+6
| | | | | | | | | | | | | | Several problems with the previous documentation: * It said it's stable "within the same binary" but not stable "across multiple binary invocations". Those statements contradict each other. * It said "in the same binary will not produce the same sequence of variates within the same binary", which is repetitive since it says "in the same binary" twice. * The comments about the seed sequence were not all next to each other, they were split apart by a rand.req.urng comment. * It implied that process stability is all you get, whereas generally you also get changelist stability. * It said you can use a seed sequence with SharedBitGen, but you can't. * It said there is more info in std_seed_seq.h , but there isn't. PiperOrigin-RevId: 501389708 Change-Id: I5e3dbc3548cc051265b8d004191c23147eccecc3
* Import of CCTZ from GitHub.Abseil Team2023-01-111-1/+2
| | | | | PiperOrigin-RevId: 501343076 Change-Id: I12e04a87b9a90951f9b52bd9690cce28d03b0f29
* Update Abseil dependenciesDerek Mauro2023-01-112-16/+17
| | | | | PiperOrigin-RevId: 501294426 Change-Id: Ic580a2f31b4a98b1dd3eb21f3279fda4cd4a5977
* Refactor InlineData to allow for memory sanitizer changes step 2Martijn Vels2023-01-103-53/+68
| | | | | PiperOrigin-RevId: 501074382 Change-Id: I26a59ee6452855685ffe89469c352e6384060f59